/* ============================================================
   BLOG STYLES — Toni Vercher Fisioterapia
   ============================================================ */

/* Navbar forzado en blanco para páginas internas */
.navbar.scrolled { background: rgba(255,255,255,.97) !important; box-shadow: 0 2px 20px rgba(0,0,0,.08) !important; }
.navbar.scrolled .nav-links a { color: var(--text) !important; }
.navbar.scrolled .nav-toggle span { background: var(--dark) !important; }
.active-page { color: var(--teal) !important; font-weight: 700 !important; }

/* Breadcrumb */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--muted); margin-bottom: 32px; flex-wrap: wrap; }
.breadcrumb a { color: var(--teal); transition: opacity .2s; }
.breadcrumb a:hover { opacity: .75; }
.breadcrumb i { font-size: .65rem; }

/* ---- BLOG HERO ---- */
.blog-hero {
    background: linear-gradient(140deg, #0b2220 0%, #154840 50%, #1a8a76 100%);
    padding: 140px 0 70px; color: var(--white); text-align: center;
}
.blog-hero .breadcrumb { justify-content: center; color: rgba(255,255,255,.6); }
.blog-hero .breadcrumb a { color: rgba(255,255,255,.8); }
.blog-hero h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 900; margin-bottom: 16px; }
.blog-hero p { font-size: 1.1rem; color: rgba(255,255,255,.75); max-width: 580px; margin: 0 auto; }

/* ---- BLOG LIST ---- */
.blog-list { padding: 80px 0 100px; background: var(--bg); }
.articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

.article-card { background: var(--white); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); transition: var(--ease); }
.article-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }

.article-img-wrap { display: block; position: relative; height: 210px; overflow: hidden; }
.article-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.article-card:hover .article-img-wrap img { transform: scale(1.05); }

.article-tag {
    position: absolute; top: 14px; left: 14px;
    background: var(--teal); color: var(--white);
    font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    padding: 5px 12px; border-radius: 50px;
}

.article-body { padding: 24px; }
.article-meta { display: flex; gap: 16px; font-size: .78rem; color: var(--muted); margin-bottom: 12px; flex-wrap: wrap; }
.article-meta i { margin-right: 4px; color: var(--teal); }

.article-body h2 { font-size: 1.05rem; font-weight: 700; color: var(--dark); line-height: 1.4; margin-bottom: 10px; }
.article-body h2 a { color: inherit; transition: color .2s; }
.article-body h2 a:hover { color: var(--teal); }
.article-body p { font-size: .875rem; color: var(--muted); line-height: 1.65; margin-bottom: 16px; }

.read-more { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 700; color: var(--teal); transition: gap .2s; }
.read-more:hover { gap: 10px; }

/* ---- POST LAYOUT ---- */
.post-layout { padding: 120px 0 60px; background: var(--white); }
.post-layout .container { max-width: 820px; }

.post-header { margin-bottom: 48px; }
.post-header h1 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 900; color: var(--dark); line-height: 1.2; margin: 14px 0 20px; }

.post-meta { display: flex; gap: 20px; font-size: .82rem; color: var(--muted); margin-bottom: 28px; flex-wrap: wrap; }
.post-meta i { margin-right: 5px; color: var(--teal); }

.post-img { width: 100%; height: 420px; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow-md); }

/* Post content typography */
.post-content { font-size: 1.02rem; line-height: 1.8; color: var(--text); }
.post-content .lead { font-size: 1.12rem; color: var(--text); font-weight: 500; margin-bottom: 28px; line-height: 1.7; }
.post-content h2 { font-size: 1.5rem; font-weight: 800; color: var(--dark); margin: 44px 0 16px; padding-top: 8px; border-top: 2px solid var(--teal-faint); }
.post-content h3 { font-size: 1.15rem; font-weight: 700; color: var(--dark); margin: 28px 0 12px; }
.post-content p { margin-bottom: 18px; }
.post-content ul, .post-content ol { margin: 0 0 20px 24px; }
.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }
.post-content li { margin-bottom: 8px; line-height: 1.7; }
.post-content a { color: var(--teal); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.post-content strong { color: var(--dark); }

/* Callout boxes */
.post-callout {
    display: flex; gap: 16px; align-items: flex-start;
    background: var(--teal-faint); border-left: 4px solid var(--teal);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 20px 24px; margin: 32px 0;
}
.post-callout > i { font-size: 1.3rem; color: var(--teal); margin-top: 2px; flex-shrink: 0; }
.post-callout p { margin: 0; font-size: .94rem; }
.post-callout strong { display: block; margin-bottom: 6px; font-size: 1rem; }

.cta-callout { background: linear-gradient(135deg, #e8f5f2, #d0ede8); border-color: var(--teal-dark); }
.cta-callout > i { font-size: 1.4rem; }

/* Related posts */
.related-posts { margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--border); }
.related-posts h3 { font-size: 1.2rem; font-weight: 800; color: var(--dark); margin-bottom: 24px; }
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.related-card { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); transition: var(--ease); color: var(--text); }
.related-card:hover { border-color: var(--teal); transform: translateX(4px); }
.related-card img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.related-card span { font-size: .875rem; font-weight: 600; color: var(--dark); line-height: 1.4; }

/* ---- BLOG CTA ---- */
.blog-cta {
    padding: 80px 0;
    background: linear-gradient(140deg, #0b2220 0%, #154840 50%, #1a8a76 100%);
}
.blog-cta-inner { text-align: center; color: var(--white); }
.blog-cta-inner h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 900; margin-bottom: 12px; }
.blog-cta-inner p { color: rgba(255,255,255,.75); font-size: 1.05rem; margin-bottom: 28px; }
.blog-cta-inner .btn { margin: 0 8px; }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
    .articles-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .articles-grid { grid-template-columns: 1fr; }
    .related-grid { grid-template-columns: 1fr; }
    .post-img { height: 240px; }
    .post-layout { padding: 100px 0 40px; }
}
@media (max-width: 480px) {
    .blog-hero { padding: 110px 0 48px; }
    .blog-hero h1 { font-size: clamp(1.8rem, 8vw, 2.4rem); }
    .blog-hero p { font-size: .9rem; }
    .blog-list { padding: 48px 0; }
    .article-body { padding: 20px 18px 22px; }
    .article-body h2 { font-size: 1rem; }
    .post-img { height: 200px; }
    .post-header h1 { font-size: clamp(1.5rem, 6vw, 2rem); }
    .post-content { font-size: .9rem; }
    .post-content h2 { font-size: 1.25rem; }
    .post-content h3 { font-size: 1.05rem; }
    .post-callout { padding: 16px 18px; }
    .blog-cta-inner { padding: 36px 20px; }
    .blog-cta-inner h2 { font-size: 1.5rem; }
    .related-posts { padding: 40px 0; }
}
