/* =========================================================
   RENTALIFT — Blog Styles
   Diseño limpio y editorial
   ========================================================= */

/* --- Hero del Blog --- */
.blog-hero{
  position:relative;
  min-height:60svh;
  display:flex;
  align-items:center;
  overflow:hidden;
  background:#1a1a1a;
}

.blog-hero-bg{
  position:absolute;
  inset:0;
  z-index:0;
}

.blog-hero-bg img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.blog-hero-overlay{
  position:absolute;
  inset:0;
  z-index:1;
  background:linear-gradient(
    to bottom,
    rgba(0,0,0,.55) 0%,
    rgba(0,0,0,.40) 50%,
    rgba(0,0,0,.65) 100%
  );
}

.blog-hero-content{
  position:relative;
  z-index:2;
  padding-top:120px;
  padding-bottom:80px;
  text-align:center;
}

.blog-hero-content .section-tag{
  justify-content:center;
  color:#fff;
}

.blog-hero-content .section-tag::before{
  background:#fff;
}

.blog-hero-content h1{
  font-family:var(--font-display);
  font-size:clamp(32px,5vw,52px);
  text-transform:uppercase;
  line-height:1.05;
  margin:0 0 16px;
  color:#fff;
  text-shadow:0 2px 20px rgba(0,0,0,.3);
}

.blog-hero-content p{
  color:rgba(255,255,255,.85);
  max-width:580px;
  margin:0 auto;
  font-size:clamp(15px,1.4vw,18px);
  line-height:1.6;
  text-shadow:0 1px 12px rgba(0,0,0,.2);
}

/* --- Layout --- */
.blog-page{
  padding-top:70px;
  padding-bottom:80px;
  min-height:100vh;
}

/* --- Responsive Hero --- */
@media (max-width:640px){
  .blog-hero{
    min-height:55svh;
  }
  .blog-hero-content{
    padding-top:100px;
    padding-bottom:50px;
  }
  .blog-hero-content h1{
    font-size:clamp(24px,7vw,30px);
  }
  .blog-hero-content p{
    font-size:14px;
  }
}

/* --- Blog grid (index) --- */
.blog-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:28px;
  margin-bottom:50px;
}

.blog-card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  overflow:hidden;
  transition:transform var(--transition), box-shadow var(--transition);
}

.blog-card:hover{
  transform:translateY(-4px);
  box-shadow:0 12px 28px rgba(0,0,0,.08);
}

.blog-card-image{
  width:100%;
  aspect-ratio:16/9;
  overflow:hidden;
  background:var(--black-soft);
  display:flex;
  align-items:center;
  justify-content:center;
}

.blog-card-image img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transition:transform var(--transition);
}

.blog-card:hover .blog-card-image img{
  transform:scale(1.06);
}

.blog-card-image svg{
  width:48px;
  height:48px;
  color:var(--gray-dim);
  opacity:.4;
}

.blog-card-body{
  padding:24px;
}

.blog-card-meta{
  display:flex;
  align-items:center;
  gap:12px;
  font-size:12px;
  color:var(--gray-dim);
  text-transform:uppercase;
  letter-spacing:.05em;
  margin-bottom:8px;
}

.blog-card-meta .tag{
  display:inline-block;
  padding:2px 10px;
  border-radius:3px;
  background:rgba(227,6,19,.1);
  color:var(--red);
  font-weight:700;
  font-size:11px;
}

.blog-card h2{
  font-family:var(--font-display);
  font-size:18px;
  text-transform:uppercase;
  line-height:1.25;
  margin:0 0 10px;
}

.blog-card h2 a{
  color:inherit;
  transition:color var(--transition);
}

.blog-card h2 a:hover{
  color:var(--red);
}

.blog-card p{
  font-size:14px;
  color:var(--gray);
  line-height:1.6;
  margin:0 0 16px;
}

.blog-card .read-more{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:13px;
  font-weight:700;
  color:var(--red);
  text-transform:uppercase;
  letter-spacing:.05em;
  transition:gap var(--transition);
}

.blog-card .read-more:hover{
  gap:10px;
}

.blog-card .read-more svg{
  width:14px;
  height:14px;
}

/* --- Single blog post --- */
.blog-post{
  padding-top:130px;
  padding-bottom:80px;
}

.blog-post .post-header{
  text-align:center;
  margin-bottom:50px;
  max-width:780px;
  margin-inline:auto;
}

.blog-post .post-header h1{
  font-family:var(--font-display);
  font-size:clamp(24px,3.6vw,36px);
  text-transform:uppercase;
  line-height:1.15;
  margin:0 0 14px;
}

.blog-post .post-meta{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:16px;
  font-size:13px;
  color:var(--gray-dim);
  text-transform:uppercase;
  letter-spacing:.05em;
}

.blog-post .post-meta .separator{
  width:4px;height:4px;
  border-radius:50%;
  background:var(--gray-dim);
}

.blog-post .post-image{
  width:100%;
  max-width:780px;
  margin:0 auto 50px;
  border-radius:var(--radius);
  overflow:hidden;
  background:var(--black-soft);
  aspect-ratio:16/9;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--border);
}

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

.blog-post .post-image svg{
  width:64px;height:64px;
  color:var(--gray-dim);
  opacity:.3;
}

