/*
Theme Name: Help4Brain Blog
Theme URI: https://help4brain.ro
Description: Tema WordPress custom pentru Help4Brain — blog integrat cu landing page (fost Elementor). SEO complet.
Version: 1.0.0
Author: Zdrovit Romania
Author URI: https://zdrovital.ro
Text Domain: help4brain
Requires at least: 6.0
Requires PHP: 7.4
License: Proprietary
*/

:root {
  --hb-primary:        #07A6E2;
  --hb-dark-navy:      #1F3057;
  --hb-medium-blue:    #16547E;
  --hb-white:          #ffffff;
  --hb-bg-light:       #f4f8fb;
  --hb-text:           #1F3057;
  --hb-text-muted:     #5a6a7e;
  --hb-accent:         #07A6E2;
  --hb-font-body:      "Roboto", sans-serif;
  --hb-font-heading:   "Montserrat", sans-serif;
  --hb-max-width:      1200px;
  --hb-radius:         6px;
}

.blog-page { font-family: var(--hb-font-body); font-weight: 400; color: var(--hb-text); line-height: 1.6; padding-top: 0; }
.blog-page *, .blog-page *::before, .blog-page *::after { box-sizing: border-box; }
.blog-page img { max-width: 100%; height: auto; }
.blog-page a { color: var(--hb-primary); text-decoration: none; transition: color 0.3s; }
.blog-page a:hover { color: var(--hb-dark-navy); }

