/* ============================================
   SECCIÓN NOSOTROS - BASE
   ============================================ */

.nosotros {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-sm);
  color: var(--blanco);
  position: relative;
  overflow: hidden;
  
  @media (min-width: 768px) { 
    padding: var(--spacing-md) var(--spacing-md);
  }

  @media (min-width: 1024px) { 
    padding: var(--spacing-lg) var(--spacing-lg);
  }

  @media (min-width: 1280px) { 
    padding: var(--spacing-xl) var(--spacing-xl);
  }

  /* Fondo con degradado y SVG animado */
  &::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('/public/assets/img/fondo-animado.svg'), linear-gradient(180deg, var(--blanco) 0%, var(--azul) 100%);
    background-repeat: no-repeat;
    background-position-y: 5%;
    background-position-x: right;
    filter: blur(5px);
    transform: scale(1.08); 
    z-index: 0;
    background-size: 200px auto, cover;

    @media (min-width: 768px) {
      background-size: 350px auto, cover;
    }

    @media (min-width: 1280px) {
      background-size: 450px auto, cover;
    }

    @media (min-width: 1536px) {
      background-size: 550px auto, cover;
    }
  }

  /* Ondas decorativas */
  &::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: 
      url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 50 Q 25 30, 50 50 T 100 50' fill='none' stroke='rgba(65, 108, 170, 0.06)' stroke-width='0.5'/%3E%3Cpath d='M0 60 Q 25 40, 50 60 T 100 60' fill='none' stroke='rgba(65, 108, 170, 0.04)' stroke-width='0.5'/%3E%3C/svg%3E");
    background-size: 300px 300px;
    background-position: center;
    pointer-events: none;
    opacity: 0.7;
    
    @media (min-width: 768px) {
      background-size: 400px 400px;
    }
    
    @media (min-width: 1280px) {
      background-size: 500px 500px;
    }
  }
}

/* ============================================
   WRAPPER - CONTENEDOR PRINCIPAL
   ============================================ */

.nosotros .wrapper {
  position: relative;
  z-index: 1;
  margin: 0 auto;
  color: var(--azulobs);
  padding: 1.25rem 1.25rem 1.5rem;
  max-width: 450px;

  @media (min-width: 768px) {
    max-width: 760px;
  }

  @media (min-width: 1024px) {
    max-width: 850px;
  }

  @media (min-width: 1280px) {
    max-width: 1100px;
    padding: 0.8rem 1.25rem 1.5rem;
  }
}

/* ============================================
   TÍTULO PRINCIPAL
   ============================================ */

.nosotros__title {
  text-align: center;
  font-size: 1.15rem;
  margin-bottom: var(--spacing-lg);

  @media (min-width: 768px) {
    font-size: 1.6rem;
    margin-bottom: var(--spacing-xl);
  }

  @media (min-width: 1280px) {
    font-size: 1.9rem;
    margin-bottom: var(--spacing-xxl);
  }
}

.nosotros__subtitle {
  font-size: 0.95rem;
  color: var(--azul);
  margin-top: var(--spacing-xs);
  font-weight: 300;
  text-align: center;
}

/* ============================================
   DESCRIPCIÓN (IMAGEN + CONTENIDO)
   ============================================ */

.nosotros__desc {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);

  @media (min-width: 768px) {
    grid-template-columns: 1fr 1.5fr;
    gap: var(--spacing-xl);
    align-items: center;
    margin-bottom: var(--spacing-xxl);
  }

  @media (min-width: 1024px) {
    gap: var(--spacing-xxl);
  }

  @media (min-width: 1280px) {
    margin-bottom: 6rem;
    gap: 3.5rem;
  }
}

/* Wrapper con animación */
.nosotros__img-wrapper {
  position: relative;
  width: fit-content;
  margin: 0 auto;
}

.nosotros__img {
  position: relative;
  z-index: 1;
  border-radius: 50%;
  overflow: visible;
  width: 100%;
  max-width: 250px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;

  @media (min-width: 768px) {
    max-width: 280px;
  }

  @media (min-width: 1280px) {
    max-width: 300px;
  }

/* Borde giratorio con degradado brillante SUTIL */
&::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: linear-gradient(
    45deg,
    var(--azullogo) 0%,
    #5a8cd9 25%,
    var(--azul) 50%,
    #0a2a4d 75%,
    var(--azullogo) 100%
  );
  z-index: -1;
  animation: rotate-border 2s linear infinite;
  filter: brightness(1.15) saturate(1.2);
  box-shadow: 
    0 0 8px rgba(65, 108, 170, 0.3),
    0 0 15px rgba(65, 108, 170, 0.2),
    inset 0 0 6px rgba(255, 255, 255, 0.15);
}

/* Máscara blanca interna */
&::after {
  content: "";
  position: absolute;
  inset: 10px;
  background: white;
  border-radius: 50%;
  z-index: -1;
}

  img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
    border: 2px solid white;
  }
}

@keyframes rotate-border {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.nosotros__content {
  @media (min-width: 768px) {
    margin-top: -0.3rem;
  }

  @media (min-width: 1280px) {
    margin-top: 0rem;
    max-width: 480px;
  }

  h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    text-align: center;

    @media (min-width: 768px) {
      font-size: 2rem;
      text-align: left;
    }

    @media (min-width: 1280px) {
      font-size: 2.2rem;
    }
  }

  p {
    text-align: center;
    line-height: 1.5;

    @media (min-width: 768px) {
      text-align: left;
    }

    @media (min-width: 1280px) {
      line-height: 1.8;
    }
  }
}

