/* =========================================================
   El Rey David Deco · Hoja de estilos principal
   ---------------------------------------------------------
   1. Variables
   2. Base
   3. Utilidades de layout
   4. Componentes (header, botones, hero, secciones...)
   5. Responsive (de mayor a menor ancho)
   ========================================================= */


/* =========================================================
   1. VARIABLES
   ========================================================= */

:root {
  --crema: #f8f5f0;
  --crema-oscuro: #eee7dc;

  --dorado: #b89555;
  --dorado-hover: #9f7c3e;
  --dorado-hero: #b8860b;
  --dorado-brillante: #d4af37;

  --rosa: #b5838d;

  --texto: #3f3b38;
  --texto-suave: #706a65;
  --texto-tenue: #999;

  --blanco: #ffffff;
  --borde-calido: #eee4d8;

  --oscuro: #292725;
  --oscuro-suave: #3a3531;
  --oscuro-footer: #211f1d;

  --whatsapp: #25d366;

  /* Header oscuro para que resalte el logo dorado */
  --header-fondo: linear-gradient(180deg, #2b2724 0%, #1f1c1a 100%);
  --header-borde: rgba(225, 189, 112, .35);
  --menu-texto: #f3ece1;
  --menu-hover: #e8c46a;

  --fuente-texto: 'Montserrat', sans-serif;
  --fuente-titulos: 'Cormorant Garamond', serif;

  --header-alto: 75px;

  --sombra: 0 8px 25px rgba(70, 55, 40, .08);
  --sombra-hover: 0 15px 35px rgba(70, 55, 40, .15);
}


/* =========================================================
   2. BASE
   ========================================================= */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-alto);
}

body {
  font-family: var(--fuente-texto);
  color: var(--texto);
  background: var(--blanco);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  width: 100%;
  display: block;
}

a {
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}


/* =========================================================
   3. LAYOUT
   ========================================================= */

.container {
  width: min(1150px, 90%);
  margin: auto;
}

section {
  padding: 55px 0;
}


/* =========================================================
   4. COMPONENTES
   ========================================================= */

/* ---------- Header ---------- */

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-alto);
  background: var(--header-fondo);
  border-bottom: 1px solid var(--header-borde);
  box-shadow: 0 3px 15px rgba(0, 0, 0, .25);
  z-index: 1000;
}

.nav {
  height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 80px;
  width: auto;
}

.menu {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
}

.menu a {
  position: relative;
  color: var(--menu-texto);
  font-size: .9rem;
  font-weight: 500;
  transition: color .3s ease;
}

.menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--menu-hover);
  transition: width .3s ease;
}

.menu a:hover {
  color: var(--menu-hover);
}

.menu a:hover::after {
  width: 100%;
}

.hamburger {
  display: none;
  font-size: 28px;
  line-height: inherit;
  color: var(--menu-texto);
  user-select: none;
}


/* ---------- Botones ---------- */

.btn {
  display: inline-block;
  padding: 14px 32px;
  background: var(--dorado);
  color: var(--blanco);
  border-radius: 30px;
  font-weight: 500;
  letter-spacing: .3px;
  box-shadow: 0 5px 15px rgba(184, 149, 85, .25);
  transition: all .3s ease;
}

