/* ============================================
   EL CHILAQUIL - Shared Global Styles
   ============================================ */

/* --- CSS Variables --- */
:root {
    /* Primary - refined red */
    --primary: #C8382A;
    --primary-dark: #A52D20;
    --primary-light: #E05A4A;

    /* Text - charcoal */
    --text-dark: #303a4d;
    --text-body: #4a5568;
    --text-muted: #718096;

    /* Backgrounds */
    --bg-white: #FFFFFF;
    --bg-light: #F9FAFB;
    --bg-section: #F3F4F6;

    /* Accent - warm gold */
    --accent: #E8962A;
    --accent-light: #FCD89D;

    /* Secondary - teal */
    --secondary: #1DB5A0;

    /* Borders */
    --border-light: #E5E7EB;
    --border-medium: #D1D5DB;

    /* Dark - footer only */
    --dark: #1F2937;
    --dark-800: #374151;
    --dark-700: #4B5563;

    /* Legacy compat */
    --white: #FFFFFF;

    /* Fonts */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, sans-serif;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;

    /* Transitions */
    --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-slow: 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background: var(--bg-white);
    line-height: 1.7;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* --- Container --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Section --- */
.section {
    padding: 100px 0;
    position: relative;
}

.section-alt {
    background: var(--bg-section);
}

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-tag {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--primary);
    background: rgba(200, 56, 42, 0.08);
    padding: 6px 20px;
    border-radius: 50px;
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    color: var(--text-dark);
}

.section-title em {
    color: var(--primary);
    font-style: italic;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ============================================
   NAVIGATION
   ============================================ */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 8px 0;
    transition: background 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

/* Home page: starts transparent */
body.page-home #navbar {
    background: transparent;
    border-bottom: 1px solid transparent;
}

body.page-home #navbar.scrolled {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
}

/* Inner pages: starts transparent */
body.page-inner #navbar {
    background: transparent;
    border-bottom: 1px solid transparent;
}

body.page-inner #navbar.scrolled {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
}

/* Scrolled state for all pages */
#navbar.scrolled {
    background: var(--bg-white);
    padding: 10px 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    border-bottom: 1px solid var(--border-light);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo-img {
    height: 90px;
    width: auto;
    transition: filter 0.4s ease;
}

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

.nav-link {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
    background: rgba(255,255,255,0.12);
}

#navbar.scrolled .nav-link {
    color: var(--text-body);
}

#navbar.scrolled .nav-link:hover,
#navbar.scrolled .nav-link.active {
    color: var(--primary);
    background: rgba(200, 56, 42, 0.06);
}

/* Live indicator on Find Us nav link */
.nav-link-live {
    animation: nav-live-pulse 2s ease-in-out infinite;
    border: 1.5px solid var(--secondary);
}

.nav-link-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-link-live::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--secondary);
    flex-shrink: 0;
    animation: nav-live-dot 2s infinite;
}

@keyframes nav-live-pulse {
    0%, 100% { border-color: var(--secondary); box-shadow: 0 0 0 0 rgba(29, 181, 160, 0); }
    50% { border-color: var(--secondary); box-shadow: 0 0 8px 2px rgba(29, 181, 160, 0.35); }
}

@keyframes nav-live-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

#navbar.scrolled .nav-link-live {
    border-color: var(--secondary);
    color: var(--secondary);
    background: rgba(29, 181, 160, 0.06);
}

.nav-btn {
    background: var(--primary);
    color: var(--white) !important;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 50px;
    margin-left: 8px;
    transition: var(--transition);
}

.nav-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(200, 56, 42, 0.3);
}

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

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition);
}

#navbar.scrolled .nav-toggle span {
    background: var(--text-dark);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 14px 36px;
    border-radius: 50px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    letter-spacing: 0.02em;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(200, 56, 42, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--text-dark);
    border: 2px solid var(--border-medium);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.btn-outline-white {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.3);
}

.btn-outline-white:hover {
    border-color: var(--white);
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 10px 24px;
    font-size: 0.85rem;
}

.btn-full {
    width: 100%;
}

/* --- Forms --- */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    font-family: var(--font-body);
    font-size: 0.92rem;
    padding: 12px 16px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--bg-light);
    color: var(--text-dark);
    transition: var(--transition);
    outline: none;
    width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    background: var(--bg-white);
    box-shadow: 0 0 0 4px rgba(200, 56, 42, 0.08);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ============================================
   FOOTER
   ============================================ */
#footer {
    background: var(--dark);
    padding: 72px 0 32px;
    color: var(--white);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand .footer-logo {
    height: 60px;
    width: auto;
    margin-bottom: 16px;
}

.footer-brand p {
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-links h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-links a {
    display: block;
    font-size: 0.88rem;
    color: rgba(255,255,255,0.5);
    padding: 4px 0;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
    transform: translateX(4px);
}

.footer-bottom {
    padding-top: 32px;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.4);
}

