:root {
  --bg: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #2563eb;
  --light: #f8fafc;

  --shadow-sm: 0 4px 20px rgba(0,0,0,0.06);
  --shadow-md: 0 12px 40px rgba(0,0,0,0.08);
}

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

/* BASE */
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* =========================
   NAVBAR
========================= */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255,255,255,0.75);
  backdrop-filter: saturate(180%) blur(20px);
  z-index: 1000;
  border-bottom: 1px solid #e5e5e5;
}

.nav-container {
  max-width: 1400px;          /* más ancho = más aire */
  margin: auto;
  padding: 0.5rem 1.5rem;     /* menos padding lateral */
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
}

/* LOGO */
.nav-logo img {
  height: 46px;   /* apenas más chico = más elegante */
}

/* REDES */
.nav-social {
  display: flex;
  gap: 1.2rem;
  justify-content: flex-end;
}


.nav-social svg,
.footer-social svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  color: var(--text);
  opacity: 0.75;
  transition: opacity 0.2s ease;
}

.nav-social a:hover svg,
.footer-social a:hover svg {
  opacity: 1;
}

@media (max-width: 900px) {
  .nav-menu {
    display: none;
  }
}

/* MENÚ */
.nav-menu {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2.4rem;
  margin: 0;
  padding: 0;
}

.nav-menu li a {
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  opacity: 0.75;
  transition: opacity 0.2s ease;
}

.nav-menu li a:hover {
  opacity: 1;
}


/* =========================
   HERO
========================= */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 2rem 5rem;
  background:
    radial-gradient(1200px 600px at 10% 15%, rgba(37,99,235,0.12), transparent 45%),
    radial-gradient(900px 500px at 90% 30%, rgba(14,165,233,0.10), transparent 45%),
    linear-gradient(
      to bottom,
      rgba(255,255,255,0.85),
      rgba(255,255,255,0.95)
    ),
    url("assets/hero-bg.webp") center / cover no-repeat;
}

.hero-content {
  max-width: 760px;
  margin-left: clamp(1rem, 4vw, 5rem);
}


/* =========================
   HERO — SPLIT APPLE STYLE
========================= */
.hero.hero-small {
  min-height: auto;
 padding: 5rem 1rem 1rem;
  background-position: center top;
}


.hero-inner {
  max-width: 1400px;
  margin: auto;
  padding: 1rem 1rem 1rem;

  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

/* Imagen derecha */
.hero-visual {
  display: flex;
  justify-content: flex-end;
}

.hero-visual img {
  width: 100%;
  max-width: 520px;
  height: auto;
  display: block;

  /* calidad y suavidad */
  image-rendering: auto;
  transform: translateZ(0);
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    padding: 7rem 1.5rem 4rem;
  }

  .hero-visual {
    display: none;
  }
}

.hero h1 {
  font-size: clamp(2.8rem, 5vw, 3.8rem);
  font-weight: 600;
  letter-spacing: 0rem;
}

@media (max-width: 768px) {
  .hero h1 {
    line-height: 1.05;
  }
}

.subtitle {
  font-size: 1.2rem;
  color: var(--muted);
}

.hero-actions {
  margin-top: 2.2rem;
  display: flex;
  gap: 1.2rem;
}

.card {
  background: #ffffff;
  padding: 3rem 2.8rem;
  border-radius: 32px;
  box-shadow:
    0 30px 60px rgba(15, 23, 42, 0.08),
    0 1px 0 rgba(255,255,255,0.9) inset;
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Hover premium */
.card:hover {
  transform: translateY(-8px);
  box-shadow:
    0 50px 100px rgba(15, 23, 42, 0.14),
    0 1px 0 rgba(255,255,255,0.9) inset;
}


.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 3rem;
}

.card h3 {
  font-size: 1.6rem;
  margin-bottom: 0.8rem;
}

.card p {
  max-width: 90%;
}

.card-icon svg {
  width: 60px;
  height: 60px;
  display: block;
}

.card-icon {
  margin-bottom: 0.9rem;
  color: var(--accent);
}

