:root {
    --color-rojo: #FF0000;
    --color-verde: #A4D65E;
    --color-celeste: #33B5E5;
    --color-azul: #0066CC;
    --color-azul-oscuro: #003366;
    --color-texto: #333333;
}

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

body {
    font-family: 'Poppins', sans-serif;
    color: var(--color-texto);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: 'Raleway', sans-serif;
    font-weight: 800;
}

/* Navbar */
.navbar-custom {
    transition: all 0.3s ease;
    padding: 0.2rem 0;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-custom.scrolled {
    background: #fff;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
}

.navbar-brand img {
    height: 70px;
    width: auto;
    /* Mantiene la proporción */
    transition: height 0.3s ease;
    /* Efecto suave al cambiar de tamaño */
}

.navbar-nav .nav-link {
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    color: var(--color-azul) !important;
    margin: 0 1rem;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--color-celeste) !important;
}

/* Hero Carousel */
.hero-section {
    height: 70vh;
    min-height: 500px;
    margin-top: 95px;
}

.carousel-item {
    height: 70vh;
    min-height: 500px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.carousel-caption {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
}

.carousel-caption h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.carousel-caption p {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.btn-hero {
    background: var(--color-azul);
    color: white;
    padding: 0.8rem 2.5rem;
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-hero:hover {
    background: var(--color-celeste);
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(51, 181, 229, 0.4);
}

/* Cursos Section */
.cursos-section {
    padding: 5rem 0;
    background: #f8f9fa;
}

.section-title {
    font-size: 2.5rem;
    color: var(--color-azul);
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 3rem;
}

/* Filtros */
.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: white;
    border: 2px solid var(--color-azul);
    color: var(--color-azul);
    padding: 0.6rem 2rem;
    border-radius: 50px;
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--color-azul);
    color: white;
}

/* Course Cards */
.course-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.course-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    z-index: 1;
}

.badge-vivo {
    background: var(--color-verde);
    color: white;
}

.badge-grabado {
    background: var(--color-azul);
    color: white;
}

.course-image {
    width: 100%;
    aspect-ratio: 4/5;
    /* object-fit: cover; */
    object-fit: contain;
    position: relative;
}

.course-content {
    padding: 0.2rem 1.5rem 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.course-title {
    font-size: 1.3rem;
    color: var(--color-azul-oscuro);
    margin-bottom: 1rem;
    font-weight: 800;
}

.course-description {
    color: #666;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    flex-grow: 1;
}

.course-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.course-info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #555;
}

.course-info-item i {
    color: var(--color-azul);
    width: 20px;
}

.course-actions {
    display: flex;
    gap: 1rem;
}