.btn:hover {
  background: var(--dorado-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(184, 149, 85, .35);
}


/* ---------- Títulos de sección ---------- */

.title {
  text-align: center;
  font-family: var(--fuente-titulos);
  font-size: 42px;
  font-weight: 600;
  line-height: 1.1;
  color: var(--texto);
  margin-bottom: 30px;
}

.section-subtitle {
  text-align: center;
  color: var(--texto-suave);
  max-width: 650px;
  margin: -15px auto 30px;
}

.eyebrow {
  color: var(--dorado);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: 4px;
}


/* ---------- Hero con carrusel ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  color: var(--blanco);
  overflow: hidden;
  padding-top: 70px;
}

.hero-slider,
.hero-slide,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-slider {
  z-index: 0;
}

.hero-slide {
  opacity: 0;
  transform: scale(1.05);
  transition:
    opacity 1.5s ease-in-out,
    transform 6s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

.hero-slide img {
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  z-index: 1;
  background: linear-gradient(90deg,
      rgba(30, 25, 20, .70),
      rgba(30, 25, 20, .35),
      rgba(30, 25, 20, .25));
}

.hero-container {
  position: relative;
  z-index: 2;
  width: min(1200px, 90%);
}

.hero-content {
  max-width: 680px;
  padding: 40px 0;
}

.hero h1 {
  font-family: var(--fuente-titulos);
  font-size: clamp(48px, 7vw, 72px);
  font-weight: 600;
  line-height: 1;
  margin-bottom: 22px;
}

.hero p {
  font-size: 18px;
  line-height: 1.7;
  max-width: 600px;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, .92);
}

.hero .btn {
  padding: 15px 35px;
  background: var(--dorado-hero);
  border-radius: 40px;
}

.hero .btn:hover {
  background: var(--dorado-brillante);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, .25);
}

.hero-dots {
  position: absolute;
  z-index: 3;
  bottom: 35px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .5);
  transition: all .4s ease;
}

.hero-dot.active {
  width: 28px;
  border-radius: 10px;
  background: var(--dorado-brillante);
}


/* ---------- Servicios ---------- */

.services {
  background: var(--blanco);
  padding-top: 45px;
}

.services-header {
  text-align: center;
  margin-bottom: 30px;
}

.services-header h2 {
  font-family: var(--fuente-titulos);
  font-size: 42px;
  color: var(--texto);
  margin: 5px 0;
}

.services-header p {
  color: var(--texto-suave);
  font-size: .95rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 300px);
  gap: 25px;
  padding: 10px 0;
  justify-content: center;
}

.card-wrapper {
  position: relative;
  width: 300px;
}

.card {
  border: 1px solid #eee7df;
  border-radius: 16px;
  overflow: hidden;
  background: var(--blanco);
  box-shadow: var(--sombra);
  cursor: pointer;
  transition:
    transform .3s ease,
    box-shadow .3s ease;
}

.card:hover,
.card:focus-visible {
  transform: translateY(-6px);
  box-shadow: var(--sombra-hover);
}

.card img,
.card-detail img {
  height: 200px;
  object-fit: cover;
  object-position: center;
}

.card-content {
  padding: 17px;
}

.card-content h3 {
  font-family: var(--fuente-titulos);
  font-size: 1.55rem;
  color: var(--texto);
  margin-bottom: 3px;
}

.card-content p {
  color: var(--texto-suave);
  font-size: .9rem;
}

/* La lista de "incluye" solo se ve en el detalle emergente */
.card .extra-details {
  display: none;
}

/* Detalle emergente (lo genera main.js a partir de la tarjeta) */
.card-detail {
  position: absolute;
  top: -15px;
  left: -15px;
  width: 330px;
  border-radius: 17px;
  overflow: hidden;
  background: var(--blanco);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .20);
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: scale(.95);
  transition:
    opacity .3s ease,
    transform .3s ease,
    visibility .3s ease;
}

.card-detail.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.extra-details {
  padding: 0 15px 15px;
  border-top: 1px dashed #ddd;
  margin-top: 10px;
  background: #fbf8f4;
}

.extra-details h4 {
  margin: 10px 0 5px;
  color: var(--rosa);
  font-size: .9rem;
}

.extra-details ul {
  padding-left: 20px;
  font-size: .82rem;
  color: var(--texto-suave);
}


/* ---------- Nosotros ---------- */

.about-section {
  background: var(--crema);
}

.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.about img {
  height: 420px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: var(--sombra);
}

.about-text p {
  color: var(--texto-suave);
  font-size: .95rem;
  line-height: 1.9;
}

.about-text p + p {
  margin-top: calc(.95rem * 1.9);
}

.about-text .title {
  text-align: left;
  margin-bottom: 18px;
}


/* ---------- Galería ---------- */

.gallery-section {
  background: var(--blanco);
  padding-bottom: 50px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.gallery img {
  height: 230px;
  object-fit: cover;
  border-radius: 14px;
  cursor: pointer;
  transition:
    transform .4s ease,
    filter .4s ease;
}

.gallery img:hover,
.gallery img:focus-visible {
  transform: scale(1.03);
  filter: brightness(.92);
}


/* ---------- Estadísticas ---------- */

.stats {
  background: var(--crema-oscuro);
  padding: 40px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  text-align: center;
}

.stat {
  padding: 10px;
}

.stat-value {
  font-family: var(--fuente-titulos);
  font-size: 52px;
  font-weight: 700;
  line-height: 1;
  color: var(--dorado);
  margin-bottom: 5px;
}

.stat-label {
  color: var(--texto-suave);
  font-size: .9rem;
}


/* ---------- Testimonios ---------- */

.testimonios {
  padding: 55px 5%;
  background: var(--blanco);
  text-align: center;
}

.testimonios-header {
  margin-bottom: 35px;
}

.testimonios-header h2 {
  margin: 5px 0 8px;
  font-family: var(--fuente-titulos);
  font-size: 42px;
  font-weight: 600;
  color: var(--texto);
}

.testimonios-header p {
  color: var(--texto-suave);
  font-size: .9rem;
}

.testimonios-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 1150px;
  margin: auto;
}