/* Ícono y título reaccionan al hover */
.card .card-icon,
.card h3 {
  transition: transform 0.45s ease, opacity 0.45s ease;
}

.card:hover .card-icon {
  transform: translateY(-2px);
  opacity: 1;
}

.card:hover h3 {
  transform: translateY(-1px);
}


/* =========================
   BOTONES — APPLE STYLE (REFINADO)
========================= */

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0.9rem 1.8rem;      /* más cuerpo */
  border-radius: 999px;

  font-size: 1rem;             /* texto más legible */
  font-weight: 500;
  letter-spacing: 0.01em;

  text-decoration: none;       /* 🔴 quita subrayado */
  cursor: pointer;

  transition:
    background-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

/* =========================
   BOTÓN PRINCIPAL
========================= */
.btn-primary {
  background-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.28);
}

.btn-primary:hover {
  background-color: #1e40af;
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.38);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.32);
}

/* =========================
   BOTÓN SECUNDARIO
========================= */
.btn-secondary {
  background-color: rgba(255,255,255,0.95);
  color: var(--text);
  border: 1px solid rgba(15,23,42,0.14);
  box-shadow: 0 6px 16px rgba(15,23,42,0.10);
}

.btn-secondary:hover {
  background-color: #f8fafc;
  box-shadow: 0 10px 26px rgba(15,23,42,0.16);
  transform: translateY(-1px);
}

.btn-secondary:active {
  transform: translateY(0);
  box-shadow: 0 6px 14px rgba(15,23,42,0.14);
}


/* =========================
   BOTONES — NORMALIZACIÓN
========================= */
button.btn-primary,
button.btn-secondary {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background-clip: padding-box;
}



/* =========================
   SECCIONES
========================= */
.section {
  padding: 3rem 2rem;
  max-width: 1100px;
  margin: auto;
  position: relative;
}

.section.light {
  background: linear-gradient(180deg,#f8fafc,#fff);
  border-radius: 32px;
  padding: 2.5rem 3rem;
  margin: 4rem auto;
  box-shadow:
    0 20px 40px rgba(15,23,42,0.06),
    inset 0 1px 0 rgba(255,255,255,0.9);
}

/* =========================
   FOOTER (HERO-LIKE)
========================= */
.site-footer {
  position: relative;
  padding: 6rem 2rem 4rem;
  background:
    linear-gradient(
      to bottom,
      rgba(255,255,255,0.85),
      rgba(255,255,255,0.95)
    ),
    url("assets/hero-bg.webp") center / cover no-repeat;
}

.footer-inner {
  max-width: 1200px;
  margin: auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 3rem;
}

/* BLOQUES */
.footer-block h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text);
}

