/*
Theme Name: Daily365AI
Theme URI: https://daily365ai.com
Author: Daily365AI
Author URI: https://daily365ai.com
Description: AdSense-optimized blogging theme for Daily365AI - Daily AI prompts, Telugu Christian designs, YouTube thumbnails, Canva designs and creative resources. Fully Elementor compatible with dark mode, Google Translate (English/Telugu), and 8 strategic ad placements.
Version: 1.6.0
Requires at least: 5.8
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: daily365ai
Tags: blog, news, two-columns, right-sidebar, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready, elementor, adsense
*/

/* ============ ROOT VARIABLES ============ */
:root {
  --primary: #0A2540;
  --accent: #6C63FF;
  --accent-hover: #5a52e6;
  --gold: #F5A623;
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --bg-card: #ffffff;
  --text: #1a1d2e;
  --text-soft: #5a6275;
  --text-muted: #8a94a6;
  --border: #e6e9ef;
  --shadow: 0 2px 12px rgba(10,37,64,0.06);
  --shadow-hover: 0 6px 24px rgba(10,37,64,0.10);
  --shadow-md: 0 4px 16px rgba(10,37,64,0.08);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.2s ease;
  --max-width: 1200px;
  --header-h: 60px;
}
[data-theme="dark"] {
  --primary: #0d1526;
  --accent: #8b85ff;
  --accent-hover: #a09aff;
  --gold: #ffb84d;
  --bg: #15182a;
  --bg-soft: #1c2038;
  --bg-card: #1e2238;
  --text: #e8ecf5;
  --text-soft: #b0b8cc;
  --text-muted: #7a8299;
  --border: #2a2f4a;
  --shadow: 0 2px 12px rgba(0,0,0,0.3);
  --shadow-hover: 0 6px 24px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-hover); }
h1, h2, h3, h4, h5, h6 { font-family: 'Poppins', sans-serif; line-height: 1.3; color: var(--text); }
ul, ol { padding-left: 1.2rem; }
button { font-family: inherit; cursor: pointer; }

/* WordPress Required Classes */
.alignleft { float: left; margin: 0 1em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide { max-width: 1100px; }
.alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 13px; color: var(--text-muted); text-align: center; padding: 8px 0; }
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}
.sticky { display: block; }
.gallery-caption { display: block; }
.bypostauthor { display: block; }

/* AdSense */
.ad-container {
  margin: 24px 0;
  text-align: center;
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.ad-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  font-weight: 600;
}
.ad-placeholder {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
  background: linear-gradient(135deg, rgba(108,99,255,0.05), rgba(245,166,35,0.05));
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}
.ad-leaderboard .ad-placeholder { min-height: 90px; }
.ad-rectangle .ad-placeholder { min-height: 250px; }
.ad-large .ad-placeholder { min-height: 280px; }

/* Top Bar */
.top-bar {
  background: var(--primary);
  color: rgba(255,255,255,0.9);
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: relative;
  z-index: 101;
}
.top-bar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.top-bar-text {
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.top-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

/* Language Switcher */
.lang-switcher { position: relative; }
.lang-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
}
.lang-btn:hover { background: rgba(255,255,255,0.22); }
.lang-btn .arrow {
  width: 8px;
  height: 8px;
  border-right: 1.5px solid rgba(255,255,255,0.85);
  border-bottom: 1.5px solid rgba(255,255,255,0.85);
  transform: rotate(45deg);
  transition: transform var(--transition);
  margin-top: -3px;
  margin-left: 2px;
  display: inline-block;
}
.lang-btn.open .arrow { transform: rotate(-135deg); margin-top: 2px; }

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 200px;
  overflow: hidden;
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition);
}
.lang-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  transition: var(--transition);
}
.lang-option:hover { background: var(--bg-soft); color: var(--accent); }
.lang-option.active { background: var(--bg-soft); color: var(--accent); font-weight: 600; }
.lang-flag { font-size: 16px; }

