* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Manrope', sans-serif;
    background-color: #fff;
}

#main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  pointer-events: none;
  transition: top 0.3s;
}

.nav-wrapper {
  background-color: #2D3B40;
  padding: 1rem 2rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  pointer-events: all;
  width: 100%; 
}

.nav-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 5rem;
}

.logo {
  display: flex;
  align-items: center;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: #fff;
  user-select: none;
}

.brand-emblem {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(209, 219, 185, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d1dbb9;
  font-size: 1.1rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.brand-logo:hover .brand-emblem {
  background-color: #B5174C;
  border-color: #B5174C;
  color: #ffffff;
  transform: rotate(-8deg) scale(1.06);
  box-shadow: 0 4px 12px rgba(181, 23, 76, 0.4);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-title {
  font-size: 1.55rem;
  font-family: "Vidaloka", serif;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: #ffffff;
  transition: color 0.3s ease;
}

.brand-logo:hover .brand-title {
  color: #ffffff;
}

.brand-subtitle {
  font-size: 0.58rem;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: #d1dbb9;
  opacity: 0.85;
  margin-top: 3px;
  transition: opacity 0.3s ease, color 0.3s ease;
}

.brand-logo:hover .brand-subtitle {
  opacity: 1;
  color: #ffffff;
}

@media (max-width: 600px) {
  .brand-subtitle {
    display: none;
  }
  .brand-title {
    font-size: 1.35rem;
  }
  .brand-emblem {
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
  }
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a, .nav-links button {
  color: #fff;
  text-decoration: none;
}

.nav-links a:hover, .nav-links button:hover {
  color: #d1dbb9;
  transition: color 0.2s ease;
}

.menu-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(209, 219, 185, 0.25);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 0.3s ease;
  z-index: 1100;
  outline: none;
}

.menu-toggle:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(209, 219, 185, 0.4);
}

#products-dropdown {
  min-width: 170px;
  width: auto;
}

@media (min-width: 1024px) {
  .menu-toggle {
    display: none !important;
  }
}

/* ==========================================================================
   OFF-CANVAS MOBILE DRAWER & RESPONSIVE
   ========================================================================== */

@media (max-width: 1023px) {
  .menu-toggle {
    display: flex !important;
  }

  .nav-container {
    gap: 1rem;
  }

  .mobile-drawer {
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  }

  .mobile-drawer-link:hover {
    transform: translateX(4px);
  }
}

/*MAIN*/

.main {
  flex: 1;
  min-height: 100vh;
}

.banner {
  position: relative;
  background-size: cover;
  background-position: top;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 5%;
  color: #2D3B40;
}

.banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(255,255,255,0.15) 40%, rgba(255,255,255,0.9) 100%);
  z-index: 1;
}

.banner-content {
  position: relative;
  z-index: 2;
  text-align: left;
  max-width: 560px;
}

.banner-content h1 {
  font-family: "Vidaloka", serif;
  font-style: normal;
  font-weight: 400; 
}

/*BANNER RESPONSIVE*/

/* Tablets (pantallas medianas) */
@media (min-width: 601px) and (max-width: 992px) {
  .banner {
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
    background-position: center;
  }

  .banner-content {
    max-width: 80%;
  }

  .banner-content h1 {
    font-size: 3.5rem;
  }

  .banner-content p {
    font-size: 0.95rem;
  }
}

/* Móviles (pantallas pequeñas / celular) */
@media (max-width: 600px) {
  .banner {
    min-height: 92svh;
    min-height: 92dvh;
    min-height: 560px;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 5.5rem 1.25rem 3rem 1.25rem;
    background-position: center 8%;
    background-repeat: no-repeat;
  }

  .banner::before {
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.02) 0%,
      rgba(255, 255, 255, 0.12) 28%,
      rgba(255, 255, 255, 0.65) 50%,
      rgba(255, 255, 255, 0.94) 70%,
      rgba(255, 255, 255, 1) 100%
    );
  }

  .banner-content {
    text-align: center;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .banner-content h1 {
    font-size: 2.35rem;
    line-height: 1.15;
    margin-bottom: 0.5rem;
    color: #2D3B40;
  }

  .banner-content p {
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    font-weight: 800;
    text-transform: uppercase;
    color: #2D3B40;
    opacity: 0.9;
    margin-bottom: 1.5rem;
    line-height: 1.4;
  }
}

