/* Homepage modern mobile-first overrides */
:root {
  --home-bg: #f4ede2;
  --home-surface: #ffffff;
  --home-surface-soft: #fff9ef;
  --home-border: #e7d9c0;
  --home-text: #2f2a24;
  --home-muted: #6d6255;
  --home-primary: #124c9c;
  --home-accent: #d58b14;
  --home-heading: #1e1812;
  --home-radius: 14px;
  --home-shadow: 0 8px 24px rgba(16, 32, 64, 0.08);

  /* Typography variables */
  --font-main: "Trebuchet MS", "Segoe UI", "Nirmala UI", sans-serif;
  --font-odia: "Nirmala UI", "Kalinga", sans-serif;
  --body-size: 16px;
  --body-lh: 1.6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--home-text);
  font-family: var(--font-main);
  font-size: var(--body-size);
  line-height: var(--body-lh);
  background: linear-gradient(180deg, #faf4e8 0%, #f1e6d4 100%) !important;
}

/* Base text sizing (excluding headings and heading children) */
p, li, td, th, a, input, select, summary, details, label {
  font-family: var(--font-main);
  font-size: var(--body-size);
  line-height: var(--body-lh);
}

/* ==========================================================================
   MAIN WHITE CANVAS WRAPPER (Sheet container over background)
   ========================================================================== */
.cover {
  max-width: 1220px;
  margin: 16px auto 24px auto;
  background: #ffffff !important;
  border: 1px solid #ebdcc5;
  border-radius: 18px;
  box-shadow: 0 12px 36px rgba(45, 30, 15, 0.09), 0 2px 8px rgba(45, 30, 15, 0.04);
  padding: 14px 18px 24px 18px;
}

/* Suppress legacy separator noise */
header hr,
footer hr,
main > p,
main > hr {
  display: none !important;
}

/* Keep homepage layout clean and mobile-focused */
.desktop-ad-rail {
  display: none !important;
}

/* Header modernized */
header .header-container,
header .mobile-header {
  background: var(--home-surface) !important;
  border: 1px solid var(--home-border) !important;
  border-radius: var(--home-radius) !important;
  box-shadow: var(--home-shadow) !important;
}

header .header-container {
  margin: 4px 0 10px;
}

header .header-logo img,
header .mobile-logo img {
  filter: saturate(1.05);
}

header .header-nav {
  gap: 12px !important;
}

