/* ============================================
   VITALPEAK - MAIN STYLESHEET
   ============================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green: #2d7a4f;
  --green-light: #e8f5ee;
  --green-mid: #4caf78;
  --accent: #f5a623;
  --text: #1a1a1a;
  --muted: #6b7280;
  --border: #e5e7eb;
  --bg: #f9fafb;
  --white: #ffffff;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0,0,0,0.07);
}

body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; color: var(--text); background: var(--white); line-height: 1.6; }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---- HEADER ---- */
.site-header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; gap: 24px; padding: 16px 0; }
.logo { font-size: 22px; font-weight: 800; color: var(--green); letter-spacing: -0.5px; }
.main-nav ul { display: flex; list-style: none; gap: 4px; }
.main-nav a { padding: 8px 14px; font-size: 14px; font-weight: 500; color: var(--muted); border-radius: 6px; transition: all 0.2s; }
.main-nav a:hover { color: var(--green); background: var(--green-light); }
.header-right { margin-left: auto; }
.search-form { display: flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.search-form input { padding: 8px 14px; border: none; outline: none; font-size: 14px; width: 200px; }
.search-form button { background: var(--green); border: none; padding: 8px 14px; cursor: pointer; font-size: 14px; color: white; }
.mobile-toggle { display: none; background: none; border: 1px solid var(--border); padding: 8px 12px; border-radius: 6px; cursor: pointer; font-size: 18px; }

/* ---- HERO ---- */
.hero { padding: 48px 0; background: linear-gradient(135deg, #fff 50%, var(--green-light) 100%); }
.hero-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 32px; }
.hero-featured a { display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: #fff; box-shadow: var(--shadow); transition: transform 0.2s; }
.hero-featured a:hover { transform: translateY(-3px); }
.hero-img { height: 280px; overflow: hidden; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; }
.img-placeholder { width: 100%; height: 100%; background: var(--green-light); display: flex; align-items: center; justify-content: center; font-size: 64px; }
.hero-content { padding: 24px; }
.hero-content h1 { font-size: 26px; font-weight: 700; line-height: 1.3; margin: 10px 0; }
.hero-content p { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 14px; }
.meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--muted); }

.badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-right: 6px; }
.badge-featured { background: var(--accent); color: #fff; }
.badge-cat { background: var(--green-light); color: var(--green); }

.hero-sidebar { display: flex; flex-direction: column; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.side-item { display: block; padding: 16px 20px; background: #fff; transition: background 0.2s; }
.side-item:hover { background: var(--bg); }
.side-cat { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--green); }
.side-item h3 { font-size: 15px; font-weight: 600; margin: 6px 0 4px; line-height: 1.35; }
.side-time { font-size: 12px; color: var(--muted); }

/* ---- SECTIONS ---- */
.section { padding: 64px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; }
.section-head h2 { font-size: 28px; font-weight: 700; }
.see-all { font-size: 14px; color: var(--green); font-weight: 500; border-bottom: 1px solid var(--green); padding-bottom: 2px; }

/* ---- CATEGORIES ---- */
.categories-section { background: var(--bg); }
.cat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.cat-card { display: flex; flex-direction: column; align-items: center; padding: 20px 12px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); text-align: center; transition: all 0.2s; }
.cat-card:hover { border-color: var(--green-mid); background: var(--green-light); transform: translateY(-2px); }
.cat-icon { font-size: 28px; margin-bottom: 8px; }
.cat-name { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.cat-count { font-size: 11px; color: var(--muted); }

/* ---- ARTICLES GRID ---- */
.articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.article-card { display: block; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: #fff; transition: all 0.2s; }
.article-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.08); }
.card-img { height: 180px; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.article-card:hover .card-img img { transform: scale(1.05); }
.card-body { padding: 18px; }
.card-cat { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--green); margin-bottom: 8px; display: block; }
.card-body h3 { font-size: 16px; font-weight: 600; line-height: 1.4; margin-bottom: 8px; }
.card-body p { font-size: 13px; color: var(--muted); line-height: 1.5; margin-bottom: 12px; }
.card-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); padding-top: 10px; border-top: 1px solid var(--border); }

