/* ===========================
   GLOBAL — Variables, Reset, Typography, Container
   =========================== */

html {
    scroll-behavior: smooth;
}

:root {
    --accent: #2ecc71;
    --dark: #2b2b2b;
    --light: #f9f9f9;
    --text: #333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter", Arial, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background-color: white;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

/* ===========================
   LAYOUT — Header, Nav, Footer
   =========================== */

/* --- HEADER & NAV --- */
header {
    background: white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 10;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
}

nav a {
    margin-left: 1.5rem;
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--accent);
}

/* --- NAV TOGGLE (hamburger) --- */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 20;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--dark);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* --- RESPONSIVE NAV --- */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        padding: 1rem 0;
        z-index: 15;
    }

    nav.nav-open {
        display: flex;
    }

    nav a {
        margin-left: 0;
        padding: 0.75rem 1.5rem;
        border-bottom: 1px solid #f0f0f0;
        text-align: center;
    }

    nav .btn-nav {
        margin: 0.5rem 1.5rem;
        text-align: center;
    }

    header {
        position: sticky;
    }

    header .nav {
        position: relative;
    }
}

/* --- FOOTER --- */
footer {
    background: var(--dark);
    color: white;
    text-align: center;
    padding: 1.2rem 0;
    font-size: 0.9rem;
    margin-top: 3rem;
}

.footer-links {
    margin-bottom: 0.6rem;
}

.footer-links a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    font-size: 0.85rem;
}

.footer-links a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-sep {
    color: #666;
    margin: 0 0.6rem;
    font-size: 0.85rem;
}

/* Footer reviews link with star badge */
.footer-reviews-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.footer-reviews-badge {
    color: #f1c40f;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* ===========================
   SHARED COMPONENTS — Buttons, Sections, Forms, Modals, Promo Bar
   =========================== */

/* --- BUTTONS --- */
.btn {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 0.8rem 1.6rem;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s;
}

.btn:hover {
    background: #27ae60;
}

.btn-nav {
    padding: 0.45rem 1.1rem;
    font-size: 0.9rem;
    border-radius: 6px;
    margin-left: 1rem;
    vertical-align: middle;
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    transition: background 0.2s, color 0.2s;
}

.btn-outline:hover {
    background: var(--accent);
    color: white;
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.82rem;
    white-space: nowrap;
}

.btn-full {
    width: 100%;
    text-align: center;
    padding: 0.75rem;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
}

.btn-full:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* --- SECTIONS --- */
section {
    padding: 4rem 0;
    text-align: center;
}

section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

/* --- AUTH FORMS (shared by modal & auth pages) --- */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.form-group label {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
    color: var(--dark);
}

.form-group input {
    padding: 0.7rem 0.9rem;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.15);
}

.form-error {
    color: #e74c3c;
    font-size: 0.85rem;
    min-height: 1.2em;
}

.form-success {
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    min-height: 1.2em;
}

/* --- MODAL (shared) --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(3px);
}

.modal {
    background: white;
    border-radius: 12px;
    padding: 2.5rem 2rem 2rem;
    width: 90%;
    max-width: 420px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: modalIn 0.25s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 0.8rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #999;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--dark);
}

.modal-tabs {
    display: flex;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #eee;
}

.modal-tab {
    flex: 1;
    padding: 0.75rem;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: #999;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.modal-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.modal-tab:hover {
    color: var(--dark);
}

@media (max-width: 768px) {
    .modal {
        width: 95%;
        padding: 2rem 1.2rem 1.5rem;
    }
}

/* --- LEGAL MODALS --- */
.modal-legal {
    max-width: 700px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    padding: 2rem 2rem 1.5rem;
}

.legal-content {
    overflow-y: auto;
    padding-right: 0.5rem;
    text-align: left;
}

.legal-content h2 {
    font-size: 1.35rem;
    color: var(--dark);
    margin-bottom: 0.3rem;
    text-align: center;
}

.legal-content .legal-meta {
    text-align: center;
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.legal-content h3 {
    font-size: 1rem;
    color: var(--accent);
    margin-top: 1.3rem;
    margin-bottom: 0.4rem;
}

.legal-content .legal-heading {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent);
    margin-top: 1.3rem;
    margin-bottom: 0.4rem;
}

