/* =========================
   RESET / BASE
========================= */
*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

html, body{ height: 100%; }

body{
  font-family: Georgia, 'Times New Roman', Times, serif;
  margin: 0;
  padding: 0;
  overflow-x: hidden;

  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

footer{ margin-top: auto; }

h1{ font-size: 3.5em; }
h2{ font-size: 2.7em; }
h3{ font-size: 2em; }
p{ font-size: 1.25em; }
ul{ list-style: none; padding: 0; margin: 0; }

@media (max-width: 768px){
  h1{ font-size: 2.5em; }
  h2{ font-size: 2em; }
  h3{ font-size: 1.5em; }
}

/* Helpers */
.color-acento{ color: rgba(120,0,0,1); }

.container{
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* =========================
   LOADING
========================= */
#loading-screen{
  position: fixed;
  inset: 0;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  flex-direction: column;
}

.loading-content{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

#loading-screen .logo-symbol{
  font-size: 3em;
  color: rgb(120,0,0);
}

#loading-screen .logo-text{
  font-size: 1.5em;
  font-weight: bold;
  color: #fff;
}

.spinner{
  border: 4px solid rgba(255,255,255,0.3);
  border-top: 4px solid rgb(120,0,0);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin{
  100%{ transform: rotate(360deg); }
}

/* =========================
   HEADER
========================= */
#header{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;

  background-color: rgba(0,0,0,0.70);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.10);

  transition: all 0.3s ease;
}

#header.shrink{
  padding: 8px 20px;
  background: rgba(0,0,0,0.85);
}

.header-container{
  display: flex;
  justify-content: space-between;
  align-items: center;

  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 20px;
  gap: 12px;
}

.header-left{ flex: 1; }
.header-center{ flex: 1; display: flex; justify-content: center; }
.header-right{ flex: 1; display: flex; justify-content: flex-end; }

.logo{
  display: flex;
  align-items: center;
}

.logo-symbol{
  font-size: 1.6em;
  color: rgb(120,0,0);
}

.logo-text{
  white-space: nowrap;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.logo-link{
  text-decoration: none;
  color: rgb(120,0,0);
  font-size: 1.6em;
  font-weight: bold;

  display: flex;
  align-items: center;
  gap: 8px;

  transition: opacity 0.2s ease;
}

.logo-link:hover{ opacity: 0.85; }

#header.shrink .header-container{
  justify-content: center;
  padding: 8px 20px;
}

#header.shrink .logo-text{ display: none; }
#header.shrink .menu-toggle{ display: none; }

.menu-toggle{
  background: none;
  border: none;
  font-size: 2em;
  color: rgb(120,0,0);
  cursor: pointer;
  padding: 10px 14px;
}

/* Mobile header */
@media (max-width: 600px){
  #header{ padding: 10px 0; text-align: center; }
  .header-container{ justify-content: center; padding: 10px 0; }
  .header-center{ flex: none; width: 100%; }
  .header-left, .header-right{ display: none; }
  .logo-link{ font-size: 1.3em; }
  .logo-symbol{ font-size: 1.4em; }
  .logo-text{ font-size: 1em; }
}

/* =========================
   SIDEBAR + BACKDROP
========================= */
.sidebar{
  position: fixed;
  top: 0;
  left: -270px;
  width: 270px;
  height: 100%;

  background: #111;
  color: #fff;
  box-shadow: 2px 0 10px rgba(0,0,0,0.2);

  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px;

  transition: left 0.25s ease;
  z-index: 2000;
}

.sidebar.show{ left: 0; }