.blog-post .post-content{
  max-width:720px;
  margin:0 auto;
  font-size:16px;
  line-height:1.8;
  color:var(--white);
}

.blog-post .post-content h2{
  font-family:var(--font-display);
  font-size:22px;
  text-transform:uppercase;
  margin:48px 0 16px;
  line-height:1.2;
}

.blog-post .post-content h3{
  font-size:17px;
  font-weight:700;
  text-transform:uppercase;
  margin:36px 0 12px;
  color:var(--red);
}

.blog-post .post-content p{
  margin:0 0 20px;
  color:#444;
}

.blog-post .post-content ul,
.blog-post .post-content ol{
  margin:0 0 20px;
  padding-left:24px;
}

.blog-post .post-content li{
  margin-bottom:8px;
  color:#444;
}

.blog-post .post-content ul li{
  list-style:disc;
}

.blog-post .post-content ul li::marker{
  color:var(--red);
}

.blog-post .post-content ol li{
  list-style:decimal;
}

.blog-post .post-content ol li::marker{
  color:var(--red);
  font-weight:700;
}

.blog-post .post-content strong{
  color:var(--white);
  font-weight:700;
}

.blog-post .post-content a{
  color:var(--red);
  text-decoration:underline;
  text-underline-offset:2px;
  transition:opacity var(--transition);
}

.blog-post .post-content a:hover{
  opacity:.7;
}

.blog-post .post-content .highlight-box{
  background:rgba(227,6,19,.06);
  border-left:3px solid var(--red);
  padding:20px 24px;
  border-radius:0 var(--radius) var(--radius) 0;
  margin:30px 0;
}

.blog-post .post-content .highlight-box p{
  margin:0;
  color:var(--white);
  font-size:15px;
}

.blog-post .post-content .cta-inline{
  display:flex;
  gap:14px;
  align-items:center;
  flex-wrap:wrap;
  margin:36px 0;
  padding:28px;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
}

.blog-post .post-content .cta-inline p{
  margin:0;
  flex:1;
  min-width:200px;
  font-size:15px;
  font-weight:600;
  color:var(--white);
}

.blog-post .post-content .cta-inline .btn{
  flex-shrink:0;
}

/* Corregir especificidad: evitar que .post-content a sobrescriba colores de botones */
.blog-post .post-content .cta-inline .btn-primary{
  color:#ffffff;
  text-decoration:none;
}
.blog-post .post-content .cta-inline .btn-outline{
  color:#333;
  text-decoration:none;
}
.blog-post .post-content .cta-inline .btn-outline:hover{
  color:#ffffff;
}

/* --- Back to blog --- */
.back-to-blog{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:13px;
  font-weight:600;
  color:var(--gray);
  text-transform:uppercase;
  letter-spacing:.06em;
  margin-bottom:40px;
  transition:color var(--transition);
}

.back-to-blog:hover{
  color:var(--red);
}

.back-to-blog svg{
  width:16px;
  height:16px;
}

/* --- Blog CTA band --- */
.blog-cta{
  text-align:center;
  padding:60px 0;
  background:var(--black-soft);
  border-top:1px solid var(--border);
  border-bottom:1px solid var(--border);
  margin-top:40px;
}

.blog-cta h2{
  font-family:var(--font-display);
  font-size:clamp(22px,3vw,32px);
  text-transform:uppercase;
  margin:0 0 12px;
}

.blog-cta p{
  color:var(--gray);
  max-width:480px;
  margin:0 auto 28px;
}

.blog-cta .cta-actions{
  display:flex;
  gap:14px;
  justify-content:center;
  flex-wrap:wrap;
}

/* --- Breadcrumbs --- */
.breadcrumbs{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:13px;
  color:var(--gray-dim);
  margin-bottom:30px;
  max-width:780px;
  margin-inline:auto;
}

.breadcrumbs a{
  color:var(--gray);
  transition:color var(--transition);
}

.breadcrumbs a:hover{
  color:var(--red);
}

.breadcrumbs svg{
  width:12px;height:12px;
  opacity:.5;
}

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

@media (max-width:640px){
  .blog-grid{ grid-template-columns:1fr; }
  .blog-page{ padding-top:100px; }
  .blog-post{ padding-top:110px; }
  .blog-post .post-header{ text-align:left; }
  .blog-post .post-meta{ justify-content:flex-start; }
  .blog-post .post-content{ font-size:15px; }
  .blog-post .post-content .cta-inline{ flex-direction:column; align-items:stretch; }
  .blog-post .post-content .cta-inline .btn{ width:100%; justify-content:center; }
  .breadcrumbs{ margin-inline:0; }
}

/* --- Blog articles: header always visible (no dark hero) --- */
body:has(.blog-post) .header{
  background:rgba(255,255,255,.97);
  padding:10px 0;
  box-shadow:0 4px 20px rgba(0,0,0,.08);
  border-bottom:1px solid var(--border);
}

body:has(.blog-post) .nav-links a{
  color:#0a0a0a;
}

body:has(.blog-post) .header-cta .btn-outline{
  border-color:rgba(0,0,0,.2);
  color:#0a0a0a;
  background:transparent;
}

/* --- Blog nav item highlight --- */
.nav-links a.blog-link{
  color:var(--red) !important;
}

.header.is-scrolled .nav-links a.blog-link{
  color:var(--red) !important;
}
