/* ==========================================================================
   1. VARIABLES Y CONFIGURACIÓN GENERAL
   ========================================================================== */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f0f0f0;
  --bg-dark: #000000;
  --text-primary: #111111;
  --text-secondary: #666666;
  --accent-color: linear-gradient(45deg, #8f94fb, #4e54c8);
  --border-radius: 14px;
  --max-width: 1500px;
  --font-titles: "League Spartan", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

/* ==========================================================================
   2. TIPOGRAFÍA Y ESTILOS GLOBALES
   ========================================================================== */
body {
  font-family: var(--font-titles);
  font-optical-sizing: auto;
  font-style: normal;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
}

/* Herencia tipográfica estricta para formularios y botones */
input, button, textarea, select {
  font-family: inherit;
}

a {
  color: inherit;
  text-decoration: none;
  display: inline-block;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

.negrita {
  font-weight: 600;
}

/* ==========================================================================
   3. ENCABEZADO (HEADER)
   ========================================================================== */
header.main-header {
  background-color: var(--bg-primary);
  max-width: var(--max-width);
  margin: 40px auto 30px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 0;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 20px;

  .logo {
    width: 190px;
  }

  .eslogan {
    margin-top: 25px;
    width: 140px;
  }
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 45px;

  a {
    font-weight: 500;
    font-size: 1.4rem;
    color: var(--text-primary);
    text-decoration: none;
    transition:
      color 0.3s ease,
      text-decoration 0.3s ease;

    &:hover {
      text-decoration: underline;
    }
  }

  .menu-btn {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: none;
    padding: 10px 30px 8px;
    font-family: inherit;
    font-weight: 600;
    border-radius: 0 6px 0 0;
    font-size: 1.6rem;
    cursor: pointer;
    transition:
      background-color 0.3s ease,
      color 0.3s ease;

    &:hover {
      background-color: #000000;
      color: #ffffff;
    }
  }
}

/* Banda */
.marquee-container {
  background-color: #000000;
  color: #ffffff;
  overflow: hidden;
  width: 100%;
  padding: 0.75rem 0; /* 12px */
  font-family: "open sans", sans-serif;
  font-size: 0.875rem; /* 14px */
  box-sizing: border-box;
  position: relative;
  letter-spacing: 0.00625rem; /* 0.1px */
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: scrollMarquee 50s linear infinite;
}

.marquee-content {
  display: flex;
  align-items: center;
  gap: 2.5rem; /* 40px */
  padding-right: 2.5rem; /* 40px */
  white-space: nowrap;
}

.dot {
  font-size: 1.25rem; /* 20px */
}

@keyframes scrollMarquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-33.333%);
  }
}

/* ==========================================================================
   4. SECCIÓN HERO Y CARROUSEL
   ========================================================================== */