.footer-brand img {
  height: 42px;
  margin-bottom: 1.2rem;
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

/* LINKS */
.footer-links,
.footer-contact {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li,
.footer-contact li {
  margin-bottom: 0.6rem;
}

.footer-links a,
.footer-contact a {
  text-decoration: none;
  color: var(--text);
  font-size: 0.9rem;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.footer-links a:hover,
.footer-contact a:hover {
  opacity: 1;
}

/* REDES */
.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1.2rem;
}

.footer-social svg {
  width: 18px;
  height: 18px;
  fill: var(--text);
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.footer-social a:hover svg {
  opacity: 1;
}


@media (max-width: 700px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 3.5rem;
  }
}

  .hero-content {
    margin-left: 0;
  }

/* Títulos de sección: estado inicial */
.section.reveal h2 {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}


/* Cuando la sección entra en viewport */
.section.reveal.visible h2 {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.08s;
}

/* Subtítulos/intro entran apenas después */
.section.reveal.visible .intro {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.14s;
}

/* Estado inicial para intro (si existe) */
.section.reveal .intro {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}


/* =========================
   MÉTODO — CARDS
========================= */
.card-method {
  background: #ffffff;
  border-radius: 28px;
  padding: 2.8rem 2.2rem;
  box-shadow:
    0 20px 40px rgba(15,23,42,0.06),
    inset 0 1px 0 rgba(255,255,255,0.9);
  text-align: left;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.card-method:hover {
  transform: translateY(-6px);
  box-shadow:
    0 35px 70px rgba(15,23,42,0.10),
    inset 0 1px 0 rgba(255,255,255,0.9);
}

.method-icon {
  margin-bottom: 1.1rem;
  color: var(--accent);
  opacity: 1;              /* visible por defecto */
  transform: translateY(0);
}

.method-icon svg {
  width: 40px;
  height: 40px;
  display: block;
  stroke: currentColor;
  fill: none;
}

/* animación al scrollear */
.card-method.reveal.visible .method-icon {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.05s;
}



.grid-4 .card-method:nth-child(1) {
  transition-delay: 0.05s;
}

.grid-4 .card-method:nth-child(2) {
  transition-delay: 0.15s;
}

.grid-4 .card-method:nth-child(3) {
  transition-delay: 0.25s;
}

.grid-4 .card-method:nth-child(4) {
  transition-delay: 0.35s;
}


.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.5rem;
}


/* =========================
   RESULTADOS — FULL WIDTH REAL
========================= */
.section.results-section {
  /* romper el layout centrado */
  max-width: none;
  margin: 6rem 0;
  padding: 6rem 0;

  /* fondo propio */
  background: linear-gradient(
    180deg,
    #f8fafc 0%,
    #eef2f7 50%,
    #f8fafc 100%
  );

  position: relative;
}

/* Bordes superior e inferior (gruesos y blancos) */
.section.results-section::before,
.section.results-section::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 18px;          /* grueso */
  background: #ffffff;
  z-index: 1;
}

.section.results-section::before {
  top: 0;
}

.section.results-section::after {
  bottom: 0;
}

/* Contenedor interno centrado */
.results-section h2,
.results-grid,
.results-closing {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
  position: relative;
  z-index: 2;
}

/* Título */
.results-section h2 {
  margin-bottom: 3rem;
}

/* Grid */
.results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 2.5rem 4rem;
}

/* Ítems */
.results-item {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  font-size: 1.3rem;
  line-height: 1rem;
}

.results-icon {
  font-size: 1rem;
  color: var(--accent);
  margin-top: 0.15rem;
}

.results-item p {
  margin: 0;
  max-width: 90%;
}

/* Texto de cierre */
.results-closing {
  margin-top: 3.5rem;
  max-width: 800px;
  font-size: 1.2rem;
  color: var(--muted);
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 600px) {
  .results-grid {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }
}

/* =========================
   CTA — SPLIT APPLE STYLE
========================= */

.section.cta-split {
  padding: 0;          /* mata el padding heredado */
  max-width: none;     /* no limita el ancho */
  margin: 0;           /* sin margen extra */
}


.cta-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #ffffff;
  align-items: stretch;
}

/* Imagen izquierda */
.cta-image {
  display: flex;
  align-items: flex-end;   /* apoya abajo */
  padding-top: 0rem;     /* aire mínimo arriba */
}

.cta-image img {
  width: 60%;
  height: auto;
  display: block;

  image-rendering: auto;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;

   transform: translateX(50%); /* mueve la imagen a la derecha */
}


/* Contenido derecho */
.cta-content {
  padding: 3.5rem 4rem 4.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Ajustes tipográficos */
.cta-content h2 {
  margin-bottom: 1rem;
}

.cta-content p {
  max-width: 420px;
  margin-bottom: 2rem;
  color: var(--muted);
}

@media (max-width: 768px) {
  .cta-split {
    grid-template-columns: 1fr;
  }

  .cta-image {
    padding-top: 0.4rem;
  }

  .cta-content {
    padding: 3rem 2rem 3.5rem;
  }
}

/* =========================
   ÍCONOS EN CARDS
========================= */
.card-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 0.9rem;
  color: var(--accent);
  opacity: 0.9;
}

.card-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* =========================
   CARD — CONTACTO
========================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}



