/* Header */
.site-header {
    background: rgba(255, 255, 255, 0.80);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    height: var(--header-height, 80px);
}

/* Logo */
.logo-container {
    display: flex;
    align-items: center;
    padding-right: 2rem;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--color-primary-dark);
    gap: 0.75rem;
}

.logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.institute-name {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.name-line {
    font-family: 'Montserrat', sans-serif;
    white-space: nowrap;
}

.name-line-small {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-gray-dark);
    letter-spacing: 0.02em;
}

.name-line-large {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-primary);
    letter-spacing: 0.01em;
}

/* Menú principal */
.main-nav {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
}

.nav-item {
    position: relative;
}

.menu-link {
    color: var(--color-gray-dark);
    text-decoration: none;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 500;
    border-radius: 6px;
}

.menu-link:hover {
    color: var(--color-primary);
    background: rgba(0, 102, 204, 0.05);
}

/* Submenús */
.has-submenu > .menu-link::after {
    content: "▾";
    font-size: 0.8em;
    margin-left: 0.25rem;
    transition: transform 0.3s ease;
}

.has-submenu.active > .menu-link::after {
    transform: rotate(180deg);
}

.submenu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(255, 255, 255, 0.80);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.has-submenu.active .submenu,
.has-submenu:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.submenu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.80);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-left: 1px solid rgba(0, 0, 0, 0.08);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.submenu li {
    list-style: none;
}

.submenu li a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--color-gray-dark);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    border-radius: 6px;
    position: relative;
}

.submenu li a:hover {
    background: rgba(0, 102, 204, 0.05);
    color: var(--color-primary);
}

/* Botones de acción */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: 2rem;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.2);
}

/* Menú móvil */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.75rem;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.menu-toggle:hover {
    background: rgba(0, 102, 204, 0.05);
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-primary);
    position: relative;
    transition: background 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--color-primary);
    transition: transform 0.3s ease;
}

.hamburger::before {
    top: -6px;
}

.hamburger::after {
    bottom: -6px;
}

.menu-toggle.active .hamburger {
    background: transparent;
}

.menu-toggle.active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.menu-toggle.active .hamburger::after {
    transform: rotate(-45deg);
    bottom: 0;
}

@media (max-width: 1024px) {
    .header-content {
        height: var(--header-height, 70px);
    }

    .logo-img {
        height: 40px;
    }

    .name-line-small {
        font-size: 0.75rem;
    }

    .name-line-large {
        font-size: 0.95rem;
    }

    .menu-toggle {
        display: block;
        z-index: 1001;
    }

    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.80); /* Reducida la opacidad */
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        padding: calc(var(--header-height, 70px) + 1rem) 1rem 1rem 1rem;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        z-index: 1000;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1); /* Agregado sombreado */
    }

    .main-nav.active {
        transform: translateX(0);
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }

    .menu-link {
        padding: 1rem;
        justify-content: space-between;
        font-size: 1.1rem;
    }

    .submenu {
        position: static;
        box-shadow: none;
        padding: 0 0 0 1rem;
        transform: none !important;
        border: none;
        background: transparent;
        width: 100%;
        display: none;
        opacity: 1;
        visibility: visible;
    }

    .submenu::before {
        display: none;
    }

    .has-submenu.active .submenu {
        display: block;
    }

    .submenu li a {
        padding: 0.75rem 1rem;
        color: var(--color-gray-dark);
    }

    .header-actions .btn-primary {
        display: none;
    }

    .site-header {
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .logo-container {
        position: relative;
        z-index: 1001;
    }
}

/* Footer */
.site-footer {
    position: relative;
    background: var(--gradient-primary);
    color: white;
    padding: var(--spacing-xl) 0 var(--spacing-md);
    margin-top: auto;
    overflow: hidden;
}

.footer-wave {
    position: absolute;
    top: -100px;
    left: 0;
    width: 100%;
    color: var(--color-primary);
    line-height: 0;
    transform: rotate(180deg);
}