/* ===== GOOGLE TRANSLATE - VISIBLE & STYLED ===== */
.lang-icon-prefix {
  font-size: 16px;
  color: #fff;
}

#google_translate_element {
  display: inline-block;
}

#google_translate_element .goog-te-gadget {
  font-family: inherit !important;
  font-size: 0 !important;
  color: transparent !important;
}

#google_translate_element .goog-te-gadget > span {
  display: none !important;
}

#google_translate_element .goog-te-gadget > div {
  display: inline-block !important;
}

/* Style the actual select dropdown */
#google_translate_element select.goog-te-combo {
  background: rgba(255,255,255,0.12) !important;
  border: 1px solid rgba(255,255,255,0.25) !important;
  color: #fff !important;
  padding: 5px 26px 5px 10px !important;
  border-radius: 20px !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  font-family: 'Inter', sans-serif !important;
  cursor: pointer !important;
  outline: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><path d='M2 4l3 3 3-3' stroke='white' stroke-width='1.5' fill='none'/></svg>") !important;
  background-repeat: no-repeat !important;
  background-position: right 8px center !important;
  background-size: 10px !important;
  transition: all 0.2s ease !important;
  min-width: 110px !important;
}

#google_translate_element select.goog-te-combo:hover {
  background-color: rgba(255,255,255,0.22) !important;
}

#google_translate_element select.goog-te-combo option {
  background: #fff !important;
  color: #1a1d2e !important;
  padding: 8px !important;
  font-weight: 500 !important;
}

[data-theme="dark"] #google_translate_element select.goog-te-combo option {
  background: #1e2238 !important;
  color: #e8ecf5 !important;
}

/* Hide Google's banner that appears on top */
.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate,
.skiptranslate iframe.goog-te-banner-frame {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
}

body {
  top: 0 !important;
  position: static !important;
}

/* Hide tooltips and text highlights */
.goog-tooltip,
.goog-tooltip:hover,
.goog-tooltip-content {
  display: none !important;
}

.goog-text-highlight {
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

font[style] {
  background-color: transparent !important;
}

.goog-te-spinner-pos {
  display: none !important;
}

.goog-logo-link,
.goog-te-gadget .goog-logo-link {
  display: none !important;
}

/* Wrap lang-icon and select together */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 20px;
  padding: 0 4px 0 10px;
  height: 30px;
  position: relative;
}

.lang-switcher #google_translate_element select.goog-te-combo {
  background: transparent !important;
  border: none !important;
  padding: 4px 22px 4px 4px !important;
  height: 28px !important;
  min-width: 90px !important;
}

.lang-switcher:hover {
  background: rgba(255,255,255,0.22);
}

/* Dark Toggle */
.dark-toggle {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}
.dark-toggle:hover { background: rgba(255,255,255,0.22); transform: rotate(15deg); }

/* Header */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  font-size: 18px;
  font-family: 'Poppins', sans-serif;
  flex-shrink: 0;
}
.logo-text {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 19px;
  color: var(--text);
  line-height: 1.1;
}
.logo-text span { color: var(--accent); }
.logo-tag {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.search-form {
  flex: 1;
  max-width: 420px;
  position: relative;
}
.search-form input[type="search"] {
  width: 100%;
  padding: 9px 14px 9px 36px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--bg-soft);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}