.legal-content p {
    font-size: 0.9rem;
    color: #444;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.legal-content ul {
    margin: 0.3rem 0 0.7rem 1.5rem;
    font-size: 0.9rem;
    color: #444;
    line-height: 1.6;
}

.legal-content ul li {
    margin-bottom: 0.25rem;
}

.legal-content a {
    color: var(--accent);
    font-weight: 600;
}

.legal-content .legal-contact {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    font-weight: 600;
}

/* Legal content scrollbar */
.legal-content::-webkit-scrollbar {
    width: 6px;
}

.legal-content::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 3px;
}

.legal-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.legal-content::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* --- PROMO BAR (site-wide, under header) --- */
.promo-bar {
    --promo-bg-start: var(--promo-bg, #2ecc71);
    --promo-bg-end: #1abc9c;
    background: linear-gradient(135deg, var(--promo-bg-start) 0%, var(--promo-bg-end) 50%, var(--promo-bg-start) 100%);
    background-size: 200% 200%;
    animation: promoGradientShift 8s ease infinite;
    color: #fff;
    position: sticky;
    top: var(--header-height, 56px);
    z-index: 9;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 2.5rem 0.65rem 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 100%;
    min-height: 50px;
    overflow: hidden;
}

.promo-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    animation: promoShimmer 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes promoGradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes promoShimmer {
    0% { left: -100%; }
    100% { left: 200%; }
}

.promo-bar-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    max-width: 1100px;
    width: 100%;
}

.promo-bar-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: nowrap;
    width: 100%;
}

.promo-bar-message {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    color: #fff;
    text-align: center;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    flex-shrink: 1;
    min-width: 0;
}

.promo-bar-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #fff;
    color: var(--promo-bg, #2ecc71);
    padding: 0.45rem 1.2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.82rem;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.25s ease;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    flex-shrink: 0;
    animation: promoPulse 2.5s ease-in-out infinite;
}

.promo-bar-cta::after {
    content: '\2192';
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

.promo-bar-cta:hover {
    background: #fff;
    transform: scale(1.06);
    box-shadow: 0 4px 18px rgba(0,0,0,0.2);
    color: var(--promo-bg, #2ecc71);
}

.promo-bar-cta:hover::after {
    transform: translateX(3px);
}

@keyframes promoPulse {
    0%, 100% { box-shadow: 0 2px 12px rgba(0,0,0,0.15); }
    50% { box-shadow: 0 2px 20px rgba(255,255,255,0.35), 0 2px 12px rgba(0,0,0,0.15); }
}

.promo-bar-close {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: none;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.2rem 0.45rem;
    transition: all 0.2s;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.promo-bar-close:hover {
    color: #fff;
    background: rgba(255,255,255,0.3);
}

/* Promo bar timer */
.promo-bar-timer {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    flex-shrink: 0;
}

.promo-timer-unit {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    min-width: 38px;
}

.promo-timer-value {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    padding: 0.3rem 0.45rem;
    min-width: 38px;
    display: inline-block;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.promo-timer-label {
    font-size: 0.55rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    margin-top: 0.2rem;
    letter-spacing: 0.06em;
}

.promo-timer-sep {
    font-size: 1rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1;
    padding: 0 0.05rem;
    margin-bottom: 0.7rem;
}

@media (max-width: 768px) {
    .promo-bar {
        padding: 0.5rem 2rem 0.5rem 0.5rem;
        top: var(--header-height, 52px);
    }

    .promo-bar-inner {
        gap: 0.4rem;
    }

    .promo-bar-content {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    .promo-bar-message {
        font-size: 0.78rem;
        flex-basis: 100%;
        text-align: center;
    }

    .promo-timer-value {
        font-size: 0.95rem;
        min-width: 30px;
        padding: 0.2rem 0.35rem;
    }

    .promo-timer-sep {
        font-size: 0.85rem;
    }

    .promo-timer-unit {
        min-width: 30px;
    }

    .promo-timer-label {
        font-size: 0.5rem;
    }

    .promo-bar-cta {
        font-size: 0.75rem;
        padding: 0.35rem 0.9rem;
    }
}
