/* ===================================
   Variables y Configuración Global
   =================================== */
:root {
    --primary-color: #E65527;
    --primary-dark: #C74520;
    --secondary-color: #2C3E50;
    --accent-color: #F39C12;
    --text-dark: #2C3E50;
    --text-light: #6C757D;
    --bg-light: #F8F9FA;
    --white: #FFFFFF;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

a {
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

/* ===================================
   Navegación
   =================================== */
.navbar {
    padding: 1rem 0;
    transition: var(--transition);
}

/* ===================================
   Jerarquía de z-index para compatibilidad con ElevenLabs Widget
   Widget de ElevenLabs: z-index ~999999
   Navbar: 999
   Back-to-top: 998
   Contenido normal: 1-100
   =================================== */
.navbar.fixed-top {
    z-index: 999 !important;
}

/* Clase helper para ocultar navbar cuando el widget esté expandido (opcional) */
.navbar.widget-expanded {
    opacity: 0.95;
    pointer-events: auto;
}

.navbar-brand img {
    transition: var(--transition);
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.nav-link {
    font-weight: 600;
    color: var(--text-dark) !important;
    padding: 0.5rem 1rem !important;
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

.nav-link.btn {
    border-radius: 50px;
    background: var(--primary-color);
    border: none;
}

.nav-link.btn::after {
    display: none;
}

.nav-link.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* ===================================
   Hero Section
   =================================== */
.hero-section {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-image: 
        linear-gradient(135deg, rgba(230, 85, 39, 0.9) 0%, rgba(44, 62, 80, 0.9) 100%),
        url('https://images.unsplash.com/photo-1557804506-669a67965ba0?w=1920&h=1080&fit=crop');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.text-primary-custom {
    color: #FFD700 !important;
}

.hero-section .btn {
    border-radius: 50px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.hero-section .btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    animation: bounce 2s infinite;
}

.scroll-indicator i {
    font-size: 2rem;
    color: var(--white);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Animaciones de entrada */
.animate-fade-in {
    animation: fadeIn 1s ease-in;
}

.animate-fade-in-delay {
    animation: fadeIn 1s ease-in 0.3s both;
}

.animate-fade-in-delay-2 {
    animation: fadeIn 1s ease-in 0.6s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   Stats Section
   =================================== */
.stats-section {
    background: var(--primary-color);
}

.stat-item {
    padding: 1.5rem;
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number::after {
    content: '+';
    margin-left: 2px;
}

/* ===================================
   About Section
   =================================== */
.about-image-wrapper {
    position: relative;
}

.about-image-wrapper::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: 20px;
    bottom: 20px;
    border: 3px solid var(--primary-color);
    border-radius: 8px;
    z-index: -1;
}

/* ===================================
   Services Section
   =================================== */
.service-card {
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-top: 4px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-top-color: var(--primary-color);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.service-icon i {
    font-size: 2rem;
    color: var(--white);
}

.service-card:hover .service-icon {
    transform: rotate(360deg) scale(1.1);
}

.service-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: var(--transition);
}

.service-link:hover {
    color: var(--primary-dark);
    transform: translateX(5px);
}

/* ===================================
   Events Section
   =================================== */
.event-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    height: 100%;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.event-date {
    background: var(--primary-color);
    color: var(--white);
    padding: 1.5rem 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 100px;
}

.event-date .day {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.event-date .month {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 0.25rem;
}

.event-content {
    padding: 1.5rem;
    flex: 1;
}

/* ===================================
   CTA Section
   =================================== */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="white" opacity="0.1"/></svg>');
    background-size: 50px 50px;
}

.cta-section .btn-light {
    background: var(--white);
    color: var(--primary-color);
    border: none;
}

.cta-section .btn-light:hover {
    background: var(--bg-light);
    transform: translateY(-3px);
}

.cta-section .btn-outline-light:hover {
    background: var(--white);
    color: var(--primary-color);
}

/* ===================================
   Contact Section
   =================================== */
.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.contact-icon i {
    font-size: 1.25rem;
    color: var(--white);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 45px;
    height: 45px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    color: var(--white);
}

.contact-form-wrapper {
    background: var(--bg-light);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.form-control {
    border: 2px solid #E9ECEF;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(230, 85, 39, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

/* ===================================
   Footer
   =================================== */
.footer {
    background: #1a1a1a;
}

.footer a:hover {
    color: var(--primary-color) !important;
}

.newsletter-form .form-control {
    border-radius: 50px 0 0 50px;
    border-right: none;
}

.newsletter-form .btn {
    border-radius: 0 50px 50px 0;
    padding: 0.75rem 1.5rem;
}

/* ===================================
   Back to Top Button
   =================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 998;
    box-shadow: var(--shadow);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
}

/* ===================================
   Utilidades Bootstrap Personalizadas
   =================================== */
.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 991px) {
    .navbar-collapse {
        background: var(--white);
        padding: 1rem;
        border-radius: 8px;
        margin-top: 1rem;
        box-shadow: var(--shadow);
    }
    
    .nav-link {
        padding: 0.75rem 1rem !important;
    }
    
    .hero-section {
        background-attachment: scroll;
    }
    
    .about-image-wrapper::before {
        display: none;
    }
}

@media (max-width: 767px) {
    .display-3 {
        font-size: 2.5rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.75rem;
    }
    
    .hero-section .btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .stat-item {
        margin-bottom: 1rem;
    }
    
    .event-card {
        flex-direction: column;
    }
    
    .event-date {
        min-width: 100%;
        padding: 1rem;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 575px) {
    .hero-section {
        padding-top: 70px;
    }
    
    .cta-section .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .contact-form-wrapper {
        padding: 1.5rem;
    }
}

/* ===================================
   Animaciones de Scroll
   =================================== */
@media (prefers-reduced-motion: no-preference) {
    .fade-in-up {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    
    .fade-in-up.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   Mejoras de Accesibilidad
   =================================== */
.btn:focus,
.form-control:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===================================
   Print Styles
   =================================== */
@media print {
    .navbar,
    .back-to-top,
    .scroll-indicator {
        display: none;
    }
    
    .hero-section {
        background: var(--white);
        color: var(--text-dark);
        min-height: auto;
        padding: 2rem 0;
    }
}