/* =========================
   FORMULARIO — APPLE STYLE
========================= */
form input,
form textarea {
  width: 100%;
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.9rem;

  font-family: inherit;
  font-size: 0.95rem;

  border-radius: 10px;
  border: 1px solid rgba(15,23,42,0.15);
  background: #ffffff;

  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

form input:focus,
form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

/* =========================
   CONTACTO — LAYOUT DEFINITIVO
========================= */

.section-contact {
  max-width: none;
}

.contact-wrapper {
  max-width: 1200px;
  margin: auto;

  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: flex-start;
}

@media (max-width: 900px) {
  .contact-wrapper {
    grid-template-columns: 1fr;
  }
}

/* =========================
   CONTACTO — CARD IZQUIERDA
========================= */
.contact-info {
  box-shadow: 0 18px 36px rgba(15,23,42,0.06);
}

.contact-info h2 {
  margin-bottom: 1.2rem;
}

/* =========================
   FORMULARIO — MENSAJE DE ÉXITO
========================= */
.form-success {
  text-align: left;
  padding: 1rem 0;
}

.form-success h3 {
  font-size: 1.4rem;
  margin-bottom: 0.6rem;
}

.form-success p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
}

/* =========================
   BOTÓN SUBMIT — FORMULARIO
========================= */
.btn-submit {
  width: 100%;
  margin-top: 1.2rem;
  justify-content: center;
}


/* =========================
   BLOG RE-ESTRUCTURADO
========================= */

.blog-posts-container {
  display: flex;
  flex-direction: column;
  gap: 2.5rem; /* Espacio entre tarjetas */
  max-width: 1000px;
  margin: 4rem auto;
  padding: 0 1.5rem;
}

/* Forzamos que la .card se comporte como fila */
.blog-post-card {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important; /* Estira la imagen al alto del texto */
  padding: 1.5rem !important; 
  gap: 2rem;
  text-align: left;
}

.blog-post-image-wrapper {
  flex: 0 0 240px; /* Tamaño del cuadrado */
  height: 240px;
  border-radius: 20px;
  overflow: hidden;
}

.blog-post-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-post-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.blog-category {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
  display: block;
}

.blog-post-body h3 {
  font-size: 1.6rem !important;
  margin-bottom: 0.5rem !important;
  line-height: 1.2;
}

.blog-subtitle {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.8rem;
}

.blog-description {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.blog-post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

/* Responsive para celulares */
@media (max-width: 768px) {
  .blog-post-card {
    flex-direction: column !important;
  }
  .blog-post-image-wrapper {
    width: 100%;
    height: 220px;
    flex: none;
  }
}

/* =========================
   ESTILOS DE LECTURA (ARTÍCULO)
========================= */

#post-body {
    color: var(--text);
    font-size: 1.15rem;
    line-height: 1.8;
}

#post-body p { margin-bottom: 1.5rem; }

#post-body h2, #post-body h3 {
    margin: 2.5rem 0 1rem;
    letter-spacing: -0.02em;
}

/* Listas */
#post-body ul, #post-body ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

#post-body li { margin-bottom: 0.5rem; }

/* Citas estilo Apple */
.apple-quote {
    font-size: 1.4rem;
    font-style: italic;
    border-left: 4px solid var(--accent);
    padding: 1rem 2rem;
    margin: 2rem 0;
    color: var(--muted);
    background: var(--light);
    border-radius: 0 16px 16px 0;
}

/* Imágenes internas */
.article-figure {
    margin: 2.5rem 0;
    text-align: center;
}

.article-figure img {
    max-width: 100%;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
}

.article-figure figcaption {
    font-size: 0.9rem;
    color: var(--muted);
    margin-top: 0.8rem;
}

.apple-divider {
    border: 0;
    height: 1px;
    background: #e5e5e5;
    margin: 3rem 0;
}

#post-body a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border 0.2s;
}

#post-body a:hover { border-bottom: 1px solid var(--accent); }

/* Mejora 3: Imagen con borde 1px y estética Apple */
.apple-blog-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 1px solid rgba(0, 0, 0, 0.1); /* Negro sutil al 10% */
    border-radius: 18px; /* Curvatura característica de Apple */
    transition: transform 0.3s ease;
}

.blog-post-card:hover .apple-blog-img {
    transform: scale(1.02);
}