.footer-wave svg {
    width: 100%;
    height: 100px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    position: relative;
    z-index: 1;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

/* Estilos comunes de columnas */
.footer-column {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.footer-logo {
    height: 40px;
    width: auto;
}

.footer-title {
    font-family: var(--font-headings);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    position: relative;
    padding-bottom: var(--spacing-sm);
}

.footer-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
}

/* Columna de contacto */
.contact-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    font-size: 1.1rem;
}

.contact-item i {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Redes sociales */
.social-links {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.social-link i {
    font-size: 1.2rem;
}

/* Columna de enlaces */
.footer-nav {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.footer-link {
    color: white;
    text-decoration: none;
    padding: var(--spacing-sm) 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    transition: transform var(--transition-fast);
}

.footer-link:hover {
    transform: translateX(var(--spacing-xs));
}

.footer-link i {
    font-size: 1.1rem;
    opacity: 0.8;
}

/* Columna de botones */
.footer-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.footer-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-md);
    color: white;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.footer-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.footer-btn i {
    font-size: 1.2rem;
}

/* Footer bottom */
.footer-bottom {
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer-links {
    display: flex;
    gap: var(--spacing-md);
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: opacity var(--transition-fast);
}

.footer-links a:hover {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .footer-title {
        text-align: center;
    }

    .footer-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .contact-item {
        justify-content: center;
    }

    .social-links {
        justify-content: center;
    }

    .footer-link {
        justify-content: center;
    }

    .footer-buttons {
        align-items: center;
    }

    .footer-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .footer-bottom-content {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}

/* Cards */
.card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-content {
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-content p {
    margin-bottom: var(--spacing-lg);
    flex-grow: 1;
}

.card-content .btn {
    align-self: flex-start;
}

.card-title {
    color: var(--color-primary-dark);
    margin-bottom: var(--spacing-sm);
}

.card-text {
    color: var(--color-gray-dark);
    margin-bottom: var(--spacing-md);
}

.card-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.card-featured {
    border: 2px solid var(--color-primary);
}

.card-badge {
    display: inline-block;
    background: var(--gradient-primary);
    color: white;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-sm);
    font-size: 0.875rem;
}

/* Hero Section */
.hero {
    position: relative;
    background: var(--gradient-primary);
    background-image: url('../img/hero/home/hero-home-01-desktop.webp'), url('../img/hero/home/hero-home-01-desktop.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    padding: var(--spacing-xl) 0;
    text-align: center;
    min-height: 400px;
    display: flex;
    align-items: center;
}

/* Overlay azul sobre la imagen */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(51, 137, 217, 0.75), rgba(0, 73, 153, 0.85));
    z-index: 1;
}

/* Aseguramos que el contenido esté por encima del overlay */
.hero .container {
    position: relative;
    z-index: 2;
}

/* Estilos específicos para páginas de pastoral */
.hero-content-pastoral {
    max-width: 800px;
    margin: 0 auto;
}

.hero-content-encabezado h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    font-weight: 500;
}

.hero-content-encabezado .hero-text {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-lg);
    opacity: 0.9;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    font-weight: 500;
}

.hero-text {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-lg);
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
}

/* Grid de Cards */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin: var(--spacing-lg) 0;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

/* Íconos */
.icon i,
.service-icon i,
.benefit-icon i,
.contact-icon i {
    font-size: 1.5rem;
    color: var(--color-primary);
    transition: transform 0.3s ease;
}

.icon i:hover,
.service-icon i:hover,
.benefit-icon i:hover,
.contact-icon i:hover {
    transform: scale(1.1);
}

.service-icon,
.benefit-icon,
.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--color-gray-light);
    margin-bottom: var(--spacing-md);
}

/* Sección de Noticias */
.news-section {
    background-color: var(--color-gray-light);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin: var(--spacing-lg) auto;
    max-width: 1000px;
}

.news-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.news-image {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
}

.news-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

/* Clases para colores especiales de news-cards */
.news-card.highlighted {
    background: linear-gradient(135deg, #fff9c4, #fef08a);
    border: 2px solid #f59e0b;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.news-card.highlighted:hover {
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3);
    transform: translateY(-8px);
}