.search-form input[type="search"]:focus {
  border-color: var(--accent);
  background: var(--bg);
  box-shadow: 0 0 0 3px rgba(108,99,255,0.1);
}
.search-form .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
}
.search-form .search-submit {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

/* Nav Toggle */
.nav-toggle {
  display: none;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  width: 40px;
  height: 40px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}
.nav-toggle.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Desktop Menu with Arrows */
.main-nav {
  position: sticky;
  top: var(--header-h);
  z-index: 99;
  background: linear-gradient(135deg, var(--primary), #1a3a6b);
  border-bottom: 3px solid var(--accent);
  box-shadow: var(--shadow);
}
[data-theme="dark"] .main-nav {
  background: linear-gradient(135deg, #0d1526, #1a2440);
}
.nav-wrapper {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: stretch;
}
.nav-scroll-btn {
  flex-shrink: 0;
  width: 44px;
  background: rgba(245, 166, 35, 0.95);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s ease;
  color: var(--primary);
  font-weight: 800;
}
.nav-scroll-btn:hover { background: var(--gold); }
.nav-scroll-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.nav-scroll-btn:disabled:hover { background: rgba(245, 166, 35, 0.95); }
.nav-scroll-btn .arrow-icon {
  width: 11px;
  height: 11px;
  border-right: 2.5px solid var(--primary);
  border-bottom: 2.5px solid var(--primary);
  display: inline-block;
}
.nav-scroll-btn.left .arrow-icon { transform: rotate(135deg); margin-left: 4px; }
.nav-scroll-btn.right .arrow-icon { transform: rotate(-45deg); margin-right: 4px; }

.nav-inner-scroll {
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
.nav-inner-scroll::-webkit-scrollbar { display: none; }

.nav-list, .nav-list ul {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0;
  white-space: nowrap;
  min-width: max-content;
}
.nav-list li { position: relative; flex-shrink: 0; }
.nav-list a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 18px;
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: var(--transition);
  position: relative;
}
.nav-list a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: var(--gold);
  transition: width var(--transition);
}
.nav-list a:hover, .nav-list .current-menu-item > a, .nav-list .current_page_item > a {
  color: #fff;
  background: rgba(255,255,255,0.08);
}
.nav-list a:hover::after, .nav-list .current-menu-item > a::after, .nav-list .current_page_item > a::after {
  width: 70%;
}

/* Submenu support */
.nav-list .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 200px;
  box-shadow: var(--shadow-md);
  flex-direction: column;
  z-index: 100;
}
.nav-list li:hover > .sub-menu { display: flex; }
.nav-list .sub-menu li { width: 100%; }
.nav-list .sub-menu a {
  color: var(--text);
  padding: 10px 16px;
  background: transparent;
}
.nav-list .sub-menu a:hover { background: var(--bg-soft); color: var(--accent); }
.nav-list .sub-menu a::after { display: none; }

/* Mobile Drawer */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  opacity: 0;
  transition: opacity var(--transition);
}
.nav-overlay.show { opacity: 1; }
.mobile-nav {
  position: fixed;
  top: 0;
  right: -300px;
  width: 280px;
  max-width: 85vw;
  height: 100vh;
  background: var(--bg);
  z-index: 201;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
}
.mobile-nav.show { right: 0; }
.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  background: var(--primary);
  color: #fff;
}
.mobile-nav-header .logo-text { color: #fff; }
.mobile-nav-close {
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mobile-nav-list, .mobile-nav-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.mobile-nav-list { flex: 1; overflow-y: auto; }
.mobile-nav-list li { border-bottom: 1px solid var(--border); }
.mobile-nav-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
}
.mobile-nav-list a:hover, .mobile-nav-list .current-menu-item > a {
  background: var(--bg-soft);
  color: var(--accent);
}
.mobile-nav-list .sub-menu a { padding-left: 36px; font-size: 14px; }
.mobile-nav-footer { padding: 16px; border-top: 1px solid var(--border); }

/* Layout */
.container, .site-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 16px;
}
.layout-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}