.circle-graphic {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.circle-graphic .sello {
  width: 130px;
  height: 130px;
  animation: rotarSello 20s linear infinite;
}

@keyframes rotarSello {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   5. GRILLA DE DESTACADOS Y PROYECTOS (FEATURED GRID)
   ========================================================================== */
.featured-grid {
  max-width: var(--max-width);
  margin: 0 auto 20px auto;
  gap: 20px;
}

.featured-grid > img {
  margin: 40px auto;
}

.featured-grid .planos {
  margin: 0 auto;
}

.featured-grid .inspiracion {
  max-width: 100%;
}

/* Clases específicas para reemplazar estilos en línea (HTML a CSS) */
.project-view-image {
  max-width: 80%;
  margin: 85px auto;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.project-rounded-image {
  border-radius: 80px;
}

.project-process-gif {
  border-radius: 50px;
  margin: 120px auto 0 auto;
}

/* Tipografía de proyectos */
.project-title {
  font-size: 2.6rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 15px;
}

.project-header {
  font-size: 3.5rem;
  font-weight: 500;
  max-width: 60%;
  margin: 60px auto 40px auto;
  color: var(--text-primary);
  line-height: 1.3;
}

.project-description {
  font-size: 1.3rem;
  font-weight: 400;
  max-width: 60%;
  text-align: justify;
  margin: 60px auto;
}

.project-description ul {
  margin-bottom: 25px;
}

.project-footer {
  font-size: 1.1rem;
  font-weight: 300;
  max-width: 60%;
  margin: 100px auto;
}

.double-grid {
  display: grid;
  place-items: center;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 0 auto;
  max-width: 60%;
}

.double-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.six-grid {
  display: grid;
  place-items: center;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin: 0 auto;
  max-width: 100%;
}

.six-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.two-grid {
  display: grid;
  place-items: center;
  grid-template-columns: repeat(2, 1fr);
  gap: 0px;
  margin: 0 auto;
  max-width: 100%;
}

.two-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ==========================================================================
   6. SECCIÓN DE RECIENTES Y SHOUTBOX
   ========================================================================== */
.section-title-container {
  max-width: var(--max-width);
  margin: 50px auto 25px auto;
  display: flex;
  align-items: baseline;
  gap: 20px;
}

.section-title-inline {
  font-size: 2.4rem;
  font-weight: 300;
  color: var(--bg-dark);
  white-space: nowrap;
  line-height: 1;
}

.section-divider-inline {
  flex-grow: 1;
  border: 0;
  height: 1px;
  background-color: #0a0a0a;
}

/* ==========================================================================
   7. PIE DE PÁGINA (FOOTER) Y ELEMENTOS FLOTANTES
   ========================================================================== */
.main-footer {
  background-color: var(--bg-dark);
  color: var(--bg-primary);
  padding: 80px 0 40px 0;
  width: 100%;
}

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

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 60px;
  position: relative;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.footer-seal-wrapper .sello {
  width: 170px;
  height: 170px;
  animation: rotarSello 20s linear infinite;
}

.footer-brand-nav {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.footer-logo {
  color: var(--bg-primary);
  margin-bottom: 20px;
}

.footer-links-grid {
  display: grid;
  grid-template-columns: minmax(180px, auto) minmax(180px, auto);
  gap: 60px;
}

.footer-column h3 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--bg-primary);
}

.footer-column ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-column ul li a {
  color: #e0e0e0;
  font-size: 1.6rem;
  transition: color 0.2s ease;
}

.footer-column ul li a:hover {
  color: var(--text-primary);
}

.footer-column ul li a span {
  opacity: 0.7;
  margin-right: 2px;
}

.footer-socials {
  display: flex;
  gap: 16px;
  margin-bottom: 50px;
}

.social-icon {
  width: 52px;
  height: 52px;
  background-color: #121212;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--bg-primary);
  font-size: 2rem;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.2s;
}

.social-icon:hover {
  background-color: #1a1a1a;
  transform: translateY(-3px);
}

.footer-bottom {
  border-top: 1px solid #1a1a1a;
  padding-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.copyright {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.legal-text {
  font-size: 1.1rem;
  line-height: 1.3;
  color: #888888;
  max-width: 900px;
}

#scrollTopBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: none;
  z-index: 99;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background-color: #111111;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M18 15l-6-6-6 6'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 22px 22px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: opacity 0.3s ease, transform 0.2s ease, background-color 0.2s ease;
}

#scrollTopBtn:hover {
  transform: translateY(-3px);
  background-color: #333333;
}

/* ==========================================================================
   FULLSCREEN MENU OVERLAY
   ========================================================================== */
.fullscreen-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-dark);
  color: var(--bg-primary);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.4s ease,
    visibility 0.4s ease;
  overflow-y: auto;
}

.fullscreen-menu.is-active {
  opacity: 1;
  visibility: visible;
}

.menu-content-wrapper {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 50px 40px 80px 40px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  min-height: 100%;
  align-items: center;
}

.menu-left-pane {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  min-height: 750px;
}
.menu-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.close-btn {
  background: var(--bg-primary);
  color: var(--bg-dark);
  border: none;
  font-family: var(--font-titles);
  font-weight: 700;
  padding: 10px 24px 7px 24px;
  font-size: 1.4rem;
  cursor: pointer;
  border-radius: 50px;
  letter-spacing: 0.3px;
  transition: background 0.2s;
}

.close-btn:hover {
  background: #e0e0e0;
}

.menu-nav-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 30px 0;
}
.menu-nav-links a {
  color: var(--bg-primary);
  text-decoration: none;
  font-size: clamp(2.8rem, 5vw, 5.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
  transition: opacity 0.2s;
}

.menu-nav-links a:hover {
  opacity: 0.6;
}

.menu-footer-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 30px;
  margin-bottom: 20px;
}