/* ---------- Blog Navbar ---------- */
.blog-navbar {
  background: linear-gradient(135deg, var(--hb-dark-navy) 0%, var(--hb-medium-blue) 100%);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  position: sticky; top: 0; z-index: 1000;
}
.blog-navbar .navbar-inner {
  max-width: var(--hb-max-width); margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.blog-navbar .navbar-logo img, .blog-navbar .navbar-logo .custom-logo { height: 40px; width: auto; }
.blog-navbar .navbar-links { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.blog-navbar .navbar-links a {
  display: block; padding: 8px 14px;
  font-family: var(--hb-font-heading); font-weight: 600; font-size: 0.88em;
  color: var(--hb-white); text-transform: uppercase; text-decoration: none;
  border-radius: var(--hb-radius); transition: background 0.3s, color 0.3s;
}
.blog-navbar .navbar-links a:hover,
.blog-navbar .navbar-links a.active {
  background: var(--hb-primary); color: var(--hb-white);
}

.blog-navbar .nav-toggle {
  display: none; background: none;
  border: 2px solid rgba(255,255,255,0.4); border-radius: 4px; cursor: pointer; padding: 8px;
}
.blog-navbar .nav-toggle span { display: block; width: 24px; height: 2px; background: var(--hb-white); margin: 5px 0; transition: 0.3s; }

@media (max-width: 768px) {
  .blog-navbar .nav-toggle { display: block; }
  .blog-navbar .navbar-links {
    display: none; flex-direction: column;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--hb-dark-navy); box-shadow: 0 4px 12px rgba(0,0,0,0.2); padding: 12px 0;
  }
  .blog-navbar .navbar-links.open { display: flex; }
  .blog-navbar .navbar-links a { padding: 12px 20px; border-radius: 0; }
}

.blog-container { max-width: var(--hb-max-width); margin: 0 auto; padding: 0 20px; }

/* ---------- Blog Hero ---------- */
.blog-hero {
  background: linear-gradient(135deg, var(--hb-dark-navy) 0%, var(--hb-medium-blue) 100%);
  padding: 48px 0 40px; margin-bottom: 40px;
}
.blog-hero h1 {
  font-family: var(--hb-font-heading); font-weight: 700;
  font-size: 2.2em; color: var(--hb-white); margin: 0; line-height: 1.2;
}
.blog-hero .blog-description { font-size: 1.05em; color: rgba(255,255,255,0.7); margin-top: 8px; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { padding: 16px 0 8px; font-size: 0.88em; color: #888; }
.breadcrumbs a { color: var(--hb-primary); }
.breadcrumbs .sep { margin: 0 6px; color: #bbb; }

/* ---------- Blog Grid ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-bottom: 48px; }
@media (max-width: 991px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .blog-grid { grid-template-columns: 1fr; } }

/* ---------- Blog Card ---------- */
.blog-card {
  background: var(--hb-white); border-radius: var(--hb-radius); overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex; flex-direction: column;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.blog-card .card-thumb { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; }
.blog-card .card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.blog-card .card-category {
  display: inline-block; font-weight: 600; font-size: 0.75em;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--hb-primary); margin-bottom: 8px;
}
.blog-card .card-title {
  font-family: var(--hb-font-heading); font-weight: 600;
  font-size: 1.15em; line-height: 1.35; margin: 0 0 10px;
}
.blog-card .card-title a { color: var(--hb-text); }
.blog-card .card-title a:hover { color: var(--hb-primary); }
.blog-card .card-excerpt { font-size: 0.92em; color: var(--hb-text-muted); line-height: 1.55; margin-bottom: 16px; flex: 1; }
.blog-card .card-meta {
  font-size: 0.8em; color: #999; display: flex; gap: 16px;
  margin-top: auto; padding-top: 12px; border-top: 1px solid #f0f0f0;
}

/* ---------- Pagination ---------- */
.blog-pagination { display: flex; justify-content: center; align-items: center; gap: 6px; padding: 24px 0 56px; }
.blog-pagination a, .blog-pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 12px;
  border-radius: var(--hb-radius); font-weight: 500; font-size: 0.95em;
  text-decoration: none; transition: background 0.2s, color 0.2s;
}
.blog-pagination a { background: var(--hb-bg-light); color: var(--hb-text); }
.blog-pagination a:hover { background: var(--hb-primary); color: var(--hb-white); }
.blog-pagination span.current { background: var(--hb-primary); color: var(--hb-white); }
.blog-pagination .dots { background: none; color: #999; }

/* ---------- Single Article ---------- */
.article-header { padding: 48px 0 32px; }
.article-header h1 {
  font-family: var(--hb-font-heading); font-weight: 700;
  font-size: 2.2em; line-height: 1.25; color: var(--hb-text); margin: 0 0 16px;
}
.article-meta { display: flex; flex-wrap: wrap; gap: 20px; font-size: 0.88em; color: #888; margin-bottom: 24px; }
.article-meta .meta-item { display: flex; align-items: center; gap: 5px; }
.article-featured-img { width: 100%; border-radius: var(--hb-radius); margin-bottom: 32px; aspect-ratio: 21/9; object-fit: cover; }

/* ---------- ToC ---------- */
.toc-wrapper {
  background: var(--hb-bg-light); border-left: 4px solid var(--hb-primary);
  border-radius: 0 6px 6px 0; padding: 24px 28px; margin-bottom: 36px;
}
.toc-wrapper .toc-title { font-family: var(--hb-font-heading); font-weight: 600; font-size: 1.1em; margin: 0 0 12px; color: var(--hb-text); }
.toc-wrapper ol { margin: 0; padding-left: 20px; }
.toc-wrapper li { margin-bottom: 6px; line-height: 1.5; }
.toc-wrapper li a { color: var(--hb-text); border-bottom: 1px dashed #ccc; transition: color 0.2s; }
.toc-wrapper li a:hover { color: var(--hb-primary); border-color: var(--hb-primary); }
.toc-wrapper ol ol { margin-top: 6px; }

/* ---------- Article Content ---------- */
.article-content { max-width: 820px; font-size: 1.05em; line-height: 1.75; }
.article-content h2 { font-family: var(--hb-font-heading); font-weight: 700; font-size: 1.6em; color: var(--hb-dark-navy); margin: 48px 0 16px; padding-top: 16px; line-height: 1.3; }
.article-content h3 { font-family: var(--hb-font-heading); font-weight: 600; font-size: 1.25em; color: var(--hb-text); margin: 36px 0 12px; }
.article-content p { margin: 0 0 20px; }
.article-content ul, .article-content ol { margin: 0 0 24px; padding-left: 24px; }
.article-content li { margin-bottom: 8px; }
.article-content img { border-radius: var(--hb-radius); margin: 16px 0; }
.article-content blockquote { border-left: 4px solid var(--hb-primary); margin: 28px 0; padding: 16px 24px; background: var(--hb-bg-light); border-radius: 0 6px 6px 0; font-style: italic; color: #555; }
.article-content a { color: var(--hb-primary); text-decoration: underline; text-underline-offset: 2px; }
.article-content a:hover { color: var(--hb-dark-navy); }

/* ---------- Related ---------- */
.related-section { background: var(--hb-bg-light); padding: 48px 0; margin-top: 56px; }
.related-section .section-title { font-family: var(--hb-font-heading); font-weight: 700; font-size: 1.5em; margin: 0 0 28px; color: var(--hb-text); }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 991px) { .related-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .related-grid { grid-template-columns: 1fr; } }

/* ---------- Blog Footer ---------- */
.blog-footer .footer-address {
  background: linear-gradient(135deg, var(--hb-dark-navy) 0%, var(--hb-medium-blue) 100%);
  color: var(--hb-white); padding: 32px 0; text-align: center; line-height: 1.5;
}
.blog-footer .footer-address p { margin-bottom: 0; }
.blog-footer .footer-copyright {
  background: var(--hb-dark-navy); color: rgba(255,255,255,0.7);
  padding: 16px 0; font-size: 0.85em;
}
.blog-footer .footer-copyright-inner {
  max-width: var(--hb-max-width); margin: 0 auto; padding: 0 20px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 24px;
}
.blog-footer .footer-copyright a { color: rgba(255,255,255,0.7); text-decoration: none; transition: color 0.3s; }
.blog-footer .footer-copyright a:hover { color: var(--hb-primary); }

/* ---------- 404 ---------- */
.page-404 { text-align: center; padding: 80px 20px; }
.page-404 h1 { font-family: var(--hb-font-heading); font-weight: 700; font-size: 5em; color: var(--hb-primary); margin: 0; }
.page-404 p { font-size: 1.2em; color: var(--hb-text-muted); margin: 16px 0 32px; }
.page-404 .btn-home { display: inline-block; padding: 12px 32px; background: var(--hb-primary); color: var(--hb-white); font-weight: 600; border-radius: 2em; text-decoration: none; transition: background 0.2s; }
.page-404 .btn-home:hover { background: var(--hb-dark-navy); }

.no-posts { text-align: center; padding: 60px 20px; color: var(--hb-text-muted); }
