/* =============================================
   DIVINITY GLAMOUR – pages.css
   Se carga DESPUÉS de styles.css y solo añade lo
   que las páginas interiores necesitan. Reutiliza
   los tokens de color y tipografía ya definidos.
   ============================================= */

/* ---------- ACCESIBILIDAD ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 2000;
  padding: 12px 22px;
  background: var(--sweet-salmon);
  color: #fff;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
}

:where(a, button, summary, input, select, textarea):focus-visible {
  outline: 2px solid var(--powder-blush);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- NAV: DESPLEGABLES ---------- */
.nav-links {
  gap: 30px;
}

.has-sub {
  position: relative;
}

.nav-sub-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: var(--text-muted);
  transition: var(--transition);
}

.nav-sub-toggle:hover,
.has-sub:hover .nav-sub-toggle,
.has-sub.open .nav-sub-toggle {
  color: var(--powder-blush);
}

.nav-sub-toggle svg {
  width: 10px;
  height: 7px;
  transition: transform 0.3s ease;
}

.has-sub:hover .nav-sub-toggle svg,
.has-sub.open .nav-sub-toggle svg {
  transform: rotate(180deg);
}

.nav-sub {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, 10px);
  margin-top: 14px;
  min-width: 250px;
  padding: 10px;
  background: rgba(20, 19, 28, 0.97);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

/* Puente invisible: sin esto el menú se cierra al cruzar el hueco con el ratón */
.has-sub::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 18px;
}

.has-sub:hover .nav-sub,
.has-sub:focus-within .nav-sub,
.has-sub.open .nav-sub {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.nav-sub a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text-muted);
}

.nav-sub a:hover,
.nav-sub a[aria-current='page'] {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

@media (max-width: 1100px) and (min-width: 769px) {
  .nav-links {
    gap: 20px;
  }
}

@media (max-width: 768px) {
  /* El panel lateral abierto tapaba el botón, así que no había forma de
     cerrarlo salvo pulsando un enlace. Lo subimos por encima. */
  .hamburger {
    position: relative;
    z-index: 1002;
  }

  /* El menú lateral pasa a ser una lista que se puede recorrer */
  .nav-links {
    justify-content: flex-start;
    gap: 6px;
    padding: 96px 26px 40px;
    overflow-y: auto;
    width: 300px;
  }

  .nav-links>li {
    width: 100%;
  }

  .nav-links>li>a {
    display: block;
    padding: 12px 0;
  }

  .nav-sub-toggle {
    width: 100%;
    justify-content: space-between;
    padding: 12px 0;
    font-size: 1.1rem;
  }

  .has-sub::after {
    display: none;
  }

  /* En móvil el desplegable empuja el contenido en vez de flotar.
     Se pliega con max-height y no con `grid-template-rows: 0fr`: esa técnica
     solo colapsa la PRIMERA fila, así que con varios <li> el primero
     desaparecía y los demás seguían viéndose. */
  .nav-sub {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    min-width: 0;
    margin: 0;
    padding: 0 0 0 14px;
    background: none;
    backdrop-filter: none;
    border: none;
    border-left: 1px solid var(--border);
    border-radius: 0;
    box-shadow: none;
    display: block;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.32s ease;
  }

  .has-sub.open .nav-sub {
    transform: none;
    /* Holgado para el submenú más largo (6 elementos) sin recortar */
    max-height: 480px;
  }

  .nav-sub a {
    font-size: 0.98rem;
    padding: 9px 12px;
  }
}

/* ---------- HERO DE PÁGINA INTERIOR ---------- */
.pg-hero {
  position: relative;
  padding: 190px 0 80px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.pg-hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.pg-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
}

/* Degradado que oscurece sobre todo la mitad izquierda, que es donde cae el
   texto: así la foto se ve de verdad y el titular sigue teniendo contraste. */
.pg-hero-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(14, 14, 20, 0.94) 0%, rgba(14, 14, 20, 0.72) 45%, rgba(14, 14, 20, 0.3) 100%),
    linear-gradient(180deg, rgba(14, 14, 20, 0.9) 0%, rgba(14, 14, 20, 0.25) 40%, rgba(14, 14, 20, 0.92) 100%);
  z-index: 1;
}

.pg-hero .container {
  position: relative;
  z-index: 2;
}

.pg-hero-inner {
  max-width: 780px;
}

.pg-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5.2vw, 3.6rem);
  line-height: 1.1;
  font-weight: 800;
  margin: 14px 0 20px;
  letter-spacing: -0.5px;
}

.pg-hero-sub {
  font-size: clamp(1rem, 1.7vw, 1.18rem);
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 34px;
}

.pg-hero-sub strong {
  color: var(--text-primary);
  font-weight: 600;
}

.pg-hero .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* ---------- MIGAS DE PAN ---------- */
.breadcrumbs {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.16);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.breadcrumbs li+li::before {
  content: '/';
  margin-right: 8px;
  opacity: 0.45;
}

