/*
Theme Name: Dao HH3D
Theme URI: https://daohh3d.com
Author: Dao HH3D
Author URI: https://daohh3d.com
Description: Theme tin tuc va review hoat hinh 3D (donghua) cho daohh3d.com. Cau truc chuan voi header/footer/sidebar/template-parts tach ro, layout page/post/category day du, responsive tot.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kira-daohh3d-com
Tags: blog, news, entertainment, dark, two-columns, right-sidebar, custom-logo, featured-images, threaded-comments, translation-ready
*/

/* ==========================================================================
   1. Bien & nen tang
   ========================================================================== */
:root {
  --bg: #0e1017;
  --bg-soft: #151824;
  --bg-card: #1a1e2d;
  --bg-elev: #212639;
  --line: #2a3047;
  --ink: #eef0f6;
  --ink-2: #b7bccc;
  --ink-3: #838aa0;
  --accent: #ff7a18;
  --accent-2: #e6323c;
  --grad: linear-gradient(135deg, #ff7a18 0%, #e6323c 100%);
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --container: 1200px;
  --content: 760px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink-2);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  word-break: break-word;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color .2s ease; }
a:hover { color: #ffa25c; }

h1, h2, h3, h4, h5, h6 { color: var(--ink); line-height: 1.3; font-weight: 700; }

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

.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden;
  padding: 0; position: absolute;
}

.btn, .more-link {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--grad); color: #fff !important;
  padding: 12px 26px; border-radius: 999px; font-weight: 600; font-size: 15px;
  border: 0; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease;
}
.btn:hover, .more-link:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(230, 50, 60, .35); }
.btn--ghost { background: transparent; border: 1px solid var(--line); color: var(--ink) !important; }
.btn--ghost:hover { border-color: var(--accent); box-shadow: none; }

/* ==========================================================================
   2. Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 16, 23, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; gap: 28px; min-height: 72px; }
.site-branding { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.site-branding img.custom-logo, .site-branding img.site-logo-img { height: 46px; width: auto; }
.site-branding .site-title { font-size: 20px; font-weight: 800; color: var(--ink); }

.main-nav { display: flex; align-items: center; margin-left: auto; }
.main-nav ul { list-style: none; display: flex; gap: 4px; }
.main-nav li { position: relative; }
.main-nav a {
  display: block; padding: 10px 14px; color: var(--ink-2);
  font-weight: 600; font-size: 15px; border-radius: 8px;
}
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current_page_item > a { color: var(--ink); background: var(--bg-elev); }
.main-nav ul ul {
  position: absolute; top: 100%; left: 0; min-width: 220px;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px; display: none; flex-direction: column; box-shadow: var(--shadow);
}
.main-nav li:hover > ul, .main-nav li:focus-within > ul { display: flex; }

.header-search { margin-left: 12px; }
.header-search form { display: flex; }
.header-search input[type="search"] {
  background: var(--bg-elev); border: 1px solid var(--line); color: var(--ink);
  border-radius: 999px 0 0 999px; padding: 9px 16px; width: 180px; font-size: 14px; outline: none;
}
.header-search input[type="search"]:focus { border-color: var(--accent); }
.header-search button {
  background: var(--grad); border: 0; color: #fff; padding: 0 16px;
  border-radius: 0 999px 999px 0; cursor: pointer; font-size: 15px;
}

.nav-toggle {
  display: none; margin-left: auto; background: none; border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 12px; color: var(--ink); font-size: 20px; cursor: pointer;
}

/* ==========================================================================
   3. Hero / slider trang chu
   ========================================================================== */
.hero { position: relative; overflow: hidden; }
.hero__slide {
  position: relative; min-height: 480px; display: none;
  background-size: cover; background-position: center;
}
.hero__slide.is-active { display: flex; align-items: center; }
.hero__slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(10, 12, 18, .92) 0%, rgba(10, 12, 18, .55) 55%, rgba(10, 12, 18, .25) 100%);
}
.hero__content { position: relative; z-index: 2; max-width: 640px; padding: 70px 0; }
.hero__badge {
  display: inline-block; background: var(--grad); color: #fff; font-size: 13px;
  font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
.hero__title { font-size: 44px; margin-bottom: 16px; }
.hero__desc { font-size: 17px; margin-bottom: 28px; color: var(--ink-2); }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__dots { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; gap: 10px; }
.hero__dots button {
  width: 10px; height: 10px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .35); transition: all .2s;
}
.hero__dots button.is-active { background: var(--accent); width: 26px; border-radius: 999px; }

/* ==========================================================================
   4. Section & grid bai viet
   ========================================================================== */
