/* ══════════════════════════════════════
   BRAULIO ANTIGÜEDADES — estilos.css v3
   Hoja de estilos compartida para todas las páginas
══════════════════════════════════════ */

/* -- VARIABLES -- */
/* Paleta extraida directamente del logo.png:
   Burdeos base  #67120A  (fondo dominante)
   Oro brillante #DAA549  (puntos de luz, textos)
   Oro medio     #B3833D  (lineas, bordes)
   Oro oscuro    #A1693A  (oro base)
*/
:root {
  --pergamino:        #f2e8e0;
  --pergamino-alt:    #e8dbd0;
  --pergamino-sombra: #d9c9bb;
  --tinta:            #1a0a06;
  --tinta-suave:      #2e1208;
  --tinta-media:      #5c2c18;
  --tinta-clara:      #8c5a42;
  --oro:              #A1693A;
  --oro-medio:        #B3833D;
  --oro-suave:        #DAA549;
  --oro-linea:        #B3833D;
  --oscuro:           #3D0805;
  --oscuro-medio:     #520C08;
  --oscuro-suave:     #67120A;
  --oscuro-borde:     rgba(179, 131, 61, 0.18);
  /* Ruta de textura — páginas raíz (index, compramos) */
  --textura-fondo:    url('imagenes/fondo1.png');
}

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  background-color: var(--pergamino);
  color: var(--tinta);
  font-family: 'Libre Baskerville', Georgia, serif;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; }

/* ── ORNAMENTOS ── */
.linea-oro {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%, var(--oro-linea) 20%,
    var(--oro-suave) 50%, var(--oro-linea) 80%, transparent 100%);
  opacity: 0.4;
}

.ornamento {
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.9rem;
  color: var(--oro);
  letter-spacing: 0.7em;
  opacity: 0.45;
  user-select: none;
  padding: 0.2rem 0;
}

.etiqueta {
  display: block;
  font-family: 'Libre Baskerville', serif;
  font-size: 0.6rem;
  letter-spacing: 0.55em;
  text-transform: uppercase;
  color: var(--oro-medio);
  margin-bottom: 1.2rem;
  opacity: 0.85;
  text-indent: 0.55em;
}

/* ── CABECERA ── */
/* Sin textura: el logo no compite con el patron de fondo */
header {
  background-color: var(--oscuro);
  text-align: center;
  padding: 3.5rem 2rem 3rem;
  position: relative;
}

.header-linea-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    transparent, var(--oro), var(--oro-suave), var(--oro), transparent);
}

.header-linea-bottom {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--oro-linea), transparent);
  opacity: 0.6;
}

.logo-wrapper {
  width: 108px; height: 108px;
  margin: 0 auto 2rem;
  border-radius: 50%;
  border: 1px solid rgba(218, 165, 73, 0.35);
  padding: 4px;
  position: relative;
  display: block;
  text-decoration: none;
}

.logo-wrapper::before {
  content: '';
  position: absolute; inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(218, 165, 73, 0.1);
}

.logo-wrapper img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  filter: brightness(0.95) contrast(1.05);
}

.header-nombre {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(2rem, 6vw, 4rem);
  color: var(--oro-suave);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  line-height: 1;
  text-decoration: none;
  display: block;
  text-indent: 0.35em;
}

.header-sub {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(0.85rem, 2.2vw, 1.4rem);
  color: rgba(218, 165, 73, 0.45);
  letter-spacing: 0.15em;
  margin-top: 0.6rem;
}

.header-divider {
  width: 36px; height: 1px;
  background: var(--oro-linea);
  opacity: 0.4; margin: 1.2rem auto;
}

.header-lugar {
  font-size: 0.57rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: rgba(218, 165, 73, 0.22);
  font-family: 'Libre Baskerville', serif;
  text-indent: 0.5em;
}

.header-cta {
  margin-top: 2rem;
  display: inline-block;
  font-size: 0.58rem;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: var(--oro-medio);
  text-decoration: none;
  font-family: 'Libre Baskerville', serif;
  border: 1px solid rgba(179, 131, 61, 0.3);
  padding: 0.75rem 2rem;
  transition: all 0.3s ease;
  text-indent: 0.45em;
}

.header-cta:hover {
  border-color: var(--oro-medio);
  background: rgba(179, 131, 61, 0.08);
  color: var(--oro-suave);
}

/* ── NAVEGACIÓN ── */
nav {
  background-color: var(--oscuro-medio);
  text-align: center;
  position: sticky;
  top: 0; z-index: 200;
  border-bottom: 1px solid var(--oscuro-borde);
  overflow: hidden;
}

nav ul {
  list-style: none;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  position: relative;
  z-index: 1;
}

nav ul li a {
  display: block;
  padding: 0.95rem 1.5rem;
  font-size: 0.57rem;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: rgba(218, 165, 73, 0.48);
  text-decoration: none;
  font-family: 'Libre Baskerville', serif;
  border-right: 1px solid rgba(179, 131, 61, 0.1);
  transition: color 0.25s ease, background-color 0.25s ease;
  text-indent: 0.38em;
}

nav ul li:last-child a { border-right: none; }
nav ul li a:hover,
nav ul li a.activo { color: var(--oro-suave); background-color: rgba(179,131,61,0.06); }

/* ── SECCIONES ── */
.seccion { max-width: 860px; margin: 0 auto; padding: 5.5rem 2.5rem; }
.seccion-oscura { background-color: var(--oscuro); overflow: hidden; }
.seccion-gris   { background-color: var(--pergamino-alt); }

h1.titulo-seccion,
h2.titulo-seccion {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  line-height: 1.25;
  margin-bottom: 1.8rem;
  color: var(--tinta);
}

