/* ==========================================
   1. VARIABLES DE DISEÑO & CONFIGURACIÓN
   ========================================== */
:root {
  /* Paleta Elegante Escribanía Cecilia Machuca */
  --bg-main: #FDFBF7;       /* Warm Sand - Fondo General */
  --bg-container: #F4EFEA;  /* Beige Elegancia - Tarjetas / Contenedores */
  --text-primary: #2C2523;  /* Oscuro Profesional - Texto Base */
  --text-muted: #5C5552;    /* Texto secundario / Bajadas */
  --accent-gold: #D4AF37;   /* Dorado - Detalles Estratégicos */
  --accent-gold-hover: #AA820A; /* Rich Bronze Gold - Hover / CTAs */
  --white: #FFFFFF;
  --border-subtle: rgba(44, 37, 35, 0.08);

  /* Tipografías */
  --font-serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, sans-serif;

  /* Elevación / Sombras */
  --shadow-soft: 0 10px 30px rgba(44, 37, 35, 0.04);
  --shadow-hover: 0 15px 35px rgba(44, 37, 35, 0.08);

  /* Transiciones */
  --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset Básico & Accesibilidad */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Contenedor Global */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Jerarquía Tipográfica Principal */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.25;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

p {
  color: var(--text-muted);
}

/* Encabezados de Sección */
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3.5rem auto;
}

.section-header p {
  font-size: 1.1rem;
}

/* ==========================================
   2. BOTONES & COMPONENTES REUTILIZABLES
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.8rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 4px;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--accent-gold);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.25);
}

.btn-primary:hover {
  background-color: var(--accent-gold-hover);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(170, 130, 10, 0.35);
}

.btn-whatsapp {
  background-color: var(--accent-gold-hover);
  color: var(--white);
}

.btn-whatsapp:hover {
  background-color: var(--text-primary);
  color: var(--bg-main);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border-color: var(--accent-gold);
}

.btn-secondary:hover {
  background-color: var(--accent-gold);
  color: var(--white);
}

/* ==========================================
   3. HEADER (NAVEGACIÓN FIJA)
   ========================================== */
.header-fixed {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(253, 251, 247, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 0;
  transition: var(--transition);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Layout Marca / Logo e Identidad */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
}

.logo-img {
  height: auto;
  max-height: 60px;
  width: auto;
  object-fit: contain;
}

.brand-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-title {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #333333;
  font-weight: 700;
  line-height: 1;
}

.brand-name {
  font-family: 'Dancing Script', cursive;
  font-size: 1.45rem;
  font-weight: 700;
  color: #7a6200;
  line-height: 1.1;
  margin-top: 2px;
}

/* Menú de Navegación */
.nav-list {
  display: flex;
  list-style: none;
  gap: 2.2rem;
}

.nav-link {
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  transition: var(--transition);
  padding: 0.3rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--accent-gold);
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-gold-hover);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* ==========================================
   4. HERO SECTION (PORTADA PRINCIPAL)
   ========================================== */
.hero-section {
  padding-top: 9rem;
  padding-bottom: 4rem;
  background: linear-gradient(180deg, var(--bg-main) 0%, var(--bg-container) 100%);
}

.hero-container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
}

.hero-title {
  font-size: 3.2rem;
  margin-bottom: 1.2rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  margin-bottom: 2rem;
  max-width: 540px;
}

.hero-image-wrapper {
  position: relative;
}

.hero-image-wrapper::before {
  content: '';
  position: absolute;
  inset: -12px;
  border: 1px solid var(--accent-gold);
  border-radius: 8px;
  z-index: 0;
  opacity: 0.5;
}

.hero-img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  object-fit: cover;
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-soft);
}

.trust-bar {
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border-subtle);
}

.trust-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: var(--white);
  padding: 1.2rem 1.5rem;
  border-radius: 6px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-subtle);
}

.trust-icon {
  font-size: 1.8rem;
}

.trust-text strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.trust-text span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================
   5. SERVICIOS PRINCIPALES
   ========================================== */
.services-section {
  padding: 6rem 0;
  background-color: var(--bg-main);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

.service-card {
  background-color: var(--bg-container);
  padding: 2.5rem;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-5px);
  background-color: var(--white);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent-gold);
}