/* ============================================
   PAGE HERO (inner pages)
   ============================================ */
.page-hero {
    position: relative;
    height: 55vh;
    min-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.page-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.page-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(31,41,55,0.7), rgba(31,41,55,0.85));
}

.page-hero-content {
    position: relative;
    z-index: 2;
    padding: 0 24px;
    padding-top: 60px;
}

.page-hero-content .section-tag {
    background: rgba(200, 56, 42, 0.2);
    color: var(--primary-light);
    margin-bottom: 12px;
}

.page-hero-content .section-title {
    color: var(--white);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
}

.page-hero-content .section-subtitle {
    color: rgba(255,255,255,0.7);
}

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

    .footer-brand {
        grid-column: span 3;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 72px 0;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(31, 41, 55, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 12px;
        z-index: 1003;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links.open .nav-link {
        color: rgba(255,255,255,0.8) !important;
        font-size: 1.2rem;
        padding: 12px 24px;
    }

    .nav-links.open .nav-link:hover,
    .nav-links.open .nav-link.active {
        color: var(--white) !important;
        background: rgba(255,255,255,0.1) !important;
    }

    .nav-btn {
        margin-left: 0;
        margin-top: 16px;
        font-size: 1rem;
        padding: 14px 40px;
    }

    .nav-logo-img {
        height: 60px;
    }

    .nav-toggle {
        display: flex;
        z-index: 1001;
    }

    /* When mobile menu is open, hamburger lines always white */
    .nav-toggle.active span {
        background: var(--white) !important;
    }

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

    .footer-brand {
        grid-column: span 2;
    }

    .footer-links a {
        padding: 10px 0;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .page-hero {
        min-height: 300px;
    }
}

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

    .footer-brand {
        grid-column: span 1;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form input,
    .newsletter-form button {
        width: 100%;
        border-radius: var(--radius-sm);
    }

    .section {
        padding: 48px 0;
    }
}

/* ============================================
   DARK MODE
   ============================================ */

/* ============================================
   ============================================ */
/* ============================================
   BACK TO TOP BUTTON
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--border-medium);
    background: var(--bg-white);
    color: var(--text-body);
    cursor: pointer;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

/* ============================================
   ANNOUNCEMENT / PROMO BAR
   ============================================ */
.announcement-bar {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    text-align: center;
    padding: 10px 48px 10px 24px;
    font-size: 0.88rem;
    font-weight: 500;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1002;
    letter-spacing: 0.02em;
}

.announcement-bar a {
    color: var(--white);
    text-decoration: underline;
    font-weight: 700;
}

.announcement-bar-close {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 12px 16px;
    min-width: 44px;
    min-height: 44px;
    line-height: 1;
    transition: var(--transition);
}

.announcement-bar-close:hover {
    color: var(--white);
}

/* ============================================
   FLOATING SOCIAL SIDEBAR
   ============================================ */
.social-sidebar {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 998;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.social-sidebar a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-left: none;
    color: var(--text-muted);
    font-size: 1.15rem;
    transition: var(--transition);
}

.social-sidebar a:first-child {
    border-radius: 0 var(--radius-sm) 0 0;
}

.social-sidebar a:last-child {
    border-radius: 0 0 var(--radius-sm) 0;
}

.social-sidebar a:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

@media (max-width: 768px) {
    .social-sidebar {
        display: none;
    }
}

/* ============================================
   COOKIE CONSENT BANNER
   ============================================ */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--dark);
    color: rgba(255,255,255,0.8);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 10000;
    font-size: 0.88rem;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.cookie-consent.visible {
    transform: translateY(0);
}

.cookie-consent p {
    margin: 0;
}

.cookie-consent-btn {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.cookie-consent-btn:hover {
    background: var(--primary-dark);
}

@media (max-width: 480px) {
    .cookie-consent {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

/* ============================================
   NEWSLETTER SIGNUP (Footer)
   ============================================ */
.footer-newsletter {
    margin-top: 20px;
}

.footer-newsletter p {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.5);
    margin-bottom: 10px;
}

.newsletter-form {
    display: flex;
    gap: 8px;
}

.newsletter-form input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50px;
    background: rgba(255,255,255,0.08);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 0.82rem;
    outline: none;
    transition: var(--transition);
    min-width: 0;
}

.newsletter-form input::placeholder {
    color: rgba(255,255,255,0.35);
}

.newsletter-form input:focus {
    border-color: var(--primary);
    background: rgba(255,255,255,0.12);
}

.newsletter-form button {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 10px 18px;
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.newsletter-form button:hover {
    background: var(--primary-dark);
}

.newsletter-success {
    font-size: 0.82rem;
    color: var(--secondary);
    margin-top: 8px;
    display: none;
}

/* --- Selection Color --- */
::selection {
    background: rgba(200, 56, 42, 0.15);
    color: var(--text-dark);
}

/* --- Smooth Scrollbar (WebKit) --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