.testimonios-carrusel {
  width: 100%;
  overflow: hidden;
}

.testimonios-track {
  display: flex;
  transition: transform .8s ease-in-out;
}

.testimonio {
  flex: 0 0 calc(33.333% - 20px);
  margin: 0 10px;
  min-height: 270px;
  padding: 30px;
  background: linear-gradient(145deg, #ffffff 0%, #faf6f0 100%);
  border: 1px solid var(--borde-calido);
  border-radius: 18px;
  box-shadow: 0 8px 25px rgba(70, 55, 40, .07);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  transition:
    transform .3s ease,
    box-shadow .3s ease;
}

.testimonio:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(70, 55, 40, .13);
}

.estrellas {
  color: var(--dorado);
  font-size: 1.2rem;
  letter-spacing: 3px;
  margin-bottom: 18px;
}

.testimonio blockquote p {
  color: var(--texto-suave);
  font-size: .92rem;
  line-height: 1.7;
  font-style: italic;
  margin-bottom: 25px;
}

.cliente {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--borde-calido);
  padding-top: 18px;
}

.cliente-icono {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--rosa);
  color: var(--blanco);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1rem;
}

.cliente-nombre {
  margin-bottom: 3px;
  color: var(--texto);
  font-size: .95rem;
  font-weight: bold;
}

.cliente-evento {
  color: var(--texto-tenue);
  font-size: .8rem;
}

.testimonio-btn {
  position: absolute;
  z-index: 5;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--dorado);
  color: var(--blanco);
  font-size: 1.2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, .15);
  transition:
    background .3s ease,
    transform .3s ease;
}

.testimonio-btn:hover {
  background: var(--dorado-hover);
  transform: scale(1.08);
}

.btn-anterior {
  left: -20px;
}

.btn-siguiente {
  right: -20px;
}

.testimonios-puntos {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}

.testimonio-punto {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ddd;
  transition: all .3s ease;
}

.testimonio-punto.activo {
  width: 24px;
  border-radius: 10px;
  background: var(--dorado);
}


/* ---------- Contacto ---------- */

.contact {
  background: linear-gradient(135deg, var(--oscuro), var(--oscuro-suave));
  color: var(--blanco);
  text-align: center;
  padding: 60px 0;
}

.contact .title {
  color: var(--blanco);
  margin-bottom: 12px;
}

.contact p {
  color: rgba(255, 255, 255, .75);
  margin-bottom: 25px;
}


/* ---------- Footer ---------- */

.footer {
  padding: 18px;
  background: var(--oscuro-footer);
  color: #aaa;
  text-align: center;
  font-size: .8rem;
}


/* ---------- Botón flotante de WhatsApp ---------- */

.whatsapp {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(145deg, #2fe074, var(--whatsapp) 55%, #1ebe5b);
  color: var(--blanco);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 8px 22px rgba(37, 211, 102, .35),
    0 4px 10px rgba(0, 0, 0, .15);
  z-index: 5000;
  transition:
    transform .3s ease,
    box-shadow .3s ease;
}

/* Onda suave que invita a hacer clic */
.whatsapp::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--whatsapp);
  z-index: -1;
  animation: whatsapp-pulso 2.4s ease-out infinite;
}

.whatsapp-icon {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .15));
}

.whatsapp:hover,
.whatsapp:focus-visible {
  transform: translateY(-3px) scale(1.06);
  box-shadow:
    0 12px 28px rgba(37, 211, 102, .45),
    0 6px 14px rgba(0, 0, 0, .18);
}

.whatsapp:focus-visible {
  outline: 3px solid var(--blanco);
  outline-offset: 3px;
}

/* Etiqueta que aparece al pasar el mouse (solo escritorio) */
.whatsapp-tooltip {
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  transform: translate(8px, -50%);
  padding: 8px 14px;
  border-radius: 20px;
  background: var(--blanco);
  color: var(--texto);
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--sombra-hover);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity .3s ease,
    transform .3s ease,
    visibility .3s ease;
}

