/*
Theme Name: Lớn Cùng Con
Theme URI: https://loncungcon.vn
Author: Lớn Cùng Con Team
Author URI: https://loncungcon.vn
Description: Theme WordPress cho website Lớn Cùng Con — đồng hành cùng phụ huynh Việt Nam nuôi dạy trẻ từ 6 tháng đến 6 tuổi.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: loncungcon
Tags: blog, education, children, parenting, vietnamese
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
*/

/* ========== RESET & VARIABLES ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #2D8F6F;
  --primary-light: #E8F5EE;
  --primary-dark: #1a6b52;
  --secondary: #F4A623;
  --secondary-light: #FFF5E0;
  --coral: #E8685A;
  --coral-light: #FDE8E5;
  --purple: #7B61C1;
  --purple-light: #F0ECFA;
  --sky: #4BA3D9;
  --sky-light: #E3F2FD;
  --dark: #1A2E35;
  --gray: #6B7C85;
  --gray-light: #F0F4F6;
  --white: #FFFFFF;
  --bg: #FAFCFB;
  --font: 'Quicksand', 'Nunito', sans-serif;
  --radius: 22px;
  --radius-sm: 12px;
  --shadow: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 36px rgba(0,0,0,0.08);
}
html { scroll-behavior: smooth; }
body {
  font-family: var(--font); background: var(--bg); color: var(--dark);
  line-height: 1.65; -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; transition: color 0.25s; }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ========== ANIMATIONS ========== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes float0 { 0%,100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-14px) rotate(5deg); } }
@keyframes float1 { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px) rotate(-5deg); } }
@keyframes float2 { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-16px) rotate(4deg); } }
@keyframes float3 { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px) rotate(-3deg); } }
.fade-up { opacity: 0; transform: translateY(30px); transition: all 0.7s cubic-bezier(0.16,1,0.3,1); }
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ========== BUTTONS ========== */
.btn { display: inline-block; font-family: var(--font); font-weight: 700; border: none; cursor: pointer; transition: all 0.3s; border-radius: 28px; }
.btn-primary { background: var(--primary); color: white; padding: 14px 32px; font-size: 15px; box-shadow: 0 4px 18px rgba(45,143,111,0.25); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(45,143,111,0.3); color: white; }
.btn-outline { background: transparent; color: var(--dark); border: 2px solid rgba(26,46,53,0.15); padding: 12px 28px; font-size: 15px; }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 9px 22px; font-size: 13px; }

