/* Notaría 9 CDMX — Estilo minimalista */

:root {
  /* Paleta principal */
  --color-primary: #003799;
  --color-primary-hover: #002a73;
  --color-green: #71c108;
  --color-gray: #f3f3f3;
  --color-red: #ff0000;
  --color-yellow: #ffd100;
  --color-orange: #ff7f00;
  --color-purple: #5a3f83;

  /* Uso en interfaz */
  --color-bg: #f3f3f3;
  --color-bg-alt: #fff;
  --color-text: #1a1a1a;
  --color-text-muted: #4a4a4a;
  --color-accent: #003799;
  --color-accent-hover: #002a73;
  --color-border: #e0e0e0;

  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Source Sans 3', -apple-system, sans-serif;
  --space: 1.5rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
  --max-width: 960px;
  --header-h: 4rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
}

main {
  flex: 1;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--color-accent-hover);
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space);
}

.container.narrow {
  max-width: 640px;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
}
.logo:hover {
  color: rgba(255, 255, 255, 0.9);
}

.logo-img {
  height: 2.25rem;
  width: auto;
}

.logo-text {
  display: block;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  display: block;
  padding: 0.5rem 0.75rem;
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 500;
}
.nav-list a:hover {
  color: rgba(255, 255, 255, 0.85);
}
.nav-list a.is-active {
  color: #fff;
  text-decoration: underline;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: #fff;
  transition: transform 0.2s ease;
}

@media (max-width: 768px) {
  .header {
    position: relative;
  }
  .header-inner {
    min-height: 40px;
    height: 40px;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
  }
  .header .logo {
    font-size: 1rem;
  }
  .header .logo-img {
    height: 1.5rem;
  }
  .nav-toggle {
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
  }
  .nav-toggle span {
    height: 1.5px;
  }
  .nav-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: var(--space);
    background: var(--color-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    gap: 0;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height 0.3s ease, visibility 0.2s ease;
  }
  .nav-list.is-open {
    max-height: 320px;
    visibility: visible;
  }
  .nav-list li {
    width: 100%;
  }
  .nav-list a {
    padding: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  }
  .nav-list li:last-child a {
    border-bottom: none;
  }
  .nav-toggle.is-open span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }
  .nav-toggle.is-open span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }
}

/* Hero */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-xl) var(--space);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--color-bg-alt);
}
.hero-bg.no-img {
  background: linear-gradient(160deg, #f3f3f3 0%, #e8e8e8 100%);
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero-slide.active {
  opacity: 0.35;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 32rem;
}

.hero-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text);
}

.hero-subtitle {
  margin: 0 0 var(--space-lg);
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--color-text-muted);
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  color: #fff;
  background: var(--color-accent);
  border: 2px solid var(--color-accent);
  border-radius: 2px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: #fff;
}

.btn--outline {
  color: var(--color-accent);
  background: transparent;
}
.btn--outline:hover {
  background: var(--color-accent);
  color: #fff;
}

/* Sections */
.section {
  padding: var(--space-xl) 0;
}

.section--alt {
  background: var(--color-bg-alt);
}

.section-title {
  margin: 0 0 var(--space-lg);
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 600;
  text-align: center;
  color: var(--color-text);
}

.section h2 {
  margin: 0 0 var(--space);
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--color-text);
}

.section p {
  margin: 0 0 1rem;
  color: var(--color-text-muted);
}
.section p:last-child {
  margin-bottom: 0;
}

.section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
}

.section-grid--reverse .section-media {
  order: 2;
}
.section-grid--reverse .section-body {
  order: 1;
}

.section-media {
  min-height: 200px;
  background: var(--color-border);
  border-radius: 2px;
  overflow: hidden;
}

.section-img {
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
}

@media (max-width: 768px) {
  .section-grid,
  .section-grid--reverse {
    grid-template-columns: 1fr;
    gap: var(--space);
  }
  .section-grid--reverse .section-media,
  .section-grid--reverse .section-body {
    order: unset;
  }
}

/* Servicios */
.servicios-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space);
  margin-top: var(--space);
}

.servicio-card {
  background: var(--color-bg);
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.servicio-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: var(--color-bg-alt);
}

.servicio-card h3 {
  margin: 0;
  padding: var(--space) var(--space) 0.25rem;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
}

.servicio-card p {
  margin: 0;
  padding: 0 var(--space) var(--space);
  font-size: 0.9375rem;
}

