/* 🔵 Encabezado visual con altura de pantalla completa */
.header-nosotros {
  position: relative;
  min-height: 100vh;
  padding: 80px 0 40px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 0 !important;
}

/* 🔵 Contenido del encabezado */
.header-content {
  position: relative;
  z-index: 2;
  color: white;
  text-align: center;
  animation: aparecer 1s ease-out forwards;
  opacity: 0;
}

.header-content h1 {
  font-size: 4rem;
  font-weight: bold;
  margin: 0;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.6);
  letter-spacing: 1px;
}

.subtitulo {
  font-size: 1.5rem;
  margin-top: 10px;
  color: rgba(255,255,255,0.85);
}

/* T铆tulo Opiniones con degradado */
.titulo-opiniones {
  background: linear-gradient(90deg, #0d6271, #00a1b9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  font-weight: 700;
}

/* L铆nea decorativa turquesa para nosotros */
.titulo-linea-nosotros {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #0d6271, #00a1b9) !important;
  border-radius: 2px;
  display: block;
  margin: 0.5rem auto 1.5rem auto;
}

/* L铆nea del header Nosotros 鈥 solo una l铆nea blanca */
.linea-header {
  margin: 15px auto 10px;
  width: 80px;
  height: 4px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 3px;
}

/* Quitamos la linea antigua para evitar duplicado */
.linea {
  display: none;
}




/* ------------------------------------------- */
/* Estilos de la Sección "Nosotros Información" */
/* ------------------------------------------- */

.nosotros-inf {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Título con gradiente VERDE (igual que Nuestra Identidad) */
.nosotros-inf .nosotros-title-gradient {
    background: linear-gradient(45deg, #006474, #00a6a6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

/* Línea decorativa bajo el título - VERDE */
.title-underline {
    width: 80px;
    height: 4px;
    background: linear-gradient(45deg, #006474, #00a6a6);
    border-radius: 2px;
}

/* Card de descripción */
.descripcion-inf-card {
    border: 1px solid #e9ecef;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.descripcion-inf-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 100, 116, 0.15) !important;
}

.descripcion-contenido p {
    color: #495057;
    line-height: 1.8;
    text-align: justify;
}

/* Mensaje cuando no hay descripción */
.mensaje-no-descripcion {
    animation: fadeIn 0.5s ease-in;
}

.mensaje-no-descripcion .icono-alerta {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

/* Card de video */
.n-video-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.n-video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 100, 116, 0.15) !important;
}

.n-video-card iframe {
    border: none;
}

/* Mensaje cuando no hay video */
.mensaje-video-vacio {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px dashed #dee2e6;
    border-radius: 0.5rem;
}

.video-vacio-contenido {
    animation: fadeIn 0.5s ease-in;
}

.video-vacio-contenido .icono-video {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Alert mejorado */
.nosotros-inf .alert-info {
    background: linear-gradient(135deg, #e7f3ff 0%, #cfe9ff 100%);
    color: #004085;
    border-radius: 10px;
}

/* Responsividad */
@media (max-width: 992px) {
    .nosotros-inf .nosotros-title-gradient {
        font-size: 2rem !important;
    }
    
    .descripcion-inf-card {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 576px) {
    .nosotros-inf .nosotros-title-gradient {
        font-size: 1.75rem !important;
    }
    
    .title-underline {
        width: 60px;
        height: 3px;
    }
}




/* ------------------------------------------- */
/* 1. Estilos de la Sección MVV (Incluye Fondo de Imagen) */
/* ------------------------------------------- */
.mvv-section {
    background-image: url('../images/nosotros.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding-top: 5rem !important;
    padding-bottom: 5rem !important;
    position: relative;
    margin-bottom: 4rem;
}

/* Superposición para mejorar la lectura del texto y el contraste */
.mvv-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85); 
    z-index: 0;
}

.mvv-section .container {
    position: relative;
    z-index: 1;
}

/* Título "Nuestra Identidad" con gradiente TURQUESA */
.mvv-section .main-title-gradient-turquesa {
    background: linear-gradient(45deg, #006474, #00a6a6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

/* Subtítulo debajo del título principal */
.mvv-section .text-center p.text-muted {
    font-size: 1.1rem;
    font-weight: 400;
}

/* ------------------------------------------- */
/* 2. Estilos y Animación Flip Card */
/* ------------------------------------------- */

.flip-card {
    background-color: transparent;
    width: 100%;
    height: 350px;
    perspective: 1000px;
    border-radius: 15px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    border-radius: 15px;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, 
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden; 
    backface-visibility: hidden;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.flip-card-front {
    color: white;
}

.flip-card-back {
    background-color: #f8f9fa;
    color: #343a40;
    transform: rotateY(180deg);
    text-align: left;
    overflow-y: auto;
}

/* ------------------------------------------- */
/* 3. Estilos de Lista de Valores */
/* ------------------------------------------- */

.flip-card-back ul.mvv-list {
    padding-left: 0;
    list-style: none;
    margin: 0;
}

.flip-card-back li {
    margin-bottom: 8px;
}

.bullet-check {
    color: #198754;
    font-weight: bold;
    margin-right: 8px;
    font-size: 1.1rem;
}

/* ------------------------------------------- */
/* 4. Responsividad MVV */
/* ------------------------------------------- */

@media (max-width: 768px) {
    .flip-card {
        height: 300px;
    }
    
    .mvv-section .main-title-gradient-turquesa {
        font-size: 2rem !important;
    }
    
    .mvv-section {
        margin-bottom: 2rem;
    }
}


/* ------------------------------------------- */
/* 5. Sección Información Adicional */
/* ------------------------------------------- */

.inf-nosotros {
    width: 100%;
    margin: 4rem auto;
    padding: 60px 20px;
    color: #FFF !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
    background-size: cover !important;
    text-align: center;
    border-radius: 0;
    box-shadow: none;
    min-height: 400px;
}

.inf-nosotros + * {
    margin-top: 4rem;
}

.titulo-inf {
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.btn-info {
    background-color: #00A8C2;
    font-size: 1rem;
    color: #FFF;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-info:hover {
    background-color: #6fecff;
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

/* ------------------------------------------- */
/* 6. Responsividad para Información Adicional */
/* ------------------------------------------- */

@media (max-width: 768px) {
    .inf-nosotros {
        margin: 2rem auto;
        padding: 40px 15px;
        min-height: 300px;
    }
    
    .titulo-inf {
        font-size: 1.5rem;
    }
}


/* ------------------------------------------- */
/* 7. Sección Testimonios                       */
/* ------------------------------------------- */

.container {
    margin-top: 40px;
}

.testimonio {
    text-align: center;
    padding: 30px;
}

.titulo {
    margin-bottom: 20px;
    color: #095f5f;
    font-weight: bold;
}

/* ✅ CORRECCIÓN PRINCIPAL: video-wrapper con proporción 16:9 */
.testimonio .video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 👈 Clave: mantiene proporción 16:9 */
    height: 0;              /* 👈 Necesario para que funcione el padding-bottom */
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

/* ✅ El iframe/video se estira para llenar el contenedor */
.testimonio .video {
    position: absolute;     /* 👈 Se posiciona dentro del contenedor */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
    border-radius: 8px;
}

/* Videos locales (no YouTube) */
.testimonio video.video {
    object-fit: contain;
    background: #000;
}

.testimonio .card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

/* Hover effect solo en desktop */
@media (min-width: 768px) {
    .testimonio .card:hover {
        transform: translateY(-5px);
        box-shadow: 0 1.5rem 4rem rgba(0,0,0,.2) !important;
    }
}

/* ✅ Ajustes dinámicos según cantidad de testimonios */

/* 1 testimonio - centrado y grande */
.testimonios-cantidad-1 {
    max-width: 900px;
    margin: 0 auto;
}

/* 2 testimonios - más espacio entre ellos */
.testimonios-cantidad-2 {
    max-width: 1100px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .testimonios-cantidad-2 .col-md-6 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* 3 o más testimonios - grid normal */
@media (min-width: 992px) {
    .testimonio .col-lg-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

/* Responsive breakpoints */
@media (min-width: 768px) and (max-width: 991px) {
    .testimonio .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

.testimonio iframe,
.testimonio video {
    max-width: 100%;
    height: 100%; /* 👈 Corregido: era "auto", sobreescribía el height del video-wrapper */
}

/* Mobile responsivo */
@media (max-width:767px) {
    .card {
        flex-direction: column;
        text-align: center;
    }
    
    .card img {
        width: 100%;
        max-width: 300px;
        margin: 0 auto 20px;
    }
    
    .card-body {
        padding: 10px;
    }
    
    .card-title {
        font-size: 1.5rem;
    }
    
    .card-text {
        font-size: 0.95rem;
    }
    
    .lista-valores li {
        font-size: 0.95rem;
    }
    
    .testimonio {
        padding: 1.5rem !important;
    }
    
    .testimonio .card-body {
        padding: 1rem !important;
    }
    
    .testimonio .titulo {
        font-size: 1.4rem;
    }
    
    .testimonio .card-title {
        font-size: 1.1rem;
    }
}

@keyframes aparecer {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes movimiento {
    from {
        background-position: bottom left;
    }
    to {
        background-position: top right;
    }
}

/* ------------------------------------------- */
/* YouTube Facade - Thumbnail de alta calidad  */
/* ------------------------------------------- */
.yt-facade {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.yt-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: opacity 0.3s ease;
}

.yt-facade:hover .yt-thumbnail {
    opacity: 0.85;
}

.yt-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: none;
    border: none;
    cursor: pointer;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
    transition: transform 0.2s ease;
}

.yt-facade:hover .yt-play-btn {
    transform: translate(-50%, -50%) scale(1.1);
}

.yt-facade iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 8px;
}

/* ------------------------------------------- */
/* BOT脫N SECCI脫N INFORMACI脫N ADICIONAL         */
/* ------------------------------------------- */
.btn-nosotros {
  background: linear-gradient(135deg, #0d7377 0%, #0a9396 100%);
  border: none;
  color: white;
  padding: 15px 35px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 4px 15px rgba(13, 115, 119, 0.3);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-nosotros:hover {
  background: linear-gradient(135deg, #095f5f 0%, #0d7377 100%);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(13, 115, 119, 0.5);
  color: white;
}

.btn-nosotros:active {
  transform: translateY(-1px);
  box-shadow: 0 6px 15px rgba(13, 115, 119, 0.4);
  color: white;
}