/* ========== HEADER / NAV ========== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 14px 0; transition: all 0.35s ease;
}
.site-header.scrolled {
  background: rgba(255,255,255,0.96); backdrop-filter: blur(14px);
  border-bottom: 1px solid #e8ece9; box-shadow: 0 2px 20px rgba(0,0,0,0.04);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.site-logo { display: flex; align-items: center; gap: 10; }
.logo-icon {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center; position: relative;
}
.logo-icon svg { width: 22px; height: 22px; }
.logo-badge {
  position: absolute; bottom: -2px; right: -2px; width: 14px; height: 14px;
  background: var(--secondary); border-radius: 50%; border: 2px solid white;
  display: flex; align-items: center; justify-content: center;
}
.logo-badge svg { width: 7px; height: 7px; }
.logo-text { font-weight: 800; font-size: 19px; color: var(--dark); letter-spacing: -0.02em; }
.main-nav { display: flex; gap: 28; align-items: center; }
.main-nav a { font-size: 14px; font-weight: 600; opacity: 0.75; }
.main-nav a:hover { opacity: 1; color: var(--dark); }
.mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.mobile-toggle span { display: block; width: 22px; height: 2px; background: var(--dark); margin: 5px 0; transition: all 0.3s; border-radius: 2px; }

/* ========== HERO ========== */
.hero {
  position: relative; padding: 140px 24px 90px; overflow: hidden;
  background: linear-gradient(165deg, var(--bg) 0%, var(--primary-light) 40%, var(--secondary-light) 100%);
}
.hero-blob { position: absolute; border-radius: 50%; filter: blur(60px); pointer-events: none; }
.hero-blob-1 { top: 40px; right: 10%; width: 220px; height: 220px; background: var(--secondary); opacity: 0.08; }
.hero-blob-2 { bottom: 20px; left: 5%; width: 180px; height: 180px; background: var(--primary); opacity: 0.08; }
.hero-blob-3 { top: 30%; left: 48%; width: 140px; height: 140px; background: var(--coral); opacity: 0.06; }
.hero-inner { display: flex; align-items: center; gap: 60; animation: fadeUp 0.9s cubic-bezier(0.16,1,0.3,1) forwards; }
.hero-content { flex: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8;
  background: rgba(45,143,111,0.1); padding: 6px 16px; border-radius: 20px; margin-bottom: 22px;
}
.hero-badge span { font-size: 13px; font-weight: 600; color: var(--primary); }
.hero h1 { font-size: 50px; font-weight: 800; line-height: 1.12; letter-spacing: -0.03em; margin-bottom: 20px; }
.hero h1 .accent { color: var(--primary); }
.hero-desc { font-size: 17px; color: var(--gray); line-height: 1.75; max-width: 480px; margin-bottom: 34px; }
.hero-buttons { display: flex; gap: 12; flex-wrap: wrap; }
.hero-visual { flex: 0.8; display: flex; justify-content: center; }
.hero-circle {
  width: 370px; height: 370px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
  display: flex; align-items: center; justify-content: center;
  position: relative; box-shadow: 0 24px 64px rgba(45,143,111,0.1);
}
.hero-circle .emoji-main { font-size: 130px; }
.hero-float { position: absolute; font-size: 34px; }
.hero-float:nth-child(2) { top: -5%; left: -8%; animation: float0 3s ease-in-out infinite; }
.hero-float:nth-child(3) { top: 10%; left: 90%; animation: float1 3s ease-in-out infinite 0.4s; }
.hero-float:nth-child(4) { top: 72%; left: -12%; animation: float2 3s ease-in-out infinite 0.8s; }
.hero-float:nth-child(5) { top: 85%; left: 86%; animation: float3 3s ease-in-out infinite 1.2s; }

/* ========== SECTIONS COMMON ========== */
.section { padding: 72px 0; }
.section-white { background: var(--white); }
.section-bg { background: var(--bg); }
.section-center { text-align: center; margin-bottom: 44px; }
.section-title { font-size: 32px; font-weight: 800; margin-bottom: 8px; }
.section-sub { font-size: 15px; color: var(--gray); }

/* ========== AGE SELECTOR ========== */
.age-grid { display: flex; gap: 20; justify-content: center; }
.age-card {
  flex: 1; max-width: 230px; padding: 30px 20px; border-radius: var(--radius);
  border: 2px solid transparent; background: var(--gray-light);
  cursor: pointer; transition: all 0.35s ease; text-align: center;
}
.age-card:hover, .age-card.active { transform: translateY(-5px); }
.age-card .emoji { font-size: 48px; margin-bottom: 10px; display: block; }
.age-card .label { font-size: 18px; font-weight: 800; }
.age-card .desc { font-size: 13px; color: var(--gray); margin-top: 4px; }

/* ========== CATEGORIES ========== */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.cat-card {
  background: var(--white); border-radius: var(--radius); padding: 34px 24px;
  cursor: pointer; transition: all 0.35s ease; border: 1px solid transparent;
}
.cat-card:hover { transform: translateY(-6px); }
.cat-icon {
  width: 58px; height: 58px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; margin-bottom: 18px;
}
.cat-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.cat-card p { font-size: 13px; color: var(--gray); line-height: 1.5; margin-bottom: 18px; }
.cat-count { font-size: 12px; font-weight: 700; }

