/* Variables CSS para colores y radios de borde */
        :root {
            --color-primary: #07415e; /* Azul oscuro */
            --color-secondary: #ffaa00; /* Naranja vibrante */
            --color-dark: #1a1a1a; /* Texto oscuro */
            --color-light: #f7f9fc; /* Fondo claro */
            --color-footer: #07415e; /* Azul más oscuro para el pie de página */
            --border-radius-default: 8px; /* Borde redondeado por defecto */
            --shadow-card: 0 6px 15px rgba(0,0,0,0.1);
            --shadow-hover: 0 10px 20px rgba(0,0,0,0.15);
        }

        /* Reset y estilos base */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        html, body {
            height: 100%;
        }
        body {
            font-family: 'Inter', sans-serif;
            line-height: 1.6;
            color: var(--color-dark);
            background-color: var(--color-light);
            overflow-x: hidden;
            padding-top: 104px;
        }

        /* Estilos del encabezado */
        header {
            background: var(--color-primary);
            color: white;
            padding: 0.75rem 2rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: fixed; /* ¡AQUÍ ESTÁ EL CAMBIO! */
            top: 0;          /* Asegura que esté en la parte superior */
            width: 100%;     /* Asegura que ocupe todo el ancho */
            z-index: 2001;   /* Alto z-index para que esté por encima de todo */
            box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* Opcional: añade una sombra para destacarlo */
        }
        .logo img {
            height: 80px;
            padding: 4px 0;
            border-radius: var(--border-radius-default);
        }
        .logo a {
            display: inline-block;
        }

        /* Estilos de la navegación y Links Generales (CONSOLIDACIÓN) */
        nav {
            display: flex;
            gap: 1.5rem;
            align-items: center;
        }
        nav a {
            color: white;
            text-decoration: none;
            font-weight: 500;
            font-size: 1rem;
            padding: 0.5rem 0.75rem;
            border-radius: var(--border-radius-default);
            transition: background-color 0.3s ease;
        }
        nav a:hover {
            background-color: rgba(255, 255, 255, 0.1);
        }
        /* Nuevo estilo para resaltar el enlace activo */
        nav a.active-link {
            background-color: var(--color-secondary); /* Naranja */
            color: var(--color-primary); /* Texto oscuro sobre naranja */
            font-weight: 700;
        }
        nav a.active-link:hover {
            background-color: #e69900; /* Naranja más oscuro en hover */
            color: var(--color-primary);
        }
        
        /* Ajuste necesario para los enlaces normales */
        nav a:hover {
            background-color: rgba(255, 255, 255, 0.1);
        }
        /* Estilos del botón de menú para móviles (oculto por defecto) */
        .menu-toggle {
            display: none;
            flex-direction: column;
            cursor: pointer;
            padding: 0.5rem;
            border-radius: var(--border-radius-default);
        }
        .menu-toggle span {
            background: white;
            height: 3px;
            width: 25px;
            margin: 4px 0;
            border-radius: 2px;
            transition: all 0.3s ease;
        }

        /* Animación para el icono de hamburguesa */
        .menu-toggle.active span:nth-child(1) {
            transform: translateY(7px) rotate(45deg);
        }
        .menu-toggle.active span:nth-child(2) {
            opacity: 0;
        }
        .menu-toggle.active span:nth-child(3) {
            transform: translateY(-7px) rotate(-45deg);
        }

        /* Media Queries para la navegación responsiva */
        @media (max-width: 768px) {
            nav {
                display: none;
                flex-direction: column;
                background: var(--color-primary);
                position: fixed; /* Cambio a fixed */
                top: 104px; /* Altura del header para que inicie justo debajo */
                left: 0;
                width: 100%;
                padding: 1rem 0;
                box-shadow: 0 4px 8px rgba(0,0,0,0.2);
                z-index: 2000; /* Un poco menos que el header */
                border-radius: 0 0 var(--border-radius-default) var(--border-radius-default);
            }
            nav.active {
                display: flex;
            }
            nav a {
                padding: 1rem 2rem;
                width: 100%;
                text-align: center;
            }
            .menu-toggle {
                display: flex;
            }
        }

        /* Sección Hero (Banner principal) */
        .hero {
            position: relative;
            height: 100vh;
            width: 100%;
            color: white;
            text-align: center;
            padding: 8rem 2rem;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            min-height: 400px;
            overflow: hidden;
        }

        .hero video {
            position: absolute;
            top: 50%;
            left: 50%;
            width: 100%;
            height: 100%;
            z-index: -1;
            transform: translate(-50%, -50%);
            object-fit: cover;
            background-color: #000;
        }

        .hero-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 0;
        }

        .hero h1, .hero p, .hero .button {
            position: relative;
            z-index: 1;
        }

        .hero h1 {
            font-size: 3rem;
            margin-bottom: 1rem;
            font-weight: 800;
        }
        .hero p {
            font-size: 1.3rem;
            margin-bottom: 2.5rem;
            max-width: 800px;
        }

        /* Estilos generales para botones (CONSOLIDACIÓN) */
        .button {
            background: var(--color-secondary);
            color: white;
            padding: 0.9rem 2rem;
            font-size: 1.1rem;
            border: none;
            cursor: pointer;
            text-decoration: none;
            display: inline-block;
            border-radius: var(--border-radius-default);
            transition: background-color 0.3s ease, transform 0.2s ease;
            font-weight: 600;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        }
        .button:hover {
            background-color: #e69900;
            transform: translateY(-2px);
            box-shadow: 0 6px 10px rgba(0,0,0,0.15);
        }
        
        /* Estilos generales para secciones (CONSOLIDACIÓN) */
        .section, .cta {
            margin-left: auto;
            margin-right: auto;
        }
        .section {
            padding: 4rem 2rem;
            max-width: 1200px;
        }
        .section h2 {
            text-align: center;
            font-size: 2.5rem;
            margin-bottom: 3rem;
            color: var(--color-primary);
        }

        /* --- ESTILOS PARA LA NUEVA SECCIÓN DE SERVICIOS (TIPO CURSOS) --- */

        .services-grid-wrapper {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 2rem;
            justify-content: center;
        }

        .service-card {
            background: white;
            border: 1px solid #e0e0e0;
            border-radius: var(--border-radius-default);
            overflow: hidden;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
            display: flex;
            flex-direction: column;
            text-decoration: none;
            color: var(--color-dark); 
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            
        }
        
        /* Estilo para las tarjetas que no son enlaces a detalle */
        .service-card.static-card {
            cursor: default;
        }

        .service-card:hover {
            transform: translateY(-5px); 
            box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
        }

        .service-image-wrapper {
            width: 100%;
            height: 180px; /* Altura fija para todas las imágenes */
            overflow: hidden; 
            border-bottom: 1px solid #eee;
        }
        
        .service-image-wrapper img {
            width: 100%;
            height: 100%;
            object-fit: cover; /* Recorta la imagen para cubrir el área */
            transition: transform 0.3s ease;
        }

        .service-card:hover .service-image-wrapper img {
            transform: scale(1.05); /* Zoom en hover */
        }
        
        .service-content {
            padding: 1.5rem;
            flex-grow: 1; /* Permite que el contenido tome el espacio restante */
        }
        
        .service-content h3 {
            color: var(--color-primary);
            margin-top: 0;
            margin-bottom: 1rem;
            font-size: 1.6rem;
            text-align: center; /* Alineación a la izquierda */
        }
        .service-content p {
            font-size: 1rem;
            color: #555;
            text-align: center;
        }
        .services-container {
            max-width: 1000px; /* Limita el ancho del contenedor para que las tarjetas no se estiren demasiado */
            margin: 0 auto; /* Centra el contenedor en la página */
        }
        
        .services-grid-wrapper {
            /* Mantenemos el grid, pero ahora lo forzamos a 3 columnas en escritorio */
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 2rem;
            /* Eliminamos 'justify-content: center' aquí si lo tienes, ya que lo hace el contenedor padre */
        }
        
        /* 💥 Media Query para forzar la estructura 3-columnas-con-centrado en escritorio (> 900px) */
        @media (min-width: 901px) {
            .services-grid-wrapper {
                /* Forzamos 3 columnas de igual ancho para que la simetría funcione */
                grid-template-columns: repeat(3, 1fr); 
            }
        }
        
        .services-button-container {
            text-align: center; /* ¡ESTO CENTRA EL BOTÓN! */
            margin-top: 3rem;
        }
        
        .view-details-btn {
            background: var(--color-secondary);
            color: white;
            padding: 0.8rem 1.5rem;
            border-radius: 0; /* Sin borde para que ocupe todo el ancho inferior */
            border-top-left-radius: 0;
            border-top-right-radius: 0;
            font-size: 0.95rem;
            font-weight: 600;
            text-align: center;
            align-self: flex-end; /* Asegura que el botón esté siempre abajo */
            width: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 8px;
        }

        /* --- Estilos para la Galería de Proyectos Mejorada --- */

        /* Contenedor de filtros */
        #project-filters {
            margin-bottom: 2rem;
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 0.75rem;
        }

        .filter-btn {
            background-color: var(--color-primary);
            color: white;
            padding: 0.8rem 1.5rem;
            border: none;
            border-radius: var(--border-radius-default);
            font-size: 1rem;
            cursor: pointer;
            transition: background-color 0.3s ease, transform 0.2s ease;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        }

        .filter-btn:hover {
            background-color: var(--color-secondary);
            transform: translateY(-2px);
        }

        .filter-btn.active {
            background-color: var(--color-secondary);
            box-shadow: 0 4px 8px rgba(0,0,0,0.2);
            font-weight: 600;
        }

        /* Ajustes a la galería existente para un look más moderno */
        .gallery {
            display: grid;
            gap: 1.5rem;
            margin-top: 2rem;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            max-width: 1200px;
            margin-left: auto;
            margin-right: auto;
        }

        .gallery a.gallery-item {
            position: relative;
            display: block;
            overflow: hidden;
            border-radius: var(--border-radius-default);
            box-shadow: 0 4px 10px rgba(0,0,0,0.12);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            background: white;
            text-decoration: none;
            color: var(--color-dark);
        }

        .gallery a.gallery-item:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 18px rgba(0,0,0,0.2);
        }

        .gallery img {
            width: 100%;
            height: 220px;
            object-fit: cover;
            border-radius: var(--border-radius-default) var(--border-radius-default) 0 0;
            display: block;
        }

        .gallery-title-overlay {
            position: static;
            background: white;
            color: var(--color-primary);
            padding: 1rem 1rem 1.2rem;
            text-align: center;
            border-radius: 0 0 var(--border-radius-default) var(--border-radius-default);
            transition: background 0.3s ease;
            box-sizing: border-box;
        }

        .gallery-title-overlay h3 {
            font-size: 1.2rem;
            margin: 0;
            color: var(--color-primary);
            white-space: normal;
            overflow: hidden;
            text-overflow: ellipsis;
            line-height: 1.2;
        }

       /* Estilos para el modal de detalle del proyecto */
        .project-modal-content {
            background: white;
            padding: 1.5rem;
            border-radius: var(--border-radius-default);
            box-shadow: none; 
            max-width: 900px;
            width: 95%;
            max-height: 95vh;
            position: relative;
            display: flex;
            flex-direction: column;
            overflow-y: auto;
        }
        
        /* Contenedor para múltiples imágenes/videos en el modal */
        .project-media-container {
            width: 100%;
            height: 450px;
            display: flex;
            justify-content: center;
            align-items: center;
            overflow: hidden; 
            border-radius: var(--border-radius-default);
            margin-bottom: 1.5rem;
            box-shadow: 0 4px 15px rgba(0,0,0,0.2);
            position: relative;
            background-color: #f0f0f0;
        }
        
        .project-media-container img,
        .project-media-container video {
            width: 100%;
            height: 100%;
            object-fit: contain; 
            border-radius: var(--border-radius-default);
            display: block;
            transition: opacity 0.15s ease-in-out; /* Transición más corta para la corrección del JS */
            opacity: 1; 
        }
        
        /* Asegura que el contenido del modal esté bien centrado en el viewport */
        .modal-overlay {
            display: flex;
            justify-content: center;
            align-items: center;
        }
        
        /* Ajustes adicionales para que los botones de navegación se vean bien */
        .media-navigation {
            position: absolute;
            top: 50%;
            left: 0;
            transform: translateY(-50%);
            width: 100%;
            padding: 0 1rem;
            max-width: 900px;
            z-index: 10;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        /* Modifica la posición de las flechas para que estén dentro del modal */
        .media-navigation .nav-arrow {
            position: relative;
            background: rgba(0, 0, 0, 0.5);
            color: white;
            border: none;
            border-radius: 50%;
            width: 40px;
            height: 40px;
            display: flex;
            justify-content: center;
            align-items: center;
            cursor: pointer;
            font-size: 1.5rem;
            transition: background-color 0.3s ease, transform 0.2s ease; /* Añadida transición transform */
        }
        
        .media-navigation .nav-arrow:hover {
             background: var(--color-secondary);
             transform: scale(1.1); /* Efecto hover para flechas */
        }
        
        .media-navigation #prevMediaBtn {
            left: 0;
        }
        
        .media-navigation #nextMediaBtn {
            right: 0;
        }

        .media-counter {
            position: absolute;
             left: 50%;
             transform: translateX(-50%);
             background-color: rgba(0, 0, 0, 0.7);
             color: white;
             padding: 0.3rem 0.8rem;
             border-radius: 20px;
             font-size: 0.9rem;
             min-width: 60px;
             text-align: center;
        }

        .project-modal-content h3 {
            font-size: 2rem;
            color: var(--color-primary);
            margin-bottom: 1rem;
            text-align: center;
        }

        #projectModalDescriptionContainer {
            margin-bottom: 1rem;
            text-align: justify;
            line-height: 1.8;
            color: #555;
            font-size: 1.1rem;
            position: relative;
            width: 100%;
        }

        .project-description-text {
            display: block;
            transition: max-height 0.5s ease-out;
            overflow: hidden;
        }

        .project-description-truncated {
            max-height: 5.4em;
        }

        .project-description-expanded {
            max-height: 1000px;
        }

        #toggleDescriptionBtn {
            background-color: var(--color-primary);
            color: white;
            border: none;
            padding: 0.6rem 1.2rem;
            font-size: 0.9rem;
            border-radius: var(--border-radius-default);
            cursor: pointer;
            margin-top: 1rem;
            transition: background-color 0.3s ease;
            display: block !important;
            margin-left: auto;
            margin-right: auto;
        }

        #toggleDescriptionBtn:hover {
            background-color: var(--color-secondary);
        }
        
        /* --- Estilos para la Nueva Sección de Cursos Hero Grid --- */
    .courses-hero-grid {
        /* Mantenemos el fondo de color original como respaldo si la imagen falla */
        background-color: var(--color-primary); 
        color: white;
        padding: 5rem 2rem;
        text-align: center;
        overflow: hidden;

        /* 💥 PROPIEDADES DE IMAGEN DE FONDO */
        background-image: 
            /* 1. Capa de Superposición (Overlay): oscurece la imagen para que el texto blanco resalte */
            linear-gradient(rgba(7, 65, 94, 0.85), rgba(7, 65, 94, 0.85)), 
            /* 2. Imagen de Fondo: reemplaza 'URL_DE_TU_IMAGEN.jpg' con la ruta real */
            url('media/topotech_wall.jpg'); 
            
        background-size: cover;          /* Asegura que la imagen cubra todo el elemento */
        background-position: center;     /* Centra la imagen */
        background-attachment: fixed;    /* (Opcional) Crea un efecto parallax al hacer scroll */
        background-repeat: no-repeat;
        /* 💥 FIN PROPIEDADES DE IMAGEN DE FONDO */
    }
    .courses-hero-grid h2 {
        font-size: 3rem;
        margin-bottom: 1rem;
        color: white;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
        font-weight: 800;
    }
    .courses-hero-grid .subtitle {
        font-size: 1.3rem;
        margin-bottom: 3rem;
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
        line-height: 1.6;
        opacity: 0.9;
    }

    .courses-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 2rem;
        margin-bottom: 3rem;
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }

    .course-module {
        background: white;
        color: var(--color-dark);
        padding: 2rem 1.5rem;
        border-radius: var(--border-radius-default);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        text-decoration: none;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        position: relative;
        overflow: hidden;
    }

    .course-module:hover {
        transform: translateY(-8px);
        box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
    }
    
    .course-module h3 {
        color: var(--color-primary);
        font-size: 1.4rem;
        margin-bottom: 0.5rem;
    }
    
    .course-module p {
        font-size: 1rem;
        color: #555;
        margin-bottom: 1rem;
    }
    .course-image-wrapper {
        width: 100%;
        height: 180px; /* Altura fija para todas las imágenes */
        margin-bottom: 1rem;
        border-radius: var(--border-radius-default); /* Hereda el radio de los bordes */
        overflow: hidden; /* Corta la imagen si excede el contenedor */
    }

    .course-image-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* Recorta la imagen para que cubra el área sin distorsionarla */
        display: block; /* Elimina espacio extra debajo de la imagen */
        transition: transform 0.3s ease; /* Efecto hover en la imagen */
    }

    .course-module:hover .course-image-wrapper img {
        transform: scale(1.05); /* Zoom ligero en hover */
    }
    .course-icon {
        font-size: 3rem;
        color: var(--color-secondary);
        margin-bottom: 1rem;
    }
    
    .course-tag {
        position: absolute;
        top: 15px;
        right: 15px;
        font-size: 0.8rem;
        font-weight: 700;
        padding: 0.3rem 0.8rem;
        border-radius: 20px;
        color: white;
        text-transform: uppercase;
    }
    
    .primary-tag {
        background-color: var(--color-secondary); /* Naranja */
    }
    .secondary-tag {
        background-color: #00a0b2; /* Azul cian */
    }

    .small-button {
        font-size: 0.9rem;
        padding: 0.6rem 1.2rem;
        margin-top: auto;
        align-self: flex-start;
        background: var(--color-primary);
    }
    .small-button:hover {
        background: var(--color-secondary);
    }

    .large-cta-button {
        background: var(--color-secondary);
        font-size: 1.2rem;
        padding: 1rem 3rem;
        margin-top: 2rem;
    }
    .contact-note {
        font-size: 1rem;
        margin-top: 1.5rem;
        opacity: 0.9;
    }
    .highlight-link {
        color: var(--color-secondary);
        font-weight: 600;
        text-decoration: underline;
        transition: color 0.3s ease;
    }
    .highlight-link:hover {
        color: white;
    }

    /* Media Queries para Cursos */
    @media (max-width: 768px) {
        .courses-hero-grid h2 {
            font-size: 2.2rem;
        }
        .courses-hero-grid .subtitle {
            font-size: 1.1rem;
        }
        .courses-grid {
            grid-template-columns: 1fr;
        }
        .course-module {
            padding: 1.5rem;
        }
        .large-cta-button {
            font-size: 1.1rem;
            padding: 0.9rem 2.5rem;
        }
    }
        
        /* Media Queries para la galería de proyectos */
        @media (max-width: 992px) {
            .gallery {
                grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
                padding: 0 1rem;
            }
        }

        @media (max-width: 600px) {
            .gallery {
                grid-template-columns: 1fr;
                max-width: 100%;
            }
            .gallery-title-overlay h3 {
                font-size: 1rem;
            }
            .filter-btn {
                padding: 0.6rem 1rem;
                font-size: 0.9rem;
            }
            .project-media-container {
                height: 250px;
            }
            .media-navigation .nav-arrow {
                padding: 0 0.5rem;
                width: 35px;
                height: 35px;
                font-size: 1.2rem;
                left: -15px;
                right: -15px;
            }
            .media-navigation #prevMediaBtn {
                left: 0;
            }
            .media-navigation #nextMediaBtn {
                right: 0;
            }
            
        }

        /* Sección de Blog/Noticias */
        .blog-posts {
            display: flex;
            flex-wrap: wrap;
            gap: 2rem;
            justify-content: center;
            margin-top: 2rem;
        }

        .blog-card {
            background: white;
            padding: 1.5rem;
            border-radius: var(--border-radius-default);
            box-shadow: 0 4px 12px rgba(0,0,0,0.08);
            flex: 1 1 300px;
            max-width: 380px;
            text-align: left;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .blog-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 18px rgba(0,0,0,0.15);
        }

        .blog-card img {
            width: 100%;
            height: 200px;
            object-fit: cover;
            border-radius: var(--border-radius-default);
            margin-bottom: 1rem;
        }

        .blog-card h3 {
            font-size: 1.4rem;
            margin-bottom: 0.75rem;
            color: var(--color-primary);
            flex-grow: 1;
            text-align: center;
        }

        .blog-card p {
            font-size: 0.95rem;
            color: #555;
            margin-bottom: 1rem;
            line-height: 1.5;
            text-align: justify;
        }

        .blog-date {
            font-size: 0.85rem;
            color: #888;
            margin-bottom: 1rem;
            display: block;
        }

        .blog-card .button {
            margin-top: auto;
            align-self: flex-start;
            font-size: 0.9rem;
            padding: 0.6rem 1.2rem;
        }

        /* Sección Call to Action (CTA) y Contacto */
        .cta {
            background: var(--color-primary);
            color: white;
            text-align: center;
            padding: 5rem 2rem;
            border-radius: var(--border-radius-default);
            margin: 4rem auto;
            max-width: 1000px;
        }
        .cta h2 {
            font-size: 2.5rem;
            margin-bottom: 1.5rem;
            color: white;
        }
        .contact-info {
            margin-bottom: 1.5rem;
            display: flex;
            flex-direction: column;
            gap: 1rem;
            align-items: center;
            font-size: 1.1rem;
        }

        .contact-info a {
            color: white;
            text-decoration: none;
            transition: color 0.3s ease;
            display: flex;
            align-items: center;
            gap: 0.8rem;
        }

        .contact-info a:hover {
            color: var(--color-secondary);
        }

        .contact-info i {
            font-size: 1.4rem;
        }

        .cta-content-grid {
            display: flex;
            flex-wrap: wrap;
            gap: 2rem;
            margin-top: 2rem;
            justify-content: center;
            align-items: flex-start;
            text-align: center;
        }

        .cta-content-grid .grid-column {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            flex: 1 1 calc(33.33% - 1.33rem);
        }

        .cta-content-grid .grid-column p {
            margin-bottom: 1rem;
        }

        .cta-logo {
            height: 100px;
            margin-bottom: 1.5rem;
            border-radius: var(--border-radius-default);
            box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        }

        .map-container {
            width: 100%;
            height: 100%;
            min-height: 250px;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .map-container iframe {
            width: 100%;
            height: 100%;
            border-radius: var(--border-radius-default);
            border:0;
        }

        /* Media Queries para la sección CTA */
        @media (max-width: 992px) {
            .cta-content-grid {
                gap: 1.5rem;
            }
            .cta-content-grid .grid-column {
                flex: 1 1 calc(50% - 1rem);
            }
            .cta-content-grid .grid-column:nth-child(3) {
                flex: 1 1 100%;
                order: 3;
            }
            .cta-content-grid .grid-column:nth-child(2) {
                order: 2;
            }
            .cta-content-grid .grid-column:nth-child(1) {
                order: 1;
            }
            .blog-card {
                flex: 1 1 calc(50% - 1rem);
                max-width: calc(50% - 1rem);
            }
        }

        @media (max-width: 600px) {
            header {
                padding: 0.75rem 1rem;
            }
            .hero {
                padding: 6rem 1.5rem;
            }
            .hero h1 {
                font-size: 2.2rem;
            }
            .hero p {
                font-size: 1.1rem;
            }
            .section {
                padding: 3rem 1.5rem;
            }
            .section h2 {
                font-size: 2rem;
                margin-bottom: 2rem;
            }
            .cta {
                padding: 3.5rem 1.5rem;
                margin: 2rem 1.5rem;
            }
            .cta h2 {
                font-size: 2rem;
            }
            .card {
                padding: 2rem;
            }
            .cta-content-grid {
                flex-direction: column;
                flex-wrap: nowrap;
                gap: 1.5rem;
                align-items: center;
            }
            .cta-content-grid .grid-column:nth-child(1) { order: 1; flex: 1 1 100%; }
            .cta-content-grid .grid-column:nth-child(2) { order: 2; flex: 1 1 100%; }
            .cta-content-grid .grid-column:nth-child(3) { order: 3; flex: 1 1 100%; }

            .contact-info {
                font-size: 1rem;
            }
            .contact-info i {
                font-size: 1.2rem;
            }
            .cta-logo {
                height: 80px;
            }
            .button {
                font-size: 1rem;
                padding: 0.75rem 1.5rem;
            }
            .map-container {
                min-height: 200px;
            }
            .blog-card {
                flex: 1 1 100%;
                max-width: 100%;
            }
        }

        /* Estilos del pie de página */
        footer {
            background: var(--color-footer);
            color: white;
            text-align: center;
            padding: 2rem;
            font-size: 0.9rem;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 1rem;
        }

        .social-icons {
            margin-top: 1rem;
            display: flex;
            gap: 1.5rem;
        }

        .social-icons a {
            color: white;
            font-size: 1.8rem;
            transition: color 0.3s ease, transform 0.2s ease;
        }

        .social-icons a:hover {
            color: var(--color-secondary);
            transform: translateY(-3px);
        }

        /* Estilos base para todos los modales (overlay y contenido genérico) */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 2002; /* 💥 CORRECCIÓN: Mayor que el z-index del header (2001) */
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s ease, visibility 0.3s ease;
            overflow-y: auto;
        }

        .modal-overlay.active {
            opacity: 1;
            visibility: visible;
        }

        .modal-content {
            background: white;
            padding: 2.5rem;
            border-radius: var(--border-radius-default);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
            max-width: 500px;
            width: 90%;
            position: relative;
            max-height: 90vh;
            overflow-y: auto;
        }

        .close-button {
            position: absolute;
            top: 1rem;
            right: 1rem;
            background: none;
            border: none;
            font-size: 2rem;
            cursor: pointer;
            color: #333;
            transition: color 0.2s ease;
            z-index: 2001;
        }

        .close-button:hover {
            color: var(--color-primary);
        }

        .modal-content h2 {
            text-align: center;
            margin-bottom: 2rem;
            color: var(--color-primary);
            font-size: 2rem;
        }

        /* Estilos del formulario dentro de los modales */
        .form-group {
            margin-bottom: 1.2rem;
        }

        .form-group label {
            display: block;
            margin-bottom: 0.5rem;
            font-weight: 600;
            color: var(--color-dark);
        }

        .form-input,
        .form-textarea {
            width: 100%;
            padding: 0.8rem;
            border: 1px solid #ccc;
            border-radius: var(--border-radius-default);
            font-family: 'Inter', sans-serif;
            font-size: 1rem;
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
        }

        .form-input:focus,
        .form-textarea:focus {
            outline: none;
            border-color: var(--color-secondary);
            box-shadow: 0 0 0 3px rgba(255, 170, 0, 0.2);
        }

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

        .modal-content .button {
            width: 100%;
            margin-top: 1.5rem;
        }

        .form-message {
            text-align: center;
            margin-top: 1rem;
            font-size: 0.9rem;
            min-height: 20px;
        }
        .form-message.success {
            color: green;
        }
        .form-message.error {
            color: red;
        }

        /* Media Queries para modales de formulario */
        @media (max-width: 600px) {
            .modal-content {
                width: 95%;
                padding: 1.5rem;
                max-height: 95vh;
            }
            .modal-content h2 {
                font-size: 1.8rem;
            }
            .form-input,
            .form-textarea {
                padding: 0.6rem;
            }
            .modal-content .button {
                font-size: 1rem;
                padding: 0.75rem 1.5rem;
            }
        }

        /* Botón de Volver Arriba */
        #scrollToTopBtn {
            display: none;
            position: fixed;
            bottom: 20px;
            right: 20px;
            z-index: 99;
            background-color: var(--color-primary);
            color: white;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            border: none;
            outline: none;
            cursor: pointer;
            font-size: 1.5rem;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
            transition: background-color 0.3s, transform 0.2s, opacity 0.3s;
            display: flex;
            justify-content: center;
            align-items: center;
            opacity: 0;
            pointer-events: none;
        }

        #scrollToTopBtn.show {
            opacity: 1;
            pointer-events: auto;
        }

        #scrollToTopBtn:hover {
            background-color: var(--color-secondary);
            transform: translateY(-3px);
        }

        /* Media Query para tamaños de pantalla más pequeños */
        @media (max-width: 768px) {
            #scrollToTopBtn {
                width: 45px;
                height: 45px;
                font-size: 1.3rem;
                bottom: 15px;
                right: 15px;
            }
        }
        /* Estilos para el Botón Flotante de Inscripción */
        .floating-btn {
        position: fixed;
        bottom: 110px;
        right: 20px;
        background-color: var(--color-secondary);
        color: white;
        padding: 15px 25px;
        border-radius: 50px;
        text-decoration: none;
        font-weight: 700;
        font-size: 1.1rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
        z-index: 1000;
        transition: background-color 0.3s ease, transform 0.2s ease;
        animation: pulse 2s infinite;
        }

        .floating-btn:hover {
            background-color: #e69900;
            transform: translateY(-3px);
        }
        
        /* Animación de Pulso */
        @keyframes pulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.05); }
            100% { transform: scale(1); }
        }
        
        /* Media query para móviles: ajustar tamaño y posición si es necesario */
        @media (max-width: 768px) {
            .floating-btn {
                bottom: 25px; /* Ajustado para móviles: se superpone con Volver Arriba a 15px */
                right: 15px;
                padding: 12px 20px;
                font-size: 1rem;
            }
        }
        
        .modal-contact-info {
            text-align: center;
            font-size: 1.2rem;
            margin-top: 2rem;
            color: var(--color-primary);
            font-weight: 600;
        }

        .modal-contact-buttons {
            display: flex;
            justify-content: center;
            gap: 1.5rem;
            margin-top: 1.5rem;
            flex-wrap: wrap;
        }

        .modal-contact-buttons .button {
            min-width: 200px;
            text-align: center;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.8rem;
        }

        .whatsapp-button {
            background-color: #25D366;
        }
        .whatsapp-button:hover {
            background-color: #1DA851;
        }

        .website-button {
            background-color: var(--color-primary);
        }
        .website-button:hover {
            background-color: #005a8d;
        }

        /* Media Queries para el modal de cursos */
        @media (max-width: 992px) {
            .modal-content.large-modal-content {
                width: 95%;
                padding: 2rem;
            }
            .course-grid {
                grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            }
        }

        @media (max-width: 768px) {
            .modal-content.large-modal-content {
                padding: 1.5rem;
            }
            .course-grid {
                grid-template-columns: 1fr;
            }
            .course-card-modal h3 {
                font-size: 1.4rem;
            }
            .course-card-modal p, .course-card-modal ul li {
                font-size: 0.9rem;
            }
            .modal-contact-buttons {
                flex-direction: column;
            }
            .modal-contact-buttons .button {
                width: 100%;
                min-width: unset;
            }
        }
        
        /* --- Estilos para el Botón Flotante de WhatsApp --- */
        .whatsapp-float {
            position: fixed;
            bottom: 20px;
            right: 100px; /* Posición ajustada para evitar choque en desktop */
            background-color: #25D366;
            color: white;
            width: 60px;
            height: 60px;
            border-radius: 50%;
            text-align: center;
            font-size: 32px;
            line-height: 60px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
            z-index: 1500;
            transition: transform 0.3s ease, background-color 0.3s ease;
        }
        
        .whatsapp-float:hover {
            transform: scale(1.1);
            background-color: #1DA851;
        }
        
        /* Ajuste para móviles */
        @media (max-width: 768px) {
            .whatsapp-float {
                right: 15px;
                bottom: 90px; /* Arriba del botón de inscripción (25px) y de volver arriba (15px) */
                width: 50px;
                height: 50px;
                font-size: 28px;
                line-height: 50px;
            }
        }
        
        .video-overlay {
            position: fixed; /* Lo fija sobre toda la pantalla */
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.85); /* Fondo oscuro semitransparente */
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 10000; /* Valor alto para estar sobre el menú y el hero */
        }
        
        .video-container {
            width: 90%;
            max-width: 450px; /* Ajustado para el formato vertical del video */
            background: #000;
            border-radius: 15px;
            overflow: hidden;
            box-shadow: 0 0 20px rgba(0,0,0,0.5);
        }
        
        #promoVideo {
            width: 100%;
            display: block;
        }
        
        .video-container {
            position: relative; /* Necesario para ubicar el botón */
        }
        
        .close-btn {
            position: absolute;
            top: 10px;
            right: 15px;
            color: white;
            font-size: 30px;
            font-weight: bold;
            cursor: pointer;
            z-index: 10001; /* Por encima del video */
            text-shadow: 0 0 5px rgba(0,0,0,0.8);
            transition: transform 0.2s;
        }
        
        .close-btn:hover {
            transform: scale(1.2);
            color: #ffcc00; /* Un color que resalte, similar al de tu logo TopoTech */
        }