.btn-inscribirse {
    flex: 1;
    background: var(--color-azul);
    color: white;
    border: none;
    padding: 0.7rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-inscribirse:hover {
    background: var(--color-celeste);
}

.btn-leer-mas {
    flex: 1;
    background: transparent;
    color: var(--color-azul);
    border: 2px solid var(--color-azul);
    padding: 0.7rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-leer-mas:hover {
    background: var(--color-azul);
    color: white;
}

/* --- ESTILOS DE GALERÍA HORIZONTAL (Grabados) --- */

/* Contenedor con scroll */
.gallery-scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 1.5rem;
    padding: 1rem 0.5rem 2rem 0.5rem;
    /* Padding inferior extra para la scrollbar */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    /* Scroll suave en iOS */
}

/* Estilización de la barra de scroll (Chrome/Safari/Edge) */
.gallery-scroll-container::-webkit-scrollbar {
    height: 8px;
}

.gallery-scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.gallery-scroll-container::-webkit-scrollbar-thumb {
    background: #ccc;
    /* Color gris suave */
    border-radius: 10px;
    transition: background 0.3s;
}

.gallery-scroll-container::-webkit-scrollbar-thumb:hover {
    background: var(--color-azul);
    /* Se pone azul al interactuar */
}

/* Elemento individual de la galería */
.gallery-item {
    flex: 0 0 auto;
    /* Importante: Evita que se encojan */
    width: 280px;
    /* Ancho fijo para mantener uniformidad */
}

/* --- Variaciones para la Tarjeta Mini (Grabados) --- */
.course-card.card-mini {
    height: 100%;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    /* Sombra un poco más sutil */
}

.course-image.image-mini {
    aspect-ratio: 1/1;
    /* Cuadrado para imágenes Instagram (se ven completas) */
    object-fit: contain;
}

/* Contacto Section */
.contacto-section {
    padding: 5rem 0;
    background: white;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: var(--color-azul);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.contact-details h4 {
    color: var(--color-azul);
    margin-bottom: 0.5rem;
}

.contact-details a {
    color: var(--color-texto);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-details .social-link {
    color: white;
}

.contact-details a:hover {
    color: var(--color-celeste);
}

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

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    color: white;
    text-decoration: none;
}

.social-link.facebook {
    background: #1877f2;
}

.social-link.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    filter: brightness(1.1);
    color: var(--color-celeste);
}

.contact-image {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.contact-image-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 400px;
    /* Altura por defecto en PC */
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.contact-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
    padding: 2rem;
}

.contact-image-container .contact-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Certificados Section */
.certificados-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--color-azul) 0%, var(--color-azul-oscuro) 100%);
    color: white;
}

.certificados-section .section-title {
    color: white;
}

.certificados-section .section-subtitle {
    color: white;
}

.certificado-search {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 15px;
}

