/* =====================
   RESET & VARIABLES
===================== */

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

:root {
  --color-fondo: #f5f5f5;
  --color-principal: #1f2933;
  --color-acento: #2563eb;
  --color-texto: #333;
  --altura-navbar: 80px;
}

/* =====================
   BASE
===================== */

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--color-fondo);
  color: var(--color-texto);
  line-height: 1.6;
}

h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--color-principal);
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--color-principal);
}

p {
  max-width: 600px;
}

/* =====================
   LAYOUT GLOBAL
===================== */

section {
  scroll-margin-top: var(--altura-navbar);
  padding: 5rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

section:nth-child(even) {
  background-color: #ffffff;
}

section:nth-child(odd) {
  background-color: #eef2f7;
}

.divider {
  width: 60px;
  height: 2px;
  background-color: var(--color-acento);
  margin: 2rem auto;
}
section > p {
  margin: 1rem auto;
  text-align: center;
}


/* =====================
   NAVBAR
===================== */

header {
  position: sticky;
  top: 0;
  height: var(--altura-navbar);
  background: white;
  border-bottom: 1px solid #ddd;
  z-index: 1000;
}

.navbar {
  height: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;

  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  height: var(--altura-navbar);
  width: auto;
}

.nav-menu {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-menu a {
  text-decoration: none;
  color: var(--color-principal);
  font-weight: 500;
}

.nav-link.active {
  color: var(--color-acento);
  border-bottom: 2px solid var(--color-acento);
  padding-bottom: 0.25rem;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
}

/* =====================
   INICIO (HERO)
===================== */

#inicio {
  max-width: none;
  padding: 0;
}

.intro-hero-wrapper {
  position: relative;
  min-height: 220px;
  overflow: hidden;
}

.intro-bg {
  position: absolute;
  inset: 0;
  background-image: url("../assets/img/still-life-with-scales-justice.JPG");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: right center;
}

.intro-hero {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.intro-text {
  max-width: 720px;
  margin: 3rem auto;
  padding: 0 2rem;
  text-align: center;
}
.intro-text p {
  margin-bottom: 1.25rem;
}

.intro-lead {
  font-size: 1.05rem;
  font-weight: 500;
}

.intro-meta {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Desktop */
.line-break {
  display: inline;
}

/* =====================
   NOSOTRAS
===================== */

.nosotras {
  text-align: center;
}

.nosotras-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
  margin-top: 3rem;
}

.nosotras-item img {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 6px;
  background-color: #f0f0f0;
  margin-bottom: 1rem;
}


.nosotras-item p {
  max-width: 38ch;          
  margin: 0.5rem auto 1rem;
  font-size: 0.9rem;        
  line-height: 1.6;         
  text-align: justify;      
}

.nosotras-item p strong {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}
.nosotras-extra {
  display: none;
  margin-top: 0.5rem;
}

.nosotras-item.is-open .nosotras-extra {
  display: block;
}

.nosotras-toggle {
  background: none;
  border: none;
  color: #444;
  font-size: 0.85rem;
  cursor: pointer;
  margin-top: 0.5rem;
  text-decoration: underline;
}

.nosotras-toggle:hover {
  color: #000;
}
/* =====================
   SERVICIOS
===================== */

.servicios {
  text-align: center;
}

.servicios-lista {
  max-width: 600px;
  margin: 0 auto;
}

.servicio-item {
  margin-bottom: 3rem;
}

.servicio-item h3 {
  text-align: left;
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  color: var(--color-principal);
}

.servicio-item p {
  text-align: left;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.servicio-divider {
  width: 48px;
  height: 2px;
  background-color: #d1d5db;
  margin: 0 auto;
}

/* =====================
   CONTACTO
===================== */

#contacto {
  text-align: center;
}

#contacto .links {
  margin: 2.5rem auto 0;
  max-width: 420px;

  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;

  text-decoration: none;
  color: var(--color-principal);
  font-size: 1rem;
}

.contact-item i {
  font-size: 1.2rem;
}

.contact-item:hover {
  color: var(--color-acento);
}

/* =====================
   FORMULARIO
===================== */

.contact-form-intro {
  max-width: 600px;
  margin: 3rem auto 2rem;
  text-align: center;
}

.contact-form {
  max-width: 500px;
  margin: 2rem auto 0;

  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.form-field label {
  font-size: 0.9rem;
  font-weight: 500;
}

.form-field input,
.form-field textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-acento);
}

.error-msg {
  font-size: 0.8rem;
  color: #b91c1c;
  min-height: 1em;
}

.form-field.error input,
.form-field.error textarea {
  border-color: #b91c1c;
}

.btn-submit {
  align-self: flex-start;
  padding: 0.6rem 1.5rem;
  background-color: var(--color-acento);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* =====================
   FOOTER
===================== */

footer {
  text-align: center;
  padding: 2rem;
  background-color: #111827;
  color: white;
}

/* =====================
   RESPONSIVE
===================== */

@media (max-width: 760px) {
  
  .line-break {
    display: block;
  }

  .intro-bg {
    background-position: 75% center;
    opacity: 0.4;
  }
}

@media (max-width: 450px) {
  section {
    padding: 3rem 1.5rem;
  }

  h1 {
    font-size: 1.6rem;
  }

  .logo {
    height: var(--altura-navbar);
  }

  .menu-toggle {
    display: block;
  }

  .nav-menu {
    position: absolute;
    top: var(--altura-navbar);
    left: 0;
    width: 100%;
    background: white;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;

    padding: 1.5rem 0;
    border-bottom: 1px solid #ddd;

    /* estado cerrado */
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;

    transition:
      opacity 0.25s ease,
      transform 0.25s ease;
  }

  .nav-menu.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .intro-bg {
    background-position: 85% center;
    opacity: 0.25;
  }

  .nav-link.active {
    border-bottom: none;
    padding-bottom: 0;
    color: inherit;
  }

  .nosotras-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .nosotras-item img {
    max-width: 200px;
    margin: 0 auto 1rem;
  }

  .servicio-item h3 {
    font-size: 1.1rem;
  }

  .servicio-item p {
    font-size: 0.9rem;
  }
}