/*BOTON*/

.boton-mas {
  display: block;
  width: fit-content;
  margin: 50px auto 0;
  padding: 10px 20px;
  background-color: #2D3B40;
  color: #fff;
  text-decoration: none;
  border-radius: 90px;
  font-weight: bold;
  transition: background-color 0.2s ease;
  text-align: center;
}

.boton-mas:hover {
  background-color: #DCE1D1;
  color: #2D3B40;
  box-shadow: 0 3px 9px rgba(0,0,0,0.2);
}

/*ENSAYOS*/

/* Deshabilitar barra de scroll visualmente */
.no-scrollbar::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.no-scrollbar {
    -ms-overflow-style: none !important;  /* IE and Edge */
    scrollbar-width: none !important;     /* Firefox */
    overflow: -moz-scrollbars-none;
}

/* Opcional: Asegurar que el contenedor del carrusel no corte las sombras de las tarjetas */
#essays-carousel {
    padding-top: 10px;
    padding-bottom: 20px;
    margin-bottom: -20px;
}

@media (max-width: 768px) {
  .md\:px-16 {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/*TEMAS*/

.temas {
  text-align: start;
  padding: 3rem 1rem;
  background: #fff;
  max-width: 1200px;
  margin: 0 auto;
}

.temas h2 {
  text-align: start;
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #2D3B40;
  font-weight: 700;
}

.box-topics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
  margin-top: 3rem;
}

.topic {
  background: white;
  color: #2D3B40;
  padding: 0.8rem 1.5rem;
  border-radius: 12px;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  transition: all 0.25s ease;
  border: 1px solid #2D3B40;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.topic:hover {
  background: #2D3B40;
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.12);
}

/*TEMAS RESPONSIVE*/

@media (max-width: 768px) {
    .box-topics {
        grid-template-columns: repeat(2, 1fr); 
    }
}

@media (max-width: 480px) {
    .box-topics {
        grid-template-columns: 1fr; 
    }
}

/*VIDEOS*/

.videos-recientes {
  max-width: 1100px;
  margin: auto;
  padding: 20px;
}

.videos-recientes h2 {
  font-size: 1.6rem;
  margin-bottom: 20px;
  color: #2D3B40;
  font-weight: bold; /* Aseguramos negrita por si acaso */
}

/* --- Video Destacado --- */
.ultimo-video {
  display: flex;
  flex-direction: row;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 40px;
}

.ultimo-video iframe {
  width: 65%;
  border: none;
  min-height: 350px; /* Altura mínima para que no se vea aplastado */
}

