:root {
  --navy:      #2D4E8A;
  --navy-dark: #1E3566;
  --navy-light:#3A61A8;
  --white:     #ffffff;
  --off-white: #f7f7f7;
  --dark:      #1a1a1a;
  --gray:      #555555;
  --light:     #e8e8e8;
  --max:       1200px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Raleway', sans-serif;
  color: var(--dark);
  background: var(--white);
  line-height: 1.65;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  line-height: 1.2;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 40px;
}

/* ============================================================
   HEADER
   ============================================================ */
header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--white);
  border-bottom: 1px solid var(--light);
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
}

.header-inner {
  display: flex;
  align-items: center;
  height: 100px;
  gap: 24px;
  max-width: 100%;
  padding: 0 32px 0 40px;
}

/* Logo */
.logo-link { flex-shrink: 0; line-height: 0; }

.logo-img {
  height: 100px;
  width: auto;
}

/* Main nav */
.main-nav { flex: 1; }

.nav-links {
  display: flex;
  list-style: none;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav-links > li { position: relative; }

.nav-links > li > a {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--dark);
  white-space: nowrap;
  position: relative;
  transition: color .2s;
}

/* Underline accent in logo navy blue */
.nav-links > li > a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--navy);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}

.nav-links > li > a:hover { color: var(--navy); }
.nav-links > li > a:hover::after,
.nav-links > li > a.active::after { transform: scaleX(1); }
.nav-links > li > a.active { color: var(--navy); }

.nav-links .fa-chevron-down {
  font-size: 9px;
  opacity: 0.55;
  transition: transform .2s;
}

.has-drop:hover .fa-chevron-down { transform: rotate(180deg); }

/* Dropdown */
.dropdown {
  position: absolute;
  top: calc(100% + 1px);
  left: 0;
  background: var(--white);
  border: 1px solid var(--light);
  border-top: 2px solid var(--navy);
  list-style: none;
  min-width: 190px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
  z-index: 300;
}

.has-drop:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown li a {
  display: block;
  padding: 13px 18px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--dark);
  border-bottom: 1px solid var(--light);
  transition: background .15s, color .15s;
}

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

.dropdown li a:hover {
  background: var(--off-white);
  color: var(--navy);
}

/* Social icons */
.header-social {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

.header-social a {
  font-size: 14px;
  color: var(--dark);
  transition: color .2s;
  line-height: 1;
}

.header-social a:hover { color: var(--navy); }

/* Burger (mobile) */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  flex-shrink: 0;
}

.burger span { width: 26px; height: 2px; background: var(--dark); display: block; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 48vh;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-color: #2a2a2a;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-image 0s;
}

.hero-fade {
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* Dark overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 20, 0.58);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 40px 40px;
  max-width: 860px;
}

.hero-content h1 {
  font-family: 'Raleway', sans-serif;
  font-size: clamp(38px, 6.5vw, 72px);
  font-weight: 300;
  font-style: normal;
  color: var(--white);
  letter-spacing: 0.08em;
  line-height: 1.18;
}

/* ============================================================
   SECTIONS (firma, areas, equipo)
   ============================================================ */
.section { padding: 88px 0; }

.section + .section { border-top: 1px solid var(--light); }

.sec-head {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 52px;
}

.sec-head .mark {
  width: 32px;
  height: 2px;
  background: var(--navy);
  transform: translateY(-8px);
  flex-shrink: 0;
}

.sec-head h2 { font-size: clamp(22px, 2.8vw, 42px); white-space: nowrap; }

/* Firma layout */
.firma-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: start;
}

.firma-grid .lead {
  font-size: 18px;
  color: var(--gray);
  margin-bottom: 20px;
  line-height: 1.7;
}

.firma-grid p {
  font-size: 15px;
  color: var(--gray);
}

/* Dossier card */
.dossier {
  border: 1px solid var(--light);
  background: var(--off-white);
  padding: 40px 36px;
  border-left: 5px solid var(--navy);
}

.dossier .tag {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--navy);
  font-weight: 700;
  margin-bottom: 16px;
  display: block;
}

.dossier h3 { font-size: 22px; margin-bottom: 14px; }

.dossier p { color: var(--gray); font-size: 14.5px; }
.dossier .ref p { text-transform: none; font-size: 14.5px; letter-spacing: normal; }

.dossier .ref {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px dashed var(--light);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray);
}

/* Button */
.btn {
  display: inline-block;
  background: var(--navy);
  color: var(--white);
  padding: 15px 32px;
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  font-family: 'Raleway', sans-serif;
  border: 2px solid var(--navy);
  transition: background .25s, color .25s;
  cursor: pointer;
}

.btn:hover {
  background: transparent;
  color: var(--navy);
}

