@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Montserrat:wght@400;600;700;800;900&display=swap');

/* Theme CSS Variables */
:root {
    --bg-primary: #121315;
    --bg-secondary: #1E2022;
    --text-primary: #FFFFFF;
    --text-secondary: #D1D5DB; /* gray-300 */
    --text-muted: #9CA3AF; /* gray-400 */
    --border-color: #1F2937; /* gray-800 */
    --border-dark: #111827; /* gray-900 */
    --card-bg: linear-gradient(185deg, #1E2022 0%, #151718 100%);
    --header-bg: rgba(18, 19, 21, 0.85);
    --input-bg: #121315;
    
    /* Brand constants */
    --color-yellow: #FBC02D;
    --color-yellow-dark: #F57F17;
    --color-yellow-light: #FFF59D;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
}

body.theme-light {
    --bg-primary: #F9FAFB;
    --bg-secondary: #FFFFFF;
    --text-primary: #111827; /* gray-900 */
    --text-secondary: #374151; /* gray-700 */
    --text-muted: #6B7280; /* gray-500 */
    --border-color: #E5E7EB; /* gray-200 */
    --border-dark: #D1D5DB; /* gray-300 */
    --card-bg: linear-gradient(185deg, #FFFFFF 0%, #F3F4F6 100%);
    --header-bg: rgba(255, 255, 255, 0.85);
    --input-bg: #F3F4F6;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-secondary);
    border: 2px solid var(--bg-primary);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-yellow);
}

/* Global Theme-Light class overrides to adapt Tailwind utility styling dynamically */
body.theme-light {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

body.theme-light .bg-theme-dark { background-color: var(--bg-primary) !important; }
body.theme-light .bg-theme-charcoal { background-color: var(--bg-secondary) !important; }
body.theme-light .text-white { color: var(--text-primary) !important; }
body.theme-light .text-gray-200 { color: var(--text-secondary) !important; }
body.theme-light .text-gray-300 { color: var(--text-secondary) !important; }
body.theme-light .text-gray-400 { color: var(--text-muted) !important; }
body.theme-light .text-gray-500 { color: var(--text-muted) !important; }
body.theme-light .border-gray-800 { border-color: var(--border-color) !important; }
body.theme-light .border-gray-900 { border-color: var(--border-dark) !important; }
body.theme-light .bg-theme-charcoal\/50 { background-color: rgba(255, 255, 255, 0.75) !important; }
body.theme-light .bg-theme-charcoal\/30 { background-color: rgba(255, 255, 255, 0.5) !important; }
body.theme-light .bg-theme-dark\/80 { background-color: var(--bg-secondary) !important; }
body.theme-light .bg-theme-dark\/60 { background-color: var(--bg-secondary) !important; }
body.theme-light .bg-theme-dark\/85 { background-color: var(--header-bg) !important; }
body.theme-light .bg-theme-dark\/95 { background-color: var(--bg-primary) !important; }
body.theme-light .bg-gradient-card { background: var(--card-bg) !important; }
body.theme-light .text-slate-900 { color: #0F172A !important; } /* Mantener legibilidad de botones */

body.theme-light input,
body.theme-light select,
body.theme-light textarea {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

body.theme-light input::placeholder {
    color: var(--text-muted) !important;
}

body.theme-light #faq-accordion .border-t {
    border-color: var(--border-color) !important;
}

/* Custom Utilities & Animations */
.bg-theme-charcoal {
    background-color: var(--bg-secondary);
}

.text-theme-yellow {
    color: var(--color-yellow);
}

.bg-theme-yellow {
    background-color: var(--color-yellow);
}

.bg-theme-yellow:hover {
    background-color: var(--color-yellow-dark);
}

.border-theme-yellow {
    border-color: var(--color-yellow);
}

/* Gradient backgrounds */
.bg-gradient-hero {
    background: linear-gradient(135deg, rgba(18, 19, 21, 0.95) 0%, rgba(30, 32, 34, 0.85) 100%);
}

.bg-gradient-card {
    background: var(--card-bg);
}

/* Glow effects */
.glow-yellow {
    box-shadow: 0 4px 20px rgba(251, 192, 45, 0.1);
}

.glow-yellow:hover {
    box-shadow: 0 10px 30px rgba(251, 192, 45, 0.2);
}

body.theme-light .glow-yellow {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

body.theme-light .glow-yellow:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* Hover scales */
.hover-scale {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-scale:hover {
    transform: translateY(-5px);
}

/* Flyer Modal */
.modal-active {
    opacity: 1;
    pointer-events: auto;
    backdrop-filter: blur(8px);
}

/* Success Form animation */
@keyframes popIn {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.animate-pop-in {
    animation: popIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Map marker dot animation */
@keyframes pulse-yellow {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(251, 192, 45, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(251, 192, 45, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(251, 192, 45, 0);
    }
}

.pulse-marker {
    animation: pulse-yellow 2s infinite;
}

/* Custom background pattern */
.bg-grid-pattern {
    background-size: 40px 40px;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
}

body.theme-light .bg-grid-pattern {
    background-image: 
        linear-gradient(to right, rgba(0, 0, 0, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
}

/* Chat Scrollbar */
#chat-messages::-webkit-scrollbar {
    width: 4px;
}
#chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

body.theme-light #chat-window {
    background-color: var(--bg-secondary) !important;
    border-color: var(--border-color) !important;
}

body.theme-light #chat-messages {
    background-color: rgba(243, 244, 246, 0.6) !important;
}

body.theme-light #chat-actions {
    background-color: var(--bg-secondary) !important;
    border-top-color: var(--border-color) !important;
}
