/*
Theme Name: Tính Ngày Rụng Trứng
Theme URI: https://tinhngayrungtrung.online
Description: Theme chuyên dụng cho tinhngayrungtrung.online — tối ưu SEO, mobile-first, thiết kế thân thiện phụ nữ.
Version: 1.1.0
Author: tinhngayrungtrung.online
Text Domain: tnrt
Requires at least: 5.8
Requires PHP: 7.4
*/

/* ===== RESET ===== */
:root{
  --rose-50:#fff1f2;--rose-100:#ffe4e6;--rose-200:#fecdd3;--rose-300:#fda4af;
  --rose-400:#fb7185;--rose-500:#f43f5e;--rose-600:#e11d48;
  --lav:#e9d5ff;--lav-light:#faf5ff;--mint:#a7f3d0;--mint-dark:#059669;
  --bg:#fffbf7;--white:#fff;
  --text:#4a3041;--text-sec:#7c6873;--text-light:#a8929e;
  --r:20px;--rs:12px;
  --shadow:0 4px 30px rgba(244,63,94,.1);--shadow-btn:0 4px 15px rgba(244,63,94,.3);
}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{font-family:'Quicksand',-apple-system,sans-serif;background:var(--bg);color:var(--text);line-height:1.7;font-size:16px;-webkit-font-smoothing:antialiased}
a{color:var(--rose-500);text-decoration:none;transition:color .2s}a:hover{color:var(--rose-600)}
img{max-width:100%;height:auto;display:block}
h1,h2,h3,h4{font-family:'Playfair Display',Georgia,serif;line-height:1.3;color:var(--text)}
h1{font-size:clamp(24px,5vw,32px);margin-bottom:16px}
h2{font-size:clamp(20px,4vw,26px);margin:32px 0 14px}
h3{font-size:clamp(17px,3.5vw,21px);margin:24px 0 10px}
p{margin-bottom:16px}
table{width:100%;border-collapse:collapse;margin:20px 0;font-size:14px}
th,td{padding:10px 12px;border:1px solid var(--rose-100);text-align:left}
th{background:var(--rose-50);font-weight:700;font-size:13px}
tr:nth-child(even){background:rgba(255,241,242,.3)}
strong{color:var(--text)}
ul,ol{margin:0 0 16px 24px}li{margin-bottom:6px}
blockquote{border-left:4px solid var(--rose-300);padding:12px 20px;margin:20px 0;background:var(--rose-50);border-radius:0 var(--rs) var(--rs) 0}

/* ===== LAYOUT ===== */
.site-wrapper{min-height:100vh;display:flex;flex-direction:column}
.site-content{flex:1}
.container{max-width:720px;margin:0 auto;padding:0 20px}
.container--narrow{max-width:520px}
.container--wide{max-width:960px}

/* ===== HEADER ===== */
.site-header{background:rgba(255,255,255,.97);border-bottom:1px solid var(--rose-100);position:sticky;top:0;z-index:100;backdrop-filter:blur(12px)}
.header-inner{max-width:1100px;margin:0 auto;padding:12px 24px;display:flex;align-items:center;justify-content:space-between}
.site-logo{display:flex;align-items:center;gap:10px;text-decoration:none}
.site-logo-icon{width:36px;height:36px;border-radius:10px;background:linear-gradient(135deg,var(--rose-400),var(--rose-500));display:flex;align-items:center;justify-content:center;box-shadow:var(--shadow-btn)}
.site-logo-icon svg{width:20px;height:20px}
.site-logo-text{font-family:'Playfair Display',serif;font-size:16px;font-weight:600;color:var(--text)}
.site-logo-text em{color:var(--rose-500);font-style:italic}

/* Nav */
.nav-main{display:flex;gap:4px;align-items:center}
.nav-main a{
  font-size:13px;font-weight:600;color:var(--text-sec);
  padding:8px 14px;border-radius:8px;transition:all .2s;letter-spacing:.2px;
}
.nav-main a:hover{background:var(--rose-50);color:var(--rose-500)}
.nav-main a.current{background:var(--rose-50);color:var(--rose-500);font-weight:700}
.nav-toggle{display:none;background:none;border:none;font-size:24px;cursor:pointer;color:var(--text);padding:8px}

@media(max-width:860px){
  .nav-main{
    display:none;position:fixed;top:62px;left:0;right:0;
    background:var(--white);flex-direction:column;padding:16px 24px;gap:4px;
    border-bottom:2px solid var(--rose-100);box-shadow:var(--shadow);
  }
  .nav-main.open{display:flex}
  .nav-main a{font-size:15px;padding:12px 16px;border-radius:10px;width:100%}
  .nav-toggle{display:block}
}

/* ===== HERO ===== */
.hero{text-align:center;padding:48px 0 32px;position:relative}
.hero-icon{width:64px;height:64px;margin:0 auto 20px;background:linear-gradient(135deg,var(--rose-400),var(--rose-500));border-radius:18px;display:flex;align-items:center;justify-content:center;box-shadow:var(--shadow-btn);animation:breathe 3s ease-in-out infinite}
@keyframes breathe{0%,100%{transform:scale(1)}50%{transform:scale(1.06)}}
.hero-icon svg{width:34px;height:34px}
.hero h1 span{color:var(--rose-500);font-style:italic}
.hero-sub{font-size:15px;color:var(--text-sec);font-weight:500;margin:0}