/* ========== ARTICLES GRID ========== */
.articles-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 44px; }
.articles-header .view-all { font-size: 14px; font-weight: 700; color: var(--primary); }
.articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.article-card {
  border-radius: var(--radius); overflow: hidden; background: var(--white);
  border: 1px solid #e8ece9; transition: all 0.35s ease;
}
.article-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.article-card a { display: block; }
.article-thumb {
  height: 200px; overflow: hidden; position: relative;
  background: var(--gray-light);
}
.article-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.article-card:hover .article-thumb img { transform: scale(1.05); }
.article-thumb-placeholder {
  height: 200px; display: flex; align-items: center; justify-content: center; font-size: 76px;
}
.article-body { padding: 22px 26px 26px; }
.article-tag {
  display: inline-block; padding: 4px 13px; border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 700; margin-bottom: 14px;
}
.article-card h3 { font-size: 16px; font-weight: 700; line-height: 1.45; margin-bottom: 10px; color: var(--dark); }
.article-card .excerpt { font-size: 13px; color: var(--gray); line-height: 1.65; margin-bottom: 18px; }
.article-meta { display: flex; justify-content: space-between; align-items: center; }
.article-meta .author { font-size: 12px; font-weight: 600; color: var(--dark); }
.article-meta .time { font-size: 11px; color: var(--gray); }

/* ========== TOOLS ========== */
.tools-section { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }
.tools-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tool-card {
  background: rgba(255,255,255,0.1); backdrop-filter: blur(10px);
  border-radius: var(--radius); padding: 34px 22px; text-align: center;
  cursor: pointer; transition: all 0.35s; border: 1px solid rgba(255,255,255,0.15);
}
.tool-card:hover { background: rgba(255,255,255,0.2); transform: translateY(-5px); }
.tool-card .emoji { font-size: 44px; margin-bottom: 14px; display: block; }
.tool-card h4 { font-size: 16px; font-weight: 700; color: white; margin-bottom: 5px; }
.tool-card p { font-size: 13px; color: rgba(255,255,255,0.6); }

/* ========== STATS ========== */
.stats-inner { display: flex; justify-content: space-around; flex-wrap: wrap; gap: 24px; }
.stat { text-align: center; }
.stat .number { font-size: 42px; font-weight: 800; color: var(--primary); }
.stat .label { font-size: 14px; color: var(--gray); margin-top: 4px; }

/* ========== NEWSLETTER ========== */
.newsletter { background: var(--secondary-light); }
.newsletter-inner { max-width: 580px; margin: 0 auto; text-align: center; }
.newsletter .emoji { font-size: 52px; margin-bottom: 18px; }
.newsletter h2 { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.newsletter > p, .newsletter-inner > p { font-size: 15px; color: var(--gray); margin-bottom: 30px; }
.newsletter-form { display: flex; gap: 12; max-width: 460px; margin: 0 auto; }
.newsletter-form input[type="email"] {
  flex: 1; padding: 14px 22px; border-radius: 28px; border: 2px solid #e8ece9;
  font-family: var(--font); font-size: 14px; outline: none; transition: border 0.3s;
}
.newsletter-form input[type="email"]:focus { border-color: var(--primary); }
.btn-subscribe {
  background: var(--secondary); color: white; border: none; border-radius: 28px;
  padding: 14px 28px; font-family: var(--font); font-weight: 700; font-size: 14px;
  cursor: pointer; white-space: nowrap; transition: all 0.3s;
}
.btn-subscribe:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(244,166,35,0.35); }

