/* =============== VARIABLES =============== */
:root {
    --primary-color: #23fd53;
    --primary-dark: #1e9b5a;
    --dark-color: #222327;
    --darker-color: #1a1a1a;
    --light-color: #ffffff;
    --lighter-color: #f8f9fa;
    --text-dark: #333;
    --text-light: #f8f9fa;
    --text-muted: rgba(255, 255, 255, 0.6);
    --transition: all 0.3s ease;
    --transition-slow: all 0.5s ease;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 5px 15px rgba(0, 0, 0, 0.2);
    --shadow-primary: 0 0 15px rgba(35, 253, 83, 0.3);
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    --section-padding: 5rem 0;
    --header-height: 80px;
    --max-width: 1400px;
    --border-radius: 0.5rem;
    --border-radius-lg: 1rem;
}

/* =============== BASE STYLES =============== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--light-color);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    transition: var(--transition-slow);
    padding-top: var(--header-height);
}

body.dark-theme {
    background-color: var(--dark-color);
    color: var(--text-light);
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: var(--section-padding);
}

/* =============== HEADER STYLES =============== */
.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    height: var(--header-height);
}

.dark-theme .sticky-header {
    background-color: rgba(34, 35, 39, 0.95);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 2rem;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--dark-color);
    transition: var(--transition);
    z-index: 1001;
    position: relative;
}

.dark-theme .logo {
    color: var(--text-light);
}

.logo i {
    color: var(--primary-color);
    margin-right: 0.5rem;
    font-size: 2rem;
}

.logo:hover {
    transform: translateY(-2px);
    color: var(--primary-color);
}

/* =============== NAVBAR STYLES =============== */
.navbar {
    display: flex;
}

.navbar-list {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.navbar a {
    color: var(--dark-color);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    transition: var(--transition);
}

.dark-theme .navbar a {
    color: var(--text-light);
}

.navbar a.active,
.navbar a:hover {
    color: var(--primary-color);
}

.navbar a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.navbar a:hover::after,
.navbar a.active::after {
    width: 100%;
}

/* Dropdown styles */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 100;
}

.dark-theme .dropdown-menu {
    background-color: var(--darker-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 0.5rem 1.5rem;
    color: var(--dark-color);
}

.dark-theme .dropdown-menu a {
    color: var(--text-light);
}

.dropdown-menu a:hover {
    background-color: rgba(35, 253, 83, 0.1);
    color: var(--primary-color);
    padding-left: 1.75rem;
}

.dropdown-icon {
    transition: var(--transition);
    margin-left: 0.25rem;
}

.dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
}

/* Header controls */
.header-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--dark-color);
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.dark-theme .theme-toggle {
    color: var(--text-light);
}

.theme-toggle:hover {
    transform: scale(1.1);
    color: var(--primary-color);
    background-color: rgba(35, 253, 83, 0.1);
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    background: var(--gradient-primary);
    color: white;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.user-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
}

/* Mobile menu button - Hidden by default */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--dark-color);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.dark-theme .mobile-menu-btn {
    color: var(--text-light);
}

.mobile-menu-btn:hover {
    background-color: rgba(35, 253, 83, 0.1);
}

.mobile-menu-btn .close-icon {
    display: none;
}

/* Active state for mobile menu */
.mobile-menu-btn.active .menu-icon {
    display: none;
}

.mobile-menu-btn.active .close-icon {
    display: block;
}

/* =============== HERO SECTION =============== */
.hero-section {
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('/assets/img/principal1.jpg') center/cover no-repeat;
    color: var(--text-light);
    position: relative;
}

.hero-content {
    max-width: 800px;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.1;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.5rem);
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-btn {
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--text-light);
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 50px;
    border: 2px solid var(--text-light);
    border-radius: 15px;
    cursor: pointer;
    transition: var(--transition);
}

.hero-scroll-indicator:hover {
    border-color: var(--primary-color);
}

.hero-scroll-indicator::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    width: 6px;
    height: 6px;
    background: var(--text-light);
    border-radius: 50%;
    transform: translateX(-50%);
    animation: scrollIndicator 2s infinite;
}

@keyframes scrollIndicator {
    0% { opacity: 1; top: 8px; }
    100% { opacity: 0; top: 30px; }
}

/* =============== MAIN CONTENT STYLES =============== */
/* Contenedor principal responsivo */
.content-container, .bloque-4, .bloque-5 {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem;
    margin-top: 2rem;
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
    gap: 2rem;
}

/* Bloques de contenido */
.content-block {
    display: flex;
    width: 100%;
    margin-bottom: 3rem;
    gap: 2rem;
}

/* Estilos para videos y texto - versión desktop */
.video-left, .video-right, 
.video-bloque-4, .video-bloque-5 {
    flex: 1 1 45%;
    min-width: 300px;
}

.text-right, .text-left,
.text-bloque-4, .text-bloque-5 {
    flex: 1 1 45%;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Contenedor responsivo para videos */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Alternar disposición de los bloques */
.content-block:nth-child(even) {
    flex-direction: row-reverse;
}

/* Títulos y texto */
.section-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--gradient-primary);
}

.section-text p {
    margin-bottom: 1rem;
    line-height: 1.7;
    font-size: 1.05rem;
}

/*=============== CARRUSEL ===============*/
.slider-box {
    width: 100%;
    max-width: 1280px;
    height: auto;
    margin: 50px auto 0;
    overflow: hidden;
}

.slider-box ul {
    display: flex;
    padding: 0;
    width: 300%;
    animation: slide 20s infinite alternate ease-in-out;
}

.slider-box li {
    width: 33.33%;
    list-style: none;
    position: relative;
}

.slider-box img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

