/*
Theme Name: Hindu Temple Guide
Theme URI: https://hindutempleguide.com
Author: Hindu Temple Guide
Description: A fast, SEO-optimized, AdSense-ready theme for Hindu Temple Guide. Built template-first (no page-builder overhead) to fix Core Web Vitals, remove inline styles, and pass Google AdSense review requirements.
Version: 2.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: htg
Tags: blog, news, one-column, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ==========================================================================
   0. CSS Variables (single source of truth - change once, updates everywhere)
   ========================================================================== */
:root{
  --htg-orange:#E8650A;
  --htg-orange-dark:#C24E02;
  --htg-black:#191512;
  --htg-ink:#1f1a17;
  --htg-gray-700:#4b4540;
  --htg-gray-500:#7a736c;
  --htg-gray-200:#e9e4de;
  --htg-gray-100:#f6f3ef;
  --htg-cream:#fdf6ef;
  --htg-white:#ffffff;
  --htg-fb:#1877F2;
  --htg-ig-1:#8a3ab9;
  --htg-ig-2:#e0355a;
  --htg-yt:#FF0000;
  --htg-radius:10px;
  --htg-shadow:0 2px 14px rgba(25,21,18,.08);
  --htg-shadow-lg:0 8px 30px rgba(25,21,18,.16);
  --htg-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --htg-serif: Georgia, "Times New Roman", "Noto Serif", serif;
  --htg-container: 1180px;
}

/* ==========================================================================
   1. Reset & base
   ========================================================================== */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{margin:0;font-family:var(--htg-font);color:var(--htg-ink);background:var(--htg-cream);line-height:1.65;font-size:16px;}