/* ---- TRENDING ---- */
.trending-section { background: var(--bg); }
.trending-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.trending-card { display: flex; gap: 16px; align-items: flex-start; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 20px; transition: all 0.2s; }
.trending-card:hover { border-color: var(--green-mid); box-shadow: var(--shadow); }
.trend-num { font-size: 32px; font-weight: 800; color: var(--border); line-height: 1; min-width: 40px; }
.trend-cat { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--green); display: block; margin-bottom: 6px; }
.trend-body h3 { font-size: 15px; font-weight: 600; line-height: 1.4; margin-bottom: 6px; }
.trend-views { font-size: 12px; color: var(--muted); }

/* ---- ADS ---- */
.ad-banner { margin: 8px 0 40px; min-height: 90px; background: var(--bg); border: 1px dashed var(--border); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; }

/* ---- NEWSLETTER ---- */
.newsletter-section { background: var(--green); color: #fff; padding: 64px 0; text-align: center; }
.newsletter-section h2 { font-size: 36px; font-weight: 700; margin-bottom: 12px; }
.newsletter-section p { font-size: 16px; opacity: 0.85; margin-bottom: 32px; }
.nl-form { display: flex; gap: 12px; justify-content: center; max-width: 480px; margin: 0 auto; }
.nl-form input { flex: 1; padding: 14px 18px; border: none; border-radius: 8px; font-size: 15px; outline: none; }
.nl-form button { background: var(--accent); color: #fff; border: none; padding: 14px 24px; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap; }

/* ---- FOOTER ---- */
.site-footer { background: #111; color: #fff; padding: 48px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand .logo { color: #fff; margin-bottom: 12px; display: block; }
.footer-brand p { font-size: 13px; color: #9ca3af; line-height: 1.6; }
.footer-col h4 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #9ca3af; margin-bottom: 16px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a { font-size: 13px; color: #d1d5db; transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--green-mid); }
.footer-bottom { border-top: 1px solid #333; padding-top: 24px; font-size: 12px; color: #6b7280; }

/* ---- PAGINATION ---- */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 48px; }
.pagination a, .pagination span { padding: 10px 16px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; }
.pagination a:hover { background: var(--green-light); border-color: var(--green); color: var(--green); }
.pagination .current { background: var(--green); color: #fff; border-color: var(--green); }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .trending-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-sidebar { display: none; }
  .main-nav { display: none; }
  .main-nav.open { display: block; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); padding: 16px; }
  .main-nav.open ul { flex-direction: column; }
  .mobile-toggle { display: block; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .articles-grid { grid-template-columns: 1fr; }
  .nl-form { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
  .section-head h2 { font-size: 22px; }
}

/* ============================================
   PROFESSIONAL HOMEPAGE STYLES v2
   ============================================ */

body { font-family: 'Inter', -apple-system, sans-serif; }

/* Hero Pro */
.hero-pro { background: linear-gradient(135deg, #fafafa 0%, #f0f9f4 100%); padding: 48px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 32px; }

.hero-card { display: block; background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 4px 30px rgba(0,0,0,0.08); transition: transform 0.3s, box-shadow 0.3s; }
.hero-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.12); }
.hero-img-wrap { position: relative; height: 380px; overflow: hidden; }
.hero-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s; }
.hero-card:hover .hero-img-wrap img { transform: scale(1.05); }
.featured-tag { position: absolute; top: 20px; left: 20px; background: #f5a623; color: #fff; padding: 6px 14px; border-radius: 4px; font-size: 11px; font-weight: 700; letter-spacing: 1px; box-shadow: 0 4px 12px rgba(245,166,35,0.4); }

.hero-content { padding: 28px 32px 32px; }
.cat-pill { display: inline-block; background: #e8f5ee; color: #2d7a4f; padding: 5px 14px; border-radius: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 14px; }
.hero-content h1 { font-family: 'Playfair Display', serif; font-size: 34px; font-weight: 700; line-height: 1.2; margin-bottom: 14px; color: #1a1a1a; }
.hero-content p { font-size: 15px; color: #6b7280; line-height: 1.7; margin-bottom: 22px; }

.hero-meta { display: flex; justify-content: space-between; align-items: center; padding-top: 18px; border-top: 1px solid #f0f0f0; }
.author-row { display: flex; align-items: center; gap: 12px; }
.author-pic { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, #2d7a4f, #4caf78); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.author-row strong { display: block; font-size: 13px; color: #1a1a1a; }
.author-row span { font-size: 12px; color: #888; }
.meta-stats { display: flex; gap: 16px; font-size: 12px; color: #888; }

.hero-side { background: #fff; border-radius: 18px; padding: 28px 24px; box-shadow: 0 4px 20px rgba(0,0,0,0.05); }
.side-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: #2d7a4f; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 2px solid #2d7a4f; }
.side-card { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid #f0f0f0; transition: opacity 0.2s; }
.side-card:last-child { border-bottom: none; padding-bottom: 0; }
.side-card:hover { opacity: 0.75; }
.side-num { font-family: 'Playfair Display', serif; font-size: 28px; font-weight: 800; color: #e0e0e0; line-height: 1; min-width: 32px; }
.side-cat-tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: #2d7a4f; display: block; margin-bottom: 4px; }
.side-card h4 { font-size: 14px; font-weight: 600; line-height: 1.4; margin-bottom: 4px; color: #1a1a1a; }
.side-time { font-size: 11px; color: #999; }

/* Categories Strip */
.cats-strip { padding: 24px 0; background: #fff; border-top: 1px solid #f0f0f0; border-bottom: 1px solid #f0f0f0; }
.cats-flex { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.cat-pill-big { display: inline-flex; align-items: center; gap: 8px; background: #f9fafb; border: 1px solid #e5e7eb; padding: 10px 18px; border-radius: 30px; font-size: 13px; font-weight: 600; color: #1a1a1a; transition: all 0.2s; }
.cat-pill-big:hover { background: #2d7a4f; color: #fff; border-color: #2d7a4f; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(45,122,79,0.3); }
.cat-pill-big .ci { font-size: 18px; }
.cat-pill-big .cnum { background: rgba(0,0,0,0.06); padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: 700; }
.cat-pill-big:hover .cnum { background: rgba(255,255,255,0.2); color: #fff; }

/* Section Heads Pro */
.section-head-pro { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 32px; }
.section-h { font-family: 'Playfair Display', serif; font-size: 32px; font-weight: 700; color: #1a1a1a; margin-bottom: 4px; }
.section-sub { font-size: 14px; color: #888; }
.more-btn { font-size: 14px; color: #2d7a4f; font-weight: 600; padding: 8px 16px; border: 1.5px solid #2d7a4f; border-radius: 6px; transition: all 0.2s; }
.more-btn:hover { background: #2d7a4f; color: #fff; }

/* Pro Article Grid */
.grid-pro { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card-pro { display: flex; flex-direction: column; background: #fff; border-radius: 14px; overflow: hidden; border: 1px solid #f0f0f0; transition: all 0.3s; height: 100%; }
.card-pro:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(0,0,0,0.1); border-color: transparent; }
.card-img-pro { height: 180px; overflow: hidden; }
.card-img-pro img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.card-pro:hover .card-img-pro img { transform: scale(1.06); }
.card-body-pro { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; }
.cat-mini { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: #2d7a4f; margin-bottom: 8px; display: block; }
.card-body-pro h3 { font-family: 'Playfair Display', serif; font-size: 17px; font-weight: 600; line-height: 1.35; margin-bottom: 10px; color: #1a1a1a; flex: 1; }
.card-body-pro p { font-size: 13px; color: #6b7280; line-height: 1.6; margin-bottom: 14px; }
.card-foot-pro { display: flex; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid #f0f0f0; font-size: 12px; color: #888; }
.card-foot-pro .auth { color: #444; font-weight: 600; }
.card-foot-pro .dot { color: #ccc; }

/* Image Fallback Gradients */
.img-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 64px; }
.gradient-1 { background: linear-gradient(135deg, #e8f5ee, #c3e6d4); }
.gradient-2 { background: linear-gradient(135deg, #fef3e2, #fde0a8); }
.gradient-3 { background: linear-gradient(135deg, #e8f0ff, #c8d8ff); }
.gradient-4 { background: linear-gradient(135deg, #fce4ec, #f8bbd0); }

/* Trending Pro */
.trending-pro { background: #f9fafb; padding: 64px 0; margin-top: 24px; }
.trend-grid-pro { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.trend-pro-card { display: flex; gap: 16px; background: #fff; border-radius: 14px; padding: 20px; transition: all 0.3s; align-items: flex-start; }
.trend-pro-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.08); }
.trend-num-pro { font-family: 'Playfair Display', serif; font-size: 56px; font-weight: 800; color: #e8f5ee; line-height: 0.9; min-width: 50px; }
.trend-img-pro { width: 120px; height: 90px; border-radius: 10px; overflow: hidden; flex-shrink: 0; }
.trend-img-pro img { width: 100%; height: 100%; object-fit: cover; }
.trend-info-pro { flex: 1; }
.trend-info-pro h3 { font-family: 'Playfair Display', serif; font-size: 15px; font-weight: 600; line-height: 1.4; margin: 6px 0; color: #1a1a1a; }
.trend-meta-pro { display: flex; gap: 12px; font-size: 11px; color: #888; }

/* Newsletter Pro */
.newsletter-pro { padding: 64px 0; }
.nl-pro-box { background: linear-gradient(135deg, #2d7a4f 0%, #1e5c39 100%); border-radius: 20px; padding: 56px 48px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; color: #fff; position: relative; overflow: hidden; }
.nl-pro-box::before { content: ''; position: absolute; top: -100px; right: -100px; width: 300px; height: 300px; background: rgba(255,255,255,0.05); border-radius: 50%; }
.nl-pro-left h2 { font-family: 'Playfair Display', serif; font-size: 36px; font-weight: 700; margin-bottom: 10px; }
.nl-pro-left p { font-size: 15px; opacity: 0.85; line-height: 1.6; }
.nl-pro-form { display: flex; gap: 10px; position: relative; z-index: 1; }
.nl-pro-form input { flex: 1; padding: 16px 18px; border: none; border-radius: 10px; font-size: 14px; outline: none; font-family: inherit; }
.nl-pro-form button { background: #f5a623; color: #fff; border: none; padding: 16px 24px; border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; font-family: inherit; transition: background 0.2s; }
.nl-pro-form button:hover { background: #e0941a; }

/* Ad zone */
.ad-zone { min-height: 90px; background: #f9fafb; border: 1px dashed #e5e7eb; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #999; font-size: 13px; margin: 32px 0; }

/* Responsive */
@media (max-width: 1024px) {
  .grid-pro { grid-template-columns: repeat(2, 1fr); }
  .trend-grid-pro { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .nl-pro-box { grid-template-columns: 1fr; padding: 36px 28px; }
  .hero-content h1 { font-size: 26px; }
}
@media (max-width: 640px) {
  .grid-pro { grid-template-columns: 1fr; }
  .cats-flex { gap: 8px; }
  .cat-pill-big { padding: 8px 14px; font-size: 12px; }
  .section-h { font-size: 24px; }
}