/* Superposición oscura sobre las imágenes */
.slider-box li::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

/* Estilos para el texto */
.text {
    position: absolute;
    text-align: center;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    padding: 0 20px;
    color: #fff;
    z-index: 2;
    box-sizing: border-box;
}

.text h2 {
    font-size: clamp(1.5rem, 4vw, 2.8rem);
    margin-bottom: 1.5rem;
}

/* Estilos específicos para los botones del carrusel */
.carousel-btn {
    font-size: 1.25em;
    font-weight: bold;
    padding: 10px 30px;
    border-radius: 5px;
    border: 2px solid rgba(255, 255, 255, 0.842);
    box-shadow: 2px 2px 10px rgb(0, 0, 0);
    color: white;
    background-color: rgba(0, 0, 0, 0);
    cursor: pointer;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Estilo hover para los botones del carrusel */
.carousel-btn:hover {
    background-color: rgb(10, 10, 10);
    transition: .4s;
}

/*=============== INFORMATION ===============*/
.text-bloque-4 h1, .text-bloque-5 h1 {
    font-size: 2rem;
    color: var(--text-dark);
}

.dark-theme .text-bloque-4 h1,
.dark-theme .text-bloque-5 h1 {
    color: var(--text-light);
}

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: var(--text-light);
    padding: 4rem 0 2rem;
    position: relative;
    overflow: hidden;
}

/* Elemento distintivo arriba del footer */
.footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
    box-shadow: 0 0 15px var(--primary-color);
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-section {
    text-align: left;
    margin-bottom: 1.5rem;
}

.footer h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
    font-size: 1.2rem;
}

.footer h3::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer p,
.footer ul {
    font-size: 0.95rem;
    line-height: 1.8;
    opacity: 0.9;
}

.footer ul {
    list-style: none;
    padding: 0;
}

.footer ul li {
    margin-bottom: 0.8rem;
}

.footer ul li a {
    color: var(--text-light);
    transition: var(--transition);
    display: inline-block;
    padding: 0.2rem 0;
}

.footer ul li a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.footer .social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.footer .social-icons a {
    font-size: 1.3rem;
    color: var(--text-light);
    transition: var(--transition);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.05);
}

.footer .social-icons a:hover {
    color: var(--primary-color);
    background-color: rgba(35, 253, 83, 0.1);
    transform: translateY(-3px);
}

.footer-bottom {
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    grid-column: 1 / -1;
}

/* =============== MEDIA QUERIES =============== */
@media (max-width: 1200px) {
    /* Pequeños ajustes para pantallas grandes pero no full width */
    .content-container, .bloque-4, .bloque-5 {
        padding: 1.5rem;
    }
}

@media (max-width: 992px) {
    :root {
        --section-padding: 4rem 0;
    }
    
    .header-container {
        padding: 0 1rem;
    }
    
    /* Menú móvil */
    .mobile-menu-btn {
        display: flex;
    }
    
    .navbar {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 80%;
        max-width: 400px;
        height: calc(100vh - var(--header-height));
        background-color: var(--light-color);
        flex-direction: column;
        padding: 2rem;
        transition: var(--transition-slow);
        z-index: 1000;
    }

    .dark-theme .navbar {
        background-color: var(--darker-color);
    }
    
    .navbar.active {
        left: 0;
    }
    
    .navbar-list {
        flex-direction: column;
        gap: 1rem;
    }
    
    .dropdown-menu {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        padding-left: 1rem;
    }
    
    .dropdown-menu.show {
        display: block;
    }
    
    /* Ajustes para el contenido principal */
    .content-container, .bloque-4, .bloque-5 {
        padding: 1rem;
        margin-top: 1.5rem;
        gap: 1rem;
    }
    
    .content-block {
        flex-direction: column;
        margin-bottom: 2rem;
        gap: 1rem;
    }
    
    .content-block:nth-child(even) {
        flex-direction: column;
    }
    
    .video-left, .video-right, 
    .video-bloque-4, .video-bloque-5,
    .text-right, .text-left,
    .text-bloque-4, .text-bloque-5 {
        flex: 1 1 100%;
        min-width: 100%;
    }
    
    .video-container {
        margin-bottom: 1rem;
    }
    
    .header-controls {
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .logo i {
        font-size: 1.75rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    h1, h2, h3 {
        font-size: 1.5rem;
    }

    p {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .footer h3 {
        font-size: 1rem;
    }

    .footer p,
    .footer ul li a {
        font-size: 0.85rem;
    }
    
    .user-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer .social-icons {
        justify-content: center;
    }
    
    .footer ul li a:hover {
        transform: none;
    }

    .carousel-btn {
        padding: 8px 20px;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    :root {
        --header-height: 60px;
        --section-padding: 3rem 0;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .content-container, .bloque-4, .bloque-5 {
        padding: 0.5rem;
    }
    
    .logo {
        font-size: 1.2rem;
    }

    .logo i {
        font-size: 1.2rem;
    }

    .user-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .mobile-menu-btn {
        font-size: 1rem;
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 400px) {
    .logo span {
        display: none;
    }
    
    .logo i {
        font-size: 1.5rem;
        margin-right: 0;
    }
    
    .header-controls {
        gap: 0.3rem;
    }
    
    .user-btn {
        padding: 0.3rem;
        width: 34px;
        justify-content: center;
    }
    
    .user-btn span {
        display: none;
    }
}

/* Animación del carrusel */
@keyframes slide {
    0% { margin-left: 0; }
    30% { margin-left: 0; }
    
    35% { margin-left: -100%; }
    65% { margin-left: -100%; }
    
    70% { margin-left: -200%; }
    100% { margin-left: -200%; }
}