.news-card.urgent {
    background: linear-gradient(135deg, #fef2f2, #fecaca);
    border: 2px solid #ef4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.news-card.urgent:hover {
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
    transform: translateY(-8px);
}

.news-card.info {
    background: linear-gradient(135deg, #f0f9ff, #bfdbfe);
    border: 2px solid #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.news-card.info:hover {
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
    transform: translateY(-8px);
}

.news-card.success {
    background: linear-gradient(135deg, #f0fdf4, #bbf7d0);
    border: 2px solid #22c55e;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

.news-card.success:hover {
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.3);
    transform: translateY(-8px);
}

.news-content {
    padding: var(--spacing-lg);
}

.news-content h3 {
    margin-bottom: var(--spacing-md);
    color: var(--color-primary-dark);
}

.news-content p {
    margin-bottom: var(--spacing-lg);
    color: var(--color-gray-dark);
}

.btn-link {
    color: var(--color-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s ease;
}

.btn-link:hover {
    color: var(--color-primary-dark);
}

/* Separador de secciones */
.section-divider {
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--color-primary), transparent);
    margin: var(--spacing-md) auto;
    max-width: 400px;
    opacity: 0.7;
}

/* Separador específico para después del carousel */
.hero-carousel + .section-divider {
    background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.1), transparent);
    height: 1px;
    max-width: 100%;
    margin: 0;
    opacity: 1;
}

/* Accesos Rápidos */
.quick-access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0;
}

.quick-access-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, #e2e6ea, #d5dbe1);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--color-primary-dark);
    transition: all 0.3s ease;
    text-align: center;
}

.quick-access-item i {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
    color: var(--color-primary);
    transition: transform 0.3s ease;
}

.quick-access-item .text {
    font-weight: 600;
    color: var(--color-gray-dark);
}

.quick-access-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
}

.quick-access-item:hover i {
    transform: scale(1.1);
    color: var(--color-primary-dark);
}

/* Utilidades adicionales */
.bg-light {
    background-color: var(--color-gray-light);
}

.btn-lg {
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: 1.1rem;
}

/* Estilos mejorados para cards de descargas */
.download-card {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.download-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
    border-radius: 12px 12px 0 0;
}

.download-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
    border-color: #3b82f6;
}

.download-card .download-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    transition: all 0.3s ease;
}