.sidebar-banner{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.sidebar-banner .logo-symbol,
.sidebar-banner .logo-text{
  color: rgb(120,0,0);
}

.sidebar-banner .logo-text{ font-size: 1.2em; }

.sidebar-links{
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

.sidebar-links a{
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.sidebar-links a:hover{ color: rgb(120,0,0); }

.sidebar-footer{
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 15px;
}

.sidebar-contact{
  text-decoration: none;
  color: #fff;
  font-size: 0.9em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-contact:hover{ color: rgb(120,0,0); }

#backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1999;
}

#backdrop.show{
  opacity: 1;
  pointer-events: auto;
}

.sidebar-search{
  display: none; /* si luego quieres activarlo, quita esto */
  gap: 6px;
  margin: 14px 0 18px;
}

.sidebar-search input{
  flex: 1;
  padding: 6px 10px;
  border-radius: 20px;
  border: 1px solid rgba(120,0,0,0.4);
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.sidebar-search input::placeholder{ color: rgba(255,255,255,0.6); }

.sidebar-search input:focus{
  background: rgba(255,255,255,0.2);
  border: 1px solid rgb(120,0,0);
  outline: none;
}

.icon-x{ width: 18px; height: 18px; }

.icon-btn{
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  color: rgb(120,0,0);
  padding: 6px;
}

/* =========================
   HERO (INDEX + EXPOSICION)
========================= */
#hero{
  color: #fff;
  text-shadow: 2px 2px 20px rgba(0,0,0,0.7);
  text-align: center;

  padding: 160px 20px 60px;
  width: 100%;

  background-image:
    linear-gradient(0deg, rgba(0,0,0,0.55), rgba(0,0,0,0.55)),
    url("media/51C3FA9C-AAF6-4061-8876-96DEF5896E96.jpeg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

#hero h1{ color: #fff; margin: 0 0 30px; }

.hero-boton{
  text-align: center;
  margin-top: 30px;
  width: 100%;
}

.hero-boton .btn-glass{
  display: inline-flex;
  margin: 0 auto;
}

/* =========================
   HERO ARTICULO (PORTADA)
========================= */
#hero-articulo{
  color: #fff;
  text-shadow: 2px 2px 20px rgba(0,0,0,0.7);

  position: relative;
  display: flex;
  height: 50vh;
  min-height: 60vh;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-direction: column;

  background-image:
    linear-gradient(0deg, rgba(0,0,0,0.55), rgba(0,0,0,0.55)),
    url("media/51C3FA9C-AAF6-4061-8876-96DEF5896E96.jpeg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center 40%;
  padding-top: 100px;
}

#hero-articulo h1{
  margin: 0;
  z-index: 2;
  font-size: 2.5em;
}

/* =========================
   LISTA ARTICULOS (INDEX + EXPOSICION)
========================= */
.lista-articulos{
  width: 100%;
  max-width: 900px;
  margin: 40px auto;
  display: flex;
  flex-direction: column;
  gap: 25px;
  padding: 0 20px;
}

/* Tarjeta horizontal tipo index */
.articulo-item{
  display: flex;
  gap: 20px;
  background: rgba(255,255,255,0.10);
  padding: 20px;
  border-radius: 12px;

  box-shadow: 0 4px 12px rgba(0,0,0,0.30);
  align-items: center;
  width: 100%;

  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.articulo-img{
  flex: 0 0 28%;
  max-width: 260px;
  min-width: 160px;

  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;

  transform: scale(1);
  transition: transform 0.30s ease;
}

.articulo-info{
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.articulo-info h3{
  margin: 0;
  font-size: clamp(1.1em, 2vw, 1.6em);
  color: #fff;
}

.articulo-meta{
  margin: 0;
  font-size: clamp(0.8em, 1.5vw, 1em);
  opacity: 0.85;
  color: #ddd;
}

/* Hover recuperado: “ilumina” + zoom mínimo */
.articulo-item:hover{
  background: rgba(255,255,255,0.14);
  box-shadow: 0 10px 26px rgba(0,0,0,0.40);
  transform: translateY(-2px);
}

.articulo-item:hover .articulo-img{
  transform: scale(1.035);
}

@media (max-width: 700px){
  .articulo-item{
    flex-direction: column;
    text-align: center;
  }

  .articulo-img{
    width: 100%;
    max-width: none;
    min-width: 0;
    aspect-ratio: 16 / 9;
  }
}

/* =========================
   CARTAS (si las usas en grid)
========================= */
.carta{
  width: 300px;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 12px rgba(0,0,0,0.20);
  cursor: pointer;
}

.carta-img-container{
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.carta-img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.carta-overlay{
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.40);
  color: #fff;
  transition: all 0.4s ease;
}

.carta-overlay h3{
  margin: 0;
  font-size: 1.2em;
  text-shadow: 0 0 8px rgba(255,255,255,0.6);
  transition: opacity 0.4s ease;
}

.carta-overlay .btn-glass{
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.carta-img-container:hover .carta-img{ transform: scale(1.1); }
.carta-img-container:hover .carta-overlay h3{ opacity: 0; }
.carta-img-container:hover .carta-overlay .btn-glass{
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 768px){
  .carta{ width: 220px; }
}

/* =========================
   ARTICULOS EXPOSICION (FONDO)
========================= */
body.articulos-exposicion{
  background:
    linear-gradient(rgba(0,0,0,0.60), rgba(0,0,0,0.60)),
    url("media/69001539-1B0B-4C79-B9B9-A5B08E12BE49.jpeg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* =========================
   SECCION CONJUNTO VACIO
========================= */
#Conjunto-Vacio .container{
  text-align: center;
  padding: 30px 12px;
  margin-top: 0;
}

#Conjunto-Vacio p{
  text-align: justify;
  line-height: 1.6;
}

/* =========================
   CONTACTO
========================= */
#Contacto{
  background-color: #000;
  color: #fff;
  padding: 120px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  height: auto;
}

#Contacto p,
#Contacto li{
  max-width: 700px;
  margin: 12px auto;
  text-align: center;
  line-height: 1.6;
}

/* IMPORTANTE: NO pisar btn-glass con bisque */
#Contacto a{
  background: none;
  padding: 0;
  border-radius: 0;
  color: inherit;
  font-weight: inherit;
  text-decoration: none;
}

/* =========================
   FOOTER
========================= */
footer{
  background: rgba(0,0,0,0.85);
  padding: 30px 20px;
  text-align: center;
  color: #fff;
}

.footer-container{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.footer-links{
  display: flex;
  gap: 30px;
  font-size: 1.2em;
}

.footer-contact{
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.3s ease;
}

.footer-contact:hover{ color: rgb(120,0,0); }

.icon-x{ width: 28px; height: auto; }

/* =========================
   ARTICULO (IMAGEN + TEXTO)
========================= */
.articulo-completo{
  position: relative;
  overflow: visible;
}

.articulo-completo .carta-img,
#imagen-articulo{
  display: block;
  width: 100%;
  max-height: 520px;
  height: auto;
  object-fit: cover;
  position: relative;
  z-index: 1;
  margin: 16px 0 18px;
  border-radius: 18px;
}

.texto-articulo,
#contenido{
  position: relative;
  z-index: 2;
  margin-top: 8px;
  white-space: pre-wrap;
}

/* Acciones: volver izquierda / descargar derecha */
.articulo-acciones{
  margin-top: 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

#descarga{
  display: flex;
  justify-content: flex-end;
}

#descarga:empty{ display: none; }

/* =========================
   BUTTONS / GLASS (2 VARIANTES)
========================= */

.btn-glass{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 10px 15px;
  border-radius: 999px;

  background: linear-gradient(135deg, rgba(255,255,255,0.26), rgba(255,255,255,0.08));
  border: 1px solid rgba(255,255,255,0.42);

  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);

  box-shadow:
    0 12px 36px rgba(0,0,0,0.22),
    inset 0 1px 0 rgba(255,255,255,0.40);

  color: rgba(255,255,255,0.94);
  text-decoration: none;
  cursor: pointer;

  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.btn-glass:hover{
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.62);
  background: linear-gradient(135deg, rgba(255,255,255,0.32), rgba(255,255,255,0.10));
  box-shadow:
    0 16px 44px rgba(0,0,0,0.26),
    inset 0 1px 0 rgba(255,255,255,0.46);
}

.btn-glass:active{ transform: translateY(0px); }

.btn-glass--dark{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 10px 15px;
  border-radius: 999px;

  background: linear-gradient(135deg, rgba(255,255,255,0.40), rgba(255,255,255,0.16));
  border: 1px solid rgba(0,0,0,0.12);

  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);

  box-shadow:
    0 12px 36px rgba(0,0,0,0.12),
    inset 0 1px 0 rgba(255,255,255,0.50);

  color: rgba(0,0,0,0.88);
  text-decoration: none;
  cursor: pointer;

  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.btn-glass--dark:hover{
  transform: translateY(-1px);
  border-color: rgba(0,0,0,0.18);
  background: linear-gradient(135deg, rgba(255,255,255,0.50), rgba(255,255,255,0.22));
  box-shadow:
    0 16px 44px rgba(0,0,0,0.14),
    inset 0 1px 0 rgba(255,255,255,0.56);
}

.btn-glass--dark:active{ transform: translateY(0px); }

#Contacto a.btn-glass{
  margin-top: 20px;
}


body:not(.articulos-exposicion) .use-dark-glass .btn-glass{

  all: unset;
}

.btn-sm{ padding: 8px 14px; font-size: .90em; }
.btn-md{ padding: 12px 18px; font-size: 1em; }  
.btn-lg{ padding: 14px 22px; font-size: 1.12em; }

.btn-wide{ padding-left: 26px; padding-right: 26px; }

.btn-glass, .btn-glass--dark{ line-height: 1; }

.articulo-contenido,
.articulo-contenido p{
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
}

.articulo-contenido p{
  margin: 0 0 1rem 0;
}

#titulo-hero{
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    font-weight: 800;
    line-height: 1.05;
    margin: 0;
  }

  .contenedor-descargas-top {
  display: flex;
  gap: 15px;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
