/*
 * RCAST public foundation
 * Shared visual tokens and typography for unauthenticated pages.
 * Page-specific layouts remain in homepage.css and the legacy page styles.
 */

:root {
    --rcast-green: #328e32;
    --rcast-green-dark: #246f27;
    --rcast-green-soft: #eaf5eb;
    --rcast-ink: #14232c;
    --rcast-text: #465760;
    --rcast-muted: #6f7f87;
    --rcast-surface: #ffffff;
    --rcast-soft: #f4f8f5;
    --rcast-line: #dfe8e2;
    --rcast-radius: 12px;
    --rcast-shadow: 0 16px 42px rgba(20, 35, 44, .09);
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body.rcast-theme,
body.rcast-theme button,
body.rcast-theme input,
body.rcast-theme select,
body.rcast-theme textarea {
    font-family: "Poppins", sans-serif !important;
}

body.rcast-public {
    background: var(--rcast-surface);
    color: var(--rcast-text);
    font-size: 16px;
    line-height: 1.7;
}

body.rcast-public *,
body.rcast-public *::before,
body.rcast-public *::after {
    box-sizing: border-box;
}

body.rcast-public img {
    height: auto;
    max-width: 100%;
}

body.rcast-public h1,
body.rcast-public h2,
body.rcast-public h3,
body.rcast-public h4,
body.rcast-public h5,
body.rcast-public h6 {
    color: var(--rcast-ink);
    font-family: "Poppins", sans-serif !important;
    font-weight: 800;
    line-height: 1.2;
}

body.rcast-public p,
body.rcast-public li {
    font-family: "Poppins", sans-serif !important;
}

body.rcast-public a {
    transition: color .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

body.rcast-public a:focus-visible,
body.rcast-public button:focus-visible,
body.rcast-public input:focus-visible,
body.rcast-public select:focus-visible,
body.rcast-public textarea:focus-visible {
    outline: 3px solid rgba(50, 142, 50, .24);
    outline-offset: 2px;
}

body.rcast-public ::selection {
    background: var(--rcast-green);
    color: #fff;
}

/* Shared legacy section headings until each page receives the new components. */
body.rcast-public .default-title h1,
body.rcast-public .default-title h2,
body.rcast-public .default-title h3,
body.rcast-public .PageHead h1,
body.rcast-public .PageHead h2,
body.rcast-public .PageHead h3 {
    color: var(--rcast-ink);
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -.025em;
    line-height: 1.22;
}

body.rcast-public .default-title > p,
body.rcast-public .PageHead > p,
body.rcast-public .PageHead > div > p {
    color: var(--rcast-muted);
    font-size: 16px;
    line-height: 1.72;
}

/* Reusable public primitives for the staged page migration. */
.rcast-section {
    padding: 88px 0;
}

.rcast-section--soft {
    background: var(--rcast-soft);
}

.rcast-section-head {
    margin: 0 auto 44px;
    max-width: 760px;
    text-align: center;
}

.rcast-section-head h2 {
    font-size: 36px;
    margin: 0 0 16px;
}

.rcast-section-head p {
    color: var(--rcast-muted);
    font-size: 16px;
    line-height: 1.72;
    margin: 0;
}

.rcast-card {
    background: var(--rcast-surface);
    border: 1px solid var(--rcast-line);
    border-radius: var(--rcast-radius);
    box-shadow: var(--rcast-shadow);
}

.rcast-button {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    display: inline-flex;
    font-size: 14px;
    font-weight: 700;
    justify-content: center;
    min-height: 46px;
    padding: 11px 20px;
    text-decoration: none !important;
}

.rcast-button--primary {
    background: var(--rcast-green);
    color: #fff !important;
}

.rcast-button--primary:hover,
.rcast-button--primary:focus {
    background: var(--rcast-green-dark);
    color: #fff !important;
}

body.rcast-public .form-control {
    border: 1px solid #d8e2dc;
    border-radius: 7px;
    box-shadow: none;
    color: var(--rcast-ink);
    font-size: 14px;
    min-height: 44px;
}

body.rcast-public textarea.form-control {
    min-height: 120px;
}

body.rcast-public .form-control:focus {
    border-color: var(--rcast-green);
    box-shadow: 0 0 0 3px rgba(50, 142, 50, .12);
}

body.rcast-public .btn-success,
body.rcast-public .btn-primary {
    background-color: var(--rcast-green);
    border-color: var(--rcast-green);
}

body.rcast-public .btn-success:hover,
body.rcast-public .btn-success:focus,
body.rcast-public .btn-primary:hover,
body.rcast-public .btn-primary:focus {
    background-color: var(--rcast-green-dark);
    border-color: var(--rcast-green-dark);
}

/* RCAST palette for the shared navigation shell. */
body.rcast-theme nav.navbar.bootsnav ul.nav > li > a:hover,
body.rcast-theme nav.navbar.bootsnav ul.nav > li > a:focus,
body.rcast-theme nav.navbar.bootsnav ul.nav > li.open > a,
body.rcast-theme nav.navbar.bootsnav ul.nav > li.active > a,
body.rcast-theme .navbar .rdj-mobile-account-toggle > ul > li > a:hover,
body.rcast-theme .navbar .rdj-mobile-account-toggle > ul > li > a:focus {
    color: #73c477 !important;
}

body.rcast-theme .navbar .rdj-mobile-account-toggle > ul > li.side-menu > a {
    color: #73c477 !important;
}

body.rcast-theme .navbar .rdj-desktop-cart > a:hover > i,
body.rcast-theme .navbar .rdj-desktop-cart > a:focus > i,
body.rcast-theme .navbar .rdj-main-account > a:hover > .fa-user-circle-o,
body.rcast-theme .navbar .rdj-main-account > a:focus > .fa-user-circle-o {
    color: #73c477 !important;
}

@media (max-width: 991px) {
    .rcast-section {
        padding: 68px 0;
    }
}

@media (max-width: 767px) {
    body.rcast-public {
        font-size: 15px;
    }

    body.rcast-public .default-title h1,
    body.rcast-public .default-title h2,
    body.rcast-public .default-title h3,
    body.rcast-public .PageHead h1,
    body.rcast-public .PageHead h2,
    body.rcast-public .PageHead h3,
    .rcast-section-head h2 {
        font-size: 28px;
    }

    body.rcast-public .default-title > p,
    body.rcast-public .PageHead > p,
    body.rcast-public .PageHead > div > p,
    .rcast-section-head p {
        font-size: 15px;
    }

    .rcast-section {
        padding: 52px 0;
    }

    .rcast-section-head {
        margin-bottom: 32px;
    }
}
