/* ========================================
   Carenox — Shared Components
   Navigation, Footer, Buttons, Sections
   ======================================== */

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 14px 28px;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: all var(--transition);
    cursor: pointer;
    border: none;
    font-family: var(--font-body);
}

.btn-primary {
    background: var(--text-primary);
    color: #fffdf8;
}

.btn-primary:hover {
    background: #2d655b;
    color: #fff;
    box-shadow: 0 12px 28px rgba(45, 101, 91, 0.18);
}

.btn-ghost,
.btn-outline-light {
    background: rgba(255, 255, 255, 0.38);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-ghost:hover,
.btn-outline-light:hover {
    background: #fff;
    border-color: #86ac9f;
    color: var(--text-primary);
}

.btn-lg {
    padding: 16px 40px;
    font-size: 1rem;
}

/* ========================================
   Navigation — Liquid Glass
   ======================================== */
.nav {
    position: fixed;
    top: 14px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(1280px, calc(100% - 40px));
    z-index: var(--z-nav);
    isolation: isolate;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(22px) saturate(175%) contrast(108%);
    -webkit-backdrop-filter: blur(22px) saturate(175%) contrast(108%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.92),
        inset 0 -1px 0 rgba(28, 53, 46, 0.16),
        inset 1px 0 0 rgba(255, 255, 255, 0.42),
        inset -1px 0 0 rgba(28, 53, 46, 0.08),
        0 14px 42px rgba(31, 54, 47, 0.12);
    transition: all var(--transition);
}

.nav::before,
.nav::after {
    content: "";
    position: absolute;
    pointer-events: none;
    border-radius: inherit;
}

.nav::before {
    z-index: -1;
    inset: 2px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background:
        linear-gradient(105deg, rgba(255, 255, 255, 0.22), transparent 28%, transparent 72%, rgba(255, 255, 255, 0.1)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(45, 72, 64, 0.04));
}

.nav::after {
    z-index: 2;
    top: 2px;
    left: 5%;
    right: 5%;
    height: 42%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), transparent);
    filter: blur(8px);
    opacity: 0.7;
}

.nav.scrolled {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.78);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.96),
        inset 0 -1px 0 rgba(28, 53, 46, 0.2),
        inset 1px 0 0 rgba(255, 255, 255, 0.48),
        inset -1px 0 0 rgba(28, 53, 46, 0.1),
        0 18px 48px rgba(31, 54, 47, 0.16);
}

.nav-inner {
    position: relative;
    z-index: 3;
    max-width: 1200px;
    margin: 0 auto;
    padding-inline: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 66px;
}

.nav-logo-img {
    height: 34px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 4px;
}

.nav-links a {
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #334f47;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.68);
    background: rgba(255, 255, 255, 0.26);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.88),
        inset 0 -1px 0 rgba(28, 53, 46, 0.11),
        0 5px 14px rgba(31, 54, 47, 0.08);
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.78);
    background: rgba(255, 255, 255, 0.3);
    color: var(--text-primary);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.96),
        inset 0 -1px 0 rgba(28, 53, 46, 0.16),
        0 7px 18px rgba(31, 54, 47, 0.1);
    transition: all var(--transition);
}

.nav-cta:hover {
    border-color: rgba(255, 255, 255, 0.94);
    background: rgba(255, 255, 255, 0.44);
    color: var(--text-primary);
    box-shadow:
        inset 0 1px 0 #fff,
        inset 0 -1px 0 rgba(28, 53, 46, 0.18),
        0 10px 24px rgba(31, 54, 47, 0.14);
}

.nav-phone {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast);
}

.nav-phone:hover {
    color: var(--accent);
}

.nav-mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-mobile-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* ========================================
   Sections
   ======================================== */
.section {
    padding: clamp(88px, 10vw, 136px) 0;
}

.section-dark {
    background: #e8eee8;
    color: var(--text-primary);
}

.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto clamp(44px, 6vw, 70px);
}

.section-header-light .section-title,
.section-header-light .section-desc {
    color: inherit;
}

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border: 1px solid rgba(57, 124, 112, 0.16);
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.4);
    color: #397c70;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-display);
    max-width: 820px;
    font-size: clamp(2.15rem, 4.5vw, 3.65rem);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 1.08;
    margin-bottom: 16px;
}

.section-desc {
    max-width: 720px;
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    padding: 80px 0 40px;
    background: #263c35;
    color: #edf2ef;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-logo-img {
    width: 168px;
    height: auto;
}

.footer-brand p {
    font-size: 0.875rem;
    color: #b9c8c1;
    line-height: 1.7;
}

.footer-links-title {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #edf2ef;
    margin-bottom: 16px;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a,
.footer-links li {
    font-size: 0.875rem;
    color: #b9c8c1;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    font-size: 0.8125rem;
    color: #b9c8c1;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: #b9c8c1;
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.footer-social svg {
    width: 18px;
    height: 18px;
}

/* ========================================
   Responsive — Shared Components
   ======================================== */
@media (max-width: 768px) {
    html, body {
        width: 100%;
        max-width: 100%;
        overflow-x: clip;
    }

    .nav {
        width: calc(100% - 16px);
        left: 50%;
        right: auto;
        top: 8px;
        border-radius: 18px;
    }

    .nav-inner {
        height: 60px;
        padding-inline: 14px;
    }

    .nav-links {
        display: none;
    }

    .nav-cta {
        display: none;
    }

    .nav-phone {
        display: none;
    }

    .nav-mobile-toggle {
        display: flex;
    }

    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        gap: 4px;
        padding: 12px;
        border: 1px solid rgba(220, 220, 220, 0.9);
        border-radius: 15px;
        background: #ffffff;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        box-shadow:
            0 18px 38px rgba(31, 54, 47, 0.18);
    }

    .nav-links.active a {
        padding: 13px 14px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
    }
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}