.seccion-oscura h1.titulo-seccion,
.seccion-oscura h2.titulo-seccion { color: var(--oro-suave); }

.seccion p {
  font-size: 0.93rem;
  color: var(--tinta-media);
  max-width: 60ch;
  margin-bottom: 1.1rem;
}
.seccion p:last-of-type { margin-bottom: 0; }
.seccion-oscura .seccion p { color: rgba(218,165,73,0.4); }

/* ── BOTÓN WHATSAPP ── */
.btn-whatsapp {
  display: inline-block;
  margin-top: 2.5rem;
  padding: 0.95rem 2.5rem;
  border: 1px solid rgba(179, 131, 61, 0.35);
  font-size: 0.6rem;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: var(--oro-medio);
  text-decoration: none;
  font-family: 'Libre Baskerville', serif;
  transition: all 0.3s ease;
  text-indent: 0.45em;
  background: transparent;
}
.btn-whatsapp:hover {
  border-color: var(--oro-medio);
  background-color: rgba(179,131,61,0.08);
  color: var(--oro-suave);
}

/* ── FOOTER ── */
footer {
  background-color: var(--oscuro);
  border-top: 1px solid rgba(179,131,61,0.1);
  text-align: center;
  padding: 3rem 2rem;
  overflow: hidden;
}

.footer-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.footer-nav a {
  font-size: 0.55rem;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: rgba(218,165,73,0.28);
  text-decoration: none;
  font-family: 'Libre Baskerville', serif;
  transition: color 0.2s;
  text-indent: 0.38em;
}

.footer-nav a:hover { color: rgba(218,165,73,0.55); }

.footer-texto {
  font-size: 0.56rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: rgba(218,165,73,0.18);
  font-family: 'Libre Baskerville', serif;
  max-width: none !important;
  margin: 0 !important;
  text-indent: 0.42em;
  position: relative;
  z-index: 1;
}

.footer-meta {
  margin-top: 0.8rem;
  font-size: 0.52rem;
  letter-spacing: 0.3em;
  color: rgba(218,165,73,0.1);
  font-family: 'Libre Baskerville', serif;
  position: relative;
  z-index: 1;
}

/* ── ANIMACIONES ── */
.fade { opacity: 0; transform: translateY(18px); transition: opacity 0.85s ease, transform 0.85s ease; }
.fade.visible { opacity: 1; transform: translateY(0); }
.fade-delay-1 { transition-delay: 0.1s; }
.fade-delay-2 { transition-delay: 0.2s; }
.fade-delay-3 { transition-delay: 0.3s; }

/* ── RESPONSIVE ── */
@media (max-width: 520px) {
  .seccion { padding: 3.5rem 1.5rem; }
  nav ul li a { padding: 0.85rem 0.9rem; font-size: 0.5rem; letter-spacing: 0.18em; }
}

/* ── PÁGINAS LEGALES ── */
.legal-contenido { max-width: 700px; margin: 0 auto; padding: 5rem 2.5rem; }
.legal-contenido h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--tinta);
  margin-bottom: 2.5rem;
  line-height: 1.2;
}
.legal-contenido h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 1.2rem;
  color: var(--tinta-suave);
  margin: 2.5rem 0 0.8rem;
}
.legal-contenido p {
  font-size: 0.88rem;
  color: var(--tinta-media);
  margin-bottom: 1rem;
  line-height: 1.85;
}
.legal-contenido ul { margin: 0.8rem 0 1rem 1.5rem; }
.legal-contenido ul li {
  font-size: 0.88rem;
  color: var(--tinta-media);
  margin-bottom: 0.4rem;
}
.legal-volver {
  display: inline-block;
  margin-top: 3rem;
  font-size: 0.6rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--oro);
  text-decoration: none;
  font-family: 'Libre Baskerville', serif;
  border-bottom: 1px solid rgba(161,105,58,0.3);
  padding-bottom: 2px;
  text-indent: 0.4em;
  transition: color 0.2s;
}
.legal-volver:hover { color: var(--oro-suave); }

/* ── BANDA DE AUTORIDAD ── */
/* La franja entre la declaración y "Especialistas en arte sacro"
   Más padding para respirar, texto más visible */
.autoridad-banda {
  padding: 2.8rem 2rem !important;
}
.autoridad-inner {
  gap: 0.8rem 4rem !important;
}
.autoridad-item {
  color: rgba(218, 165, 73, 0.55) !important;
  font-size: 0.62rem !important;
  letter-spacing: 0.4em !important;
}

/* ── TEXTURA DE FONDO ────────────────────────────────────────────
   fondo1.png: patron liturgico — cruces, candelabros, urnas, custodias
   Aplicado en: nav, footer, .seccion-oscura
   Header excluido: el logo no debe competir con el patron
   Opacidad 0.07: perceptible solo al fijarse, nunca protagonista
   Tecnica: ::after para no interferir con z-index del contenido
─────────────────────────────────────────────────────────────────── */

nav,
footer,
.seccion-oscura {
  position: relative;
  overflow: hidden;
}

nav::after,
footer::after,
.seccion-oscura::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--textura-fondo);
  background-repeat: repeat;
  background-size: 520px auto;
  opacity: 0.07;
  pointer-events: none;
  z-index: 0;
}

nav ul,
footer > *,
.seccion-oscura > * {
  position: relative;
  z-index: 1;
}

/* ── OVERRIDE TEXTURA PARA PÁGINAS EN SUBCARPETAS ───────────────
   Las páginas en categoria/ y legal/ necesitan ruta ../imagenes/
   Añade class="nivel-categoria" al <html> de esas páginas,
   o incluye este bloque en su <style> local:
      :root { --textura-fondo: url('../imagenes/fondo1.png'); }
─────────────────────────────────────────────────────────────────── */