@media (max-width: 640px) {
  .servicios-grid {
    grid-template-columns: 1fr;
  }
}

.servicios-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem 2rem;
  margin: var(--space-lg) auto 0;
  max-width: 560px;
  list-style: none;
  padding: 0;
}

.servicios-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--color-text);
}

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

@media (max-width: 480px) {
  .servicios-list {
    grid-template-columns: 1fr;
  }
}

/* Contacto */
.contact-info {
  font-style: normal;
}

.contact-address {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.contact-tel,
.contact-fax {
  margin: 0.25rem 0;
}

.contact-email {
  display: inline-block;
  margin-top: 0.5rem;
}

.contact-hint {
  font-size: 0.7em;
}

#telefonos-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.2em 1.5em;
}

.contact-emails {
  margin-bottom: 1em;
}

.contact-map {
  margin-top: 2em;
}

.contact-map iframe {
  border: 0;
  width: 100%;
  max-width: 600px;
}

/* Footer */
.footer {
  padding: var(--space) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  background: var(--color-primary);
  text-align: center;
}

.footer .container {
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.footer-copy {
  margin: 0;
  font-size: 0.875rem;
  color: #fff;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1rem;
}

.footer-nav a {
  font-size: 0.875rem;
  color: #fff;
}
.footer-nav a:hover {
  color: rgba(255, 255, 255, 0.85);
}

/* Páginas interiores (ej. Facturas) */
.section--page {
  min-height: 50vh;
  padding: var(--space-xl) 0;
}

.page-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 600;
  color: var(--color-text);
  text-align: center;
}

.page-lead {
  margin: 0 0 var(--space-lg);
  font-size: 1.125rem;
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.6;
}

.facturas-card {
  text-align: center;
  padding: var(--space-lg);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 2px;
  margin-bottom: var(--space-lg);
}

.facturas-logo {
  width: 80px;
  height: auto;
  margin: 0 auto 1rem;
}

.facturas-heading {
  margin: 0 0 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text);
}

.facturas-desc {
  margin: 0 0 var(--space);
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

.facturas-card .btn {
  margin-top: 0.25rem;
}

.proveedores-card {
  text-align: center;
  padding: var(--space-lg);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 2px;
}

.proveedores-card p {
  margin: 0 0 var(--space);
  color: var(--color-text-muted);
}

.proveedores-card .btn {
  margin-top: 0.25rem;
}

.privacidad-content h2 {
  margin-top: var(--space-lg);
  margin-bottom: var(--space);
}

.privacidad-content h2:first-of-type {
  margin-top: 0;
}

.privacidad-content ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  color: var(--color-text-muted);
}

.privacidad-content li {
  margin-bottom: 0.35rem;
}

.section-note {
  text-align: center;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}
.section-note a {
  font-weight: 500;
}

/* Página Nosotros */
.nosotros-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space);
  margin: var(--space-lg) 0;
}

.nosotros-card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 2px;
  overflow: hidden;
}

.nosotros-card-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: var(--color-border);
}

.nosotros-card-body {
  padding: var(--space);
}

.nosotros-card h1 {
  margin: 0 0 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-primary);
  text-align: center;
  font-size: 3rem;
}

.nosotros-card p,
.nosotros-card ul {
  margin: 0 0 0.5rem;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.nosotros-card ul {
  padding-left: 1.25rem;
}

.nosotros-card li {
  margin-bottom: 0.25rem;
}

@media (max-width: 768px) {
  .nosotros-cards {
    grid-template-columns: 1fr;
  }
}

.nosotros-carrera {
  margin: 0 calc(-1 * var(--space));
  padding: var(--space-xl) var(--space);
  border-radius: 0;
}

.nosotros-carrera .container {
  padding: 0 var(--space);
}

.nosotros-carrera-intro {
  max-width: 640px;
  margin: 0 auto var(--space-lg);
  text-align: center;
  color: var(--color-text-muted);
}

.nosotros-listas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  max-width: 720px;
  margin: 0 auto;
}

.nosotros-lista h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
}

.nosotros-lista ul {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.nosotros-lista li {
  margin-bottom: 0.35rem;
}

@media (max-width: 640px) {
  .nosotros-listas {
    grid-template-columns: 1fr;
  }
  .nosotros-carrera {
    margin: 0 calc(-1 * var(--space));
  }
}