.btn-navy {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.btn-navy:hover {
  background: var(--white);
  color: var(--navy);
}

/* ============================================================
   ACORDEÓN ÁREAS
   ============================================================ */
.accordion-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}

.accordion-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}


.acc-btn {
  width: 100%;
  background: var(--navy);
  color: var(--white);
  border: none;
  padding: 18px 24px;
  font-family: 'Raleway', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background .2s;
}

.acc-btn::after {
  content: '+';
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
  transition: transform .25s ease;
}

.acc-item.open .acc-btn {
  background: var(--navy-dark);
}

.acc-item.open .acc-btn::after {
  transform: rotate(45deg);
}

.acc-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease, padding .35s ease;
  background: var(--off-white);
  border-left: 3px solid var(--navy);
  padding: 0 20px;
}

.acc-item.open .acc-detail {
  max-height: 1200px;
  padding: 20px 20px;
}

.acc-detail p {
  font-size: 14px;
  color: var(--dark);
  line-height: 1.8;
  text-align: justify;
  font-weight: 600;
  margin-bottom: 14px;
}
.acc-detail p:last-child { margin-bottom: 0; }
.acc-detail ul {
  margin: 10px 0 14px 0;
  padding-left: 20px;
}
.acc-detail ul li {
  font-size: 14px;
  color: var(--dark);
  font-weight: 600;
  line-height: 1.8;
  list-style: disc;
}

/* ============================================================
   TEAM
   ============================================================ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.team-card { text-align: left; }

.team-photo {
  width: 100%;
  aspect-ratio: 3/4;
  background: linear-gradient(160deg, var(--navy-dark), var(--navy-light));
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.team-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255,255,255,.2);
  margin: 10px;
}

.team-card h4 { font-size: 16px; margin-bottom: 4px; }

.team-card .role {
  font-size: 12px;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

/* ============================================================
   NEWSLETTER BAND
   ============================================================ */
.news-band {
  background: var(--navy-dark);
  color: var(--white);
}

.news-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 48px;
  padding: 68px 0;
}

.news-inner h2 {
  color: var(--white);
  font-size: clamp(24px, 3vw, 36px);
  margin-bottom: 8px;
}

.news-inner p { color: rgba(255,255,255,.7); font-size: 15px; }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: #2b477b;
  color: rgba(255,255,255,.75);
  padding: 72px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  margin-bottom: 52px;
  align-items: start;
}

.footer-logo-link { display: inline-block; margin-bottom: 24px; }

.footer-logo {
  height: 56px;
  width: auto;
  opacity: 0.9;
}

.footer-grid h4 {
  font-family: 'Raleway', sans-serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--white);
}

.footer-grid p,
.footer-grid li {
  font-size: 14px;
  margin-bottom: 10px;
  color: rgba(255,255,255,.65);
}

.footer-grid ul { list-style: none; }

.footer-grid a:hover { color: var(--white); }

.footer-grid .fa-brands,
.footer-grid .fa-solid {
  width: 16px;
  margin-right: 4px;
  color: var(--navy-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: rgba(255,255,255,.45);
  flex-wrap: wrap;
  gap: 12px;
}

.legal-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.legal-links a:hover { color: var(--white); }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 25, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}

.modal-overlay.active { display: flex; }

.modal {
  background: var(--white);
  border-left: 5px solid var(--navy);
  max-width: 460px;
  width: 100%;
  padding: 44px 40px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 20px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--gray);
  line-height: 1;
  transition: color .2s;
}

.modal-close:hover { color: var(--dark); }

.modal h3 { font-size: 26px; margin-bottom: 12px; }

.modal p { font-size: 14px; color: var(--gray); margin-bottom: 22px; }

.modal form { display: flex; flex-direction: column; gap: 14px; }

.modal input[type="email"] {
  padding: 14px 16px;
  border: 1px solid var(--light);
  font-family: 'Raleway', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
}

.modal input[type="email"]:focus { border-color: var(--navy); }