/* ========== SINGLE POST ========== */
.single-post-header {
  padding: 140px 0 48px;
  background: linear-gradient(165deg, var(--bg), var(--primary-light));
}
.single-post-header .article-tag { font-size: 13px; margin-bottom: 16px; }
.single-post-header h1 { font-size: 38px; font-weight: 800; line-height: 1.25; margin-bottom: 20px; max-width: 720px; }
.post-meta-bar { display: flex; gap: 24px; align-items: center; font-size: 14px; color: var(--gray); }
.post-meta-bar .author-name { font-weight: 700; color: var(--dark); }
.post-content {
  max-width: 720px; margin: 0 auto; padding: 48px 24px 72px;
  font-size: 17px; line-height: 1.85; color: #2a3a40;
}
.post-content h2 { font-size: 26px; font-weight: 800; margin: 40px 0 16px; color: var(--dark); }
.post-content h3 { font-size: 21px; font-weight: 700; margin: 32px 0 12px; color: var(--dark); }
.post-content p { margin-bottom: 20px; }
.post-content img { border-radius: var(--radius); margin: 32px 0; }
.post-content ul, .post-content ol { margin: 16px 0 20px 24px; }
.post-content li { margin-bottom: 8px; }
.post-content blockquote {
  border-left: 4px solid var(--primary); background: var(--primary-light);
  padding: 20px 24px; margin: 28px 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic; color: var(--primary-dark);
}

/* ========== SIDEBAR ========== */
.content-with-sidebar { display: grid; grid-template-columns: 1fr 320px; gap: 40px; }
.sidebar .widget {
  background: var(--white); border-radius: var(--radius); padding: 28px;
  margin-bottom: 24px; border: 1px solid #e8ece9;
}
.sidebar .widget h4 { font-size: 16px; font-weight: 700; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 2px solid var(--primary-light); }
.sidebar .widget a { display: block; font-size: 14px; padding: 8px 0; border-bottom: 1px solid var(--gray-light); }
.sidebar .widget a:last-child { border-bottom: none; }

/* ========== PAGINATION ========== */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 48px; }
.pagination a, .pagination span {
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%; font-size: 14px; font-weight: 700;
  border: 2px solid #e8ece9; transition: all 0.3s;
}
.pagination .current { background: var(--primary); color: white; border-color: var(--primary); }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }

/* ========== FOOTER ========== */
.site-footer { padding: 60px 0 36px; background: var(--dark); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 44px; margin-bottom: 44px; }
.footer-brand { display: flex; align-items: center; gap: 10; margin-bottom: 18px; }
.footer-brand .icon {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.footer-brand span { font-weight: 800; font-size: 20px; color: white; }
.footer-desc { font-size: 13px; color: rgba(255,255,255,0.45); line-height: 1.75; max-width: 280px; }
.footer-col h4 { font-size: 14px; font-weight: 700; color: white; margin-bottom: 18px; }
.footer-col a { display: block; font-size: 13px; color: rgba(255,255,255,0.45); margin-bottom: 11px; }
.footer-col a:hover { color: rgba(255,255,255,0.9); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1); padding-top: 26px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
}
.footer-bottom .copy { font-size: 12px; color: rgba(255,255,255,0.25); }
.footer-socials { display: flex; gap: 18px; }
.footer-socials a { font-size: 12px; color: rgba(255,255,255,0.35); }
.footer-socials a:hover { color: rgba(255,255,255,0.8); }

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .hero-inner { flex-direction: column; text-align: center; gap: 40px; }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .hero-buttons { justify-content: center; }
  .hero-circle { width: 280px; height: 280px; }
  .hero-circle .emoji-main { font-size: 90px; }
  .hero-float { font-size: 26px; }
  .main-nav a { display: none; }
  .mobile-toggle { display: block; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .articles-grid { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .age-grid { flex-wrap: wrap; }
  .age-card { min-width: 140px; }
  .content-with-sidebar { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .hero { padding: 120px 16px 60px; }
  .hero h1 { font-size: 34px; }
  .section-title { font-size: 26px; }
  .cat-grid, .tools-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
  .stats-inner { flex-direction: column; gap: 20px; }
  .single-post-header h1 { font-size: 28px; }
}