img{max-width:100%;height:auto;display:block}
a{color:inherit;text-decoration:none}
ul{list-style:none;margin:0;padding:0}
h1,h2,h3,h4{line-height:1.25;margin:0 0 .5em;font-weight:700}
p{margin:0 0 1em}
button,input,textarea,select{font-family:inherit;font-size:inherit}
.htg-container{max-width:var(--htg-container);margin:0 auto;padding:0 20px}
.screen-reader-text{position:absolute!important;clip:rect(1px,1px,1px,1px);width:1px;height:1px;overflow:hidden}
.skip-link{position:absolute;left:-9999px;top:0;background:var(--htg-orange);color:#fff;padding:10px 16px;z-index:9999}
.skip-link:focus{left:10px;top:10px}

/* ==========================================================================
   2. Top utility bar
   ========================================================================== */
.htg-topbar{background:var(--htg-black);color:#e8b774;font-size:13px}
.htg-topbar .htg-container{display:flex;align-items:center;justify-content:space-between;height:40px}
.htg-topbar a{color:#e6c896;font-weight:600;letter-spacing:.04em;font-size:12px;text-transform:uppercase}
.htg-topbar a:hover{color:var(--htg-orange)}
.htg-topbar-links{display:flex;gap:22px}
.htg-topbar-greeting{white-space:nowrap;display:flex;align-items:center;gap:6px}

/* ==========================================================================
   3. Header / nav
   ========================================================================== */
.htg-header{border-bottom:3px solid var(--htg-orange);background:var(--htg-white)}
.htg-header-row{display:flex;align-items:center;justify-content:space-between;padding:16px 0;gap:20px;position:relative}
.htg-logo{display:flex;align-items:center;gap:14px;color:var(--htg-ink)}
.htg-logo img.htg-logo-img{height:52px;width:52px;border-radius:50%;object-fit:cover;flex:none;border:2px solid var(--htg-gray-200)}
.htg-logo-mark{width:52px;height:52px;border-radius:50%;background:var(--htg-orange);display:flex;align-items:center;justify-content:center;color:#fff;font-size:22px;flex:none}
.htg-logo-word{font-family:var(--htg-serif);font-size:26px;font-weight:700;letter-spacing:.01em;line-height:1.15}
.htg-logo-word .accent{color:var(--htg-orange)}
.htg-logo-sub{display:block;font-size:11.5px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--htg-gray-500);margin-top:3px}
.htg-header-search{display:none;position:absolute;right:20px;top:100%;margin-top:10px;background:var(--htg-white);border:1px solid var(--htg-gray-200);border-radius:8px;box-shadow:var(--htg-shadow-lg);padding:10px;z-index:60;width:min(320px,calc(100vw - 40px))}
.htg-header-search.is-open{display:block}
.htg-search-form{display:flex;border:1px solid var(--htg-gray-200);border-radius:24px;overflow:hidden}
.htg-search-form input{flex:1;border:0;padding:9px 16px;outline:none;background:var(--htg-gray-100);min-width:0}
.htg-search-form button{border:0;background:var(--htg-gray-100);padding:0 16px;cursor:pointer;color:var(--htg-gray-500)}
.htg-search-toggle{background:var(--htg-gray-100);border:1px solid var(--htg-gray-200);border-radius:50%;width:42px;height:42px;display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--htg-orange);flex:none;position:relative}

.htg-nav{background:var(--htg-white);border-top:1px solid var(--htg-gray-100)}
.htg-nav ul.menu{display:flex;flex-wrap:wrap;align-items:center;gap:2px;padding:10px 0}
.htg-nav .menu > li{position:relative}
.htg-nav .menu > li > a{display:flex;align-items:center;gap:7px;padding:9px 16px;color:var(--htg-ink);font-weight:700;font-size:13.5px;letter-spacing:.03em;text-transform:uppercase;border-radius:6px}
.htg-nav .menu > li.menu-item-has-children > a::after{content:"▾";font-size:10px;margin-left:2px;font-weight:400;color:var(--htg-gray-500)}
.htg-nav .menu > li:hover > a{background:var(--htg-gray-100);color:var(--htg-orange)}
.htg-nav .menu > li.current-menu-item > a,
.htg-nav .menu > li.htg-home-item > a{background:var(--htg-orange);color:#fff}
.htg-nav .menu > li.current-menu-item > a::after,
.htg-nav .menu > li.htg-home-item > a::after{color:#ffe3cf}
.htg-nav .sub-menu{display:none;position:absolute;left:0;top:100%;background:var(--htg-white);min-width:230px;box-shadow:var(--htg-shadow-lg);border-radius:0 0 var(--htg-radius) var(--htg-radius);z-index:50;padding:8px 0;border-top:2px solid var(--htg-orange)}
.htg-nav li:hover > .sub-menu{display:block}
.htg-nav .sub-menu a{display:block;color:var(--htg-ink);padding:9px 18px;font-weight:600;font-size:13.5px;text-transform:none;letter-spacing:0}
.htg-nav .sub-menu a:hover{background:var(--htg-gray-100);color:var(--htg-orange)}
.htg-mobile-toggle{display:none;background:none;border:0;color:var(--htg-ink);padding:12px 18px;font-size:22px;cursor:pointer}

/* ==========================================================================
   4. Hero / featured
   ========================================================================== */
.htg-hero{position:relative;overflow:hidden;background:linear-gradient(135deg,#8a5a2e,#3d2814);min-height:420px;margin-top:18px;border-radius:var(--htg-radius)}
.htg-hero-media{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.htg-hero-scrim{position:absolute;inset:0;background:linear-gradient(0deg,rgba(10,8,6,.92) 0%,rgba(10,8,6,.55) 45%,rgba(10,8,6,.15) 100%)}
.htg-hero-content{position:relative;padding:40px 20px;max-width:var(--htg-container);margin:0 auto;color:#fff}
.htg-eyebrow{display:inline-block;background:var(--htg-orange);color:#fff;font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;padding:5px 12px;border-radius:4px;margin-bottom:16px}
.htg-hero-title{font-family:var(--htg-serif);font-size:clamp(26px,4vw,42px);margin-bottom:16px;max-width:820px}
.htg-hero-title a{color:#fff}
.htg-hero-excerpt{color:#e6e1db;max-width:680px;font-size:15.5px}
.htg-meta{font-size:13px;color:var(--htg-gray-500);display:flex;gap:16px;flex-wrap:wrap;align-items:center}
.htg-meta span{display:inline-flex;align-items:center;gap:5px}
.htg-hero .htg-meta{color:#d8d2cb;margin-bottom:22px}
.htg-hero-btn{display:inline-flex;align-items:center;gap:8px;background:var(--htg-orange);color:#fff;font-weight:700;font-size:14px;padding:12px 24px;border-radius:6px}
.htg-hero-btn:hover{background:var(--htg-orange-dark);color:#fff}

/* ==========================================================================
   5. Home grid layout
   ========================================================================== */
.htg-home-grid{display:grid;grid-template-columns:2fr 1fr;gap:48px;margin:36px 0}
.htg-sidebar{border-left:1px solid var(--htg-gray-200);padding-left:36px}
.htg-section-head{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:18px;border-bottom:1px solid var(--htg-gray-200);padding-bottom:14px}
.htg-section-title{font-size:21px;border-left:4px solid var(--htg-orange);padding-left:12px;margin:0}
.htg-section-link{font-size:12.5px;font-weight:700;color:var(--htg-orange);text-transform:uppercase;letter-spacing:.04em;white-space:nowrap}
.htg-section-link:hover{color:var(--htg-orange-dark)}

/* Archive/search page header — the big heading at the top of category, tag, search, and blog-index pages */
.htg-archive-header{background:linear-gradient(135deg,#fff 0%,var(--htg-gray-100) 100%);border:1px solid var(--htg-gray-200);border-left:5px solid var(--htg-orange);border-radius:var(--htg-radius);padding:26px 28px;margin:22px 0 32px}
.htg-archive-header .htg-archive-title{font-family:var(--htg-serif);font-size:clamp(24px,3vw,32px);border:0;padding:0;margin:0 0 8px}
.htg-archive-header .htg-archive-desc{color:var(--htg-gray-700);font-size:14.5px;margin:0;max-width:70ch}
.htg-archive-header .htg-archive-count{display:inline-block;color:var(--htg-orange);font-size:12.5px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;margin-top:8px}

.htg-card-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:22px}
.htg-card{background:var(--htg-white);border:1px solid var(--htg-gray-200);border-radius:var(--htg-radius);overflow:hidden;transition:box-shadow .2s,transform .2s}
.htg-card:hover{box-shadow:var(--htg-shadow-lg);transform:translateY(-2px)}
.htg-card-media{aspect-ratio:16/10;width:100%;overflow:hidden;background:linear-gradient(135deg,#caa46a,#6b4423)}
.htg-card-media img{width:100%;height:100%;object-fit:cover}
.htg-card-body{padding:16px}
.htg-card-cat{color:var(--htg-orange);font-size:11.5px;font-weight:700;text-transform:uppercase;letter-spacing:.05em}
.htg-card-title{font-size:16px;margin:7px 0}
.htg-card-title a:hover{color:var(--htg-orange)}

/* Single featured story (replaces the old 4-card grid) */
.htg-card-featured{display:block;margin-bottom:28px}
.htg-card-featured .htg-card-media{aspect-ratio:16/9;height:auto;min-height:0}
.htg-card-featured .htg-card-body{padding:24px}
.htg-card-title-featured{font-family:var(--htg-serif);font-size:24px;margin:10px 0 12px}
.htg-card-excerpt{color:var(--htg-gray-700);font-size:14.5px;margin-bottom:14px}

/* Category tiles (photo tiles with count) */
.htg-cat-tiles{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:0 0 32px}
.htg-cat-tile{position:relative;aspect-ratio:1/0.85;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#7a5a35,#2c1d10);display:flex;align-items:flex-end}
.htg-cat-tile img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.htg-cat-tile::after{content:"";position:absolute;inset:0;background:linear-gradient(0deg,rgba(10,8,6,.85) 0%,rgba(10,8,6,.15) 65%,rgba(10,8,6,.05) 100%)}
.htg-cat-tile-body{position:relative;padding:12px;color:#fff;width:100%}
.htg-cat-tile-name{font-size:12.5px;font-weight:800;text-transform:uppercase;letter-spacing:.03em;display:block}
.htg-cat-tile-count{font-size:11px;color:#e8c9a3}

/* Latest - list rows */
.htg-latest-list{display:flex;flex-direction:column}
.htg-latest-row{display:flex;gap:16px;padding:16px 0;border-bottom:1px solid var(--htg-gray-200)}
.htg-latest-row:last-child{border-bottom:0}
.htg-latest-thumb{width:110px;height:78px;border-radius:8px;overflow:hidden;flex:none;background:var(--htg-gray-100)}
.htg-latest-thumb img{width:100%;height:100%;object-fit:cover}
.htg-latest-body{flex:1;min-width:0}
.htg-latest-title{font-size:15.5px;margin:4px 0}
.htg-latest-title a:hover{color:var(--htg-orange)}

.htg-btn{display:inline-block;background:var(--htg-orange);color:#fff;font-weight:700;font-size:13px;padding:9px 16px;border-radius:6px;margin-top:8px}
.htg-btn:hover{background:var(--htg-orange-dark);color:#fff}

/* Sidebar */
.htg-widget{background:var(--htg-white);border:1px solid var(--htg-gray-200);border-radius:var(--htg-radius);padding:18px;margin-bottom:22px}
.htg-widget-title{font-size:16px;border-bottom:2px solid var(--htg-orange);padding-bottom:8px;margin-bottom:14px}

.htg-follow-list{display:flex;flex-direction:column;gap:10px}
.htg-follow-btn{display:flex;align-items:center;justify-content:space-between;gap:10px;border-radius:8px;padding:12px 14px;color:#fff}
.htg-follow-btn.fb{background:var(--htg-fb)}
.htg-follow-btn.ig{background:linear-gradient(135deg,var(--htg-ig-1),var(--htg-ig-2))}
.htg-follow-btn.yt{background:var(--htg-yt)}
.htg-follow-left{display:flex;align-items:center;gap:10px}
.htg-follow-icon{font-size:20px}
.htg-follow-count{font-weight:800;font-size:16px;display:block;line-height:1.1}
.htg-follow-label{font-size:11px;opacity:.9}
.htg-follow-cta{background:rgba(255,255,255,.22);border-radius:5px;padding:6px 12px;font-size:12px;font-weight:700;white-space:nowrap}
.htg-follow-btn:hover .htg-follow-cta{background:rgba(255,255,255,.35)}

.htg-trend-list li{display:flex;gap:12px;padding:11px 0;border-bottom:1px solid var(--htg-gray-100);align-items:flex-start}
.htg-trend-list li:last-child{border-bottom:0}
.htg-trend-num{color:var(--htg-orange);font-weight:800;font-size:17px;flex:none;font-family:var(--htg-serif);min-width:20px}
.htg-trend-title{font-size:13.5px;font-weight:700;display:block}
.htg-trend-title:hover{color:var(--htg-orange)}
.htg-trend-date{font-size:11.5px;color:var(--htg-gray-500);display:flex;align-items:center;gap:4px;margin-top:3px}

.htg-browsecats li{display:flex;align-items:center;justify-content:space-between;padding:9px 0;border-bottom:1px solid var(--htg-gray-100);font-size:13.5px;font-weight:600}
.htg-browsecats li:last-child{border-bottom:0}
.htg-browsecats li:hover{color:var(--htg-orange)}
.htg-cat-badge{background:var(--htg-orange);color:#fff;font-size:11px;font-weight:700;border-radius:20px;padding:2px 9px;min-width:22px;text-align:center}

.htg-aboutus{text-align:center}
.htg-aboutus-icon{font-size:34px;color:var(--htg-orange);margin-bottom:10px}
.htg-aboutus p{font-size:13.5px;color:var(--htg-gray-700)}

/* Category chips (used on archive/search fallback) */
.htg-cat-chips{display:flex;flex-wrap:wrap;gap:10px;margin:24px 0}
.htg-cat-chip{background:var(--htg-gray-100);border:1px solid var(--htg-gray-200);border-radius:24px;padding:8px 16px;font-size:13.5px;font-weight:600}
.htg-cat-chip:hover{background:var(--htg-orange);color:#fff;border-color:var(--htg-orange)}
.htg-cat-chip .count{color:var(--htg-gray-500);font-weight:400;margin-left:4px}
.htg-cat-chip:hover .count{color:#ffe3cf}

/* ==========================================================================
   6. Single / page content
   ========================================================================== */
.htg-single-wrap{display:grid;grid-template-columns:2.4fr 1fr;gap:36px;margin:30px 0 50px}
.htg-single-header{margin-bottom:18px}
.htg-single-title{font-family:var(--htg-serif);font-size:clamp(26px,3.2vw,38px)}
.htg-byline{display:flex;align-items:center;gap:10px;margin:14px 0}
.htg-byline-avatar{width:36px;height:36px;border-radius:50%;object-fit:cover}
.htg-single-hero{margin:18px 0;border-radius:var(--htg-radius);overflow:hidden;aspect-ratio:16/8;background:var(--htg-gray-100)}
.htg-single-hero img{width:100%;height:100%;object-fit:cover}
.htg-content{font-size:16.5px;line-height:1.8;background:var(--htg-white);border:1px solid var(--htg-gray-200);border-radius:var(--htg-radius);padding:26px 28px}
.htg-content h2{font-size:24px;margin-top:1.6em;padding-top:6px;border-top:1px solid var(--htg-gray-200)}
.htg-content h3{font-size:19px;margin-top:1.4em}
.htg-content img{border-radius:var(--htg-radius);margin:1em 0}
.htg-content a{color:var(--htg-orange-dark);text-decoration:underline}
.htg-content blockquote{border-left:4px solid var(--htg-orange);margin:1.4em 0;padding:.4em 1.2em;background:var(--htg-gray-100);border-radius:0 8px 8px 0}
.htg-content table{width:100%;border-collapse:collapse;margin:1.4em 0}
.htg-content table th,.htg-content table td{border:1px solid var(--htg-gray-200);padding:8px 10px;text-align:left}
.htg-tags{display:flex;flex-wrap:wrap;gap:8px;margin:26px 0}
.htg-tag{background:var(--htg-gray-100);border-radius:20px;padding:6px 14px;font-size:12.5px}

/* Breadcrumbs */
.htg-breadcrumbs{font-size:13px;color:var(--htg-gray-500);margin:16px 0}
.htg-breadcrumbs a{color:var(--htg-gray-500)}
.htg-breadcrumbs a:hover{color:var(--htg-orange)}

/* Ad slots */
.htg-ad-slot{margin:26px 0;text-align:center;overflow:hidden}
.htg-ad-slot .htg-ad-label{font-size:10.5px;letter-spacing:.08em;text-transform:uppercase;color:var(--htg-gray-500);margin-bottom:6px}

/* Pagination */
.htg-pagination{display:flex;gap:8px;justify-content:center;margin:30px 0}
.htg-pagination a,.htg-pagination span{border:1px solid var(--htg-gray-200);border-radius:6px;padding:8px 14px;font-size:14px;font-weight:600;background:var(--htg-white)}
.htg-pagination .current{background:var(--htg-orange);color:#fff;border-color:var(--htg-orange)}

/* Comments */
.htg-comments{margin-top:40px}
.comment-list{margin:0}
.comment-list li{margin-bottom:18px}
.comment-body{background:var(--htg-gray-100);border-radius:var(--htg-radius);padding:16px}
.comment-form input,.comment-form textarea{width:100%;border:1px solid var(--htg-gray-200);border-radius:8px;padding:10px 12px;margin-bottom:12px}
.comment-form textarea{min-height:120px}
.comment-form .form-submit input{width:auto;background:var(--htg-orange);color:#fff;border:0;font-weight:700;padding:10px 22px;cursor:pointer}

/* ==========================================================================
   7. Footer
   ========================================================================== */
.htg-footer{background:var(--htg-black);color:#c9c2ba;margin-top:60px}
.htg-footer-top{padding:50px 0 30px;display:grid;grid-template-columns:1.5fr 1fr 1fr 1fr;gap:34px}
.htg-footer h4{color:#fff;font-size:15px;margin-bottom:16px}
.htg-footer-links li{margin-bottom:10px;font-size:13.5px}
.htg-footer-links a::before{content:"› ";color:var(--htg-orange)}
.htg-footer a:hover{color:var(--htg-orange)}
.htg-footer-word{font-family:var(--htg-serif);font-size:19px;font-weight:700}
.htg-footer-word .accent{color:var(--htg-orange)}
.htg-footer-desc{font-size:13.5px;color:#a39c93;margin:12px 0 18px}
.htg-footer-social{display:flex;gap:10px;flex-wrap:wrap}
.htg-footer-social a{display:flex;align-items:center;gap:7px;border-radius:6px;padding:8px 14px;font-size:12.5px;font-weight:700;color:#fff}
.htg-footer-social a.fb{background:var(--htg-fb)}
.htg-footer-social a.ig{background:linear-gradient(135deg,var(--htg-ig-1),var(--htg-ig-2))}
.htg-footer-social a.yt{background:var(--htg-yt)}
.htg-footer-contact{list-style:none;padding:0;margin:16px 0 0}
.htg-footer-contact li{display:flex;gap:8px;font-size:13.5px}
.htg-footer-search{display:flex;margin-top:10px;border-radius:6px;overflow:hidden}
.htg-footer-search input{flex:1;border:0;padding:9px 12px;background:#2c2823;color:#fff}
.htg-footer-search input::placeholder{color:#8f887f}
.htg-footer-search button{border:0;background:var(--htg-orange);color:#fff;font-weight:700;padding:0 16px;cursor:pointer}
.htg-footer-bottom{border-top:1px solid #2c2823;padding:18px 0;display:flex;justify-content:space-between;flex-wrap:wrap;gap:14px;font-size:12.5px;color:#8f887f}
.htg-footer-bottom-links{display:flex;gap:16px;flex-wrap:wrap}
.htg-footer-bottom a{color:#8f887f}
.htg-footer-heart{color:#e05a5a}

/* ==========================================================================
   8. Utility & accessibility
   ========================================================================== */
.htg-back-to-top{position:fixed;right:20px;bottom:20px;width:46px;height:46px;border-radius:50%;background:var(--htg-orange);color:#fff;display:flex;align-items:center;justify-content:center;box-shadow:var(--htg-shadow-lg);opacity:0;pointer-events:none;transition:opacity .2s}
.htg-back-to-top.is-visible{opacity:1;pointer-events:auto}

/* ==========================================================================
   9. Responsive
   ========================================================================== */
@media(max-width:1024px){
  .htg-cat-tiles{grid-template-columns:repeat(3,1fr)}
}
@media(max-width:900px){
  .htg-home-grid{grid-template-columns:1fr}
  .htg-sidebar{border-left:0;padding-left:0}
  .htg-single-wrap{grid-template-columns:1fr}
  .htg-footer-top{grid-template-columns:1fr 1fr}
  .htg-cat-tiles{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:680px){
  .htg-card-grid{grid-template-columns:1fr}
  .htg-topbar-links{display:none}
  .htg-nav .menu{display:none;flex-direction:column;width:100%;padding:6px 0}
  .htg-nav .menu.is-open{display:flex}
  .htg-nav .menu > li > a{width:100%}
  .htg-nav .sub-menu{position:static;box-shadow:none;border-radius:0;background:var(--htg-gray-100);border-top:0}
  .htg-mobile-toggle{display:block}
  .htg-nav-inner{display:flex;align-items:center;justify-content:space-between}
  .htg-footer-top{grid-template-columns:1fr}
  .htg-cat-tiles{grid-template-columns:repeat(2,1fr)}
  .htg-latest-thumb{width:88px;height:64px}
}