/* Mejora 1: Cuadro sutil de Categoría y Fecha */
.blog-meta-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.03); /* Gris ultra suave */
    padding: 4px 12px;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.meta-category {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent); /* Tu color azul o principal */
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.meta-divider {
    width: 1px;
    height: 12px;
    background: rgba(0, 0, 0, 0.1);
    margin: 0 10px;
}

.meta-date {
    font-size: 0.75rem;
    color: #666;
}

/* Ajuste adicional para el texto */
.blog-description {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #444;
    margin-bottom: 1.5rem;
}



/* Reducción de espacios y fondo de corcho */
.blog-main {
    padding-top: 4rem;    /* Reducimos el espacio superior (antes quizás era 8rem) */
    padding-bottom: 4rem; /* Reducimos el espacio inferior */
    min-height: 200vh;     /* Aseguramos que ocupe gran parte de la pantalla */
    
    /* Imagen de fondo assets/corcho.jpg */
    background-image: url('assets/corcho.jpg');
  
   
}

/* Opcional: Si quieres que las tarjetas resalten más sobre el corcho */
.blog-post-card {
    background: rgba(255, 255, 255, 0.95); /* Blanco ligeramente traslúcido */
    backdrop-filter: blur(5px);            /* Efecto esmerilado */
    box-shadow: 0 8px 30px rgba(0,0,0,0.15); /* Sombra un poco más profunda para dar relieve */
}


/* ===================================================
   REPARACIÓN TOTAL BLOG EREBOR
   =================================================== */

#seccion-blog {
    margin-top: 60px !important; /* Baja el contenido para que no lo tape el navbar */
    padding: 20px 0 !important;
    min-height: 100vh !important;
    background-image: url('assets/corcho.jpg') !important;
  
}

/* Forzamos que el contenedor sea ancho y centrado */
#seccion-blog .blog-posts-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 30px !important;
    max-width: 1100px !important; /* Ancho de la lista */
    margin: 0 auto !important;    /* Centra la lista en la pantalla */
    padding: 20px !important;
    width: 100% !important;
}

/* Reparación de la Card (que se veía recortada) */
#seccion-blog .blog-post-card {
    display: flex !important;
    flex-direction: row !important; /* Imagen a la izquierda, texto a la derecha */
    width: 100% !important;        /* Ocupa todo el ancho del contenedor */
    background: white !important;
    border-radius: 24px !important;
    padding: 20px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
    gap: 30px !important;
}

/* Asegurar que la imagen no achique la card */
#seccion-blog .blog-post-image-wrapper {
    flex: 0 0 300px !important; /* Ancho fijo para la imagen */
    height: 200px !important;
    border-radius: 16px !important;
    overflow: hidden !important;
}

#seccion-blog .blog-post-body {
    flex: 1 !important; /* El texto ocupa todo el espacio restante */
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

/* Responsive para móviles */
@media (max-width: 850px) {
    #seccion-blog .blog-post-card {
        flex-direction: column !important;
    }
    #seccion-blog .blog-post-image-wrapper {
        flex: 0 0 auto !important;
        width: 100% !important;
        height: 250px !important;
    }
}


#seccion-blog {
    margin-top: 0 !important;      /* Eliminamos el margen superior que empuja el main */
    padding-top: 100px !important; /* Creamos el espacio para el Navbar con padding, así el fondo sí sube */
    min-height: 100vh !important;
    background-image: url('assets/corcho.jpg') !important;
    background-position: top center !important; /* Asegura que el patrón empiece desde arriba */
}


/* Layout del Artículo */
.article-wrapper {
    max-width: 900px;
    margin: 2rem auto;
    padding: 3rem !important;
    background: white !important;
}

.article-header {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
}

#post-title {
    font-size: 2.2rem !important; /* Más pequeño y elegante */
    line-height: 1.1;
    margin-top: 0.5rem;
}

.header-visual img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* Estilos de los bloques de contenido */
#post-body {
    margin-top: 2rem;
    font-size: 1.1rem;
    color: #333;
    line-height: 1.8;
}

#post-body p { margin-bottom: 1.5rem; }