.menu-tagline {
  font-size: 1.4rem;
  letter-spacing: 0.5px;
}
.menu-socials {
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
}
.menu-socials a,
.menu-contact-details p,
.menu-contact-details a {
  color: var(--bg-primary);
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 500;
}
.menu-socials a:hover,
.menu-contact-details a:hover {
  text-decoration: underline;
}
.menu-contact-details {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.menu-right-pane {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-image-container {
  width: 100%;
  height: 80vh;
  max-height: 700px;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.menu-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 1024px) {
  .menu-content-wrapper {
    grid-template-columns: 1fr;
    padding: 40px 24px 60px 24px;
  }
  .menu-right-pane {
    display: none;
  }
  .menu-left-pane {
    min-height: auto;
    gap: 40px;
  }
  .menu-nav-links a {
    font-size: 3.5rem;
  }
}

/* ==========================================================================
   8. BARRA FLOTANTE
   ========================================================================== */

.scroll-floating-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgb(7, 7, 7, 0.95);
  backdrop-filter: blur(10px);
  color: #ffffff;
  padding: 12px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;

  transform: translateY(-100%);
  opacity: 0;
  transition:
    transform 0.4s cubic-bezier(0.25, 1, 0.5, 1),
    opacity 0.4s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.scroll-floating-bar.visible {
  transform: translateY(0);
  opacity: 1;
}

/* Estilo del Logo */
.floating-logo-link {
  display: flex;
  align-items: center;
}

.scroll-floating-bar .floating-logo {
  height: 26px; /* Ajusta este valor según el tamaño óptimo de tu SVG */
  width: auto;
  display: block;
}

/* Estilo de las categorías del Nav */
.floating-nav-links {
  display: flex;
  gap: 35px;
}

.floating-nav-links a {
  color: #cccccc;
  text-decoration: none;
  font-size: 1.3rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.floating-nav-links a:hover {
  color: #ffffff;
}

/* Estilo del Botón de Contacto */
.scroll-floating-bar .floating-btn {
  background-color: #ffffff;
  color: #1a1a1a;
  padding: 8px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1.4rem;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.scroll-floating-bar .floating-btn:hover {
  background-color: rgb(7, 7, 7, 0.95);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Ajuste responsive para móviles */
@media (max-width: 768px) {
  .scroll-floating-bar {
    padding: 12px 20px;
  }
  .floating-nav-links {
    display: none; /* Oculta las categorías en pantallas pequeñas para evitar saturar el espacio */
  }
}

/* ==========================================================================
   9. BARRA DE PROGRESO DE LECTURA
   ========================================================================== */

.reading-progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  z-index: 1002; /* Por encima de cualquier otro elemento flotante */
  pointer-events: none; /* Evita que interfiera con clics */
}

.reading-progress-bar {
  height: 100%;
  width: 0%;
  background-color: #ffffff; /* Puedes cambiarlo por un color de acento si lo prefieres */
  transition: width 0.05s ease-out; /* Transición ultra fluida */
}

/* ==========================================================================
   10. MEDIA QUERIES (RESPONSIVE)
   ========================================================================== */
@media (max-width: 1024px) {
  header.main-header,
  .hero-banner,
  .featured-grid,
  .wide-banner,
  .section-title-container,
  .recent-section-grid,
  .footer-container {
    max-width: 100%;
    padding-left: 24px;
    padding-right: 24px;
  }

  .recent-section-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .shoutbox-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 768px) {
  header.main-header {
    margin: 30px auto;
    flex-direction: column;
    align-items: center;
    gap: 25px;
  }

  nav.main-nav {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .hero-banner {
    flex-direction: column-reverse;
    text-align: center;
    gap: 30px;
    padding: 40px 24px;
  }

  .hero-content h2 {
    font-size: 3.8rem;
    padding-left: 0;
  }

  .hero-content p {
    font-size: 1.3rem;
    padding-left: 0;
  }

  .circle-graphic .sello {
    width: 120px;
    height: 120px;
  }

  .grid-card {
    padding: 40px;
    min-height: 320px;
  }

  .project-overlay {
    padding: 30px;
  }

  .overlay-title {
    font-size: 3.2rem;
  }

  .post-titleblack {
    font-size: 4rem;
  }

  .wide-banner {
    height: auto;
    min-height: 280px;
    padding: 40px 24px;
  }

  .wide-banner h2 {
    font-size: 3.4rem;
  }

  .wide-banner p {
    padding-right: 0;
    font-size: 1.2rem;
  }

  .post-item {
    height: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    padding-bottom: 20px;
  }

  .post-item-image {
    width: 100%;
    height: 200px;
  }

  .post-item-content {
    padding: 0 20px;
  }

  .post-item-title {
    font-size: 2rem;
  }

  .shoutbox-list {
    grid-template-columns: 1fr;
  }

  .footer-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 40px;
  }

  .footer-brand-nav {
    align-items: center;
  }

  .footer-links-grid {
    justify-items: center;
    gap: 30px;
  }

  .footer-column ul {
    align-items: center;
  }

  .footer-socials {
    justify-content: center;
  }

  .footer-bottom {
    text-align: center;
  }

  /* Ajustes de proyecto para responsive */
  .project-description,
  .project-header,
  .project-footer,
  .double-grid {
    max-width: 90%;
  }

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

@media (max-width: 480px) {
  header.main-header,
  .hero-banner,
  .wide-banner,
  .footer-container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .search-input {
    width: 100%;
    font-size: 1.4rem;
    padding: 8px 10px;
  }

  nav.main-nav {
    gap: 10px;
  }

  .menu-btn,
  .language-selector {
    font-size: 1.4rem;
    padding: 8px 20px;
  }

  .hero-content h2 {
    font-size: 3rem;
  }

  .post-title {
    font-size: 2.4rem;
  }

  .overlay-title {
    font-size: 2.8rem;
  }

  .featured-recent-title {
    font-size: 2.4rem;
  }

  .featured-recent-body {
    padding: 25px 20px;
  }

  .footer-links-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .project-view-image {
    max-width: 100%;
  }

  .six-grid,
  .two-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   11. ARTÍCULOS RELACIONADOS (SECCIÓN FINAL)
   ========================================================================== */
.related-posts-section {
  max-width: var(--max-width);
  margin: 80px auto 60px auto;
  padding: 0 40px;
}

.related-header-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.related-section-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.carousel-nav-buttons {
  display: flex;
  gap: 10px;
}

.carousel-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #d0d0d0;
  background-color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.carousel-btn svg {
  width: 18px;
  height: 18px;
  stroke: var(--text-primary);
  stroke-width: 2.5;
  fill: none;
}

.carousel-btn:hover {
  background-color: var(--bg-dark);
  border-color: var(--bg-dark);
}

.carousel-btn:hover svg {
  stroke: var(--bg-primary);
}

/* Contenedor del carrusel / tarjetas */
.related-cards-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

/* Tarjeta destacada grande con imagen de fondo */
.related-card-featured {
  position: relative;
  height: 420px;
  border-radius: var(--border-radius);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 30px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  grid-column: span 1; /* Ocupa una columna del grid, ajústalo si prefieres que sea más ancha */
}

/* Tarjeta flotante blanca encima de la imagen de fondo */
.related-card-floating-box {
  background-color: var(--bg-primary);
  padding: 30px;
  border-radius: 12px;
  width: 100%;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-tag {
  background-color: var(--bg-dark);
  color: var(--bg-primary);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  width: fit-content;
  letter-spacing: 0.5px;
}

.card-date {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

.card-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  text-decoration: none;
  transition: color 0.2s;
}

.card-title:hover {
  color: #4e54c8;
}

.card-link-action {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  transition: gap 0.2s ease;
}

.card-link-action:hover {
  gap: 10px;
}

/* Tarjetas normales secundarias (las que se ven a la derecha) */
.related-card-standard {
  background-color: var(--bg-primary);
  border: 1px solid #eaeaea;
  border-radius: var(--border-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 15px rgba(0,0,0,0.04);
}

.related-card-standard img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.standard-card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.standard-card-content .card-title {
  font-size: 1.5rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .related-cards-track {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1750px) {
  :root {
    --max-width: 1350px; /* Reduces el ancho máximo de la retícula para que respire igual que en tu monitor de 1920px */
  }
}