/* ==========================================================================
   SIMA DESARROLLOS — NOSOTROS.CSS
   Estilos específicos de la página Nosotros: Pestañas, Galería y Manuales
   Tipografía: MONTSERRAT | Paleta: Blanco, Rojo y Negro
   ========================================================================== */

/* ---------- Estructura General y Pestañas Laterales ---------- */
.about {
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(4rem, 8vw, 6.5rem);
  background: var(--surface-light);
}

.about-grid {
  display: grid;
  grid-template-columns: 16rem minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.about-tabs {
  position: sticky;
  top: 6.5rem;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: .75rem;
  box-shadow: var(--shadow-sm);
}

.about-tabs ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.about-tabs a {
  display: block;
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
  padding: .85rem 1.15rem;
  border-radius: var(--radius-md);
  color: var(--slate);
  border-left: 3px solid transparent;
  transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
}

.about-tabs a:hover {
  color: var(--black);
  background: var(--surface-light);
  border-left-color: var(--slate-light);
}

.about-tabs a[aria-selected="true"] {
  color: var(--black);
  border-left-color: var(--red);
  background: var(--surface-light);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* ---------- Paneles de Contenido ---------- */
.panel {
  max-width: var(--measure);
  scroll-margin-top: 6.5rem;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: clamp(2rem, 4.5vw, 3.5rem);
  box-shadow: var(--shadow-sm);
}

.panel:focus {
  outline: none;
}

.panel+.panel {
  margin-top: 4rem;
}

.js .panel[hidden] {
  display: none;
}

.js .panel+.panel {
  margin-top: 0;
}

.panel h2 {
  font: 800 clamp(2rem, 3.4vw, 2.6rem)/1.12 var(--font-display);
  letter-spacing: -.025em;
  margin: 0 0 1.5rem;
  color: var(--black);
}

.panel h3 {
  font: 700 1.35rem/1.25 var(--font-display);
  letter-spacing: -.015em;
  margin: 2.5rem 0 1rem;
  color: var(--black);
}

.panel h2+h3 {
  margin-top: 0;
}

.panel p {
  margin: 0 0 1.25rem;
  color: var(--slate);
  line-height: 1.7;
  font-size: 1.02rem;
}

/* Declaraciones de Misión y Visión */
.panel .statement {
  font-size: clamp(1.15rem, 1.8vw, 1.32rem);
  line-height: 1.7;
  color: var(--text-dark);
  background: var(--surface-light);
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1.75rem 2.25rem;
  margin: 0;
  box-shadow: var(--shadow-sm);
}

.panel-figure {
  margin: 0 0 2rem;
  background: var(--black-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.panel-figure img {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------- Galería Fotográfica ---------- */
.panel#galeria {
  max-width: none;
}

.gallery {
  list-style: none;
  margin: 1.5rem 0 2.5rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: .85rem;
}

.gallery a {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--black-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s cubic-bezier(.16, 1, .3, 1), opacity .2s;
}

.gallery a:hover {
  border-color: rgba(211, 16, 39, 0.4);
  box-shadow: var(--shadow-md);
}

.gallery a:hover img {
  transform: scale(1.06);
}

/* ---------- Descarga de Documentos / Manuales ---------- */
.docs {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  background: var(--surface-light);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: .5rem 1.75rem;
}

.docs li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}

.docs li:last-child {
  border-bottom: none;
}

.docs a {
  font-weight: 700;
  font-size: 1.02rem;
  text-decoration: none;
  color: var(--black);
  transition: color 0.15s ease;
}

.docs a:hover {
  color: var(--red);
}

.docs span {
  flex: none;
  background: rgba(211, 16, 39, 0.08);
  color: var(--red);
  border: 1px solid rgba(211, 16, 39, 0.2);
  font-weight: 700;
  font-size: .82rem;
  padding: .25rem .75rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

@media (prefers-reduced-motion: no-preference) {
  .js .panel:not([hidden]) {
    animation: panel-in .35s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  @keyframes panel-in {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 54rem) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-tabs {
    position: static;
    padding: .5rem;
  }

  .about-tabs ul {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: .25rem;
  }

  .about-tabs a {
    white-space: nowrap;
    border-left: none;
    border-bottom: 3px solid transparent;
    border-radius: var(--radius-sm);
  }

  .about-tabs a[aria-selected="true"] {
    border-left: none;
    border-bottom-color: var(--red);
  }

  .docs li {
    flex-direction: column;
    align-items: flex-start;
    gap: .5rem;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}