#post-body h2 { 
    font-size: 1.8rem; 
    margin: 2.5rem 0 1rem; 
    color: var(--text);
}

#post-body li {
    margin-bottom: 0.5rem;
    list-style-position: inside;
}

/* Estilo para las citas de Notion */
.apple-quote {
    border-left: 4px solid var(--accent);
    padding: 1rem 2rem;
    margin: 2rem 0;
    background: #f9f9f9;
    font-style: italic;
    border-radius: 0 12px 12px 0;
}

@media (max-width: 768px) {
    .article-header {
        grid-template-columns: 1fr;
    }
    .header-visual { order: -1; } /* Imagen arriba en móviles */
}

.article-content-render {
    padding-top: 3rem;
    max-width: 800px; /* Ancho óptimo de lectura */
    margin: 0 auto;
    width: 100%;
}

.article-content-render p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 1.5rem;
}

.article-content-render h2 {
    font-size: 1.8rem;
    margin: 2.5rem 0 1rem;
}

/* Imagen a la derecha en escritorio, arriba en móvil */
@media (max-width: 850px) {
    .article-header-split {
        flex-direction: column-reverse !important;
    }
    .blog-post-image-wrapper {
        flex: 0 0 auto !important;
        width: 100% !important;
    }
}


/* =========================
   SERVICIOS — COMPACTACIÓN DE SECCIONES
========================= */

/* Reducimos padding general solo en esta página */
.page-services .section {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

/* Acercamos secciones consecutivas */
.page-services .section + .section {
  padding-top: 1rem;
}

/* Evitamos doble aire cuando hay card dentro */
.page-services .section .card {
  margin-bottom: 0;
}

.page-services .section:nth-of-type(2) {
  padding-top: 1rem;
}

.article-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid #eee;
  gap: 2rem;
}