.certificado-search h4 {
    color: var(--color-azul);
    margin-bottom: 1.5rem;
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-input {
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.btn-buscar {
    background: var(--color-azul);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-buscar:hover {
    background: var(--color-celeste);
}

.certificado-result {
    margin-top: 2rem;
    display: none;
}

.certificado-preview {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    color: var(--color-texto);
}

.certificado-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-certificado {
    flex: 1;
    padding: 0.8rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-descargar {
    background: var(--color-verde);
    color: white;
}

.btn-imprimir {
    background: var(--color-celeste);
    color: white;
}

/* WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    box-shadow: 0 5px 20px rgba(37, 211, 102, 0.5);
    z-index: 1000;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.7);
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 5px 20px rgba(37, 211, 102, 0.5);
    }

    50% {
        box-shadow: 0 5px 30px rgba(37, 211, 102, 0.8);
    }
}

/* Footer */
footer {
    background: var(--color-azul-oscuro);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-logo img {
    height: 80px;
    /* Altura generosa para PC */
    width: auto;
    /* Mantiene la proporción */
    margin-bottom: 1rem;
}

.footer-section h5 {
    font-family: 'Raleway', sans-serif;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links li i {
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

/* Reduce tamaño de fuente para emails largos */
.footer-links li:has(i.fa-envelope) {
    font-size: 0.85rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--color-celeste);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 3rem;
    padding: 1.5rem 0;
}

/* Estilo para el contenedor del QR */
.camara-badge-qr {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Modal Customization */
.modal-header {
    background: var(--color-azul);
    color: white;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-body {
    padding: 2rem;
}

/* Descargo de Responsabilidad */
.descargo-section {
    padding: 2rem 0;
    background-color: #f1f4f8;
    /* Un tono gris-azulado muy suave, más armónico */
    color: #555;
    /* Texto gris suave, no negro puro */
    font-size: 0.9rem;
    text-align: center;
    border-top: 1px solid #e0e0e0;
}

.descargo-section i {
    color: var(--color-azul);
    /* CAMBIO: Azul en lugar de Rojo */
    font-size: 1.2rem;
    margin-right: 8px;
    vertical-align: middle;
}

.descargo-section p {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
    /* Mejor lectura */
}

/* Fondos personalizados para Banners */
.bg-azul-oscuro {
    background-color: var(--color-azul-oscuro);
    color: white;
    /* Texto blanco por defecto */
}

.bg-azul {
    background-color: var(--color-azul);
    color: white;
}

.bg-celeste {
    background-color: var(--color-celeste);
    color: white;
}

/* Fondos en degradé para Banners y Cursos */
.bg-gradient-1,
.grad-curso-1 {
    background-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.bg-gradient-2,
.grad-curso-2 {
    background-image: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.bg-gradient-3,
.grad-curso-3 {
    background-image: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.grad-curso-4 {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.grad-curso-5 {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.grad-curso-6 {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

.bg-claro {
    background-color: #f8f9fa;
    color: var(--color-texto);
}

.bg-claro .carousel-caption h1,
.bg-claro .carousel-caption p {
    color: var(--color-texto);
    text-shadow: none;
}

/* --- BOTÓN DESCARGA PDF EN MODAL --- */
.btn-descargar-pdf {
    display: inline-block;
    background-color: #fff;
    color: #dc3545;
    /* Rojo Bootstrap */
    border: 2px solid #dc3545;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-descargar-pdf:hover {
    background-color: #dc3545;
    color: #fff;
    box-shadow: 0 4px 10px rgba(220, 53, 69, 0.3);
    transform: translateY(-2px);
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* =========================================
   MEDIA QUERIES (RESPONSIVE)
   ========================================= */

/* Tablets y Laptops pequeñas (Menos de 992px) */
@media (max-width: 992px) {
    .navbar-brand img {
        height: 50px;
    }

    .navbar-custom {
        padding: 0.1rem 0;
    }

    .contact-image-box {
        height: 300px;
        /* Reduce altura */
        font-size: 3rem;
    }

    .contact-info {
        text-align: center;
        /* Centra textos */
    }

    .contact-item {
        flex-direction: column;
        /* Icono arriba, texto abajo */
        gap: 1rem;
        margin-bottom: 2rem;
    }

    .social-links {
        justify-content: center;
    }

    .footer-section .social-links {
        justify-content: start;
    }
}

/* Tablets y Móviles (Menos de 768px) */
@media (max-width: 768px) {
    .carousel-caption h1 {
        font-size: 2rem;
    }

    .carousel-caption p {
        font-size: 1rem;
    }

    .hero-section,
    .carousel-item {
        height: 50vh;
        min-height: 400px;
        margin-top: 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .course-actions {
        flex-direction: column;
    }

    .filter-tabs {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.5rem 1.5rem;
        font-size: 0.9rem;
    }

    .gallery-item {
        width: 240px;
        /* Un poco más angostas en móvil para ver más contexto */
    }

    .course-title {
        font-size: 1rem;
        /* Título un poco más pequeño */
    }

    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        bottom: 20px;
        right: 20px;
    }

    /* Footer y QR */
    .footer-section {
        text-align: center;
    }

    .footer-section .social-links {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 10px;
    }

    .camara-badge-qr {
        flex-direction: column;
        gap: 10px;
    }

    .camara-badge-qr .text-end {
        text-align: center !important;
        margin-right: 0 !important;
    }
}

/* Celulares pequeños (Menos de 425px) */
@media (max-width: 425px) {}

/* --- ESTILOS PARA LISTA DE CERTIFICADOS --- */
#certificadoResult {
    max-height: 500px;
    /* Altura máxima antes de hacer scroll */
    overflow-y: auto;
    /* Scroll automático */
    padding: 5px;
    /* Padding interno para sombras */

    /* Scrollbar fina y elegante */
    scrollbar-width: thin;
    scrollbar-color: var(--color-azul) #f1f1f1;
}

#certificadoResult::-webkit-scrollbar {
    width: 6px;
}

#certificadoResult::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#certificadoResult::-webkit-scrollbar-thumb {
    background: #003366;
    border-radius: 4px;
}

/* Efecto Hover en las tarjetas pequeñas */
.hover-effect {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-effect:hover {
    transform: translateY(-2px);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15) !important;
}