.whatsapp:hover .whatsapp-tooltip,
.whatsapp:focus-visible .whatsapp-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translate(0, -50%);
}

@keyframes whatsapp-pulso {
  0% {
    transform: scale(1);
    opacity: .45;
  }

  70%,
  100% {
    transform: scale(1.55);
    opacity: 0;
  }
}

@media (hover: none) {
  .whatsapp-tooltip {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .whatsapp::before {
    animation: none;
  }
}


/* ---------- Lightbox de la galería ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 16, .92);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity .35s ease,
    visibility .35s ease;
  z-index: 9999;
  padding: 30px;
}

.lightbox.show {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: 90%;
  max-height: 85vh;
  width: auto;
  border-radius: 12px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, .5);
  transform: scale(.8);
  opacity: 0;
  transition:
    transform .35s ease,
    opacity .35s ease;
}

.lightbox.show img {
  transform: scale(1);
  opacity: 1;
}

.close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 45px;
  line-height: inherit;
  color: var(--blanco);
  transition:
    transform .3s ease,
    color .3s ease;
}

.close:hover {
  transform: rotate(90deg);
  color: var(--dorado);
}


/* =========================================================
   5. RESPONSIVE
   Los puntos de corte del carrusel de testimonios
   (1000px y 768px) también se usan en main.js.
   ========================================================= */

/* ---------- Tablet (≤ 1000px) ---------- */

@media (max-width: 1000px) {

  .cards {
    grid-template-columns: repeat(2, 300px);
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .about {
    gap: 35px;
  }

  .testimonio {
    flex-basis: calc(50% - 20px);
  }
}


/* ---------- Celular (≤ 768px) ---------- */

@media (max-width: 768px) {

  .header,
  .nav {
    height: 65px;
  }

  .logo img {
    height: 55px;
  }

  .hamburger {
    display: block;
  }

  .menu {
    position: absolute;
    top: 65px;
    left: 0;
    width: 100%;
    background: #1f1c1a;
    border-bottom: 1px solid var(--header-borde);
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 25px;
    gap: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, .25);
  }

  .menu.active {
    display: flex;
  }

  .title {
    font-size: 36px;
  }

  .hero {
    min-height: 90vh;
    padding-top: 65px;
  }

  .hero-overlay {
    background: linear-gradient(rgba(30, 25, 20, .60), rgba(30, 25, 20, .55));
  }

  .hero-content {
    text-align: center;
    margin: auto;
  }

  .hero h1 {
    font-size: 50px;
  }

  .hero p {
    font-size: 16px;
    margin-left: auto;
    margin-right: auto;
  }

  .about {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .about img {
    height: 300px;
  }

  .about-text .title {
    text-align: center;
  }

  .gallery img {
    height: 180px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .testimonios {
    padding: 50px 7%;
  }

  .testimonios-header h2 {
    font-size: 36px;
  }

  .testimonio {
    flex-basis: calc(100% - 20px);
    min-height: 250px;
    padding: 25px;
  }

  .testimonio-btn {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  .btn-anterior {
    left: -18px;
  }

  .btn-siguiente {
    right: -18px;
  }
}


/* ---------- Celular pequeño (≤ 500px) ---------- */

@media (max-width: 500px) {

  .cards {
    grid-template-columns: 1fr;
    padding: 5px 0;
  }

  .card-wrapper {
    max-width: 100%;
    margin: auto;
  }

  .card-detail {
    max-width: calc(100vw - 30px);
    left: 50%;
    transform: translateX(-50%) scale(.95);
  }

  .card-detail.is-active {
    transform: translateX(-50%) scale(1);
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  .gallery img {
    height: 220px;
  }

  .hero h1 {
    font-size: 44px;
  }

  .hero-content {
    padding: 30px 0;
  }

  .testimonios-header h2 {
    font-size: 32px;
  }
}


/* ---------- Celular muy pequeño (≤ 480px) ---------- */

@media (max-width: 480px) {

  .hero h1 {
    line-height: 1.05;
  }

  .hero p {
    line-height: 1.6;
  }

  .hero .btn {
    padding: 13px 28px;
  }

  .hero-dots {
    bottom: 25px;
  }

  .whatsapp {
    width: 54px;
    height: 54px;
    bottom: 18px;
    right: 18px;
  }

  .whatsapp-icon {
    width: 28px;
    height: 28px;
  }
}
