/* ==============================================
   REDISEÑO FINAL - QUIÉNES SOMOS - CORREDORA DEL SUR
   ============================================== */

   :root {
    /* Paleta de colores corporativos */
    --primary-color: #2469b3;       /* Azul corporativo */
    --primary-light: #4185d8;
    --primary-dark: #1a4f8e;
    --secondary-color: #5cc62c;     /* Verde corporativo */
    --secondary-light: #7de64c;
    --secondary-dark: #46a021;
    --neutral-dark: #2c3e50;
    --neutral-mid: #546e7a;
    --neutral-light: #f7f9fa;
    --white: #ffffff;
    
    /* Sombras y efectos */
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 15px 30px rgba(0, 0, 0, 0.15);
    
    /* Bordes y radios */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Espaciado */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-6: 24px;
    --space-8: 32px;
    --space-12: 48px;
    --space-16: 64px;
    
    /* Transiciones */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-bounce: 400ms cubic-bezier(0.34, 1.3, 0.64, 1);
    
    /* Gradientes */
    --gradient-primary: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    --gradient-subtle: linear-gradient(135deg, rgba(36, 105, 179, 0.05), rgba(92, 198, 44, 0.05));
  }
  
  /* Importación de fuentes */
  @import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Poppins:wght@300;400;500;600&display=swap');
  
  /* Estilos base refinados */
  body {
    font-family: 'Poppins', sans-serif;
    color: var(--neutral-dark);
    overflow-x: hidden;
    background-color: var(--white);
    line-height: 1.5;
    font-size: 16px;
  }
  
  /* ========================
     HERO SECTION AJUSTADO
     ======================== */
  .main-background {
    position: relative;
    width: 100%;
    height: 65vh;
    margin-top: 0;
    overflow: hidden;
  }
  
  .background-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 20s ease;
    filter: brightness(0.9);
  }
  
  .main-background:hover .background-img {
    transform: scale(1.05);
  }
  
  .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(36, 105, 179, 0.8) 0%, rgba(0, 0, 0, 0.6) 100%);
    z-index: 1;
  }
  
  .hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--white);
    width: 90%;
    max-width: 900px;
    z-index: 2;
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
  }
  
  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translate(-50%, -45%);
    }
    to {
      opacity: 1;
      transform: translate(-50%, -50%);
    }
  }
  
  .hero-content h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  }
  
  .hero-content p {
    font-size: 1.4rem;
    font-weight: 300;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    max-width: 700px;
    margin: 1.5rem auto 0;
    line-height: 1.5;
  }
  
  .hero-content::after {
    content: "";
    position: absolute;
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: var(--radius-full);
  }
  
  .scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
  }
  
  .mouse {
    width: 30px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 20px;
    position: relative;
  }
  
  .mouse::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    animation: scrollAnim 1.5s infinite;
  }
  
  @keyframes scrollAnim {
    0% { 
      opacity: 1; 
      top: 10px; 
    }
    100% { 
      opacity: 0; 
      top: 25px; 
    }
  }
  
  /* ========================
     SECCIÓN NOSOTROS AJUSTADA
     ======================== */
  .nosotros {
    padding: 70px 0;
    position: relative;
  }
  
  .nosotros::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: var(--gradient-subtle);
    top: -150px;
    right: -150px;
    z-index: -1;
  }
  
  .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
  }
  
  .nosotros-header {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin-bottom: 50px;
  }
  
  .nosotros-logo {
    width: auto;
    height: 100px;
    margin-bottom: 25px;
    transition: var(--transition-normal);
  }
  
  .nosotros-logo:hover {
    transform: translateY(-5px);
  }
  
  .nosotros-header h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.6rem;
    font-weight: 600;
    color: var(--neutral-dark);
    position: relative;
    text-align: center;
  }
  
  .nosotros-header h1::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
  }
  
  .nosotros-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }
  
  .nosotros-content p {
    font-size: 1.1rem;
    color: var(--neutral-mid);
    line-height: 1.7;
    padding: 25px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: var(--transition-normal);
  }
  
  .nosotros-content p:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
  }
  
  .nosotros-content p strong {
    color: var(--primary-color);
    font-weight: 600;
  }
  
  /* ========================
     SECCIÓN MVV AJUSTADA
     ======================== */
  .mision-vision-valor {
    padding: 70px 0;
    background-color: var(--neutral-light);
    position: relative;
  }
  
  .mision-vision-valor .container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
  }
  
  .mvv-card {
    width: 30%;
    min-width: 300px;
    padding: 30px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
  }
  
  .mvv-card.show {
    animation: fadeInCard 0.5s forwards;
  }
  
  @keyframes fadeInCard {
    0% {
      opacity: 0;
      transform: translateY(20px);
    }
    100% {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .mvv-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-image: var(--gradient-primary);
  }
  
  .mvv-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
  }
  
  .mvv-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
  }
  
  .mvv-card .sticker {
    width: 40px;
    height: 40px;
    object-fit: contain;
    transition: var(--transition-normal);
  }
  
  .mvv-card:hover .sticker {
    transform: scale(1.1) rotate(5deg);
  }
  
  .mvv-card h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
  }
  
  .mvv-card p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--neutral-mid);
    margin-top: 15px;
  }
  
  /* ========================
     SECCIÓN DIRECTORIO - TARJETAS ESTILO TARJETA PRESENTACIÓN (4 POR LÍNEA MÁS ANCHAS)
     ======================== */
  .directorio-section {
    padding: 70px 0;
    position: relative;
  }
  
  .titulo-directorio {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.6rem;
    font-weight: 600;
    color: var(--neutral-dark);
    text-align: center;
    margin-bottom: 40px;
    position: relative;
  }
  
  .titulo-directorio::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
  }
  
  .directorio-filtros {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    gap: 12px;
    flex-wrap: wrap;
  }
  
  .filtro-btn {
    padding: 10px 24px;
    border: none;
    background: var(--neutral-light);
    color: var(--neutral-mid);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-normal);
    border-radius: var(--radius-full);
  }
  
  .filtro-btn:hover {
    background: #e6e6e6;
  }
  
  .filtro-btn.active {
    background: var(--primary-color);
    color: var(--white);
  }
  
  /* Contenedor con 4 tarjetas por línea - Más ancho y bordes más cercanos */
  .cards-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Usa todo el espacio disponible */
    gap: 15px; /* Espacio reducido entre tarjetas */
    width: 95%; /* Usa el 95% del ancho de la pantalla */
    max-width: 1600px; /* Ancho máximo extendido */
    margin: 0 auto;
  }
  
  /* Clases para diferentes números de tarjetas */
  .single-card {
    grid-template-columns: minmax(300px, 500px) !important;
    justify-content: center;
  }
  
  .two-cards {
    grid-template-columns: repeat(2, minmax(300px, 500px)) !important;
    justify-content: center;
  }
  
  .three-cards {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  
  /* Tarjetas estilo tarjeta de presentación */
  .custom-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition-normal);
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 450px;
    transform: translateY(15px);
    opacity: 0;
    width: 100%;
  }
  
  .custom-card.visible {
    animation: cardAppear 0.5s forwards;
    animation-delay: calc(var(--i, 0) * 80ms);
  }
  
  @keyframes cardAppear {
    0% {
      opacity: 0;
      transform: translateY(15px);
    }
    100% {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* Header con degradado corporativo */
  .custom-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    z-index: 0;
  }
  
  .custom-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
  }
  
  /* Foto centrada sobresaliendo del header */
  .custom-card img {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--white);
    margin: 60px auto 20px;
    position: relative;
    z-index: 2;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-sm);
    display: block; /* Asegura que la imagen siempre esté como bloque para el centrado */
  }
  
  .custom-card:hover img {
    transform: scale(1.05);
    border-color: var(--white);
    box-shadow: var(--shadow-md);
  }
  
  .custom-card h2 {
    margin-top: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--neutral-dark);
    text-align: center;
    padding: 0 15px;
    z-index: 2;
  }
  
  .custom-card h3 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 15px;
    z-index: 2;
  }
  
  .card-section {
    padding: 12px 20px;
    text-align: left;
    flex-grow: 1;
    z-index: 2;
  }
  
  .card-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 6px;
  }
  
  .card-section p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--neutral-mid);
    margin-bottom: 6px;
  }
  
  /* ========================
     ELEMENTOS DECORATIVOS SUTILES
     ======================== */
  .bubble {
    position: absolute;
    border-radius: 50%;
    background: var(--gradient-subtle);
    animation: floatAnimation 15s infinite ease-in-out;
    z-index: -1;
    opacity: 0.6;
    pointer-events: none;
  }
  
  @keyframes floatAnimation {
    0%, 100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(-10px);
    }
  }
  
  /* ========================
     ANIMACIONES DE SCROLL
     ======================== */
  .animate-on-scroll {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  
  .animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
  }
  
  .delay-1 {
    transition-delay: 0.1s;
  }
  
  .delay-2 {
    transition-delay: 0.2s;
  }
  
  /* ========================
     MEDIA QUERIES
     ======================== */
  @media (max-width: 1400px) {
    .cards-container {
      width: 98%;
      gap: 12px;
    }
  }
  
  @media (max-width: 1200px) {
    .cards-container {
      width: 98%;
      gap: 10px;
    }
  }
  
  @media (max-width: 992px) {
    .hero-content h1 {
      font-size: 3.5rem;
    }
    
    .nosotros-content {
      grid-template-columns: 1fr;
    }
    
    .mvv-card {
      width: 45%;
    }
    
    /* 2 columnas en tablets */
    .cards-container,
    .single-card,
    .two-cards,
    .three-cards {
      grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .single-card {
      grid-template-columns: minmax(300px, 450px) !important;
      justify-content: center;
    }
  }
  
  @media (max-width: 768px) {
    .hero-content h1 {
      font-size: 3rem;
    }
    
    .hero-content p {
      font-size: 1.2rem;
    }
    
    .main-background {
      height: 55vh;
    }
    
    .mvv-card {
      width: 100%;
      max-width: 450px;
    }
    
    .cards-container,
    .single-card,
    .two-cards,
    .three-cards {
      grid-template-columns: 1fr !important;
      width: 90%;
      max-width: 450px;
    }
  }
  
  @media (max-width: 576px) {
    .hero-content h1 {
      font-size: 2.5rem;
    }
    
    .hero-content p {
      font-size: 1rem;
    }
    
    .main-background {
      height: 50vh;
    }
    
    /* 1 columna en móviles pequeños */
    .cards-container {
      grid-template-columns: 1fr;
      width: 85%;
    }
    
    .nosotros-header h1,
    .titulo-directorio {
      font-size: 2rem;
    }
  }
  /* Configuración base para todas las fotos de perfil */
.custom-card img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid var(--white);
  margin: 35px auto 20px;
  position: relative;
  z-index: 2;
  transition: var(--transition-normal);
  box-shadow: var(--shadow-sm);
  display: block;
}

