/* =========================================
   HERO SECTION 
   ========================================= */
.hero-nosotros {
    height: 85vh !important;
    min-height: 550px;
    background-size: cover !important;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(43, 43, 43, 0.3), rgba(75, 64, 54, 0.7));
    z-index: 1;
}

.hero-nosotros .hero-content {
    margin-top: 20px;
    position: relative;
    z-index: 2;
    padding: 3rem 1rem;
    width: 100%; 
    max-width: 1200px; 
}

/* --- TIPOGRAFÍA FLUIDA --- */
.hero-title1 {
    font-family: 'Quickpen', cursive;
    font-size: clamp(3rem, 8vw, 5rem); 
    color: var(--text-light);
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    margin-bottom: 0.5rem;
    line-height: 1;
    word-wrap: break-word; 
}

.hero-sublead {
    font-family: 'Quickpen', cursive;
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 300;
    letter-spacing: 1px;
    color: var(--fondo-principal);
    padding: 0 10px; 
}

/* --- MARQUEE --- */
.marquee-wrapper {
    background: var(--color-secundario);
    color: var(--acento-principal);
    padding: 12px 0;
    overflow: hidden;
    white-space: nowrap;
    border-bottom: 4px solid var(--acento-principal);
}

.marquee-content {
    display: inline-block;
    animation: scroll 30s linear infinite;
    font-family: 'Marcellus', serif;
    font-size: clamp(0.7rem, 1.5vw, 0.9rem); 
    letter-spacing: 2px;
}

.marquee-content i {
    margin: 0 15px;
    font-size: 0.7rem;
    vertical-align: middle;
    color: #fff;
    opacity: 0.7;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- SECCIONES GENERALES --- */
.section-title {
    font-family: 'Quickpen', cursive;
    font-size: -webkit-xxx-large;
    color: var(--acento-principal);
    text-align: center;
    margin-bottom: 2rem;
    text-transform: unset;
    line-height: 1.1;
}

/* --- QUIÉNES SOMOS --- */
.quienes-portrait {
    height: 550px;
    width: 100%;
    background-size: cover;
    background-position: center;
    border-radius: 20px; 
    transition: transform 0.5s ease;
}

.quienes-portrait:hover {
    transform: translateY(-10px);
}

.text-justified-custom {
    text-align: justify;
    line-height: 1.8;
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* --- ESTADÍSTICAS --- */
.stats-parallax-section {
    position: relative;
    background: var(--color-principal);
    padding: 6rem 0;
    margin: 5rem 0;
    color: var(--text-light);
    overflow: hidden;
}

.stats-parallax-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('/img/nosotros/4.webp') center/cover fixed;
    opacity: 0.4;
    z-index: 0;
}

.stats-parallax-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--color-principal);
    opacity: 0.85;
    z-index: 1;
}

.stats-container {
    position: relative;
    z-index: 2;
}

.stat-box {
    padding: 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-number {
    font-family: 'Times New Roman', serif;
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 700;
    color: var(--acento-principal);
    line-height: 1;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--fondo-principal);
    opacity: 0.8;
}

/* --- GALERÍA --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    height: 320px;
    background-color: var(--color-secundario);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(43, 43, 43, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-caption {
    color: var(--text-light);
    font-family: 'Quickpen', cursive;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
}

/* --- MISIÓN Y VISIÓN --- */
.mision-vision-card {
    background: var(--fondo-principal);
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    height: 100%;
    border-top: 5px solid var(--acento-principal);
    transition: transform 0.3s ease;
}

.mision-vision-card:hover {
    transform: translateY(-5px);
}

.mv-icon {
    font-size: clamp(2.5rem, 4vw, 3rem);
    font-family: 'Quickpen', cursive;
    color: var(--acento-principal);
    margin-bottom: 1rem;
}

.vision-accent .mv-icon {
    color: var(--acento-secundario);
}

.vision-accent {
    border-top-color: var(--acento-secundario);
}

/* --- VALORES --- */
.section-valores {
    background-color: var(--fondo-secundario);
    padding: 4rem 1rem; 
    border-radius: 20px;
    margin-bottom: 4rem;
}

.valor-card {
    border: none;
    background: var(--fondo-principal);
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    position: relative;
    z-index: 1;
    height: 100%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
    
    padding: 1.5rem !important; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.valor-card .card-body {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 0; 
}

.valor-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--acento-secundario);
    opacity: 0;
    z-index: 1;
    transition: opacity 0.4s ease;
}

.valor-card.highlight,
.valor-card:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(196, 138, 58, 0.2);
}

.valor-card.highlight::before,
.valor-card:hover::before {
    opacity: 0.95;
}

.valor-card .card-title {
    font-family: 'Quickpen', cursive;
    font-size: clamp(1.6rem, 2.5vw, 2.2rem); 
    margin-bottom: 0.8rem;
    color: var(--acento-principal);
    transition: color 0.3s;
    word-break: normal; 
    white-space: normal;
    line-height: 1.1;
}

.valor-card .card-text {
    color: var(--text-muted);
    transition: color 0.3s;
    font-size: 0.95rem; 
    line-height: 1.4;
}

