/* === amor.red — hoja de estilo principal === */
/* === REVISIÓN 2.8.2 — Fix grid servicios: 1 col en móvil, 2 en tablet; resto intacto === */

:root {
  --color-primary: #9c89b8;
  --color-secondary: #e0c097;
  --color-accent: #f7f5fc;
  --color-dark: #2e2e2e;
  --color-light: #fff;
  --font-title: 'Playfair Display', serif;
  --font-body: 'Poppins', sans-serif;
  --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 10px 24px rgba(156, 137, 184, 0.25);
  --transition-base: all 0.35s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--color-dark);
  background-color: var(--color-light);
  line-height: 1.7;
  overflow-x: hidden;
}

/* Bloqueo real de scroll cuando menú/popup activos */
body.no-scroll { overflow: hidden; }

a:focus-visible, button:focus-visible {
  outline: 3px solid var(--color-secondary);
  outline-offset: 3px;
}

.top-nav {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 999;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.8rem 1.5rem;
  background: rgba(46, 46, 46, 0.75);
  backdrop-filter: blur(8px);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.top-nav.scrolled {
  background: rgba(46, 46, 46, 0.95);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.logo-wrapper { display: flex; align-items: center; }
.logo-image { height: 42px; transition: transform 0.3s ease; }
.logo-image:hover { transform: scale(1.05); }

.nav-menu {
  list-style: none;
  display: flex;
  gap: 1.6rem;
  align-items: center;
}

.nav-menu li a {
  color: var(--color-light);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: opacity 0.3s ease;
}
.nav-menu li a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 2px;
  background-color: var(--color-secondary);
  transition: width 0.3s ease;
}
.nav-menu li a:hover::after { width: 100%; }

.nav-menu li a.cta-link {
  padding: 0.45rem 0.9rem;
  background-color: var(--color-secondary);
  color: var(--color-dark);
  border-radius: 4px;
  transition: var(--transition-base);
}
.nav-menu li a.cta-link:hover { background-color: #d4a061; }

.menu-toggle {
  display: none;
  background: none; border: none;
  font-size: 1.8rem;
  color: var(--color-light);
  cursor: pointer;
  transition: transform 0.3s ease;
}
.menu-toggle.active { transform: rotate(90deg); }

/* Offset para anclas con navbar fija */
section { scroll-margin-top: 80px; }

.hero {
  background: linear-gradient(135deg, rgba(156, 137, 184, 0.95), rgba(224, 192, 151, 0.95));
  min-height: 90vh;
  display: flex; align-items: center; justify-content: center;
  padding-top: 6rem;
}
.hero-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 3rem; padding: 0 1.5rem; flex-wrap: wrap;
}
.hero-image-wrapper { flex: 1; display: flex; justify-content: center; }
.hero-photo {
  width: 260px; height: 260px; object-fit: cover; border-radius: 50%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border: 4px solid rgba(255, 255, 255, 0.8);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}
.hero-photo:hover { transform: scale(1.06); box-shadow: 0 12px 36px rgba(0, 0, 0, 0.2); }
.hero-text { flex: 2; color: var(--color-light); animation: fadeInUp 1s ease forwards; }
.hero-text h1 { font-family: var(--font-title); font-size: 2.8rem; line-height: 1.2; margin-bottom: 0.6rem; }
.hero-text h2 { font-family: var(--font-title); font-weight: 400; font-size: 1.5rem; margin-bottom: 1.2rem; opacity: 0.95; }
.hero-text p { font-size: 1.15rem; margin-bottom: 1.6rem; max-width: 600px; opacity: 0.95; }

.btn { display: inline-block; padding: 0.9rem 1.8rem; border-radius: 30px; font-weight: 600; text-decoration: none; transition: var(--transition-base); cursor: pointer; }
.btn-primary { background-color: var(--color-secondary); color: var(--color-dark); }
.btn-primary:hover { background-color: #d4a061; transform: translateY(-2px); }
.btn-service { background-color: var(--color-primary); color: var(--color-light); margin-top: 1rem; box-shadow: 0 3px 8px rgba(156, 137, 184, 0.25); }
.btn-service:hover { background-color: #7e6aa4; transform: translateY(-3px); box-shadow: 0 6px 16px rgba(156, 137, 184, 0.3); }

/* Secciones visibles por defecto (robusto aunque falle JS) */
main section {
  padding: 4rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* (Opcional) Animación sólo en desktop con clases .reveal */
@media (min-width: 769px) {
  .reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
  .reveal.is-visible { opacity: 1; transform: none; }
}

section h2 {
  font-family: var(--font-title);
  font-size: 2rem;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  text-align: center;
}

.services-section { background-color: var(--color-accent); border-radius: 12px; box-shadow: var(--shadow-soft); padding-bottom: 4rem; }
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem; margin-top: 2rem;
}
.service-card { background-color: var(--color-light); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-soft); display: flex; flex-direction: column; text-align: left; transition: var(--transition-base); transform-origin: center bottom; }
.service-card img { width: 100%; height: 190px; object-fit: cover; transition: var(--transition-base); }
.service-card h3 { font-family: var(--font-title); color: var(--color-primary); font-size: 1.3rem; margin: 1rem; }
.service-card p { font-size: 1rem; color: #555; margin: 0 1rem 1rem; flex-grow: 1; }
.service-card a { align-self: flex-start; margin: 0 1rem 1.5rem; }
.service-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-hover); }
.service-card:hover img { filter: brightness(1.08); transform: scale(1.03); }

.testimonials-section { background-color: var(--color-light); border-radius: 16px; padding: 5rem 1.5rem 6rem; text-align: center; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03); }
.testimonials-header h2 { font-size: 2rem; color: var(--color-primary); margin-bottom: 0.75rem; }
.testimonials-header p { color: #444; font-size: 1.05rem; line-height: 1.6; font-style: italic; max-width: 800px; margin: 0 auto 3rem auto; }

.testimonial-slider { position: relative; max-width: 800px; margin: 0 auto; overflow: hidden; border-radius: 16px; box-shadow: var(--shadow-soft); background-color: var(--color-accent); padding: 2rem 1rem; }
.testimonial-slider .slides { display: flex; transition: transform 0.8s ease; width: 100%; }
.testimonial-slider .slide { flex: 0 0 100%; opacity: 0; transition: opacity 1s ease; display: flex; align-items: center; justify-content: center; text-align: center; min-height: 220px; }
.testimonial-slider .slide.active { opacity: 1; }
.testimonial-slider blockquote { font-style: italic; font-size: 1.05rem; line-height: 1.7; color: var(--color-dark); max-width: 680px; margin: 0 auto; position: relative; padding: 1.5rem 1rem; }
.testimonial-slider blockquote::before, .testimonial-slider blockquote::after { content: '“'; font-family: var(--font-title); color: var(--color-primary); font-size: 3rem; position: absolute; opacity: 0.2; }
.testimonial-slider blockquote::after { content: '”'; bottom: -20px; right: -10px; }
.testimonial-slider cite { display: block; margin-top: 1rem; color: var(--color-primary); font-weight: 600; font-size: 1rem; }
.testimonial-slider .stars { font-size: 1.2rem; color: #f5b301; margin-bottom: 0.6rem; letter-spacing: 2px; text-shadow: 0 0 6px rgba(245, 179, 1, 0.25); }

.cta-final { background: radial-gradient(circle at top left, #9c89b8, #7f6aa7 30%, #e0c097 90%); color: var(--color-light); text-align: center; padding: 6rem 1.5rem 5rem; border-radius: 16px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15); position: relative; overflow: hidden; }
.cta-final::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.15), transparent 70%); z-index: 0; pointer-events: none; }
.cta-final h2 { position: relative; z-index: 1; font-family: var(--font-title); font-size: 2.4rem; margin-bottom: 1.2rem; color: #fff; text-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); }
.cta-final p { position: relative; z-index: 1; font-size: 1.15rem; line-height: 1.7; opacity: 0.95; margin-bottom: 2rem; max-width: 650px; margin-inline: auto; color: #fdfdfd; }
.cta-final .btn { position: relative; z-index: 1; }

/* Footer con mejor contraste sobre fondo claro */
footer {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.9rem;
  background-color: #f8f4fb;
  color: #1f1f1f;
}
footer a { color: var(--color-primary); text-decoration: none; font-weight: 600; }
footer a:hover { text-decoration: underline; }

@media (max-width: 992px) {
  .hero-inner { flex-direction: column; text-align: center; }
  .hero-photo { width: 200px; height: 200px; margin-bottom: 1.5rem; }
  .hero-text h1 { font-size: 2.2rem; }
  .hero-text h2 { font-size: 1.3rem; }
  /* ⛔️ Eliminado el forzado a 2 columnas aquí */
}

/* móvil: 1 columna */
@media (max-width: 768px) {
  .menu-toggle { display: block; z-index: 1001; }

  /* Off-canvas robusto por transform + pointer-events */
  .nav-menu {
    position: fixed; top: 0; right: 0;
    width: 70%; height: 100vh;
    background: rgba(46, 46, 46, 0.95);
    flex-direction: column; align-items: center; justify-content: center; gap: 2rem;
    transform: translateX(100%); transition: transform 0.4s ease;
    box-shadow: -4px 0 10px rgba(0, 0, 0, 0.2);
    pointer-events: none;
  }
  .nav-menu.active { transform: translateX(0); pointer-events: auto; }

  .nav-menu li a { font-size: 1.2rem; color: var(--color-light); }
  .nav-menu li a.cta-link { background-color: var(--color-secondary); color: var(--color-dark); padding: 0.6rem 1.2rem; border-radius: 8px; }

  /* MÓVIL → 1 columna */
  .services-grid { grid-template-columns: 1fr; }

  /* En móvil no animamos las secciones */
  .reveal, .reveal.is-visible { opacity: 1 !important; transform: none !important; }
}

/* tablet: 2 columnas */
@media (min-width: 769px) and (max-width: 992px) {
  .services-grid { grid-template-columns: 1fr 1fr; }
}

/* === POPUP HISTORIA === */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex; justify-content: center; align-items: center;
  visibility: hidden; opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 9999; padding: 1rem;
}
.popup-overlay.active { visibility: visible; opacity: 1; }

.popup-content {
  background: #fff; color: #222;
  max-width: 680px; width: 100%;
  max-height: 85vh; overflow-y: auto;
  border-radius: 1rem; box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  padding: 2rem; position: relative; animation: fadeInUp 0.4s ease;
}
.popup-close {
  position: absolute; top: 10px; right: 15px;
  border: none; background: none; font-size: 1.8rem; cursor: pointer;
  color: #888; transition: color 0.2s ease;
}
.popup-close:hover { color: #111; }
.popup-body p { margin-bottom: 1rem; line-height: 1.6; }
/* === FORM REGALO === */
#popup-regalo .popup-content { max-width: 560px; }
#regalo-form { margin-top: 1rem; display: grid; gap: 0.9rem; }
#regalo-email {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 1rem;
}
#regalo-email:focus { outline: 3px solid rgba(156,137,184,0.3); border-color: #9c89b8; }
.form-note { font-size: 0.85rem; color: #555; }
.form-status { font-size: 0.95rem; min-height: 1.2em; }
.hp {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important; height: 1px !important;
  overflow: hidden !important;
}
.sr-only {
  position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important; overflow: hidden !important;
  clip: rect(0,0,0,0) !important; border: 0 !important;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(25px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0s !important; transition-duration: 0s !important; }
}