.card-icon {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.service-card h3 {
  font-size: 1.6rem;
  margin-bottom: 0.8rem;
}

.service-card p {
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
}

.service-list {
  list-style: none;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1rem;
}

.service-list li {
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1.2rem;
}

.service-list li::before {
  content: "•";
  color: var(--accent-gold-hover);
  font-weight: bold;
  position: absolute;
  left: 0;
}

.services-cta {
  text-align: center;
}

/* ==========================================
   6. SOBRE CECILIA MACHUCA
   ========================================== */
.about-section {
  padding: 6rem 0;
  background-color: var(--bg-container);
}

.about-container {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 4rem;
  align-items: center;
}

.about-portrait {
  width: 100%;
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.about-content-col h2 {
  margin-bottom: 1.5rem;
}

.about-text {
  font-size: 1.05rem;
  margin-bottom: 1.2rem;
}

.about-quote {
  margin-top: 2rem;
  padding: 1.5rem 2rem;
  background-color: var(--bg-main);
  border-left: 3px solid var(--accent-gold);
  border-radius: 0 6px 6px 0;
}

.about-quote p {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.about-quote cite {
  font-style: normal;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-gold-hover);
}

/* ==========================================
   7. PREGUNTAS FRECUENTES (FAQ)
   ========================================== */
.faq-section {
  padding: 6rem 0;
  background-color: var(--bg-main);
}

.faq-accordion {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background-color: var(--bg-container);
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transition: var(--transition);
}

.faq-question {
  padding: 1.2rem 1.5rem;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "+";
  font-family: var(--font-sans);
  font-size: 1.4rem;
  color: var(--accent-gold-hover);
  transition: var(--transition);
}

.faq-item[open] .faq-question::after {
  transform: rotate(45deg);
}

.faq-item[open] {
  background-color: var(--white);
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-soft);
}

.faq-answer {
  padding: 0 1.5rem 1.2rem 1.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ==========================================
   8. CONTACTO Y UBICACIÓN
   ========================================== */
.contact-section {
  padding: 6rem 0;
  background-color: var(--bg-container);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.info-card {
  background-color: var(--white);
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-subtle);
}

.info-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1.2rem;
}

.info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.info-list li {
  display: flex;
  flex-direction: column;
  font-size: 0.95rem;
}

.info-list strong {
  color: var(--accent-gold-hover);
}

.info-list a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
}

.map-wrapper {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-subtle);
}

.contact-form-wrapper {
  background-color: var(--white);
  padding: 2.5rem;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
}

.appointment-form h3 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  background-color: var(--bg-main);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--text-primary);
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
  background-color: var(--white);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.btn-block {
  width: 100%;
}

/* ==========================================
   9. FOOTER Y CRÉDITOS
   ========================================== */
.footer-institutional {
  background-color: var(--text-primary);
  color: var(--bg-main);
  padding-top: 3.5rem;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(253, 251, 247, 0.1);
}

.brand-legal {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--bg-main);
}

.registry-legal {
  font-size: 0.85rem;
  color: var(--accent-gold);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.footer-links a {
  color: var(--bg-main);
  text-decoration: none;
  font-size: 0.85rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent-gold);
}

.social-links {
  display: flex;
  gap: 1rem;
}

.footer-bottom {
  padding: 1.2rem 0;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(253, 251, 247, 0.5);
}

/* Sub-Footer / Créditos de desarrollo */
.developer-credits {
  background-color: #1a1a1a;
  color: #a0a0a0;
  padding: 15px 20px;
  font-size: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.credits-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.copyright-text,
.dev-text {
  margin: 0;
  line-height: 1.4;
}

.heart {
  color: #e25555;
  display: inline-block;
}

.dev-link {
  color: #d4af37;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.dev-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* ==========================================
   10. RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================== */

/* --- Tablets y Pantallas Medianas (<= 992px) --- */
@media (max-width: 992px) {
  .hero-container,
  .about-container,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero-section {
    padding-top: 7rem;
    padding-bottom: 3rem;
  }

  .hero-title {
    font-size: 2.4rem;
  }

  .trust-container {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .main-nav {
    display: none; /* Oculta navegación de escritorio */
  }

  .about-portrait {
    max-height: 450px;
    object-fit: cover;
  }
}

/* --- Celulares Grandes y Medianos (<= 768px) --- */
@media (max-width: 768px) {
  .header-fixed {
    padding: 0.75rem 0;
  }

  .brand-logo {
    gap: 10px;
  }

  .logo-img {
    max-height: 42px;
  }

  .brand-title {
    font-size: 0.6rem;
    letter-spacing: 1px;
  }

  .brand-name {
    font-size: 1.2rem;
  }

  .header-cta {
    display: none; /* Oculta CTA para dar aire al header en móviles */
  }

  .hero-title {
    font-size: 2rem;
  }

  .section-header {
    margin-bottom: 2.5rem;
  }

  .service-card,
  .contact-form-wrapper {
    padding: 1.5rem;
  }

  .credits-container {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }
}

/* --- Celulares Pequeños (<= 576px) --- */
@media (max-width: 576px) {
  h2 {
    font-size: 1.8rem;
  }

  .hero-section {
    padding-top: 6rem;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .footer-container {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }

  .footer-links {
    flex-direction: column;
    gap: 1rem;
  }
}
/* ==========================================
   MENÚ HAMBURGUESA & DESPLEGABLE MÓVIL
   ========================================== */

/* Botón oculto por defecto en escritorio */
.hamburger-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 5px;
  z-index: 1001;
}

.hamburger-toggle .bar {
  width: 25px;
  height: 3px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* Animación del ícono a una 'X' cuando está activo */
.hamburger-toggle.is-active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger-toggle.is-active .bar:nth-child(2) {
  opacity: 0;
}

.hamburger-toggle.is-active .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* --- Adaptación para Tablets y Celulares (<= 992px) --- */
@media (max-width: 992px) {
  .hamburger-toggle {
    display: flex; /* Muestra el botón en móviles/tablets */
  }

  .main-nav {
    display: block; /* Sobrescribe el display:none anterior */
    position: fixed;
    top: 70px; /* Se posiciona justo debajo del header */
    left: 0;
    width: 100%;
    background-color: var(--bg-main);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-hover);
    padding: 2rem 0;
    
    /* Estado inicial: Oculto deslizándose hacia arriba */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: var(--transition);
  }

  /* Estado Visible al hacer clic */
  .main-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-list {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .nav-link {
    font-size: 1.1rem;
  }
}