.breadcrumbs a:hover {
  color: var(--powder-blush);
}

.breadcrumbs [aria-current='page'] {
  color: var(--text-primary);
}

/* ---------- SECCIONES ---------- */
.pg-section {
  position: relative;
}

.pg-alt {
  background: rgba(255, 255, 255, 0.022);
  border-block: 1px solid var(--border);
}

.container-narrow {
  width: min(820px, 92%);
}

/* styles.css usa clamp(2.5rem, 5vw, 4rem) para los títulos, que funciona en la
   home a pantalla completa pero se come una página de contenido: en un
   contenedor de 820px un H2 se parte en cuatro líneas. Aquí bajamos la escala. */
.pg-section .section-title,
.pg-cta h2 {
  font-size: clamp(1.65rem, 3.1vw, 2.5rem);
  letter-spacing: -0.5px;
  margin-bottom: 22px;
}

.pg-section .section-header .section-title {
  margin-bottom: 14px;
}

.pg-section .section-desc {
  max-width: 620px;
}

.pg-left {
  text-align: left;
  margin-inline: 0;
}

.pg-section p {
  color: var(--text-muted);
  margin-bottom: 18px;
  font-size: 1.02rem;
}

.pg-section p:last-child {
  margin-bottom: 0;
}

.pg-section p strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Enlaces dentro del texto: subrayado discreto que se enciende al pasar */
.pg-section p a,
.pg-faq-body a {
  color: var(--powder-blush);
  border-bottom: 1px solid rgba(232, 180, 161, 0.35);
  transition: var(--transition);
}

.pg-section p a:hover,
.pg-faq-body a:hover {
  color: var(--sweet-salmon);
  border-bottom-color: var(--sweet-salmon);
}

/* ---------- TARJETAS ---------- */
.pg-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

/* Con 4 tarjetas, auto-fit deja 3 arriba y una huérfana abajo. En 2x2 quedan
   equilibradas y con 2 tarjetas se evita que ocupen todo el ancho. */
@media (min-width: 900px) {

  .pg-cards[data-count='4'],
  .pg-cards[data-count='2'] {
    grid-template-columns: repeat(2, 1fr);
  }
}

.pg-card {
  padding: 34px 30px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: var(--transition);
  opacity: 0;
  transform: translateY(24px);
}

.pg-card.visible {
  opacity: 1;
  transform: none;
}

.pg-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(217, 128, 115, 0.32);
  transform: translateY(-5px);
  box-shadow: var(--shadow-card);
}

.pg-card-icon {
  width: 50px;
  height: 50px;
  margin-bottom: 20px;
  color: var(--sweet-salmon);
}

.pg-card-icon svg {
  width: 100%;
  height: 100%;
}

.pg-card h3 {
  font-family: var(--font-cards);
  font-size: 1.16rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.pg-card p {
  color: var(--text-muted);
  font-size: 0.96rem;
  margin-bottom: 16px;
}

.pg-card .service-list {
  margin-bottom: 18px;
}

/* ---------- TEXTO + IMAGEN ---------- */
.pg-media {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 56px;
  align-items: center;
}

.pg-media-flip .pg-media-img {
  order: 2;
}

.pg-media-img img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.pg-media-text .section-title {
  text-align: left;
  margin-bottom: 20px;
}

.pg-media-text .section-tag {
  margin-bottom: 14px;
}

/* ---------- TABLAS ---------- */
.pg-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.pg-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
  font-size: 0.95rem;
}

.pg-table th,
.pg-table td {
  padding: 15px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.pg-table thead th {
  font-family: var(--font-cards);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--powder-blush);
  background: rgba(255, 255, 255, 0.03);
}

.pg-table tbody th {
  font-weight: 600;
  color: var(--text-primary);
}

.pg-table td {
  color: var(--text-muted);
}

.pg-table tbody tr:last-child th,
.pg-table tbody tr:last-child td {
  border-bottom: none;
}

.pg-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.pg-note {
  margin-top: 16px;
  font-size: 0.88rem;
  color: var(--text-muted);
  opacity: 0.85;
  border-left: 2px solid var(--dusty-grape);
  padding-left: 14px;
}

/* ---------- PASOS ---------- */
.pg-steps {
  list-style: none;
  display: grid;
  gap: 18px;
  counter-reset: paso;
  max-width: 820px;
  margin-inline: auto;
}

.pg-step {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  padding: 26px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
}

.pg-step.visible {
  opacity: 1;
  transform: none;
}

.pg-step-num {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gradient-accent);
  color: #fff;
  font-family: var(--font-cards);
  font-weight: 800;
  font-size: 1rem;
}

