/* ================= RESET ================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ================= VARIABLES ================= */
:root {
  --primary: #b11226;
  --secondary: #d6452b;
  --accent: #f26a2e;
  --light: #fff5f0;
  --dark: #5a0f1b;
  --text: #3f1f1f;
}

/* ================= BASE ================= */
body {
  font-family: system-ui, sans-serif;
  color: var(--text);
  font-weight: 350;
  line-height: 1.75;
  letter-spacing: 0.015em;
  background: #fff;   
}

/* Accesibilidad */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}

/* ================= HEADER ================= */
header {
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
  color: white;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-bar {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
}

/* Logo */
.header-logos img {
  height: 45px;
  filter: brightness(0) invert(1);
}

/* ================= MENÚ ================= */
.header-nav > ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.header-nav li {
  position: relative;
}

.header-nav a {
  color: white;
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  border-radius: 5px;
  display: inline-block;
}

.header-nav a:hover {
  background: rgba(255,255,255,0.25);
}

.header-nav a:focus-visible {
  outline: 2px solid rgba(255,255,255,0.6);
  outline-offset: 2px;
}

/* ================= SUBMENÚ ================= */
.submenu {
  position: relative;
}

.submenu-lista {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  background: white;
  min-width: 220px;
  list-style: none;
  padding: 0.5rem 0;
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  z-index: 9999;
}

.submenu-lista.activo {
  display: flex;
  flex-direction: column;
}

.submenu-lista a {
  color: var(--text);
  padding: 0.6rem 1rem;
  text-decoration: none;
}

.submenu-lista a:hover,
.submenu-lista a:focus-visible {
  background: var(--light);
}

/* ================= BUSCADOR + REDES ================= */
.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.header-search input {
  width: 140px;
  min-width: 0;
  padding: 0.35rem 0.5rem;
  font-size: 0.85rem;
  line-height: 1.2;
}

.header-search input::placeholder {
  color: rgba(255,255,255,0.7);
}

.header-search input:focus {
  width: 180px;
  transition: width 0.25s ease;
}

.header-search button {
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
  border-radius: 5px;
  border: none;
  cursor: pointer;
}

.social-icons a {
  color: white;
  font-size: 1.2rem;
  text-decoration: none;
}

/* ================= LAYOUT PRINCIPAL ================= */
.layout-principal {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 2rem;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(260px, 1fr);
  gap: 3rem;
  align-items: stretch;
}

/* ================= CONTENIDO PRINCIPAL ================= */

.contenido-principal {
  display: flex;
  flex-direction: column;
  gap: 5rem;  /* aumenta el espacio entre secciones */
  padding-right: 2rem; /* espacio respecto al aside */
}



/* ================= ASIDE ================= */
.contenido-secundario {
  position: sticky;
  top: 140px; /* un poco debajo del header */
  align-self: start;
  background: var(--light);
  padding: 3rem 2.5rem;
  border-left: 6px solid var(--secondary);
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(177, 18, 38, 0.15);
}

.contenido-secundario .section-title {
  font-size: 1.4rem;
  color: var(--dark);
  border-bottom: 2px solid var(--secondary);
  margin-bottom: 1.5rem;
  text-align: left;
}

.contenido-secundario .lista-accesos a {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.7;
}

.lista-accesos {
  list-style: none;
  padding: 0;
  margin: 0;
}

.lista-accesos li {
  margin-bottom: 1rem;
}

.lista-accesos a {
  text-decoration: none;
  color: var(--primary);
  font-weight: 500;
}

.lista-accesos a:hover {
  text-decoration: underline;
}

/* ================= SECCIONES ================= */
section {  
  text-align: inherit;
}

section:not(.hero) {
  margin-bottom: 3.5rem;
}

#inicio,
#quienes,
#ubicacion,
#contacto {
  scroll-margin-top: 100px; 
}

.section-title {
  font-size: 1.4rem;
  font-weight: 600; 
  color: var(--primary);
  border-bottom: 4px solid var(--secondary);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.section-icon {
  width: 1.4rem;
  height: 1.4rem;
  stroke: #8c2b2b;
  fill: none;
  stroke-width: 1.6;
  flex-shrink: 0;
}

.subsection-title {
  margin: 2rem 0 1rem;
  font-size: 1.45rem;
  color: var(--dark);
  border-bottom: 2px solid var(--secondary);
  display: inline-block;
}

/* ================= HERO ================= */
.hero {
  margin-bottom: 3rem;
}

.hero-title {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.1;
  margin-bottom: 0.6rem;
}

.hero-proico {
  display: block;
  font-size: 1.2rem;
  color: var(--dark);
}

.hero-area {
  display: block;
  font-size: 2.2rem;
  color: var(--primary);
}

.hero-subtitle {
  font-size: 0.9rem;
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: var(--secondary);
  max-width: 780px;
} 

.hero-image {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

/* ================= EQUIPO / SLIDER ================= */
.team-wrapper {
  display: flex;
  margin-top: 3rem;
  margin-bottom: 1rem;
  align-items: center;
  gap: 1rem;
}

.team-viewport {
  overflow: hidden;
  width: 100%;
}

.team-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  transition: transform 0.4s ease;
}

.team-member {
  flex: 0 0 100%;
  text-align: center;
  padding: 1rem;
}

.member-photo {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--secondary);
  margin-bottom: 0.8rem;
}

.team-btn {
  background: var(--secondary);
  color: white;
  border: none;
  font-size: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-btn:hover {
  background: var(--accent);
}

.team-btn:focus-visible {
  outline: 3px solid var(--dark);
  outline-offset: 2px;
}

/* ================= EQUIPO – TEXTO ================= */
.member-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dark);
  margin-top: 0.6rem;
}

.member-role {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary);
}

.member-profile {
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--text);
  max-width: 420px;
  margin: 0.4rem auto;
}

.member-email {
  font-size: 0.85rem;
  color: var(--secondary);
  word-break: break-word;
}

/* ================= FOOTER ================= */
footer {
  background: var(--dark);
  color: white;
  text-align: center;
  padding: 2rem;
  margin-top: 4rem;
}

.footer-mail {
  color: white;
}

.footer-mail:hover,
.footer-mail:focus-visible {
  color: white;
  text-decoration: none;
}

/* ================= FORMULARIO ================= */
.formulario {
  max-width: 1000px;
}

.formulario .campo {
  margin-bottom: 1.6rem;
}

.formulario label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.formulario input {
  width: 75%;
  padding: 0.75rem;
  font-size: 1rem;
  resize: horizontal;
}

.formulario textarea {
  width: 85%;
  min-height: 200px;
  padding: 0.75rem;
  font-size: 1rem;
  line-height: 1.6;
  resize: both;
}

.formulario button {
  margin-top: 1rem;
  padding: 0.8rem 2rem;
  font-size: 1rem;
  cursor: pointer;
}

.form-message {
  display: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.8rem 1rem;
  margin-top: 1rem;
  border-radius: 6px;
  text-align: center;
  transition: opacity 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
  .layout-principal {
    grid-template-columns: 1fr;
  }
  .contenido-secundario {
    position: static;
    top:auto;
  } 
}

@media (max-width: 600px) {  
  .header-bar {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .header-right {
    justify-content: center;
  }
  .formulario input,
  .formulario textarea {
    width: 100%;
  }
}