.ultimo-video .info-card {
  padding: 20px;
  padding-top: 0;
  width: 35%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ultimo-video .titulo-video {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
  color: #2D3B40; /* Color base forzado por si Tailwind falla */
}

.ultimo-video .desc-video {
  font-size: 0.95rem;
  color: #444;
  margin-bottom: 20px;
  line-height: 1.6;
  user-select: text;
  flex-grow: 1;
}

/* --- Videos Anteriores (Grid) --- */
.videos-anteriores {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.video-anterior {
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 12px; /* Añadido para consistencia */
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.video-anterior iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
}

.video-anterior .info-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px; /* Ajustado padding */
}

.video-anterior .titulo-video {
  font-size: 1.3rem;
  font-weight: bold;
  margin-bottom: 0;
  color: #2D3B40;
}

/* --- Comunes --- */
.info-link {
  text-decoration: none;
  display: block;
  color: inherit;
  user-select: none;
}

.info-link:hover {
  cursor: pointer;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .ultimo-video {
        flex-direction: column;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }

    .ultimo-video iframe,
    .ultimo-video .info-card {
        width: 100%;
    }

    .ultimo-video iframe {
        aspect-ratio: 16/9;
        min-height: auto;
    }

    .ultimo-video .info-card {
        padding: 20px;
    }

    .ultimo-video .titulo-video {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }

    .videos-anteriores {
        grid-template-columns: 1fr;
    }
}

/*CONTACT ME*/

.contact-wrapper button {
  background-color: #2D3B40;
}

.contact-wrapper button:hover {
  background-color: #DCE1D1;
  color: #2D3B40;
}

/*ABOUT ME*/

.about-wrapper {
  margin-top: 3rem;
}

/* ==========================================================================
   QUILL.JS V2 RICH TEXT EDITOR STYLES (STICKY TOOLBAR & BRANDING)
   ========================================================================== */

.quill-editor-wrapper {
  position: relative;
  width: 100%;
}

/* Sticky top toolbar al hacer scroll */
.quill-editor-wrapper .ql-toolbar.ql-snow {
  position: sticky;
  top: 72px; /* Queda anclada debajo del menú fijo (#main-header) */
  z-index: 40;
  background-color: #ffffff;
  border: 1px solid #d1d5db;
  border-top-left-radius: 0.6rem;
  border-top-right-radius: 0.6rem;
  box-shadow: 0 4px 10px rgba(45, 59, 64, 0.05);
  padding: 0.75rem 1rem;
  transition: box-shadow 0.2s ease;
}

.quill-editor-wrapper .ql-container.ql-snow {
  border: 1px solid #d1d5db;
  border-top: none;
  border-bottom-left-radius: 0.6rem;
  border-bottom-right-radius: 0.6rem;
  min-height: 380px;
  background-color: #ffffff;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #2D3B40;
}

.quill-editor-wrapper .ql-editor {
  min-height: 380px;
  padding: 1.5rem;
  line-height: 1.8;
}

.quill-editor-wrapper .ql-editor.ql-blank::before {
  color: #9ca3af;
  font-style: normal;
  left: 1.5rem;
}

.quill-editor-wrapper .ql-snow .ql-stroke {
  stroke: #4b5563;
}

.quill-editor-wrapper .ql-snow .ql-fill {
  fill: #4b5563;
}

.quill-editor-wrapper .ql-snow .ql-picker {
  color: #4b5563;
  font-weight: 600;
}

.quill-editor-wrapper .ql-snow button:hover .ql-stroke,
.quill-editor-wrapper .ql-snow .ql-picker-label:hover .ql-stroke,
.quill-editor-wrapper .ql-snow button.ql-active .ql-stroke,
.quill-editor-wrapper .ql-snow .ql-picker-label.ql-active .ql-stroke {
  stroke: #B5174C;
}

.quill-editor-wrapper .ql-snow button:hover .ql-fill,
.quill-editor-wrapper .ql-snow button.ql-active .ql-fill {
  fill: #B5174C;
}

.quill-editor-wrapper .ql-snow button:hover,
.quill-editor-wrapper .ql-snow button.ql-active {
  color: #B5174C;
}

/* ==========================================================================
   FORMATO Y ESTÉTICA DE ARTÍCULOS (.article-content)
   ========================================================================== */

.article-content {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1.125rem;
  line-height: 1.85;
  color: #334155;
  letter-spacing: -0.01em;
  word-break: break-word;
}

.article-content p {
  margin-bottom: 1.75rem;
  line-height: 1.85;
}

.article-content p:last-child {
  margin-bottom: 0;
}

.article-content h1 {
  font-family: 'Vidaloka', serif;
  font-size: 2.25rem;
  font-weight: 700;
  color: #2D3B40;
  line-height: 1.3;
  margin-top: 2.75rem;
  margin-bottom: 1.25rem;
}

.article-content h2 {
  font-family: 'Vidaloka', serif;
  font-size: 1.875rem;
  font-weight: 600;
  color: #2D3B40;
  line-height: 1.35;
  margin-top: 2.5rem;
  margin-bottom: 1.125rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(45, 59, 64, 0.08);
}

.article-content h3 {
  font-size: 1.45rem;
  font-weight: 700;
  color: #2D3B40;
  line-height: 1.4;
  margin-top: 2.25rem;
  margin-bottom: 0.875rem;
}

.article-content h4 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2D3B40;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

.article-content strong,
.article-content b {
  font-weight: 700;
  color: #1e293b;
}

.article-content em,
.article-content i {
  font-style: italic;
}

.article-content a {
  color: #B5174C;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  font-weight: 500;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.article-content a:hover {
  color: #9c1340;
  text-decoration-color: #9c1340;
}

/* Citas estilizadas con borde acentuado e itálica */
.article-content blockquote {
  position: relative;
  margin: 2.25rem 0;
  padding: 1.25rem 1.75rem;
  border-left: 4px solid #B5174C;
  background: linear-gradient(to right, rgba(181, 23, 76, 0.05), rgba(181, 23, 76, 0.01));
  border-radius: 0 12px 12px 0;
  font-family: 'Libre Baskerville', Georgia, serif;
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.8;
  color: #475569;
}

.article-content blockquote p {
  margin-bottom: 0.5rem;
}

.article-content blockquote p:last-child {
  margin-bottom: 0;
}

/* Listas ordenadas y desordenadas */
.article-content ul,
.article-content ol {
  margin-top: 1rem;
  margin-bottom: 1.75rem;
  padding-left: 1.75rem;
  line-height: 1.8;
}

.article-content ul {
  list-style-type: disc;
}

.article-content ol {
  list-style-type: decimal;
}

.article-content li {
  margin-bottom: 0.625rem;
  padding-left: 0.35rem;
}

.article-content li::marker {
  color: #B5174C;
  font-weight: bold;
}

/* Imágenes dentro del contenido: 100% responsivas, bordes redondeados y sombras suaves */
.article-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 2.25rem auto;
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-content img:hover {
  box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.12), 0 10px 12px -5px rgba(0, 0, 0, 0.06);
}