.modal label {
  font-size: 12px;
  color: var(--gray);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.modal label a { color: var(--navy); text-decoration: underline; }

/* ============================================================
   PAGES (show/hide)
   ============================================================ */
.page { display: none; }

.page.active {
  display: block;
  animation: pageFadeIn .35s ease forwards;
}

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

/* ============================================================
   HIGHLIGHT BAND (inicio)
   ============================================================ */
.highlight-band {
  background: var(--off-white);
  border-top: 1px solid var(--light);
  padding: 56px 0;
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.highlight-item {
  text-align: center;
}

.highlight-item i {
  font-size: 32px;
  color: var(--navy);
  margin-bottom: 16px;
}

.highlight-item h4 {
  font-family: 'Raleway', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.highlight-item p {
  font-size: 14px;
  color: var(--gray);
}

/* ============================================================
   TIMELINE (historia)
   ============================================================ */
.timeline {
  position: relative;
  padding-left: 48px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--light);
}

.timeline-item {
  position: relative;
  padding-bottom: 48px;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 28px;
  align-items: start;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -40px;
  top: 6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--navy);
  border: 2px solid var(--white);
  box-shadow: 0 0 0 2px var(--navy);
}

.timeline-year {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  color: var(--navy);
  font-weight: 400;
  padding-top: 2px;
}

.timeline-content h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.timeline-content p {
  font-size: 14.5px;
  color: var(--gray);
  line-height: 1.7;
}

/* ============================================================
   VALORES GRID
   ============================================================ */
.valores-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.valor-card {
  padding: 36px 28px;
  border: 1px solid var(--light);
  background: var(--white);
  transition: box-shadow .25s, border-color .25s;
}

.valor-card:hover {
  box-shadow: 0 4px 24px rgba(0,0,0,.08);
  border-color: var(--navy);
}

.valor-icon {
  width: 48px; height: 48px;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.valor-icon i {
  font-size: 20px;
  color: var(--white);
}

.valor-card h3 { font-size: 18px; margin-bottom: 10px; }

.valor-card p { font-size: 14px; color: var(--gray); }

/* ============================================================
   TEAM BIO
   ============================================================ */
.team-bio {
  font-size: 13px;
  color: var(--gray);
  margin-top: 8px;
  line-height: 1.6;
}

/* ============================================================
   CONTACTO
   ============================================================ */
.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 64px;
  align-items: start;
}

.contacto-info h3 {
  font-size: 26px;
  margin-bottom: 16px;
}

.contacto-info .lead {
  font-size: 16px;
  color: var(--gray);
  margin-bottom: 32px;
}

.contacto-datos {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contacto-datos li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14.5px;
  color: var(--gray);
}

.contacto-datos i {
  color: var(--navy);
  margin-top: 3px;
  width: 16px;
  flex-shrink: 0;
}

.contacto-datos a:hover { color: var(--navy); }

.contacto-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px 16px;
  border: 1px solid var(--light);
  font-family: 'Raleway', sans-serif;
  font-size: 14px;
  color: var(--dark);
  background: var(--white);
  outline: none;
  transition: border-color .2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--navy); }

.form-group textarea { resize: vertical; }

/* ============================================================
   LEGAL PAGES
   ============================================================ */
.legal-content {
  max-width: 820px;
}

.legal-date {
  font-size: 13px;
  color: var(--gray);
  letter-spacing: 0.04em;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--light);
}

.legal-block {
  margin-bottom: 36px;
}

.legal-block h3 {
  font-family: 'Raleway', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 12px;
}

.legal-block p {
  font-size: 14.5px;
  color: var(--gray);
  line-height: 1.8;
  margin-bottom: 10px;
}

.legal-block ul {
  margin: 10px 0 10px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.legal-block ul li {
  font-size: 14.5px;
  color: var(--gray);
  line-height: 1.7;
}

.legal-block a {
  color: var(--navy);
  text-decoration: underline;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .nav-links > li > a { padding: 10px 10px; font-size: 11.5px; }
}

@media (max-width: 900px) {
  .hero-content h1 { font-size: clamp(32px, 7vw, 56px); }
  .firma-grid { grid-template-columns: 1fr; }
  .areas-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid .col-1 { grid-column: 1 / -1; }
  .highlight-grid { grid-template-columns: 1fr 1fr; }
  .valores-grid { grid-template-columns: repeat(2, 1fr); }
  .contacto-grid { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 700px) {
  .wrap { padding: 0 20px; }

  .header-inner { height: 72px; }
  .logo-img { height: 50px; }
  .main-nav { display: none; }
  .header-social { display: none; }
  .burger { display: flex; margin-left: auto; }

  /* Mobile nav overlay */
  .main-nav.open {
    display: block;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--light);
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
    z-index: 199;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-links > li > a {
    padding: 16px 24px;
    border-bottom: 1px solid var(--light);
    font-size: 13px;
  }

  .nav-links > li > a::after { display: none; }

  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    border-top: none;
    background: var(--off-white);
  }

  .dropdown li a { padding-left: 36px; }

  .hero { min-height: 75vh; }
  .hero-content h1 { font-size: clamp(28px, 9vw, 46px); }

  .areas-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .news-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .legal-links { flex-direction: column; gap: 10px; }
  .highlight-grid { grid-template-columns: 1fr; gap: 24px; }
  .valores-grid { grid-template-columns: 1fr; }
  .contacto-grid { grid-template-columns: 1fr; gap: 40px; }
  .form-row { grid-template-columns: 1fr; }
  .timeline { padding-left: 32px; }
  .timeline-item { grid-template-columns: 60px 1fr; gap: 16px; }
}

/* Accesibilidad */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
