/* ==========================================================================
   VARIABLES - PALETA "PAPEL Y TINTA"
   ========================================================================== */
:root {
  --bg-dark: #f5f4f0;      
  --bg-panel: #ffffff;    
  --accent: #1a1a1a;      
  --text-main: #333333;   
  --text-muted: #777777;
  --border-color: #d1cfc7; 
  --bg-header: #ebe9e4;
  --font-serif: 'Crimson Pro', serif;
  --font-sans: 'Inter', sans-serif;
  --container-width: 100%;
}

.site-logo {
  /* Control de tamaño: Ajusta estos valores según prefieras */
  max-height: 219px;    /* Limita la altura para que no desplace el menú */
  max-width: 800px;     /* Limita el ancho máximo en pantallas grandes */
  
  /* Mantenimiento de proporciones */
  width: auto;
  height: auto;
  object-fit: contain;  /* Asegura que la imagen no se recorte */
  
  /* Centrado y espaciado */
  display: block;
  margin: 0 auto;
  transition: filter 0.3s ease; /* Transición suave para el modo oscuro */
}

/* Tema Oscuro (Estética Noir) */
[data-theme="dark"] {
  --bg-dark: #111111;
  --bg-panel: #1a1a1a;
  --accent: #ffffff;
  --text-main: #f5f4f0;
  --text-muted: #999999;
  --border-color: #333333;
  --bg-header: #1a1a1a;
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 40px; 
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.top-bar {
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  padding: 8px 0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
}

.meta-nav a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 15px;
  transition: color 0.3s ease;
}

.main-header {
  background: var(--bg-dark);
  padding: 40px 0 20px;
  border-bottom: 3px double var(--border-color);
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  z-index: 100;
}

.main-header.is-sticky {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 15px 0;
  background: var(--bg-dark);
  backdrop-filter: blur(5px);
  border-bottom: 1px solid var(--border-color);
}

.brand-central {
  text-align: center;
  margin-bottom: 25px;
}

.brand-central h1 {
  font-family: var(--font-serif);
  font-size: 3rem;
  color: var(--accent);
  letter-spacing: 2px;
  line-height: 1.2;
  transition: color 0.3s ease;
}

.brand-central .subtitle {
  font-style: italic;
  color: var(--text-muted);
  font-size: 1rem;
}

.main-nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  gap: 30px;
}

.main-nav a {
  color: var(--text-main);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.3s ease;
}

/* ==========================================================================
   SLIDER / CARRUSEL
   ========================================================================== */
.hero-slider-section {
  margin: 30px 0 50px;
}

.main-slider {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
  background: var(--bg-header);
  border: 1px solid var(--border-color);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.main-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  display: flex;
  align-items: flex-end;
}

.main-slide.active {
  opacity: 1;
  z-index: 10;
}

.main-slide img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(20%) contrast(90%) grayscale(30%);
  z-index: 1;
}

.slide-overlay {
  position: relative;
  z-index: 2;
  background: linear-gradient(to top, rgba(26, 26, 26, 0.95), transparent);
  width: 100%;
  padding: 80px 50px 40px;
  color: #fff;
}

.badge {
  background: var(--accent);
  color: var(--bg-panel);
  padding: 5px 12px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  display: inline-block;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.slide-overlay h2 {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  margin-bottom: 8px;
  color: #fff;
}

.slider-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  color: #1a1a1a;
  padding: 15px 20px;
  cursor: pointer;
  font-size: 20px;
  transition: background 0.3s;
}

.slider-control:hover { background: #fff; }
.prev { left: 0; }
.next { right: 0; }

.btn-primary {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 24px;
  background: var(--accent);
  color: var(--bg-panel);
  text-decoration: none;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  border: 1px solid var(--accent);
  transition: all 0.3s;
}

.btn-primary:hover {
  background: transparent;
  color: var(--accent);
}

/* ==========================================================================
   CONTENT LAYOUT (GRILLA PRINCIPAL)
   ========================================================================== */
.main-wrapper {
  margin-top: 40px;
  margin-bottom: 80px;
}

.spacing-top {
  margin-top: 60px;
}

.section-heading {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--accent);
  margin-bottom: 12px;
  transition: color 0.3s ease;
}

.heading-sep {
  border: 0;
  height: 1px;
  background: var(--border-color);
  margin-bottom: 25px;
  transition: background-color 0.3s ease;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.grid-item {
  background: var(--bg-panel);
  padding: 15px;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.img-frame {
  margin-bottom: 12px;
  overflow: hidden;
}

.img-frame img {
  width: 100%;
  height: 250px; 
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter 0.5s ease;
  display: block;
}

.grid-item .img-frame img[alt="Novela"] {
  height: 450px; 
}

.grid-item:hover .img-frame img {
  filter: grayscale(0%);
}

.category {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-bottom: 5px;
}

.grid-item h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--accent);
  margin-bottom: 8px;
  transition: color 0.3s ease;
}

.grid-item p {
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-main);
  transition: color 0.3s ease;
}

.badge-wattpad { background: #ff500a; color: #fff; }
.badge-fictograma { background: #1a1a1a; color: #fff; }
.badge-inkitt { background: #00bf8f; color: #fff; }

/* ==========================================================================
   BLOQUES EDITORIALES INFERIORES
   ========================================================================== */
.bottom-editorial-blocks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  padding: 40px;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.text-list {
  list-style: none;
}

.text-list li {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px dashed var(--border-color);
}

.text-list li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.text-list .category {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 6px;
}

.text-list a {
  font-size: 1.2rem;
  font-family: var(--font-serif);
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.3s ease, color 0.3s ease;
  line-height: 1.3;
}

.text-list a:hover {
  opacity: 0.6;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.main-footer {
  text-align: center;
  padding: 40px 0;
  border-top: 1px solid var(--border-color);
  font-size: 12px;
  color: var(--text-muted);
  transition: border-color 0.3s ease;
}

/* ==========================================================================
   MOBILE MENU & RESPONSIVE
   ========================================================================== */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.menu-toggle .bar {
  height: 2px;
  width: 100%;
  background-color: var(--accent);
  transition: all 0.4s ease, background-color 0.3s ease;
}

.menu-toggle.is-active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
.menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 1024px) {
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
  }

  .main-nav {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px);
    transition: all 0.4s ease;
    z-index: 999;
  }

  .main-nav.is-active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    padding: 25px 0;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
  }

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

  .bottom-editorial-blocks {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 20px;
  }

  .header-flex {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}