/* Reglas específicas con máxima prioridad para el posicionamiento de fotos */

/* Eduardo Riquelme S. */
.custom-card[data-category="director"]:nth-of-type(1) img {
  object-position: center 1% !important;
}

/* Cristian Silva */
.custom-card[data-category="director"]:nth-of-type(2) img {
  object-position: center 10% !important;
}

/* Caterina Villagra C. */
.custom-card[data-category="comercial"]:nth-of-type(1) img {
  object-position: center 30% !important;
}

/* Fernanda Ubeira V. */
.custom-card[data-category="soporte"]:nth-of-type(1) img {
  object-position: center 40% !important;
}

/* Rossana Bazzi */
.custom-card[data-category="comercial"]:nth-of-type(2) img {
  object-position: center 40% !important;
}

/* Andrea Muñoz */
.custom-card[data-category="comercial"]:nth-of-type(3) img {
  object-position: center 5% !important;
}

/* Ajustes adicionales con !important para garantizar visualización correcta */
.custom-card {
  display: flex !important;
  flex-direction: column !important;
}
/* Estilos para el contenedor de tarjetas */
.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  width: 95%;
  max-width: 1600px;
  margin: 0 auto;
  transition: all 0.3s ease;
}

/* Configuraciones específicas para diferente número de tarjetas */
.single-card {
  grid-template-columns: minmax(300px, 500px) !important;
  justify-content: center;
}

.two-cards {
  grid-template-columns: repeat(2, minmax(300px, 1fr)) !important;
  justify-content: center;
  gap: 30px;
}

.three-cards {
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 25px;
}

/* Estilos responsivos */
@media (max-width: 992px) {
  .cards-container {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .single-card {
    grid-template-columns: 1fr !important;
    max-width: 450px;
    margin: 0 auto;
  }
  
  .two-cards, .three-cards {
    grid-template-columns: repeat(2, 1fr) !important;
    max-width: 900px;
  }
}

@media (max-width: 768px) {
  .cards-container,
  .single-card,
  .two-cards,
  .three-cards {
    grid-template-columns: 1fr !important;
    max-width: 450px;
    margin: 0 auto;
  }
}