/* Hero */
.hero, .page-header {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  padding: 40px 20px;
  border-radius: var(--radius-lg);
  text-align: center;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.hero::before, .page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(245,166,35,0.3), transparent 50%);
}
.hero-content { position: relative; z-index: 1; }
.hero h1, .page-header h1 {
  font-size: clamp(22px, 4vw, 36px);
  font-weight: 800;
  margin-bottom: 12px;
  color: #fff;
  position: relative;
}
.hero p, .page-header p {
  font-size: clamp(14px, 2vw, 16px);
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 20px;
  position: relative;
}
.hero-cta {
  display: inline-block;
  background: var(--gold);
  color: var(--primary);
  padding: 10px 24px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 14px;
  transition: var(--transition);
}
.hero-cta:hover { background: #fff; color: var(--primary); transform: translateY(-2px); }

.section-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-left: 4px solid var(--accent);
  padding-left: 12px;
  flex-wrap: wrap;
  gap: 8px;
}
.section-title .view-all { font-size: 13px; font-weight: 500; color: var(--accent); }

/* Post Cards */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}
.post-thumb {
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  position: relative;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  overflow: hidden;
}
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-thumb.bg-1 { background: linear-gradient(135deg, #6C63FF, #00D4FF); }
.post-thumb.bg-2 { background: linear-gradient(135deg, #F5A623, #FF6B6B); }
.post-thumb.bg-3 { background: linear-gradient(135deg, #00D4FF, #4CAF50); }
.post-thumb.bg-4 { background: linear-gradient(135deg, #FF6B6B, #6C63FF); }
.post-thumb.bg-5 { background: linear-gradient(135deg, #4CAF50, #F5A623); }
.post-thumb.bg-6 { background: linear-gradient(135deg, #9C27B0, #00D4FF); }
.post-cat {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255,255,255,0.95);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.post-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.post-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.35;
}
.post-title a { color: var(--text); }
.post-title a:hover { color: var(--accent); }
.post-excerpt {
  font-size: 14px;
  color: var(--text-soft);
  margin-bottom: 12px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.post-views {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: var(--accent);
}

/* Sidebar */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
}
.widget-title, .widget h2, .widget h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.widget li:last-child { border-bottom: none; }
.widget a { color: var(--text); }
.widget a:hover { color: var(--accent); }

.tags-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tagcloud a, .tags-cloud a {
  background: var(--bg-soft);
  color: var(--text-soft) !important;
  padding: 4px 10px !important;
  border-radius: 12px;
  font-size: 12px !important;
  font-weight: 500;
  display: inline-block;
}
.tagcloud a:hover, .tags-cloud a:hover { background: var(--accent); color: #fff !important; }

/* Single Article */
.single-article {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}
.breadcrumbs {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.breadcrumbs a { color: var(--accent); }
.breadcrumbs span { margin: 0 6px; }
.single-article h1, .single-article h2.entry-title {
  font-size: clamp(20px, 3vw, 30px);
  margin-bottom: 12px;
}
.article-meta, .entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.article-featured, .post-thumbnail {
  width: 100%;
  border-radius: var(--radius);
  margin-bottom: 18px;
  overflow: hidden;
}
.article-featured {
  aspect-ratio: 16 / 8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  background: linear-gradient(135deg, var(--accent), var(--gold));
}
.article-content p, .entry-content p { margin-bottom: 14px; color: var(--text-soft); font-size: 16px; }
.article-content h2, .entry-content h2 { margin: 28px 0 14px; font-size: 22px; color: var(--text); }
.article-content h3, .entry-content h3 { margin: 22px 0 10px; font-size: 18px; color: var(--text); }
.article-content ul, .article-content ol, .entry-content ul, .entry-content ol { margin-bottom: 14px; padding-left: 1.5rem; }
.article-content li, .entry-content li { margin-bottom: 8px; color: var(--text-soft); }
.article-content blockquote, .entry-content blockquote {
  border-left: 4px solid var(--accent);
  background: var(--bg-soft);
  padding: 14px 18px;
  margin: 18px 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text-soft);
}
.article-content code, .entry-content code {
  background: var(--bg-soft);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--accent);
  font-family: 'Courier New', monospace;
}
.article-content pre, .entry-content pre {
  background: var(--bg-soft);
  padding: 14px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 18px 0;
}
.prompt-box {
  background: var(--bg-soft);
  padding: 16px;
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
  font-style: italic;
  margin: 18px 0;
}

.article-tags, .entry-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 20px 0;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.article-tags strong { font-size: 13px; margin-right: 8px; align-self: center; }

.share-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #fff !important;
  transition: var(--transition);
}
.share-btn:hover { transform: translateY(-2px); }
.share-fb { background: #1877F2; }
.share-tw { background: #000000; }
.share-wa { background: #25D366; }
.share-tg { background: #229ED9; }
.share-pin { background: #E60023; }

.author-box {
  display: flex;
  gap: 14px;
  background: var(--bg-soft);
  padding: 16px;
  border-radius: var(--radius);
  margin: 20px 0;
  align-items: center;
}
.author-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  color: #fff;
  font-weight: 700;
  overflow: hidden;
}
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-info h4 { font-size: 15px; margin-bottom: 4px; }
.author-info p { font-size: 13px; color: var(--text-soft); margin: 0; }

.related-posts h3 {
  font-size: 20px;
  margin-bottom: 16px;
  border-left: 4px solid var(--accent);
  padding-left: 12px;
}

/* CTA */
.cta-section { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #fff !important;
  text-decoration: none;
  transition: var(--transition);
}
.cta-btn:hover { transform: translateY(-2px); }
.cta-tg { background: #229ED9; }
.cta-wa { background: #25D366; }
.cta-yt { background: #FF0000; }

/* Pagination */
.pagination, .nav-links {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 24px 0;
  flex-wrap: wrap;
}
.pagination a, .pagination span, .nav-links a, .nav-links .current {
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}
.pagination a:hover, .nav-links a:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.pagination .active, .pagination .current, .nav-links .current { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Comments */
.comments-area {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 24px;
}
.comment-list { list-style: none; padding: 0; margin: 0 0 20px; }
.comment-list li { padding: 16px 0; border-bottom: 1px solid var(--border); }
.comment-list .children { padding-left: 30px; list-style: none; }
.comment-author { font-weight: 600; margin-bottom: 4px; }
.comment-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.comment-content p { margin-bottom: 8px; }
.comment-form input, .comment-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-soft);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 12px;
}
.comment-form .submit, .comment-form input[type="submit"] {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
}

/* Footer */
.site-footer {
  background: var(--primary);
  color: rgba(255,255,255,0.8);
  padding: 36px 0 0;
  margin-top: 32px;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 24px;
}
.footer-brand p { font-size: 13px; margin-top: 10px; opacity: 0.75; line-height: 1.6; }
.footer-col h4, .footer-col h2, .footer-col .widget-title {
  color: #fff;
  font-size: 14px;
  margin-bottom: 12px;
  font-weight: 700;
  border: none;
  padding: 0;
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 6px; border: none; padding: 0; }
.footer-col a { color: rgba(255,255,255,0.7); font-size: 13px; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 16px 0;
  font-size: 12px;
  text-align: center;
  opacity: 0.7;
}

/* Floating Social */
.social-float {
  position: fixed;
  right: 12px;
  bottom: 80px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 95;
}
.social-float a {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}
.social-float a:hover { transform: scale(1.1); }
.float-tg { background: #229ED9; }
.float-wa { background: #25D366; }

/* Sticky Mobile Ad */
.sticky-ad {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 6px;
  z-index: 100;
  text-align: center;
}
.sticky-ad-close {
  position: absolute;
  top: -10px;
  right: 8px;
  width: 22px;
  height: 22px;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: 50%;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Responsive */
@media (max-width: 968px) {
  .layout-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .container, .site-content { padding: 16px 12px; }
  .hero, .page-header { padding: 28px 16px; border-radius: var(--radius); }
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .header-inner { padding: 10px 12px; gap: 10px; flex-wrap: wrap; }
  .logo-tag { display: none; }
  .search-form { order: 3; flex: 1 1 100%; max-width: 100%; }
  .top-bar-inner { padding: 0 12px; gap: 8px; }
  .top-bar-text { font-size: 11.5px; }
  .posts-grid { grid-template-columns: 1fr; gap: 14px; }
  .post-thumb { font-size: 36px; }
  .single-article { padding: 16px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 18px; }
  .sticky-ad { display: block; }
  body { padding-bottom: 70px; }
  .social-float { bottom: 80px; right: 10px; }
  .social-float a { width: 40px; height: 40px; font-size: 18px; }
}

@media (max-width: 480px) {
  .container, .site-content { padding: 12px 10px; }
  .hero, .page-header { padding: 22px 14px; }
  .hero h1, .page-header h1 { font-size: 20px; }
  .hero p, .page-header p { font-size: 13px; }
  .header-inner { padding: 8px 10px; }
  .logo-icon { width: 34px; height: 34px; font-size: 16px; }
  .logo-text { font-size: 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 18px; }
  .top-controls { gap: 6px; }
  .top-bar-text { font-size: 11px; max-width: 100px; }
  .lang-btn .lang-name-full { display: none; }
  .lang-btn { padding: 5px 10px; }
  .post-card { border-radius: var(--radius); }
  .ad-container { margin: 16px 0; padding: 8px; }
  .section-title { font-size: 19px; }
  .nav-toggle { width: 36px; height: 36px; }
  .top-bar { padding: 6px 0; }
}

@media (max-width: 360px) {
  .top-bar-text { display: none; }
  .top-bar-inner { justify-content: flex-end; }
}

[data-theme="dark"] .post-cat { background: var(--bg-card); color: var(--text); }
[data-theme="dark"] .ad-placeholder {
  background: linear-gradient(135deg, rgba(108,99,255,0.1), rgba(245,166,35,0.08));
}
[data-theme="dark"] .nav-toggle { background: var(--bg-soft); }
/* ============================================
   MOBILE OVERFLOW FIX - PASTE IN style.css
   Add this at the very END of your style.css
   ============================================ */

/* Prevent horizontal scroll on entire site */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw;
  width: 100%;
}

/* Force all elements to respect viewport width */
*, *::before, *::after {
  max-width: 100%;
  box-sizing: border-box;
}

/* Container fixes - never exceed viewport */
.container,
.site-content,
.header-inner,
.top-bar-inner,
.nav-wrapper,
.footer-inner,
.layout-grid,
.main-content,
.sidebar {
  max-width: 100%;
  overflow-x: hidden;
}

/* Mobile-specific fixes */
@media (max-width: 768px) {

  /* Container padding fix */
  .container, .site-content {
    padding-left: 12px !important;
    padding-right: 12px !important;
    width: 100%;
    max-width: 100vw;
  }

  /* Header fix */
  .header-inner {
    padding: 10px 12px !important;
    width: 100%;
    max-width: 100vw;
  }

  /* Top bar fix */
  .top-bar {
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
  }
  .top-bar-inner {
    padding: 0 12px !important;
    width: 100%;
    max-width: 100vw;
  }

  /* Hero/Page header fix */
  .hero, .page-header {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    max-width: 100%;
  }

  /* Post grid - single column on mobile */
  .posts-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    width: 100%;
  }

  .post-card {
    width: 100%;
    max-width: 100%;
  }

  .post-thumb img {
    width: 100%;
    height: auto;
  }

  /* Single article fix */
  .single-article {
    padding: 16px !important;
    width: 100%;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
  }

  /* Article content - prevent text overflow */
  .article-content,
  .entry-content {
    width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
  }

  .article-content img,
  .entry-content img {
    width: 100%;
    height: auto;
    max-width: 100%;
  }

  .article-content pre,
  .article-content code,
  .entry-content pre,
  .entry-content code {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
  }

  /* Sidebar fix */
  .sidebar {
    width: 100%;
    max-width: 100%;
  }

  .widget {
    width: 100%;
    max-width: 100%;
  }

  /* Ad container fix */
  .ad-container {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .ad-placeholder {
    max-width: 100%;
    overflow: hidden;
  }

  .adsbygoogle, ins.adsbygoogle {
    max-width: 100% !important;
    width: 100% !important;
  }

  /* Footer fix */
  .site-footer {
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
  }

  .footer-inner {
    padding: 0 12px !important;
    width: 100%;
    max-width: 100vw;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 18px !important;
    width: 100%;
  }

  /* Tables responsive */
  table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* iframes responsive (YouTube embeds etc) */
  iframe, embed, object, video {
    max-width: 100%;
    width: 100%;
    height: auto;
  }

  /* Search form */
  .search-form {
    width: 100%;
    max-width: 100%;
  }

  .search-form input[type="search"] {
    width: 100%;
    max-width: 100%;
  }

  /* Sticky ad fix */
  .sticky-ad {
    width: 100%;
    max-width: 100vw;
    left: 0;
    right: 0;
    overflow: hidden;
  }

  .sticky-ad ins.adsbygoogle {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Floating social */
  .social-float {
    right: 8px !important;
  }

  /* Mobile drawer fix */
  .mobile-nav {
    max-width: 85vw;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .container, .site-content {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .single-article {
    padding: 14px !important;
  }

  .top-bar-text {
    max-width: 100px;
    font-size: 11px;
  }

  /* Hero text scaling */
  .hero h1, .page-header h1 {
    font-size: 20px;
    line-height: 1.3;
  }

  .hero p, .page-header p {
    font-size: 13px;
  }

  /* Post card adjustments */
  .post-body {
    padding: 14px;
  }

  .post-title {
    font-size: 16px;
  }

  .post-excerpt {
    font-size: 13px;
  }

  /* Footer single column */
  .footer-grid {
    grid-template-columns: 1fr !important;
  }

  /* Ad slot tighter */
  .ad-container {
    padding: 8px !important;
    margin: 14px 0 !important;
  }
}

/* Very small phones */
@media (max-width: 360px) {
  .container, .site-content {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  .single-article {
    padding: 12px !important;
  }

  .post-body {
    padding: 12px;
  }

  .header-inner {
    padding: 8px 10px !important;
  }
}

/* ============ POST CARD HEIGHT FIX ============ */
/* Make all cards in same row equal height naturally */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
  align-items: stretch;
}

/* Limit excerpt length - prevent stretching */
.post-excerpt {
  font-size: 14px;
  color: var(--text-soft);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3 !important;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 0 0 auto !important;
  max-height: 4.5em;
  line-height: 1.5;
}

/* Push meta to bottom always */
.post-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-meta {
  margin-top: auto;
}

/* Hide empty ad containers (when AdSense is not loaded) */
.ad-container .ad-placeholder ins.adsbygoogle:empty {
  display: none;
}

/* Hide ad container if it's completely empty */
.ad-container:has(ins.adsbygoogle:empty:not([data-ad-status])) {
  display: none;
}

/* For browsers that don't support :has() */
.ad-container .adsbygoogle[data-ad-status="unfilled"] {
  display: none !important;
}

/* Set minimum height for ads to avoid layout shift but cap maximum */
.ad-placeholder ins.adsbygoogle {
  display: block !important;
  min-height: 90px;
  max-height: 280px;
  overflow: hidden;
}

.ad-rectangle .ad-placeholder ins.adsbygoogle {
  min-height: 250px;
  max-height: 300px;
}

.ad-large .ad-placeholder ins.adsbygoogle {
  min-height: 280px;
  max-height: 320px;
}

/* Better grid for trending - max 3 columns to avoid empty space */
@media (min-width: 1100px) {
  .posts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 769px) and (max-width: 1099px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .posts-grid {
    grid-template-columns: 1fr;
  }
}