/* ============================================
   PILLARS (MISIÓN Y VISIÓN)
   ============================================ */

.nosotros__pillars {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xxl);

  @media (min-width: 768px) {
    grid-template-columns: repeat(2, 1fr);
    margin: 0 auto;
    max-width: 640px;
    margin-bottom: 4rem;
  }

  @media (min-width: 1024px) {
    max-width: 100%;
  }

  @media (min-width: 1280px) {
    max-width: 840px;
    margin-bottom: 5rem;
  }
}

.nosotros__pillar {
  margin: 0 auto;
  background: #f3fafba9;
  backdrop-filter: blur(10px);
  padding: var(--spacing-md) var(--spacing-md) var(--spacing-sm);
  border-radius: 0.9rem;
  border: 1px solid rgba(65, 108, 170, 0.2);
  box-shadow: 0 4px 20px rgba(26, 68, 109, 0.1);
  transition: all 0.3s ease;
  max-width: 300px;
  cursor: pointer;

  @media (min-width: 1024px) {
    max-width: 355px;
    padding: var(--spacing-md) var(--spacing-sm) var(--spacing-lg);
  }

  @media (min-width: 1280px) {
    max-width: 330px;
  }

  &:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(26, 68, 109, 0.2);
  }

  &:hover .pillar__icon {
    transform: scale(1.1) rotate(5deg);
  }

  h3 {
    text-align: center;
    color: var(--azulobs);
    margin-bottom: var(--spacing-sm);
  }

  p {
    text-align: center;
    color: var(--azulobs);
  }
}

.pillar__icon {
  width: 58px;
  height: 58px;
  background: linear-gradient(135deg, var(--azullogo) 0%, var(--azul) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--spacing-md);
  box-shadow: 0 4px 15px rgba(65, 108, 170, 0.3);
  transition: transform 0.3s ease;

  i {
    font-size: 1.8rem;
    color: var(--blanco);
  }
}

/* ============================================
   VALORES
   ============================================ */

.nosotros__values-intro {
  text-align: center;
  color: #133a64;
  font-size: 1.07rem;
  margin-bottom: var(--spacing-lg);
  font-weight: 300;

  @media (min-width: 768px) {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-xl);
  }

  @media (min-width: 1280px) {
    font-size: 1.15rem;
  }
}

.nosotros__values {
  width: 100%;
  margin: 0 auto var(--spacing-lg);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  justify-content: center;
  gap: 1.3rem;
  max-width: 350px;

  @media (min-width: 768px) {
    gap: 2rem;
    margin-bottom: var(--spacing-xl);
    max-width: 440px;
  }

  @media (min-width: 1024px) {
    grid-template-columns: repeat(4, 1fr);
    max-width: 900px;
  }

  @media (min-width: 1280px) {
    max-width: 1000px;
    gap: 2.6rem;
  }
}

.nosotros__card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: var(--spacing-sm) 0;
  border-radius: 0.8rem;
  background: linear-gradient(135deg, var(--azul) 0%, #0f2942 100%);
  border: 1px solid var(--azullogo);
  color: var(--blanco);
  box-shadow: 0px 4px 25px 0px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, background-color 0.6s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;

  @media (min-width: 768px) {
    padding: var(--spacing-md) 0;
  }

  @media (min-width: 1280px) {
    padding: var(--spacing-lg) var(--spacing-sm);
  }

  &::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    transform: translate(-50%, -50%);
    transition: width 0.8s ease, height 0.8s ease;
  }

  &:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0px 8px 35px 0px rgba(0, 0, 0, 0.2);
    border: 0.05px solid rgba(255, 255, 255, 0.4);
    cursor: pointer;

    i {
      transform: scale(1.2) rotate(5deg);
    }

    &::before {
      width: 300px;
      height: 300px;
    }
  }

  i {
    font-size: 1.25rem;
    margin-bottom: 0.7rem;
    color: var(--blanco);
    transition: transform 0.3s ease;

    @media (min-width: 768px) {
      font-size: 1.5rem;
    }

    @media (min-width: 1280px) {
      font-size: 1.6rem;
    }
  }

  h4 {
    font-weight: 600;
    text-align: center;
    font-size: 0.95rem;

    @media (min-width: 768px) {
      font-size: 1.05rem;
    }

    @media (min-width: 1280px) {
      font-size: 1.15rem;
    }
  }
}

/* ============================================
   ICONOS Y DESCRIPCIONES EN CARDS
   ============================================ */

.card__icon-wrapper {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--spacing-sm);
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;

  @media (min-width: 768px) {
    width: 59px;
    height: 59px;
  }

  i {
    margin: 0 !important;
    font-size: 1.5rem !important;

    @media (min-width: 768px) {
      font-size: 1.8rem !important;
    }

    @media (min-width: 1280px) {
      font-size: 2rem !important;
    }
  }
}

.nosotros__card:hover .card__icon-wrapper {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.15) rotate(10deg);
}

.card__description {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  margin-top: 0.5rem;
  position: relative;
  z-index: 1;
  font-weight: 300;
  line-height: 1.1rem;

  @media (min-width: 768px) {
    font-size: 0.9rem;
  }

  @media (min-width: 1280px) {
    font-size: 0.88rem;
  }
}

.nosotros__card h4 {
  margin-bottom: 0;
  position: relative;
  z-index: 1;
}