.article-share {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.share-label {
  font-size: 0.85rem;
  color: #777;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.article-share a svg {
  width: 20px;
  height: 20px;
  color: #444;
  transition: color 0.2s ease, transform 0.2s ease;
}

.article-share a:hover svg {
  color: #000;
  transform: translateY(-2px);
}


/* ===================================================
   MOBILE FIX — EREBOR (NO TOCAR ARRIBA)
   =================================================== */

@media (max-width: 768px) {

  /* =========================
     BASE
  ========================= */
  body {
    font-size: 15px;
    line-height: 1.6;
  }

  /* =========================
     NAVBAR
  ========================= */
  .nav-container {
    padding: 0.6rem 1rem;
  }

  .nav-logo img {
    height: 38px;
  }

  .nav-social {
    gap: 0.8rem;
  }

  /* =========================
     HERO
  ========================= */
  .hero {
    min-height: auto;
    padding: 6rem 1.5rem 3.5rem;
    background-position: center top;
  }

.hero h1 {
  font-size: clamp(2.8rem, 5vw, 3.8rem);
  font-weight: 600;
  letter-spacing: -0.035em;
}

  .subtitle {
    font-size: 1rem;
  }

  .hero-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  .hero-actions a {
    width: 100%;
  }

  /* =========================
     SECCIONES
  ========================= */
  .section {
    padding: 3rem 1.25rem;
  }

  .section.light {
    padding: 2.8rem 1.5rem;
    margin: 2.5rem 1rem;
  }

  /* =========================
     GRIDS
  ========================= */
  .grid-2,
  .grid-4 {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* =========================
     CARDS
  ========================= */
  .card {
    padding: 2.2rem 1.8rem;
    border-radius: 26px;
  }

  .card p,
  .card ul {
    max-width: 100%;
  }

  .card h3 {
    font-size: 1.35rem;
  }

  .card h4 {
    font-size: 1.1rem;
  }

  .card-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 0.6rem;
  }

  .card-icon svg {
    width: 100%;
    height: 100%;
  }

  /* Desactivamos hover flotante en mobile */
  .card:hover {
    transform: none;
    box-shadow:
      0 30px 60px rgba(15, 23, 42, 0.08),
      0 1px 0 rgba(255,255,255,0.9) inset;
  }

  /* =========================
     LISTAS
  ========================= */
  ul {
    padding-left: 1.2rem;
  }

  li {
    margin-bottom: 0.4rem;
  }

  /* =========================
     CTA SPLIT
  ========================= */
  .cta-split {
    grid-template-columns: 1fr;
  }

  .cta-image {
    display: none;
  }

  .cta-content {
    padding: 3rem 1.5rem 3.5rem;
  }

  /* =========================
     RESULTADOS
  ========================= */
  .results-section {
    padding: 4rem 0;
  }

  .results-section h2 {
    margin-bottom: 2rem;
  }

  .results-item p {
    max-width: 100%;
  }

  /* =========================
     FOOTER
  ========================= */
  .site-footer {
    padding: 4rem 1.5rem 3rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  /* =========================
     BLOG
  ========================= */
  .blog-main {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .blog-post-card {
    padding: 1.5rem !important;
  }

  .blog-post-body h3 {
    font-size: 1.35rem !important;
  }

  .blog-description {
    font-size: 0.95rem;
  }

  /* =========================
     FORMULARIOS
  ========================= */
  .contact-wrapper {
    gap: 2.5rem;
  }

  form input,
  form textarea {
    font-size: 0.95rem;
  }

  .btn-primary,
  .btn-secondary,
  .btn-submit {
    width: 100%;
  }
}


/* ===================================================
   NAVBAR — MENÚ HAMBURGUESA MOBILE
   =================================================== */

/* Botón hamburguesa */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Menú mobile overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(18px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-menu ul {
  list-style: none;
  text-align: center;
  padding: 0;
}

.mobile-menu li {
  margin: 1.2rem 0;
}

.mobile-menu a {
  font-size: 1.4rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text);
}

/* Estado activo */
.mobile-menu.active {
  opacity: 1;
  pointer-events: auto;
}

/* Mobile rules */
@media (max-width: 900px) {
  .nav-menu {
    display: none;
  }

  .nav-social {
    display: none;
  }

  .nav-toggle {
    display: block;
  }
}

/* Ajuste fino: hamburguesa alineada a la derecha */
@media (max-width: 900px) {
  .nav-toggle {
    justify-self: end;   /* lo empuja al extremo derecho del grid */
  }
}


.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0; top: 0; width: 100%; height: 100%; 
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}
.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 25px;
    width: 80%;
    max-width: 700px;
    position: relative;
    animation: slideUp 0.3s ease;
}
@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.close-modal {
    position: absolute;
    right: 20px; top: 15px;
    font-size: 30px; cursor: pointer;
}


/* Cuadrícula de Portfolio - Forzamos 4 columnas */
.portfolio-grid {
    display: grid;
    /* Creamos 4 columnas de igual tamaño */
    grid-template-columns: repeat(4, 1fr); 
    gap: 25px;
    padding: 40px 0;
    max-width: 1200px; /* Ajusta esto al ancho de tu contenedor principal */
    margin: 0 auto;
}

/* Responsivo: Ajustamos las columnas según el tamaño de pantalla */
@media (max-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 columnas en tablets */
    }
}

@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas en tablets pequeñas */
    }
}

@media (max-width: 480px) {
    .portfolio-grid {
        grid-template-columns: 1fr; /* 1 sola columna en móviles */
    }
}

/* Ajuste de la Card para que no se vea gigante */
.portfolio-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid #f2f2f7;
    display: flex;
    flex-direction: column;
    height: 100%; /* Para que todas midan lo mismo en la fila */
}

.card-image-container {
    height: 180px; /* Reducimos un poco la altura para el grid de 4 */
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fbfbfd;
    padding: 20px;
}


.project-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(100%); /* Opcional: logos en blanco y negro */
    opacity: 0.7;
    transition: all 0.3s ease;
}

.portfolio-card:hover .project-logo {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

/* Contenido debajo */
.card-content {
    padding: 24px;
    text-align: left;
}

.project-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 4px;
}

.project-company {
    font-size: 1rem;
    color: #86868b;
    margin-bottom: 12px;
}

.project-tag {
    display: inline-block;
    padding: 6px 14px;
    background: #f2f2f7;
    color: #0071e3;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}


}