/* Speedway Driving School — shared site styles.
   Loaded by every marketing page via head-base.ejs. Page-specific styles
   live in each page's inline <style> tag. When you change a rule here,
   ALL pages update. Don't add page-specific rules to this file. */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-dark: #0B1B3D;
    --accent-gold: #FFD200;
    --text-dark: #1a1a1a;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.12);
    --shadow-lg: 0 16px 40px rgba(0,0,0,0.16);
}

.skip-link { position: absolute; top: -40px; left: 0; background: #0B1B3D; color: #FFD200; padding: 8px 16px; z-index: 10000; font-weight: 700; transition: top 0.2s; }
.skip-link:focus { top: 0; }

html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* PRINT PROTECTION */
@media print { .hamburger, .mobile-menu, .whatsapp-float, .page-loader, nav .contact-btn, nav .language-toggle { display: none; } }

/* NAVIGATION */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(11, 27, 61, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 210, 0, 0.15);
    color: white;
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}
.nav-logo { display: flex; align-items: center; gap: 0.75rem; font-weight: 700; font-size: 1.25rem; text-decoration: none; color: white; cursor: pointer; }
.nav-logo img { height: 110px; width: auto; }
.nav-center { display: flex; gap: 3rem; align-items: center; }
.nav-links { display: flex; list-style: none; gap: 1.5rem; }
.nav-link { color: white; text-decoration: none; font-size: 0.95rem; cursor: pointer; position: relative; transition: color 0.3s ease; font-weight: 400; }
.nav-link:hover { color: var(--accent-gold); }
.nav-link::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px; background: var(--accent-gold); transition: width 0.3s ease; }
.nav-link:hover::after { width: 100%; }

.dropdown { position: relative; }
.dropdown-menu { display: none; position: absolute; top: 100%; left: 0; background: rgba(11, 27, 61, 0.95); backdrop-filter: blur(20px); border-radius: 0.5rem; min-width: 200px; box-shadow: var(--shadow-md); padding-top: 0.5rem; overflow: hidden; z-index: 1001; }
.dropdown:hover .dropdown-menu { display: block; }
.dropdown.open .dropdown-menu { display: block; }
.dropdown-item { display: flex; align-items: center; min-height: 44px; padding: 0.75rem 1.5rem; color: white; text-decoration: none; transition: all 0.3s ease; white-space: nowrap; }
.dropdown-item:hover { background: rgba(255, 210, 0, 0.15); color: var(--accent-gold); padding-left: 2rem; }

.nav-right { display: flex; align-items: center; gap: 1.5rem; }

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 0.4rem;
    background: transparent;
    border: 0;
    padding: 0;
}
.hamburger span { width: 25px; height: 3px; background: white; border-radius: 2px; transition: all 0.3s ease; }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(8px, 8px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -7px); }

