/*
  NepalTechHub — GeneratePress Child FINAL CSS
  Consistent light background, unified cards, hero band, tables, forms,
  Compare/Rewards/Account polish, and accessible focus states.
*/

/* =============== TOKENS =============== */
:root{
  --bg: #f8fafc;          /* page background */
  --card: #ffffff;        /* card/surface */
  --ink: #0f172a;         /* main text */
  --muted: #64748b;       /* secondary text */
  --border: #e5e7eb;      /* border color */

  --brand: #1d4ed8;       /* primary blue */
  --brand-2: #2563eb;     /* hover/active */

  --radius: 12px;
  --gap: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --shadow-md: 0 4px 10px rgba(0,0,0,.08);

  /* Hero / heading band */
  --band-grad: linear-gradient(108deg, #e8efff, #dbeafe 55%, #eff6ff);
  --band-border: #e5e7eb;
  --band-shadow: 0 8px 24px rgba(37,99,235,.10);
}

/* =============== BASE =============== */
html,body{background:var(--bg); color:var(--ink);}
img{display:block;max-width:100%;height:auto;}
a{color:var(--brand);}
a:hover{color:var(--brand-2);}

button, .button, input[type=submit]{
  background:var(--brand); color:#fff; border:1px solid var(--brand);
  border-radius:var(--radius); padding:10px 14px; font-weight:700; cursor:pointer;
  box-shadow:var(--shadow-sm); transition:background .2s, transform .08s, box-shadow .2s;
}
button:hover,.button:hover,input[type=submit]:hover{background:var(--brand-2); transform:translateY(-1px); box-shadow:var(--shadow-md);}
button:disabled{opacity:.55; cursor:not-allowed; transform:none}

/* Accessible focus ring */
:where(a,button,input,select,textarea){outline:none;}
:where(a,button,input,select,textarea):focus-visible{
  box-shadow:0 0 0 3px rgba(29,78,216,.25);
  border-color:var(--brand);
}

/* GeneratePress containers – keep clean white content cards */
.inside-article,
.comments-area,
.comment-respond,
.paging-navigation,
.post-navigation{
  background:var(--card) !important;
  border:1px solid var(--border) !important;
  border-radius:var(--radius) !important;
  box-shadow:var(--shadow-sm) !important;
}

/* =============== HERO / HEADING BAND =============== */
.nth-hero,
.archive .page-header,
.blog .page-header,
.search .page-header{
  background:var(--band-grad) !important;
  border:1px solid var(--band-border) !important;
  border-radius:14px !important;
  box-shadow:var(--band-shadow) !important;
  padding:18px 20px !important;
  margin:10px auto 18px !important;
}
.nth-hero h1,
.archive .page-header h1,
.blog .page-header h1,
.search .page-header h1{
  margin:.1rem 0 .35rem; font-weight:800; font-size:22px; color:#0f172a;
}
.nth-hero p{margin:0;color:#334155}

/* =============== CARDS / CHIPS / UTILITIES =============== */
.nth-card{
  background:var(--card); border:1px solid var(--border); border-radius:var(--radius);
  padding:14px; box-shadow:var(--shadow-sm);
}
.nth-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px}
.badge, .chip{
  display:inline-block; padding:6px 10px; border:1px solid var(--border); border-radius:999px;
  background:#f1f5ff; color:#0f172a; font-weight:600; font-size:13px;
}
.btn-outline{
  background:#fff; color:var(--brand); border:1px solid var(--brand);
  border-radius:var(--radius); padding:10px 14px; font-weight:700; text-decoration:none;
}
.btn-outline:hover{background:var(--brand); color:#fff}

/* =============== FORMS (account / register / withdraw) =============== */
input[type=text], input[type=email], input[type=password], input[type=number],
select, textarea{
  width:100%; padding:10px 12px; border:1px solid #cbd5e1; border-radius:10px;
  background:#fff; color:var(--ink);
}
select{appearance:none;background-image:linear-gradient(45deg,transparent 50%,#94a3b8 50%),linear-gradient(135deg,#94a3b8 50%,transparent 50%);
background-position:calc(100% - 18px) calc(1em - 2px),calc(100% - 13px) calc(1em - 2px); background-size:5px 5px,5px 5px; background-repeat:no-repeat;}

/* inline help */
.muted{color:var(--muted);font-size:13px}

/* =============== TABLES (specs, compare, variants) =============== */
.nth-table, .specs-table, .variant-table, .nth-compare-table{
  width:100%; border-collapse:separate; border-spacing:0; border:1px solid var(--border);
  background:#fff; border-radius:12px; overflow:hidden;
}
.nth-table th, .nth-table td,
.specs-table th, .specs-table td,
.variant-table th, .variant-table td,
.nth-compare-table th, .nth-compare-table td{
  padding:10px 12px; border-bottom:1px solid #f0f0f0; vertical-align:top; font-size:14px; word-break:break-word;
}
.nth-table thead th,
.variant-table thead th,
.nth-compare-table thead th{background:#f8fafc;font-weight:700}
.nth-table tr:last-child td,
.specs-table tr:last-child td,
.variant-table tr:last-child td,
.nth-compare-table tr:last-child td{border-bottom:0}

/* Label column */
.nth-compare-table tr > *:first-child,
.specs-table th{background:#fafbff;font-weight:700;width:28%;min-width:120px;color:#334155}

/* =============== HOME cards grid (latest phones) =============== */
.phone-card{
  background:#fff; border:1px solid var(--border); border-radius:14px; box-shadow:var(--shadow-sm);
  overflow:hidden; transition:transform .08s, box-shadow .25s;
}
.phone-card:hover{transform:translateY(-2px); box-shadow:var(--shadow-md);}
.phone-card h3{font-size:16px;margin:10px 0 0}
.phone-card .price-pill{display:inline-block;margin-top:8px;padding:6px 10px;border:1px solid #c7ddff;border-radius:999px;background:#eef6ff;color:#0b4ad1;font-weight:700;font-size:12px}

/* =============== COMPARE PAGE POLISH =============== */
.page-template-page-compare-phones .nth-hero{padding:16px !important}
.page-template-page-compare-phones select{min-width:190px;height:40px}
.page-template-page-compare-phones #compare-btn{height:40px}

/* =============== REWARDS PAGE POLISH =============== */
.nth-rewards-wrap{max-width:1100px;margin:0 auto;padding:0 10px}
.nth-rewards-wrap .nth-card h3{margin:0 0 8px;font-weight:800;font-size:16px;color:var(--brand)}
.nth-rewards-wrap .progress{height:10px;background:#eef2ff;border-radius:999px;overflow:hidden}
.nth-rewards-wrap .progress > span{display:block;height:100%;background:var(--brand);width:0}
.nth-rewards-wrap .actions{display:flex;gap:10px;flex-wrap:wrap}
.withdraw-form .btn{min-width:160px}

/* shrink QR on mobile */
@media (max-width:480px){
  .nth-rewards-wrap img[alt="Referral QR"]{width:96px;height:96px}
}

/* =============== ACCOUNT / LOGIN / REGISTER =============== */
.nth-auth-card{max-width:480px;margin:0 auto;background:#fff;border:1px solid var(--border);border-radius:12px;box-shadow:var(--shadow-sm);padding:18px}
.nth-auth-card h2{text-align:center;margin:0 0 10px;font-size:20px;font-weight:800}

/* =============== SINGLE PHONE HERO & PRICE =============== */
.phone-hero{display:grid;grid-template-columns:120px 1fr;gap:14px;align-items:center;margin:14px 0 22px}
.phone-hero img{width:120px;height:120px;object-fit:cover;border-radius:16px;box-shadow:var(--shadow-sm)}
.phone-hero h1{font-size:22px;margin:0 0 6px}
.meta-badges .badge{margin:0 6px 6px 0}

.price-card{
  display:flex;flex-wrap:wrap;gap:12px;align-items:center;background:var(--ink);color:#fff;
  border-radius:16px;padding:14px 16px;margin:16px 0;
}
.price-card strong{font-size:18px}
.price-card .btn{background:#fff;color:var(--ink);border-color:#fff}

/* =============== ARCHIVES / REVIEW LISTS =============== */
.archive.category-reviews .inside-article,
.blog .inside-article{
  background:#fff;border:1px solid var(--border);border-radius:12px;box-shadow:var(--shadow-sm);padding:14px;
}
.archive.category-reviews .entry-title a,
.blog .entry-title a{color:var(--ink);text-decoration:none}

/* =============== FOOTER CLEANUP (optional) =============== */
/* If you use your own legal bar, keep these hidden: */
.site-info, .footer-bar, .copyright-bar {display:none !important;}

/* =============== DARK MODE (optional) =============== */
@media (prefers-color-scheme: dark){
  :root{
    --bg:#0b1220; --card:#0f172a; --ink:#e6edf7; --muted:#9ca3af; --border:#22304a;
    --band-grad: linear-gradient(108deg, #0d1b33, #0f2040 60%, #0d1930);
  }
  a{color:#7aa2ff}
  .inside-article, .nth-card{box-shadow:none}
  .nth-compare-table thead th,
  .variant-table thead th{background:#0f1a2b}
  .price-card{background:#0c1426}
}

/* =============== RESPONSIVE TWEAKS =============== */
@media (max-width:782px){
  .nth-hero{padding:14px !important}
  .nth-hero h1{font-size:20px !important}
  .phone-hero{grid-template-columns:96px 1fr}
  .phone-hero img{width:96px;height:96px}
}
/* Hide tag cloud/“Discover more” chips site-wide (or tweak to only front page) */
.home .widget_tag_cloud,
.home .tagcloud,
.home [aria-label="Tag Cloud"],
.home .gb-query-loop .tagcloud { display:none !important; }
#unlock-content,
.unlock-overlay,
.content-locker,
.adblock-popup {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}
/* ----------------------------------
 * CSS from Front-Page (Base)
 * (यो तपाईंको original code हो)
 * ---------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Noto+Sans+Devanagari:wght@400;700&display=swap');
:root{--bg:#f8fafc;--card:#fff;--muted:#64748b;--ink:#111827;--accent:#2563eb;--accent-2:#059669;--border:#e5e7eb;--radius:8px;}
body{background:var(--bg);color:var(--ink);font-family:'Inter',system-ui,-apple-system,Segoe UI,Roboto;}
:lang(ne), [lang="ne"]{font-family:'Noto Sans Devanagari',system-ui,sans-serif;}
#nth-home{max-width:1200px;margin:18px auto;padding:14px;}
.nth-hero{display:grid;grid-template-columns:1fr 300px;gap:20px;background:linear-gradient(135deg,#f0f9ff,#eaf6ff);padding:24px;border-radius:12px;border:1px solid var(--border);}
@media(max-width:880px){.nth-hero{grid-template-columns:1fr;padding:18px} .nth-hero aside{order:2}}
.nth-hero h1{margin:0;color:var(--accent);font-size:28px}
.nth-search{display:flex;gap:10px;margin-top:12px;flex-wrap:wrap}
.nth-search input[type="search"]{flex:1;padding:12px;border-radius:8px;border:1px solid var(--border);min-width:200px}
.nth-btn{padding:12px 16px;border-radius:8px;border:none;font-weight:600;cursor:pointer}
.nth-btn--yellow{background:linear-gradient(135deg,#fbbf24,#f59e0b);color:#0f172a}
.nth-btn--green{background:linear-gradient(135deg,#10b981,#047857);color:#fff}
.nth-why{background:var(--card);padding:12px;border-radius:8px;border:1px solid var(--border)}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:16px;margin-top:12px}
.card{background:var(--card);border:1px solid var(--border);border-radius:8px;overflow:hidden;transition:transform .18s,box-shadow .18s}
.card:hover{transform:translateY(-4px);box-shadow:0 10px 30px rgba(16,24,40,0.08)}
.card__img{height:200px;overflow:hidden;background:#fafcff}
.card__img img{width:100%;height:100%;object-fit:cover;display:block}
.card__content{padding:12px}
.card h3{margin:0 0 8px;font-size:16px}
.meta{display:flex;justify-content:space-between;color:var(--muted);font-size:13px}
.badge{display:inline-block;padding:6px 10px;border-radius:999px;background:#dbeafe;color:#1e40af;font-weight:700;margin-top:10px}
#nth-load-more{display:block;margin:22px auto;padding:12px 20px;border-radius:8px;background:var(--accent);color:#fff;border:none;cursor:pointer}

/* ----------------------------------
 * NEW CSS for Refactored Classes
 * (यो तपाईंले थप्नुपर्ने नयाँ code हो)
 * ---------------------------------- */
.nth-quick-actions__buttons {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}
.nth-quick-actions__brands {
    margin-top: 12px;
}
.nth-tag-list {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.nth-rewards-teaser {
    margin: 18px 0;
    padding: 16px;
    border-radius: 8px;
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    border: 1px solid #86efac;
    text-align: center;
}
.nth-progress-bar {
    margin-top: 10px;
    background: rgba(6, 95, 70, 0.12);
    height: 8px;
    border-radius: 6px;
    overflow: hidden;
}
.nth-progress-bar__inner {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
}
.nth-progress-label {
    margin-top: 8px;
}
.nth-btn--rewards {
    margin-top: 10px;
    background: #fff;
    color: #065f46;
    border: 1px solid #bbf7d0;
}
.nth-ad-container {
    text-align: center;
    margin: 18px 0;
}
.nth-section-spacing {
    margin-top: 18px;
}
.nth-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.nth-view-all-link {
    color: var(--muted);
}
.nth-grid-notice {
    grid-column: 1 / -1;
    text-align: center;
    padding: 28px;
    color: var(--muted);
}
/* --- UPDATED: Review Form & List CSS (For Professional Look) --- */

/* Review Form Stars (RTL for input) */
.comment-form-rating { margin-bottom: 15px; }
.comment-form-rating label { display: block; font-weight: 600; margin-bottom: 5px; color: var(--ink); }

.nth-review-stars {
    display: inline-block;
    font-size: 26px; /* थोरै ठूलो बनाइयो */
    direction: rtl; 
    line-height: 1;
}
.nth-review-stars input[type="radio"] { display: none; }
.nth-review-stars label {
    color: #ccc;
    cursor: pointer;
    transition: color 0.2s;
    margin: 0;
    padding: 0 1px;
}
.nth-review-stars input[type="radio"]:checked ~ label,
.nth-review-stars label:hover,
.nth-review-stars label:hover ~ label {
    color: #ffc107; 
}

/* Review List Styling (The Card Look) */
.commentlist {
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
}
/* प्रत्येक रिभ्युको लागि कार्ड डिजाइन */
.nth-review-item {
    background: var(--card); /* #fff */
    border: 1px solid var(--line); /* लाइट ग्रे किनारा */
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); /* हल्का छायाँ (Shadow) */
}
.nth-review-item .comment-body { position: relative; }
.nth-review-item .comment-meta {
    display: flex;
    align-items: center;
    gap: 15px; /* स्पेस थपियो */
    margin-bottom: 15px;
    border-bottom: 1px dashed var(--line); /* छुट्टै लाइन */
    padding-bottom: 10px;
}
.nth-review-item .comment-author img { 
    border-radius: 50%; 
    border: 2px solid var(--line);
    min-width: 40px; /* Avatar साइज */
    height: 40px;
}
.nth-review-item .comment-author b.fn { 
    font-size: 16px; 
    color: var(--ink); /* गाढा अक्षर */
    font-weight: 700;
}
.nth-review-item .comment-metadata { 
    font-size: 13px; 
    color: var(--muted); 
    margin-left: auto; /* मितिलाई दायाँ लैजान्छ */
}

/* Star Display (Card भित्र) */
.review-stars-display {
    color: #ffc107;
    font-size: 18px; /* थोरै ठूलो स्टार */
    margin-bottom: 10px;
}
.review-stars-display .star.is-empty { color: #ccc; }

/* Review Content */
.nth-review-item .comment-content {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
}
/* Reply Link */
.nth-review-item .reply a {
    display: inline-block;
    margin-top: 10px;
    font-size: 13px;
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}
/* HEADER */
.nth-header {
    background:#fff;
    border-bottom:1px solid #edf1f7;
    position: sticky;
    top:0;
    z-index:1000;
}

.nth-container {
    max-width:1250px;
    margin:auto;
    padding:14px 20px;
    display:flex;
    align-items:center;
    justify-content:space-between;
}

/* LOGO FIX */
.nth-logo {
    font-size:24px;
    font-weight:800;
    white-space:nowrap;   /* 🔥 Prevents logo breaking into 3 lines */
    color:#0f172a;
    text-decoration:none;
    margin-right:30px;
}

/* NAV MENU (Desktop) */
.nth-nav {
    flex-grow:1;
}

.nth-menu {
    display:flex;
    align-items:center;
    gap:26px;
}

/* MENU LINKS */
.nth-menu li {
    position:relative;
}

.nth-menu a {
    text-decoration:none;
    font-size:16px;
    color:#0f172a;
    font-weight:600;
}

/* 🔥 DROPDOWN FIX */
.nth-menu li ul.sub-menu {
    display:none;
    position:absolute;
    left:0;
    top:32px;
    background:#fff;
    padding:12px 0;
    border:1px solid #e5e7eb;
    border-radius:8px;
    min-width:160px;
    z-index:99;
}

.nth-menu li:hover > ul.sub-menu {
    display:block;
}

.nth-menu li ul.sub-menu li {
    display:block;
    padding:6px 16px;
    white-space:nowrap;
}

.nth-menu li ul.sub-menu a:hover {
    color:#2563eb;
}

/* RIGHT */
.nth-right {
    display:flex;
    align-items:center;
    gap:18px;
}

/* SEARCH */
.nth-search input {
    padding:8px 14px;
    border:1px solid #e2e8f0;
    border-radius:8px;
    width:200px;
}

/* BURGER (mobile only) */
.nth-burger {
    display:none;
    font-size:26px;
    background:none;
    border:none;
    cursor:pointer;
}

/* MOBILE */
@media (max-width:900px){

    .nth-nav,
    .nth-search {
        display:none;
    }

    .nth-burger {
        display:block;
    }

    .nth-mobile-menu {
        display:none;
        padding:20px;
        background:#fff;
        border-bottom:1px solid #edf1f7;
    }

    body.nth-open .nth-mobile-menu {
        display:block;
    }

    .nth-mobile-nav {
        display:flex;
        flex-direction:column;
        gap:12px;
    }

    .nth-mobile-search input {
        width:100%;
        padding:10px;
        border:1px solid #e2e8f0;
        border-radius:8px;
        margin-top:12px;
    }
}
/* =====================================================
   CLS + PageSpeed FINAL FIX — GeneratePress
   Tested for Mobile & Desktop
   ===================================================== */

/* ---------- 1️⃣ FONT CLS FIX ---------- */
/* REMOVE @import from CSS (important) */
/* Use font-display optional */
@font-face {
  font-display: optional;
}

/* ---------- 2️⃣ GLOBAL IMAGE SIZE RESERVE ---------- */
img {
  max-width: 100%;
  height: auto;
}

/* If width/height missing */
img:not([width]):not([height]) {
  aspect-ratio: 1 / 1;
}

/* Card images */
.card__img {
  aspect-ratio: 16 / 9;
  min-height: 200px;
  background: #f8fafc;
}

/* Phone hero image */
.phone-hero img {
  width: 120px;
  height: 120px;
  aspect-ratio: 1 / 1;
}

/* ---------- 3️⃣ HERO / ABOVE THE FOLD FIX ---------- */
.nth-hero {
  min-height: 260px; /* reserves space */
}

/* Mobile */
@media (max-width: 880px) {
  .nth-hero {
    min-height: 220px;
  }
}

/* ---------- 4️⃣ HEADER (STICKY) CLS FIX ---------- */
.nth-header {
  min-height: 64px; /* prevents font shift */
}

/* Logo text no jump */
.nth-logo {
  line-height: 1;
}

/* ---------- 5️⃣ GOOGLE ADS CLS FIX (MOST IMPORTANT) ---------- */
.nth-ad-container,
.adsbygoogle {
  display: block;
  min-height: 250px;
  width: 100%;
  overflow: hidden;
}

/* Mobile ads */
@media (max-width: 768px) {
  .nth-ad-container,
  .adsbygoogle {
    min-height: 280px;
  }
}

/* ---------- 6️⃣ QUICK LINKS / ASIDE FIX ---------- */
aside {
  min-height: 180px;
}

/* ---------- 7️⃣ AVOID LAZY LOAD ON LOGO ---------- */
.custom-logo {
  width: 90px;
  height: 90px;
}

/* ---------- 8️⃣ TRANSFORM SAFETY ---------- */
/* Prevent hover animations causing CLS */
.card,
.phone-card {
  will-change: transform;
}

/* ---------- 9️⃣ GENERATEPRESS CONTAINER STABILITY ---------- */
.site-content,
.inside-article {
  contain: layout paint;
}