/* ===== CARD ===== */
.card{background:var(--white);border-radius:var(--r);padding:28px 24px;box-shadow:var(--shadow);margin-bottom:20px;border:1px solid rgba(254,205,211,.3);position:relative;overflow:hidden}
.card::before{content:'';position:absolute;top:0;left:0;right:0;height:3px;background:linear-gradient(90deg,var(--rose-300),var(--rose-400),var(--lav))}

/* ===== BLOG GRID ===== */
.blog-grid{display:grid;grid-template-columns:1fr;gap:20px;margin:30px 0}
@media(min-width:640px){.blog-grid{grid-template-columns:1fr 1fr}}
.blog-card{background:var(--white);border-radius:var(--r);overflow:hidden;border:1px solid var(--rose-100);transition:all .3s;display:flex;flex-direction:column}
.blog-card:hover{transform:translateY(-3px);box-shadow:var(--shadow);border-color:var(--rose-300)}
.blog-card-thumb{width:100%;height:180px;object-fit:cover;background:var(--rose-50)}
.blog-card-body{padding:20px;flex:1;display:flex;flex-direction:column}
.blog-card-cat{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:1px;color:var(--rose-500);margin-bottom:8px}
.blog-card-title{font-family:'Playfair Display',serif;font-size:17px;font-weight:600;margin-bottom:8px;line-height:1.4}
.blog-card-title a{color:var(--text)}.blog-card-title a:hover{color:var(--rose-500)}
.blog-card-excerpt{font-size:13px;color:var(--text-sec);line-height:1.6;flex:1}
.blog-card-meta{font-size:11px;color:var(--text-light);margin-top:12px;padding-top:12px;border-top:1px solid var(--rose-50)}

/* ===== SINGLE ===== */
.single-header{padding:40px 0 24px;text-align:center}
.single-header .cat-badge{display:inline-block;padding:4px 14px;border-radius:20px;background:var(--rose-50);color:var(--rose-500);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:1px;margin-bottom:12px}
.single-header h1{max-width:640px;margin:0 auto 12px}
.single-header .meta{font-size:13px;color:var(--text-light)}
.single-content{padding-bottom:40px}
.single-content h2{padding-top:8px;border-bottom:2px solid var(--rose-100);padding-bottom:10px}

/* ===== SIDEBAR ===== */
.layout-with-sidebar{display:grid;grid-template-columns:1fr;gap:30px;max-width:960px;margin:0 auto;padding:0 20px}
@media(min-width:768px){.layout-with-sidebar{grid-template-columns:1fr 300px}}
.sidebar .widget{background:var(--white);border-radius:var(--r);padding:20px;margin-bottom:20px;border:1px solid var(--rose-100)}
.sidebar .widget-title{font-size:14px;font-weight:700;margin-bottom:14px;padding-bottom:8px;border-bottom:2px solid var(--rose-100)}

/* ===== FOOTER ===== */
.site-footer{background:#2d1f28;color:#c9b8c2;padding:0;margin-top:40px}
.footer-inner{max-width:1100px;margin:0 auto;padding:40px 24px 0}

.footer-disclaimer{
  background:rgba(255,255,255,.06);border-radius:var(--rs);padding:16px 20px;
  font-size:12px;line-height:1.7;margin-bottom:32px;border:1px solid rgba(255,255,255,.08);
}
.footer-disclaimer strong{color:#e8d5de}

.footer-grid{display:grid;grid-template-columns:1fr;gap:32px;margin-bottom:32px}
@media(min-width:640px){.footer-grid{grid-template-columns:1.5fr 1fr 1fr 1fr}}

.footer-brand{display:flex;align-items:center;margin-bottom:12px}
.footer-col h4{
  font-family:'Quicksand',sans-serif;font-size:13px;font-weight:700;
  text-transform:uppercase;letter-spacing:1.5px;color:#e8d5de;margin-bottom:16px;
}
.footer-col p{font-size:13px;line-height:1.6;margin-bottom:10px}
.footer-col ul{list-style:none;padding:0;margin:0}
.footer-col li{margin-bottom:10px}
.footer-col a{font-size:13px;color:#c9b8c2;transition:color .2s}
.footer-col a:hover{color:var(--rose-400)}

.footer-bottom{
  border-top:1px solid rgba(255,255,255,.08);padding:20px 0;
  text-align:center;font-size:12px;color:#8a7580;
}
.footer-bottom-inner{display:flex;justify-content:center;align-items:center;gap:6px;flex-wrap:wrap}
.footer-sep{opacity:.4}

/* ===== BREADCRUMB ===== */
.breadcrumb{font-size:12px;color:var(--text-light);padding:12px 0;margin-bottom:8px}
.breadcrumb a{color:var(--text-sec)}.breadcrumb span{margin:0 6px}

/* ===== PAGINATION ===== */
.pagination{display:flex;justify-content:center;gap:8px;margin:30px 0}
.pagination a,.pagination span{display:inline-flex;align-items:center;justify-content:center;min-width:36px;height:36px;padding:0 10px;border-radius:8px;font-size:13px;font-weight:600;border:1.5px solid var(--rose-100);color:var(--text-sec)}
.pagination a:hover{border-color:var(--rose-400);color:var(--rose-500)}
.pagination .current{background:var(--rose-500);color:var(--white);border-color:var(--rose-500)}

/* ===== SCROLL TOP ===== */
.scroll-top{position:fixed;bottom:24px;right:20px;width:44px;height:44px;border-radius:50%;background:var(--rose-500);color:var(--white);border:none;font-size:18px;cursor:pointer;box-shadow:var(--shadow-btn);display:none;align-items:center;justify-content:center;z-index:99;transition:.3s}
.scroll-top.show{display:flex}

/* ===== UTILS ===== */
.text-center{text-align:center}