.pg-step h3 {
  font-family: var(--font-cards);
  font-size: 1.06rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.pg-step p {
  color: var(--text-muted);
  font-size: 0.96rem;
  margin: 0;
}

/* ---------- CRÉDITO DE ORIXE STUDIO ---------- */
.pg-partner {
  padding: 30px 0;
  background: rgba(84, 86, 119, 0.14);
  border-bottom: 1px solid var(--border);
}

.pg-partner-inner {
  display: flex;
  align-items: center;
  gap: 26px;
}

.pg-partner-logo {
  flex-shrink: 0;
  display: block;
  opacity: 0.85;
  transition: var(--transition);
}

.pg-partner-logo:hover {
  opacity: 1;
}

.pg-partner-logo img {
  width: 140px;
  height: auto;
}

.pg-partner p {
  margin: 0;
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.pg-partner p strong {
  color: var(--text-primary);
}

.pg-partner a {
  color: var(--powder-blush);
  border-bottom: 1px solid rgba(232, 180, 161, 0.35);
}

.pg-partner a:hover {
  color: var(--sweet-salmon);
}

/* ---------- FAQ ---------- */
.pg-faq {
  display: grid;
  gap: 12px;
}

.pg-faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.pg-faq-item[open] {
  background: var(--bg-card-hover);
  border-color: rgba(217, 128, 115, 0.3);
}

.pg-faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 26px;
  cursor: pointer;
  list-style: none;
}

.pg-faq-item summary::-webkit-details-marker {
  display: none;
}

.pg-faq-item summary h3 {
  font-family: var(--font-cards);
  font-size: 1.04rem;
  font-weight: 600;
  line-height: 1.45;
  margin: 0;
}

.pg-faq-item[open] summary h3 {
  color: var(--powder-blush);
}

/* Signo + que gira a × al abrir */
.pg-faq-icon {
  flex-shrink: 0;
  position: relative;
  width: 18px;
  height: 18px;
}

.pg-faq-icon::before,
.pg-faq-icon::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  background: var(--sweet-salmon);
  transition: transform 0.3s ease;
}

.pg-faq-icon::before {
  width: 16px;
  height: 2px;
  transform: translate(-50%, -50%);
}

.pg-faq-icon::after {
  width: 2px;
  height: 16px;
  transform: translate(-50%, -50%);
}

.pg-faq-item[open] .pg-faq-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.pg-faq-body {
  padding: 0 26px 24px;
}

.pg-faq-body p {
  color: var(--text-muted);
  font-size: 0.97rem;
  margin-bottom: 14px;
}

.pg-faq-body p:last-child {
  margin-bottom: 0;
}

/* ---------- RELACIONADOS ---------- */
.pg-related {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.pg-related-card {
  display: block;
  padding: 30px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: var(--transition);
  opacity: 0;
  transform: translateY(20px);
}

.pg-related-card.visible {
  opacity: 1;
  transform: none;
}

.pg-related-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(217, 128, 115, 0.32);
  transform: translateY(-5px);
}

.pg-related-card h3 {
  font-family: var(--font-cards);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.pg-related-card p {
  color: var(--text-muted);
  font-size: 0.94rem;
  margin-bottom: 16px;
}

.pg-related-go {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--sweet-salmon);
}

/* ---------- CTA FINAL ---------- */
.pg-cta {
  text-align: center;
  background: var(--gradient-main);
  border-top: 1px solid var(--border);
}

.pg-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.pg-cta p {
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 32px;
}

.pg-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

/* ---------- AJUSTES SOBRE LA HOME ---------- */
/* Los títulos de servicio ahora son enlaces: quitamos el color de enlace */
.service-card h3 a,
.evento-content h3 a {
  color: inherit;
}

.service-card h3 a:hover,
.evento-content h3 a:hover {
  color: var(--powder-blush);
}

.choc-cta {
  margin-top: 26px;
}

.contacto-card h3 {
  font-family: var(--font-cards);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.contacto-plain {
  color: var(--text-primary);
  font-size: 0.95rem;
}

/* El footer usaba h4; ahora son h2 por jerarquía, pero se ven igual */
.footer-links h2,
.footer-contact h2 {
  font-family: var(--font-cards);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-primary);
  margin-bottom: 18px;
}

.footer-zona {
  margin-top: 14px;
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .pg-media {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .pg-media-flip .pg-media-img {
    order: 0;
  }

  .pg-partner-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .pg-hero {
    padding: 150px 0 60px;
  }

  .pg-step {
    padding: 22px;
    gap: 16px;
  }

  .pg-faq-item summary {
    padding: 18px 20px;
  }

  .pg-faq-body {
    padding: 0 20px 20px;
  }

  .pg-cta-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ---------- MOVIMIENTO ----------
   Por decisión de diseño, las animaciones se reproducen siempre, también con
   `prefers-reduced-motion` activado en el sistema. No hay bloque que las anule
   a propósito: si se vuelve a añadir uno, el sitio dejará de animarse en los
   equipos que tengan esa preferencia puesta (en Windows, "Mostrar animaciones"
   desactivado), que es justamente lo que no se quiere. */