.valor-card.highlight .card-title,
.valor-card:hover .card-title,
.valor-card.highlight .card-text,
.valor-card:hover .card-text {
    color: var(--text-light);
}

@media (max-width: 1200px) and (min-width: 768px) {
    .valor-card .card-title {
        font-size: 1.5rem; 
    }
}

/* --- CTA CONTACTO --- */
.contact-cta-section {
    background: linear-gradient(135deg, var(--color-secundario), var(--color-principal));
    padding: 4rem 2rem;
    border-radius: 20px;
    margin-top: 5rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.contact-cta-section::before {
    content: '';
    position: absolute;
    top: -50%; left: -20%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(196, 138, 58, 0.1) 0%, transparent 70%);
    z-index: 0;
}

.contact-cta-section .section-title {
    position: relative;
    z-index: 1;
    color: var(--acento-principal);
}

.btn-gold {
    background: var(--acento-principal);
    background: linear-gradient(45deg, #c48a3a, #e6b768);
    color: #fff;
    border: none;
    font-family: 'Marcellus', serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn-gold:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(196, 138, 58, 0.4);
    color: #fff;
}

.contact-number-box {
    border: 1px dashed var(--acento-principal);
    transition: background 0.3s;
}
.contact-number-box:hover {
    background: #fff;
    border-style: solid;
}

/* --- ANIMACIONES UTILS --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}
.reveal.is-visible {
    opacity: 1;
    transform: none;
}

.modal-content-custom {
    background-color: transparent;
    border: none;
}
.caption-custom {
    font-family: 'Quickpen', cursive;
    color: var(--fondo-principal);
    font-size: 2rem;
}

/* =========================================
   MEDIA QUERIES (TABLET Y MÓVIL)
   ========================================= */

@media (max-width: 991px) {
    .quienes-portrait {
        height: 350px;
        margin-top: 2rem;
    }
    
    .stat-box {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 2rem;
    }
    
    .col-lg-6.pe-lg-5 {
        padding-right: 0 !important;
        text-align: center; 
    }
    
    .section-title.text-start {
        text-align: center !important;
    }
}

@media (max-width: 768px) {
    .hero-nosotros {
        min-height: 400px;
    }
    
    .section-valores {
        padding: 2rem 1rem;
    }
    
    .valor-card {
        margin-bottom: 1rem;
    }
    
    .contact-cta-section .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .contact-cta-section::before {
        display: none; 
    }
    
    .mision-vision-card {
        padding: 2rem;
    }
}
/* --- ALIADOS COMERCIALES (PREMIUM HOVER) --- */

.partner-card {
    display: block;
    position: relative;
    background: #fff;
    border-radius: 12px;
    overflow: hidden; /* Clave para ocultar el botón cuando baja */
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    height: 180px; /* Altura fija para uniformidad */
    border: 1px solid rgba(0,0,0,0.03);
}

.partner-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
}

/* Estilo del Logo */
.partner-logo {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
    filter: grayscale(100%); /* Blanco y negro por defecto */
    opacity: 0.6;
    transition: all 0.4s ease;
    transform: translateY(0);
}

.partner-logo1 {
    max-width: 150%;
    max-height: 300px;
    object-fit: contain;
    filter: grayscale(100%); /* Blanco y negro por defecto */
    opacity: 0.6;
    transition: all 0.4s ease;
    transform: translateY(0);
}

.partner-logo2 {
    max-width: 150%;
    max-height: 170px;
    object-fit: contain;
    filter: grayscale(100%); /* Blanco y negro por defecto */
    opacity: 0.6;
    transition: all 0.4s ease;
    transform: translateY(0);
}

/* Botón "Visitar" (Oculto inicialmente) */
.partner-cta {
    position: absolute;
    bottom: 20px;
    font-family: 'Marcellus', serif;
    font-size: 0.8rem;
    color: var(--acento-principal);
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0;
    transform: translateY(20px); /* Empujado hacia abajo */
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
}

/* --- INTERACCIÓN HOVER --- */

.partner-card:hover {
    transform: translateY(-8px); /* La tarjeta flota hacia arriba */
    box-shadow: 0 20px 40px rgba(196, 138, 58, 0.15); /* Sombra dorada */
    border-color: rgba(196, 138, 58, 0.3); /* Borde dorado sutil */
}

.partner-card:hover .partner-logo {
    filter: grayscale(0%); /* Recupera color */
    opacity: 1;
    transform: translateY(-15px); /* El logo sube para dar espacio al texto */
}

.partner-card:hover .partner-logo1 {
    filter: grayscale(0%); /* Recupera color */
    opacity: 1;
    transform: translateY(-15px); /* El logo sube para dar espacio al texto */
}

.partner-card:hover .partner-logo2 {
    filter: grayscale(0%); /* Recupera color */
    opacity: 1;
    transform: translateY(-15px); /* El logo sube para dar espacio al texto */
}

.partner-card:hover .partner-cta {
    opacity: 1;
    transform: translateY(0); /* El texto sube a su posición */
}

/* Ajuste Móvil */
@media (max-width: 768px) {
    .partner-card {
        height: 140px; /* Un poco más compactas en celular */
    }
    .partner-logo {
        max-height: 50px;
    }
}