.article-content pre {
  background-color: #1e293b;
  color: #f8fafc;
  padding: 1.25rem 1.5rem;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 1.75rem 0;
}

.article-content code {
  background-color: #f1f5f9;
  color: #B5174C;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  font-size: 0.9em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.article-content pre code {
  background-color: transparent;
  color: inherit;
  padding: 0;
}

.article-content hr {
  border: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(45, 59, 64, 0.2), transparent);
  margin: 3rem 0;
}

/* ==========================================================================
   TARJETAS DE ARTÍCULOS (.article-card & HOVER LIFT)
   ========================================================================== */

.article-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
  height: 100%;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(45, 59, 64, 0.1), 0 10px 10px -5px rgba(45, 59, 64, 0.04);
  border-color: rgba(181, 23, 76, 0.2);
}

.article-card-cover {
  position: relative;
  width: 100%;
  height: 210px;
  overflow: hidden;
  background: linear-gradient(135deg, #2D3B40 0%, #3f5259 100%);
}

.article-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.article-card:hover .article-card-cover img {
  transform: scale(1.05);
}

.article-card-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.95);
  color: #B5174C;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.article-card:hover .article-card-badge {
  background-color: #B5174C;
  color: #ffffff;
}

.article-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.article-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2D3B40;
  line-height: 1.35;
  margin-top: 0.5rem;
  margin-bottom: 0.625rem;
  transition: color 0.2s ease;
}

.article-card:hover .article-card-title {
  color: #B5174C;
}

.article-card-excerpt {
  font-size: 0.925rem;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.article-card-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #B5174C;
  transition: gap 0.2s ease, color 0.2s ease;
}

.article-card:hover .article-card-link-btn {
  gap: 0.55rem;
  color: #9c1340;
}