.section { padding: 56px 0; }
.section--alt { background: var(--bg-soft); }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.section__title { font-size: 28px; position: relative; padding-left: 16px; }
.section__title::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 5px; border-radius: 4px; background: var(--grad); }
.section__link { font-weight: 600; font-size: 15px; white-space: nowrap; }

.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.post-grid--2 { grid-template-columns: repeat(2, 1fr); }
.post-grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: transform .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); border-color: #3a4160; }
.card__thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card__thumb img { transform: scale(1.06); }
.card__cat {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: var(--grad); color: #fff; font-size: 12px; font-weight: 700;
  padding: 4px 12px; border-radius: 999px;
}
.card__body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__title { font-size: 17px; line-height: 1.45; }
.card__title a { color: var(--ink); }
.card__title a:hover { color: var(--accent); }
.card__excerpt { font-size: 14px; color: var(--ink-3); }
.card__meta { margin-top: auto; display: flex; gap: 14px; font-size: 13px; color: var(--ink-3); }

/* danh muc noi bat */
.cat-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cat-tile {
  position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3;
  display: flex; align-items: flex-end; background-size: cover; background-position: center;
}
.cat-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(8, 10, 16, .88) 0%, rgba(8, 10, 16, .1) 60%); }
.cat-tile__label { position: relative; z-index: 2; padding: 18px; color: #fff; font-weight: 700; font-size: 17px; }
.cat-tile__count { display: block; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.cat-tile:hover::after { background: linear-gradient(0deg, rgba(230, 50, 60, .55) 0%, rgba(8, 10, 16, .15) 70%); }

/* CTA */
.cta-band { background: var(--grad); border-radius: var(--radius); padding: 44px 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; font-size: 26px; }
.cta-band p { color: rgba(255, 255, 255, .85); }
.cta-band .btn { background: #12141d; }

/* ==========================================================================
   5. Layout 2 cot & sidebar
   ========================================================================== */
.site-main { padding: 48px 0 64px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 40px; }
.layout--full { grid-template-columns: minmax(0, 1fr); }

.widget { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 26px; }
.widget__title { font-size: 17px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.widget ul { list-style: none; }
.widget ul li { padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.widget ul li:last-child { border-bottom: 0; }
.widget ul li a { color: var(--ink-2); }
.widget ul li a:hover { color: var(--accent); }
.widget .post-count { color: var(--ink-3); font-size: 13px; }
.widget-mini { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.widget-mini:last-child { border-bottom: 0; }
.widget-mini img { width: 84px; height: 60px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.widget-mini__title { font-size: 14px; line-height: 1.45; }
.widget-mini__title a { color: var(--ink-2); }
.widget-mini__date { font-size: 12px; color: var(--ink-3); }
.widget form.search-form { display: flex; }
.widget input[type="search"] {
  flex: 1; background: var(--bg-elev); border: 1px solid var(--line); color: var(--ink);
  border-radius: 8px 0 0 8px; padding: 10px 14px; font-size: 14px; outline: none; min-width: 0;
}
.widget button[type="submit"] { background: var(--grad); border: 0; color: #fff; padding: 0 16px; border-radius: 0 8px 8px 0; cursor: pointer; }

/* ==========================================================================
   6. Breadcrumb, page header, noi dung
   ========================================================================== */
.breadcrumb { font-size: 13px; color: var(--ink-3); margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.breadcrumb a { color: var(--ink-3); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { opacity: .5; }

.page-hero { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 44px 0; }
.page-hero__title { font-size: 34px; margin-bottom: 8px; }
.page-hero__desc { color: var(--ink-3); max-width: 720px; }

.entry { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.entry__thumb img { width: 100%; max-height: 460px; object-fit: cover; }
.entry__inner { padding: 34px 38px 42px; }
.entry__header { margin-bottom: 22px; }
.entry__title { font-size: 32px; margin-bottom: 14px; }
.entry__meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; color: var(--ink-3); }
.entry__meta a { color: var(--accent); font-weight: 600; }

.entry-content { max-width: var(--content); font-size: 16.5px; }
.entry-content > * + * { margin-top: 1.2em; }
.entry-content h2 { font-size: 25px; margin-top: 1.6em; padding-left: 14px; border-left: 4px solid var(--accent); }
.entry-content h3 { font-size: 20px; margin-top: 1.4em; }
.entry-content p { color: var(--ink-2); }
.entry-content ul, .entry-content ol { padding-left: 24px; }
.entry-content li { margin: .4em 0; }
.entry-content blockquote {
  border-left: 4px solid var(--accent); background: var(--bg-elev);
  padding: 18px 22px; border-radius: 0 10px 10px 0; font-style: italic;
}
.entry-content img { border-radius: 10px; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 15px; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }
.entry-content th { background: var(--bg-elev); color: var(--ink); }

.entry__tags { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 10px; }
.entry__tags a { background: var(--bg-elev); border: 1px solid var(--line); color: var(--ink-2); font-size: 13px; padding: 6px 14px; border-radius: 999px; }
.entry__tags a:hover { border-color: var(--accent); color: var(--accent); }

/* related posts */
.related { margin-top: 44px; }
.related__title { font-size: 22px; margin-bottom: 20px; }

/* pagination */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 44px; flex-wrap: wrap; }
.pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; height: 42px; padding: 0 14px; border-radius: 10px;
  background: var(--bg-card); border: 1px solid var(--line); color: var(--ink-2); font-weight: 600;
}
.pagination .page-numbers.current { background: var(--grad); color: #fff; border-color: transparent; }
.pagination .page-numbers:hover:not(.current) { border-color: var(--accent); color: var(--accent); }

/* post navigation */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 36px; }
.post-nav a { background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; color: var(--ink-2); font-size: 14px; }
.post-nav a:hover { border-color: var(--accent); }
.post-nav .nav-label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin-bottom: 6px; }
.post-nav .nav-next { text-align: right; }

/* comments */
.comments-area { margin-top: 44px; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 34px; }
.comments-area .comment-list { list-style: none; }
.comments-area .comment { padding: 18px 0; border-bottom: 1px dashed var(--line); }
.comments-area input, .comments-area textarea {
  width: 100%; background: var(--bg-elev); border: 1px solid var(--line); color: var(--ink);
  border-radius: 10px; padding: 12px 14px; font-size: 15px; outline: none; font-family: inherit;
}
.comments-area input:focus, .comments-area textarea:focus { border-color: var(--accent); }
.comments-area .form-submit input[type="submit"] { width: auto; background: var(--grad); border: 0; color: #fff; font-weight: 700; padding: 12px 30px; border-radius: 999px; cursor: pointer; }

/* archive header */
.archive-head { margin-bottom: 30px; }
.archive-head__banner { border-radius: var(--radius); overflow: hidden; margin-bottom: 22px; max-height: 280px; }
.archive-head__banner img { width: 100%; height: 280px; object-fit: cover; }
.archive-head__title { font-size: 30px; margin-bottom: 8px; }
.archive-head__title span { color: var(--accent); }
.archive-head__desc { color: var(--ink-3); max-width: 720px; }

/* 404 & khong co ket qua */
.big-404 { text-align: center; padding: 60px 20px; }
.big-404 h1 { font-size: 110px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.big-404 p { margin: 18px auto 30px; max-width: 480px; }

/* ==========================================================================
   7. Footer
   ========================================================================== */
.site-footer { background: #0a0c12; border-top: 1px solid var(--line); margin-top: 0; }
.site-footer__main { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 40px; padding: 54px 0 40px; }
.site-footer h4 { color: var(--ink); font-size: 16px; margin-bottom: 18px; }
.site-footer ul { list-style: none; }
.site-footer ul li { margin-bottom: 10px; font-size: 14px; }
.site-footer ul li a { color: var(--ink-3); }
.site-footer ul li a:hover { color: var(--accent); }
.site-footer p { font-size: 14px; color: var(--ink-3); }
.site-footer__logo img { height: 52px; width: auto; margin-bottom: 16px; }
.site-footer__bottom { border-top: 1px solid var(--line); padding: 20px 0; text-align: center; font-size: 14px; color: var(--ink-3); }

/* ==========================================================================
   8. Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .post-grid, .post-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .cat-tiles { grid-template-columns: repeat(2, 1fr); }
  .layout { grid-template-columns: 1fr; }
  .site-footer__main { grid-template-columns: 1fr 1fr; }
  .hero__title { font-size: 36px; }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg-soft); border-bottom: 1px solid var(--line);
    padding: 14px 20px 20px; margin: 0;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav ul ul { position: static; display: flex; border: 0; box-shadow: none; padding-left: 18px; background: transparent; }
  .header-search { display: none; }
  .hero__slide { min-height: 420px; }
  .hero__title { font-size: 28px; }
  .hero__content { padding: 48px 0; }
  .section { padding: 40px 0; }
  .section__title { font-size: 23px; }
  .entry__inner { padding: 24px 20px 32px; }
  .entry__title { font-size: 25px; }
  .post-nav { grid-template-columns: 1fr; }
  .cta-band { padding: 32px 24px; }
}

@media (max-width: 560px) {
  .post-grid, .post-grid--2, .post-grid--4 { grid-template-columns: 1fr; }
  .cat-tiles { grid-template-columns: 1fr 1fr; gap: 12px; }
  .site-footer__main { grid-template-columns: 1fr; gap: 28px; }
  .hero__title { font-size: 24px; }
  .page-hero__title { font-size: 26px; }
}
