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

:root {
  --zd-primary:        #d9aa42;
  --zd-primary-dark:   #c49a38;
  --zd-dark-brown:     #4a3334;
  --zd-med-brown:      #593f35;
  --zd-red:            #d13432;
  --zd-red-dark:       #9e1d21;
  --zd-red-light:      #bf3733;
  --zd-red-hover:      #a07678;
  --zd-white:          #ffffff;
  --zd-bg-light:       #f8f6f2;
  --zd-text:           #4a3334;
  --zd-text-muted:     #7a6465;
  --zd-font-body:      "Lato", sans-serif;
  --zd-font-heading:   "Lato", sans-serif;
  --zd-max-width:      1200px;
  --zd-radius:         4px;
}

.blog-page {
  font-family: var(--zd-font-body);
  font-weight: 400;
  color: var(--zd-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(--zd-dark-brown); text-decoration: none; transition: color 0.3s; }
.blog-page a:hover { color: var(--zd-red); }

/* ---------- Blog Navbar ---------- */
.blog-navbar {
  background: var(--zd-white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.blog-navbar .navbar-inner {
  max-width: var(--zd-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(--zd-font-heading); font-weight: 700; font-size: 0.92em;
  color: var(--zd-dark-brown); text-transform: uppercase; text-decoration: none;
  border-radius: var(--zd-radius); transition: background 0.3s, color 0.3s;
}
.blog-navbar .navbar-links a:hover {
  background: var(--zd-primary);
  color: var(--zd-dark-brown);
}
.blog-navbar .navbar-links a.active {
  background: var(--zd-primary);
  color: var(--zd-dark-brown);
}

.blog-navbar .nav-toggle {
  display: none; background: none;
  border: 2px solid rgba(74,51,52,0.3); border-radius: 4px;
  cursor: pointer; padding: 8px;
}
.blog-navbar .nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--zd-dark-brown); 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(--zd-white); box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    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(--zd-max-width); margin: 0 auto; padding: 0 20px; }

/* ---------- Blog Hero ---------- */
.blog-hero { background: var(--zd-primary); padding: 48px 0 40px; margin-bottom: 40px; }
.blog-hero h1 {
  font-family: var(--zd-font-heading); font-weight: 700;
  font-size: 2.2em; color: var(--zd-dark-brown);
  margin: 0; line-height: 1.2;
}
.blog-hero .blog-description { font-size: 1.05em; color: rgba(74,51,52,0.7); margin-top: 8px; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { padding: 16px 0 8px; font-size: 0.88em; color: #888; }
.breadcrumbs a { color: var(--zd-dark-brown); }
.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(--zd-white); border-radius: 6px; 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: 700; font-size: 0.75em;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--zd-red); margin-bottom: 8px;
}
.blog-card .card-title {
  font-family: var(--zd-font-heading); font-weight: 700;
  font-size: 1.15em; line-height: 1.35; margin: 0 0 10px;
}
.blog-card .card-title a { color: var(--zd-text); }
.blog-card .card-title a:hover { color: var(--zd-red); }
.blog-card .card-excerpt {
  font-size: 0.92em; color: var(--zd-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(--zd-radius); font-weight: 500; font-size: 0.95em;
  text-decoration: none; transition: background 0.2s, color 0.2s;
}
.blog-pagination a { background: var(--zd-bg-light); color: var(--zd-text); }
.blog-pagination a:hover { background: var(--zd-primary); color: var(--zd-dark-brown); }
.blog-pagination span.current { background: var(--zd-primary); color: var(--zd-dark-brown); }
.blog-pagination .dots { background: none; color: #999; }

/* ---------- Single Article ---------- */
.article-header { padding: 48px 0 32px; }
.article-header .article-category {
  display: inline-block; font-weight: 700; font-size: 0.82em;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--zd-red); margin-bottom: 12px;
}
.article-header h1 {
  font-family: var(--zd-font-heading); font-weight: 700;
  font-size: 2.2em; line-height: 1.25; color: var(--zd-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: 6px; margin-bottom: 32px;
  aspect-ratio: 21/9; object-fit: cover;
}

/* ---------- Table of Contents ---------- */
.toc-wrapper {
  background: #fdf6e8; border-left: 4px solid var(--zd-primary);
  border-radius: 0 6px 6px 0; padding: 24px 28px; margin-bottom: 36px;
}
.toc-wrapper .toc-title {
  font-family: var(--zd-font-heading); font-weight: 700;
  font-size: 1.1em; margin: 0 0 12px; color: var(--zd-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(--zd-text); text-decoration: none;
  border-bottom: 1px dashed #ccc; transition: color 0.2s, border-color 0.2s;
}
.toc-wrapper li a:hover { color: var(--zd-red); border-color: var(--zd-red); }
.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(--zd-font-heading); font-weight: 700;
  font-size: 1.6em; color: var(--zd-dark-brown);
  margin: 48px 0 16px; padding-top: 16px; line-height: 1.3;
}
.article-content h3 {
  font-family: var(--zd-font-heading); font-weight: 700;
  font-size: 1.25em; color: var(--zd-text);
  margin: 36px 0 12px; line-height: 1.35;
}
.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: 6px; margin: 16px 0; }
.article-content blockquote {
  border-left: 4px solid var(--zd-primary); margin: 28px 0;
  padding: 16px 24px; background: #fdf6e8;
  border-radius: 0 6px 6px 0; font-style: italic; color: #555;
}
.article-content a { color: var(--zd-dark-brown); text-decoration: underline; text-decoration-color: var(--zd-primary); text-underline-offset: 2px; }
.article-content a:hover { color: var(--zd-red); }

/* ---------- Related ---------- */
.related-section { background: var(--zd-bg-light); padding: 48px 0; margin-top: 56px; }
.related-section .section-title {
  font-family: var(--zd-font-heading); font-weight: 700;
  font-size: 1.5em; margin: 0 0 28px; color: var(--zd-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: var(--zd-dark-brown); color: var(--zd-white);
  padding: 25px 0; text-align: center; line-height: 1.3;
}
.blog-footer .footer-address p { margin-bottom: 0; font-size: 1rem; }
.blog-footer .footer-copyright {
  background: var(--zd-med-brown); color: var(--zd-white);
  padding: 20px 0; font-size: 0.85em;
}
.blog-footer .footer-copyright-inner {
  max-width: var(--zd-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: var(--zd-white); text-decoration: none; transition: color 0.3s;
}
.blog-footer .footer-copyright a:hover { color: var(--zd-primary); }

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

.no-posts { text-align: center; padding: 60px 20px; color: var(--zd-text-muted); }
.no-posts h2 { font-size: 1.4em; margin-bottom: 12px; }
