/* Paleta de Colores:
Azul: #004D80
Amarillo Dorado: #FFD700
Blanco: #FFFFFF
Gris Claro: #F4F4F4
Gris Oscuro: #333333 */

:root {
    --primary-color: #0a174e;
    --accent-color: #f5d042;
    --light-color: #FFFFFF;
    --background-color: #F4F4F4;
    --text-color: #333333;
}

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

body {
    font-family: Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--light-color);
    line-height: 1.6;
}

/* ------------------ Header y Navegación ------------------ */

.header {
    background-color: var(--primary-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header.scrolled {
    padding: 0.5rem 2rem;
    background-color: #002147;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.nav {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex; /* Muestra los enlaces en línea en PC */
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 15px; /* ancho de barra de menu */
}


.nav-links li {
    margin-left: 20px;
}

.nav-links a {
    color: var(--light-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
    padding: 10px 0;
    position: relative;
}

.nav-links a:hover {
    color: var(--accent-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: var(--accent-color);
    bottom: 0;
    left: 0;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-links a:hover::after {
    transform: scaleX(1);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--light-color);
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s ease; /* Transición suave para el efecto de zoom */
}

.nav-toggle:hover {
    transform: scale(1.1) translateY(-3px); /* Zoom y movimiento al pasar el mouse */
}

/* Nuevo contenedor para el logo con fondo blanco y efecto */
.logo-container {
    background-color: var(--light-color);
    padding: 10px 15px;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.logo-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.header .logo img {
    height: 50px;
    display: block;
}

/* ------------------ Media Queries para Móviles ------------------ */

@media (max-width: 768px) {
    .header {
        padding: 1rem;
    }

    .nav-toggle {
        display: block; /* Muestra el botón de hamburguesa en móviles */
    }

    .nav-links {
        display: none; /* Oculta los enlaces por defecto en móviles */
        flex-direction: column;
        width: 100%;
        text-align: center;
        background-color: var(--primary-color);
        position: absolute;
        top: 100%;
        left: 0;
    }

    .nav-links.active {
        display: flex; /* Muestra los enlaces cuando se les añade la clase 'active' */
    }

    .nav-links li {
        margin: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }

    .nav-links a {
        display: block;
        padding: 15px;
        color: var(--light-color);
    }
}

/* ------------------ Secciones de la Página ------------------ */

main {
    padding-top: 70px; /* Espacio para el header fijo */
}

section {
    padding: 4rem 2rem;
    text-align: center;
}

h1, h2, h3, h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Estilo para pantallas de escritorio (PC) */
h1 {
  font-size: 5rem;
}

/* Media query para pantallas pequeñas (móviles) */
@media (max-width: 768px) {
  h1 {
    font-size: 1.5rem; /* Ajusta este valor al tamaño que prefieras para móviles */
  }
}

.btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--primary-color);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #FFC107;
    transform: translateY(-2px);
}

.page-header {
    background-color: var(--primary-color);
    color: var(--light-color);
    padding: 6rem 2rem 4rem;
}

.page-header h1 {
    color: var(--light-color);
}

.page-header p {
    max-width: 800px;
    margin: 0 auto;
}

/* ------------------ Carrusel de Video ------------------ */

.video-carousel {
    position: relative;
    height: 80vh; 
    width: 100%;
    overflow: hidden;
    color: var(--light-color);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    background-color: black;
}

.video-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.video-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease-in-out, visibility 1s ease-in-out;
}

.video-slide.active {
    opacity: 1;
    visibility: visible;
}

.video-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.prev-slide, .next-slide {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: var(--light-color);
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 1.5rem;
    z-index: 10;
    transition: background-color 0.3s ease;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.prev-slide:hover, .next-slide:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.prev-slide {
    left: 10px;
}

.next-slide {
    right: 10px;
}

.slide-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.dot.active {
    background-color: var(--accent-color);
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .video-carousel {
        height: 50vh; 
    }
    .prev-slide, .next-slide {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        padding: 10px;
    }
}
/* ------------------ Cards de Cursos y Organizaciones ------------------ */

.course-cards-container,
.all-courses-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.course-card, .module-card {
    background-color: var(--background-color);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.course-card:hover, .module-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.course-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.course-card h3 {
    margin-top: 0;
}

.course-card p {
    flex-grow: 1;
    margin-bottom: 1rem;
}

.course-card .btn {
    align-self: flex-start;
}

.all-courses-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--light-color);
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.2rem;
    margin-top: 3rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.all-courses-btn:hover {
    background-color: var(--accent-color);
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}
 /* imagen con tiluto y codigo de curso */
.hero-course-banner {
    width: 100%;
    height: 350px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    color: var(--light-color);
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

/* Capa de superposición para que el texto sea más legible */
.hero-course-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-course-banner .banner-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 1rem;
}

.hero-course-banner h1 {
    color: var(--light-color); /* Color blanco */
    font-size: 3.5rem; /* Tamaño más grande */
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7); /* Sombra para que se lea mejor */
    text-align: center; /* Centrar el título */
}

.hero-course-banner p {
    text-align: left; /* Alinear el código a la izquierda */
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

/*movimiento y estilo de logos de organizaciones*/
.organizations {
    background-color: var(--background-color);
}

.organization-logos {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 2rem;
}

.organization-logos img {
    max-width: 150px;
    height: auto;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: filter 0.3s ease, opacity 0.3s ease, transform 0.3s ease; /* ¡Añadimos transform! */
    transform: scale(1); /* Tamaño original por defecto */
}

.organization-logos img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1) translateY(-5px); /* Zoom del 110% y ligero movimiento hacia arriba */
}

.organization-logos img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* ------------------ Sección de Detalle de Cursos ------------------ */

.course-detail {
    padding-top: 5rem;
    max-width: 900px;
    margin: 0 auto;
    text-align: left;
}

.course-header {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.course-description-text {
    max-width: 800px;
    margin: 0 auto 2rem auto;
    text-align: center; /* Esto centrará el texto */
    color: var(--text-color);
}

.course-header h1 {
    font-size: 2.5rem;
}

.course-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    background-color: var(--background-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    text-align: center; /* Esto centrará el texto */
}

.info-box {
    text-align: center;
}

.info-box h4 {
    margin: 0;
    color: var(--primary-color);
}

.info-box p {
    margin: 0;
}

.course-section {
    margin-bottom: 3rem;
}

.modules-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.module-card h4 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.content-list {
    margin-top: 2rem;
}

.content-list h4 {
    color: var(--accent-color);
    border-left: 3px solid var(--accent-color);
    padding-left: 10px;
    margin-bottom: 1rem;
}

.content-list ul {
    list-style: none;
    padding-left: 0;
}

.content-list li {
    background-color: var(--background-color);
    margin-bottom: 0.5rem;
    padding: 10px 15px;
    border-radius: 5px;
}

/* ------------------ Contacto y Mapa ------------------ */

.contact-info {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.contact-info h2 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.contact-info p {
    margin-bottom: 0.5rem;
}

.map-container {
    width: 100%;
    height: 400px;
    margin-top: 2rem;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    border: none;
}

/* ------------------ Footer ------------------ */

.footer {
    background-color: var(--primary-color);
    color: var(--light-color);
    padding: 2rem;
    text-align: center;
}

.footer-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 2rem;
    margin-bottom: 1rem;
}

.footer-section {
    text-align: left;
}

.footer-section h4 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    }

.footer-section p {
    margin: 0.5rem 0;
}

.social-icons a {
    color: var(--light-color);
    font-size: 1.5rem;
    margin: 0 10px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-icons a:hover {
    color: var(--accent-color);
    transform: scale(1.1) translateY(-13px); /* Movimiento hacia arriba al pasar el mouse */
}

.copyright {
    text-align: center;
}

/* ------------------ Carrusel de Imágenes (Acerca de Nosotros) ------------------ */

.image-carousel-section {
    background-color: var(--background-color);
    padding: 4rem 2rem;
}

.image-carousel {
    position: relative;
    max-width: 900px;
    height: 450px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.carousel-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease-in-out, visibility 1s ease-in-out;
}

.carousel-item.active {
    opacity: 1;
    visibility: visible;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.prev-img-btn, .next-img-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: var(--light-color);
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 1.5rem;
    z-index: 10;
    transition: background-color 0.3s ease;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.prev-img-btn:hover, .next-img-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.prev-img-btn {
    left: 10px;
}

.next-img-btn {
    right: 10px;
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.carousel-dots .dot {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.carousel-dots .dot.active {
    background-color: var(--accent-color);
    transform: scale(1.2);
}

.about-content .container {
    max-width: 900px;
    margin: 0 auto;
    text-align: left;
    padding: 0 1rem;
}

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

@media (max-width: 768px) {
    .image-carousel {
        height: 300px;
    }
    .prev-img-btn, .next-img-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        padding: 10px;
    }
}