.download-card:hover .download-icon {
    transform: scale(1.1);
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

.download-card .download-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.download-card .download-description {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.download-card .download-btn {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.download-card .download-btn:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.download-card .download-btn i {
    font-size: 1.1rem;
}

/* Variantes de colores para diferentes tipos de archivos */
.download-card.pdf .download-icon {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.download-card.pdf:hover .download-icon {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.download-card.doc .download-icon {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.download-card.book .download-icon {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.download-card.book:hover .download-icon {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
}

.download-card.form .download-icon {
    background: linear-gradient(135deg, #10b981, #059669);
}

.download-card.form:hover .download-icon {
    background: linear-gradient(135deg, #059669, #047857);
}

/* Media Queries adicionales */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero-text {
        font-size: 1.1rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .grid-cards,
    .news-grid,
    .quick-access-grid {
        grid-template-columns: 1fr;
    }

    .download-card {
        padding: 1.5rem;
    }

    .download-card .download-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

/* Galería */
.gallery {
    width: 100%;
    margin: var(--spacing-lg) 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.gallery-overlay {
    position: relative;
    width: 100%;
    height: 100%;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Galería específica para articulaciones */
.articulation-gallery {
    margin: 3rem 0 2rem;
    padding: 2rem 0;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-radius: 16px;
}

.articulation-gallery h3 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--color-primary-dark);
    font-size: 1.5rem;
    font-weight: 600;
}

.articulation-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.articulation-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    background: white;
    aspect-ratio: 4/3;
}

.articulation-gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.articulation-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.articulation-gallery-item:hover img {
    transform: scale(1.05);
}

.articulation-gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.articulation-gallery-item:hover::after {
    opacity: 1;
}

.articulation-gallery-item .zoom-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: rgba(255, 255, 255, 0.9);
    color: var(--color-primary);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    z-index: 2;
}

.articulation-gallery-item:hover .zoom-icon {
    transform: translate(-50%, -50%) scale(1);
}

/* Responsive para galería de articulaciones */
@media (max-width: 768px) {
    .articulation-gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
        padding: 0 0.5rem;
    }
    
    .articulation-gallery h3 {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }
    
    .articulation-gallery {
        margin: 2rem 0 1rem;
        padding: 1.5rem 0;
    }
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0));
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-caption h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
}

.gallery-item:hover .gallery-img {
    transform: scale(1.05);
}

.gallery-item:hover .gallery-caption {
    opacity: 1;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    position: relative;
    background: white;
    padding: 1rem;
    border-radius: 8px;
}

.lightbox-img {
    max-width: 100%;
    max-height: calc(90vh - 100px);
    object-fit: contain;
}

.lightbox-caption {
    padding: 1rem;
    text-align: center;
    color: #333;
}

.lightbox-caption h3 {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
}

.lightbox-caption p {
    margin: 0;
    font-size: 1rem;
    color: #666;
}

.close-lightbox {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 1001;
}

.close-lightbox:hover {
    color: #ddd;
}

/* Carousel */
.hero-carousel {
    position: relative;
    width: 100%;
    height: 500px; /* Altura fija similar a la sección hero */
    margin-bottom: var(--spacing-xl);
    background: var(--color-gray-dark);
}

.swiper {
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
    transition: transform 2s ease;
}

.carousel-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--spacing-xl);
    background: linear-gradient(transparent, rgba(0, 73, 153, 0.7)); /*hero grandient*/
    color: white;
    transform: translateY(0);
    transition: transform 0.5s ease;
}

.carousel-content h2 {
    color: white;
    font-size: var(--text-4xl);
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
}

.carousel-content p {
    font-size: var(--text-lg);
    max-width: 600px;
    opacity: 0.9;
}

.swiper-button-next,
.swiper-button-prev {
    color: white !important;
    background: rgba(0, 0, 0, 0.3);
    width: 50px !important;
    height: 50px !important;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: rgba(0, 0, 0, 0.5);
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 1.5rem !important;
}

.swiper-pagination-bullet {
    width: 12px !important;
    height: 12px !important;
    background: white !important;
    opacity: 0.5 !important;
}

.swiper-pagination-bullet-active {
    opacity: 1 !important;
    background: var(--color-primary) !important;
}

.carousel-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 10;
}

.carousel-progress-bar {
    height: 100%;
    background: var(--color-primary);
    width: 0;
    transition: width 0.1s linear;
}

/* Animaciones del carousel */
.swiper-slide-active .carousel-image {
    transform: scale(1.1);
}

.swiper-slide-active .carousel-content {
    transform: translateY(0);
}

.swiper-slide:not(.swiper-slide-active) .carousel-content {
    transform: translateY(100px);
}

/* Responsive para Hero Section */
@media (max-width: 768px) {
    .hero {
        background-image: url('../img/hero/home/hero-home-01-mobile.webp'), url('../img/hero/home/hero-home-01-mobile.jpg');
        min-height: 300px;
        padding: var(--spacing-lg) 0;
    }
    
    .hero h1,
    .hero-content-encabezado h1 {
        font-size: 2rem;
    }

    .hero-text,
    .hero-content-encabezado .hero-text {
        font-size: 1.1rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .hero {
        background-image: url('../img/hero/home/hero-home-01-tablet.webp'), url('../img/hero/home/hero-home-01-tablet.jpg');
    }
}

/* Responsive para Carousel */
@media (max-width: 768px) {
    .hero-carousel {
        height: 60vh;
        min-height: 400px;
    }

    .carousel-content {
        padding: var(--spacing-lg);
    }

    .carousel-content h2 {
        font-size: var(--text-3xl);
    }

    .carousel-content p {
        font-size: var(--text-base);
    }

    .swiper-button-next,
    .swiper-button-prev {
        display: none !important;
    }
}