.contact-btn { background: var(--accent-gold); color: var(--primary-dark); padding: 0.6rem 1.5rem; border-radius: 0.4rem; text-decoration: none; font-weight: 600; transition: all 0.3s ease; border: none; cursor: pointer; display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap; font-size: 0.9rem; }
.contact-btn:hover { background: #ffeb3b; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(255, 210, 0, 0.4); }

.language-toggle { background: rgba(255, 210, 0, 0.35); border: 1px solid var(--accent-gold); color: white; padding: 0.4rem 0.8rem; border-radius: 0.3rem; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all 0.3s ease; display: flex; align-items: center; gap: 0.4rem; }
.language-toggle:hover, .language-toggle.active { background: var(--accent-gold); color: var(--primary-dark); }

/* YouTube icon sized to match the language-toggle box height (toggle is
   ~1.65rem tall = 0.85rem font + 0.8rem vertical padding). A bare icon at
   1.3rem looks shorter than the boxed toggle next to it; 1.6rem matches. */
.youtube-nav-icon {
    color: white;
    font-size: 1.85rem;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    line-height: 1;
}
.youtube-nav-icon:hover { color: #ff0000; }

/* MOBILE MENU — aligned to the canonical inline version used by the
   static HTML pages (contact.html, index.html, etc.) so EJS-rendered
   pages (faq, zoom-class, seguro, privacy, terms) render an identical
   mobile menu. Prior version was 16px / weight 400 / padding 0.75rem 1rem
   which felt smaller and lighter than every other page on the site. */
.mobile-menu { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: var(--primary-dark); padding: 6rem 0 2rem; z-index: 998; box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; overflow-y: auto; transition: opacity 0.3s ease, visibility 0.3s ease; }
.mobile-menu.active { display: block; opacity: 1; visibility: visible; }
.mobile-menu a { min-height: 44px; box-sizing: border-box; display: block; color: white; text-decoration: none; padding: 1rem 2rem; font-size: 1.05rem; font-weight: 500; transition: all 0.2s ease; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.mobile-menu a:hover, .mobile-menu a:active { background: rgba(255, 210, 0, 0.15); color: var(--accent-gold); padding-left: 2.5rem; }

/* BUTTONS */
.btn { padding: 1rem 2.5rem; background: var(--accent-gold); color: var(--primary-dark); border: none; border-radius: 0.5rem; font-weight: 700; cursor: pointer; transition: all 0.3s ease; font-size: 1rem; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; }
.btn:hover { background: #ffeb3b; transform: translateY(-3px); box-shadow: 0 8px 25px rgba(255, 210, 0, 0.5); }
.btn-primary { background: var(--accent-gold); color: var(--primary-dark); text-decoration: none; border: none; font-weight: 600; cursor: pointer; padding: 0.75rem 1.5rem; border-radius: 0.4rem; transition: all 0.3s ease; }
.btn-primary:hover { background: #ffeb3b; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(255, 210, 0, 0.4); }
.btn-secondary { background: transparent; color: white; border: 2px solid white; padding: 1rem 2.5rem; border-radius: 0.5rem; font-weight: 700; text-decoration: none; transition: all 0.3s ease; }
.btn-secondary:hover { background: white; color: var(--primary-dark); transform: translateY(-3px); }

/* SECTION STYLES */
section { padding: 4rem 2rem; }
.section-title { text-align: center; font-size: 2.5rem; font-weight: 800; margin-bottom: 3rem; color: var(--primary-dark); }
.section-subtitle { text-align: center; font-size: 1.1rem; color: var(--text-light); margin-bottom: 2rem; }

/* PAGE HEADER for sub-pages */
.page-header { background: linear-gradient(135deg, var(--primary-dark) 0%, #1a3f6a 100%); color: white; padding: 10rem 2rem 2.5rem; text-align: center; }
.page-header h1 { font-size: 2.5rem; font-weight: 800; }

/* MODALS — reused across contact CTAs */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); backdrop-filter: blur(4px); }
.modal.active { display: flex; align-items: center; justify-content: center; }
.modal-content { background-color: white; padding: 2.5rem; border-radius: 1rem; width: 90%; max-width: 500px; box-shadow: var(--shadow-lg); animation: slideUp 0.3s ease; }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.modal-header { font-size: 1.5rem; font-weight: 700; color: var(--primary-dark); margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.75rem; }
.modal-body { margin-bottom: 2rem; color: var(--text-light); line-height: 1.8; }
.modal-details { background: var(--bg-light); padding: 1.5rem; border-radius: 0.5rem; margin-bottom: 1.5rem; }
.modal-footer { display: flex; gap: 1rem; }
.modal-footer button { flex: 1; padding: 0.75rem; border: none; border-radius: 0.4rem; font-weight: 600; cursor: pointer; transition: all 0.3s ease; font-size: 0.95rem; }
.btn-cancel { background: var(--bg-light); color: var(--text-dark); }
.btn-cancel:hover { background: var(--border-color); }

/* FOOTER */
footer { background: linear-gradient(180deg, #0a1a3a 0%, #060f22 100%); color: white; padding: 4rem 2rem 1.5rem; }
.footer-content { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-section h4, .footer-section h2 { margin-bottom: 1rem; font-size: 1rem; color: var(--accent-gold); }
.footer-section p, .footer-section a { color: rgba(255, 255, 255, 0.8); margin-bottom: 0.75rem; text-decoration: none; transition: color 0.3s ease; display: block; }
.footer-section a:hover { color: var(--accent-gold); }
.footer-bottom { max-width: 1200px; margin: 0 auto; padding-top: 2rem; border-top: 1px solid rgba(255, 255, 255, 0.2); text-align: center; color: rgba(255, 255, 255, 0.7); font-size: 0.9rem; }

/* WHATSAPP BUTTON */
.whatsapp-float { position: fixed; bottom: 25px; left: 25px; width: 60px; height: 60px; background: #25D366; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4); z-index: 999; cursor: pointer; transition: all 0.3s ease; text-decoration: none; }
.whatsapp-float:hover { transform: scale(1.1); box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6); }
.whatsapp-float i { color: white; font-size: 1.8rem; }
.whatsapp-tooltip { position: fixed; bottom: 95px; left: 25px; background: white; color: #333; padding: 8px 14px; border-radius: 8px; font-size: 0.85rem; font-weight: 500; box-shadow: 0 2px 10px rgba(0,0,0,0.15); z-index: 999; opacity: 0; transform: translateY(10px); animation: tooltipFade 0.5s ease 2s forwards; white-space: nowrap; }
.whatsapp-tooltip::after { content: ""; position: absolute; bottom: -6px; left: 20px; width: 12px; height: 12px; background: white; transform: rotate(45deg); box-shadow: 2px 2px 5px rgba(0,0,0,0.05); }
@keyframes tooltipFade { to { opacity: 1; transform: translateY(0); } }

/* WATERMARK (some pages use this) */
.watermark { position: fixed; bottom: 20px; right: 20px; font-size: 2rem; opacity: 0.15; transform: rotate(-45deg); pointer-events: none; z-index: 100; user-select: none; color: var(--primary-dark); font-weight: 800; white-space: nowrap; }

/* RESPONSIVE */
@media (max-width: 768px) {
    .nav-logo img { height: 80px; }
    .nav-center { display: none; }
    .nav-right { gap: 0.75rem; }
    .hamburger { display: flex; }
    .language-toggle { font-size: 0.75rem; padding: 0.3rem 0.6rem; }
    .page-header h1 { font-size: 1.8rem; }
    .section-title { font-size: 1.8rem; }
    .modal-content { width: 95%; }
    .footer-section h2, .footer-section h4 { font-size: 0.9rem; }
    .footer-section p, .footer-section a { font-size: 0.85rem; }
}

/* Mobile: collapse the contact button to just the phone icon so the
   full phone number doesn't push other header elements past the
   viewport on 360-375px phones. */
@media (max-width: 768px) {
    .contact-btn-label { display: none; }
    .contact-btn {
        display: inline-flex !important;
        padding: 0.55rem 0.75rem;
        font-size: 1rem;
    }
}

/* ============================================================
   Toast notification system (audit 2026-05-21 — micro-interactions)
   Usage from any page:
     showToast('Booking confirmed!', 'success')
     showToast('Could not connect', 'error')
     showToast('Saving...', 'info')
   Toasts auto-dismiss after 4 seconds. Stack vertically if multiple.
   ============================================================ */
.toast-stack {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    pointer-events: none;
    max-width: calc(100vw - 40px);
}
.toast {
    background: #0B1B3D;
    color: #fff;
    padding: 12px 18px 12px 14px;
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.28);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    min-width: 240px;
    max-width: 360px;
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
    animation: toast-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
    border-left: 4px solid #FFD200;
}
.toast.success { border-left-color: #2E7D32; }
.toast.success::before { content: '✓'; color: #4ade80; font-weight: 800; font-size: 1.05rem; }
.toast.error { border-left-color: #C62828; }
.toast.error::before { content: '⚠'; color: #ff5c5c; font-weight: 800; font-size: 1.05rem; }
.toast.info::before { content: 'ℹ'; color: #FFD200; font-weight: 800; font-size: 1.05rem; }
.toast.fade-out {
    animation: toast-out 0.24s ease-in forwards;
}
@keyframes toast-in {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toast-out {
    to { opacity: 0; transform: translateY(20px) scale(0.96); }
}
@media (max-width: 540px) {
    .toast-stack {
        left: 12px;
        right: 12px;
        bottom: 12px;
        max-width: none;
    }
    .toast { min-width: 0; max-width: 100%; font-size: 0.86rem; }
}

/* ============================================================
   Polished button hover micro-interactions — site-wide
   ============================================================ */
.btn, .btn-primary, .btn-secondary, .btn-confirm, .auth-btn {
    will-change: transform;
}
.btn:active, .btn-primary:active, .btn-secondary:active, .btn-confirm:active, .auth-btn:active {
    transform: translateY(0) !important;
    transition: transform 0.08s ease;
}