header .nav-item {
  min-width: 140px !important;
  padding: 14px 12px !important;
  border-radius: 12px !important;
  border: 1px solid #dce6f6 !important;
  background: linear-gradient(180deg, #ffffff 0%, #f2f6ff 100%) !important;
  box-shadow: 0 6px 16px rgba(10, 26, 60, 0.1) !important;
}

header .nav-item a {
  color: var(--home-primary) !important;
  letter-spacing: 0.45px !important;
  font-family: var(--font-main) !important;
  font-size: 14px !important;
  font-weight: 700;
}

header .mobile-header {
  margin: 4px 0 8px;
}

header .mobile-menu {
  border: 1px solid var(--home-border);
  border-radius: 12px;
  overflow: hidden;
  margin: 0 0 8px;
}

header .mobile-menu-item {
  background: #f8f1e4;
  color: var(--home-primary) !important;
  border-bottom: 1px solid #efe2cb;
  font-weight: 700;
  font-size: 14px;
}

main {
  padding-bottom: 20px;
}

/* ==========================================================================
   SEO-FRIENDLY RESPONSIVE HEADINGS & BILINGUAL ALIGNMENT FIX
   ========================================================================== */
.hBlock {
  margin: 10px 0 12px !important;
  padding: 10px 14px !important;
  text-align: center;
  font-family: var(--font-main) !important;
  font-weight: 800 !important;
  letter-spacing: 0.25px;
  line-height: 1.35 !important;
  color: var(--home-heading) !important;
  text-transform: none !important; /* Disabled uppercase to prevent baseline distortion with Odia script */
  border: 1px solid #e6cb77;
  border-radius: 12px;
  box-shadow: 0 3px 12px rgba(112, 90, 30, 0.12);
  background: linear-gradient(90deg, #f9e7ac 0%, #f5db89 100%) !important;
}

.hBlock::after {
  display: none !important;
}

/* Fluid responsive sizing */
h1.hBlock {
  font-size: clamp(1.2rem, 2.3vw, 1.7rem) !important;
}

h2.hBlock {
  font-size: clamp(1.08rem, 1.9vw, 1.4rem) !important;
}

h3.hBlock {
  font-size: clamp(0.98rem, 1.4vw, 1.18rem) !important;
}

/* Preserve heading font-size on nested child spans */
.hBlock span,
h1 span,
h2 span,
h3 span {
  font-size: inherit !important;
  line-height: inherit !important;
}

/* Odia script alignment and optical size balance */
.hBlock [lang="or"],
.hBlock span[lang="or"],
h1 [lang="or"],
h2 [lang="or"],
h3 [lang="or"] {
  font-family: var(--font-odia) !important;
  font-size: 0.96em !important; /* Optically balances native Odia glyph ascenders with English letters */
  line-height: 1 !important;
  font-weight: 700 !important;
  vertical-align: baseline;
}

/* ==========================================================================
   SECTION CONTAINERS
   ========================================================================== */
.bodydata {
  margin: 0 0 16px !important;
  padding: 14px !important;
  border: 1px solid var(--home-border);
  border-radius: var(--home-radius);
  background: #fffdf9;
  box-shadow: 0 4px 14px rgba(30, 20, 10, 0.04);
}

main .bodydata .row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0 !important;
}

main .bodydata .col-12,
main .bodydata .col-4,
main .bodydata .col-3 {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  padding: 0 !important;
}

main .bodydata .card,
.live-fresh .summary-card,
.seo-content-card,
.festival-live-card,
.rasi-detail-card,
.faq-wrap details {
  border: 1px solid var(--home-border) !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

main .bodydata .card {
  padding: 10px !important;
}

main .bodydata .card img {
  border-radius: 10px;
  width: 100% !important;
  height: auto !important;
}

main .button {
  display: block;
  margin-top: 8px !important;
  border: 0 !important;
  border-radius: 10px !important;
  padding: 8px 12px !important;
  color: #ffffff !important;
  background: linear-gradient(180deg, #1a61be 0%, #124c9c 100%) !important;
  text-decoration: none !important;
  font-size: 14px !important;
  font-weight: 700;
  text-align: center;
}

.current-month-link {
  color: var(--home-primary) !important;
  font-size: 13.5px !important;
  font-weight: 700;
}

/* ==========================================================================
   TODAY'S ODIA PANJIKA (2-COLUMN MODERN CARD GRID DESIGN)
   ========================================================================== */
.live-fresh .summary-card {
  padding: 16px !important;
  border-left: 5px solid #d58b14 !important;
  background: #fffbf4 !important;
}

.live-fresh .panchang-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 !important;
}

.live-fresh .panchang-row {
  padding: 0 !important;
  border-bottom: none !important;
}

.live-fresh .panchang-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 12px !important;
}

@media (min-width: 600px) {
  .live-fresh .panchang-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

.live-fresh .panchang-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #ffffff !important;
  border: 1px solid #e7dac1 !important;
  border-radius: 10px !important;
  padding: 10px 14px !important;
  box-shadow: 0 2px 6px rgba(18, 76, 156, 0.04) !important;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  font-size: 14px !important;
  line-height: 1.6 !important;
  color: #243a6b;
}

.live-fresh .panchang-item:hover {
  border-color: #d58b14 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(213, 139, 20, 0.12) !important;
}

.live-fresh .panchang-item .label {
  display: inline-block;
  margin-bottom: 2px;
  font-size: 13px !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #8c4a0e !important;
}

@media (min-width: 600px) and (max-width: 900px) {
  .live-fresh .panchang-row .panchang-grid > .panchang-item:nth-child(3):last-child {
    grid-column: 1 / -1;
  }
}

/* Monthly Table & Other Components */
.live-fresh .odia-monthly-table {
  border-collapse: collapse;
  border-radius: 10px;
  overflow: hidden;
}

.live-fresh .odia-monthly-table th {
  background: #1b4f96 !important;
  color: #ffffff !important;
  font-size: 13px !important;
}

.live-fresh .odia-monthly-table td.today {
  background: #fff2c4 !important;
}

.daily-rasi-line {
  font-size: 14px !important;
  line-height: 1.6 !important;
}

.daily-rasi-line.en-line {
  font-size: 14px !important;
  line-height: 1.6 !important;
}

.faq-wrap summary {
  color: var(--home-primary) !important;
  font-size: 14px !important;
}

.faq-wrap p {
  font-size: 14px !important;
  line-height: 1.6 !important;
}

/* Ad zones with reserved dimensions for CLS */
.home-ad-card {
  border: 1px dashed #d8c7a8 !important;
  border-radius: 12px !important;
  background: #fffef9 !important;
}

.home-ad-slot {
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
  text-align: center;
  overflow: hidden;
}

.ad-slot-320x100 {
  width: 320px;
  min-height: 100px;
}

.ad-slot-300x250 {
  width: 300px;
  min-height: 250px;
}

.ad-slot-336x280 {
  width: 336px;
  min-height: 280px;
}

.ad-slot-728x90 {
  width: 728px;
  min-height: 90px;
}

.ad-slot-970x250 {
  width: 970px;
  min-height: 250px;
}

.ad-slot-300x600 {
  width: 300px;
  min-height: 600px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .cover {
    margin: 8px 6px 14px 6px;
    padding: 10px 10px 18px 10px;
    border-radius: 12px;
  }

  .ad-slot-320x100,
  .ad-slot-300x250,
  .ad-slot-336x280,
  .ad-slot-728x90,
  .ad-slot-970x250,
  .ad-slot-300x600 {
    width: 100%;
    min-height: 100px;
  }
}

@media (min-width: 769px) {
  main .bodydata .row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  main .bodydata .row .col-12 {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1040px) {
  .cover {
    margin: 18px auto 28px auto;
    padding: 16px 22px 28px 22px;
  }

  main .bodydata .row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-ad-mobile,
  .home-ad-mobile-bottom {
    display: none !important;
  }

  .home-ad-desktop {
    display: block !important;
  }
}
