/* ── Mobile (≤ 680px) ── */
@media (max-width: 680px) {
/* Base Layout & Spacing */
.page-wrap { padding: 16px 16px 40px; }
.main-layout { grid-template-columns: 1fr; gap: 24px; }

/* Hero Section */
.hero-grid { grid-template-columns: 1fr; height: auto; gap: 8px; border-radius: 12px; margin-bottom: 32px; box-shadow: var(--shadow-md); }
.hero-main { aspect-ratio: 16 / 9; height: auto; }
.hero-main-bg { font-size: 72px; }
.hero-main-overlay { background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 60%, transparent 100%); padding: 32px 20px 20px; }
.hero-cat { font-size: 11px; padding: 4px 12px; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 10px; min-height: 24px; }
.hero-title { font-size: 20px; line-height: 1.35; margin-bottom: 8px; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.hero-date { font-size: 13px; color: rgba(255,255,255,0.8); display: flex; align-items: center; gap: 6px; }

.hero-stack { gap: 8px; } 
.hero-small { aspect-ratio: 16 / 9; height: auto; border-radius: 8px; }
.hero-small-bg { font-size: 30px; }
.hero-small-overlay { background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%); padding: 24px 16px 16px; }
.hero-small .hero-cat { font-size: 10px; padding: 3px 10px; margin-bottom: 8px; }
.hero-small .hero-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.hero-small .hero-date { font-size: 12px; }

/* Panchang Card */
.panchang-card { border-radius: 12px; box-shadow: var(--shadow-md); margin-bottom: 32px; border: 1px solid var(--border); }
.panchang-header { padding: 16px 20px; gap: 10px; }
.panchang-header h2 { font-size: 17px; display: flex; align-items: center; gap: 8px; }
.panchang-header .ph-date { font-size: 14px; opacity: 0.9; font-weight: 500; }
.panchang-body { padding: 20px; }
.pw-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
.pw-item { border-radius: 8px; padding: 16px 12px; border: 1px solid rgba(240, 203, 176, 0.4); display: flex; flex-direction: column; justify-content: center; }
.pw-label { font-size: 12px; font-weight: 600; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.pw-value { font-size: 16px; }
.panchang-footer { padding: 16px 20px 20px; gap: 12px; }
.panchang-footer a { font-size: 14px; font-weight: 700; padding: 12px 16px; border-radius: 8px; display: flex; align-items: center; justify-content: center; min-height: 44px; }


/* Rashi Section */
.rashi-section { border-radius: 12px; box-shadow: var(--shadow-md); margin-bottom: 32px; border: 1px solid var(--border); }
.rashi-section-head { font-size: 16px; padding: 14px 20px; gap: 8px; }
.rashi-section-head a { font-size: 13px; padding: 4px 8px; min-height: 32px; display: inline-flex; }
.rashi-grid { grid-template-columns: repeat(2, 1fr); padding: 12px; gap: 8px; }
.rashi-chip { padding: 8px 4px; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 80px; border: 1px solid var(--border); }
.rashi-emoji { font-size: 28px; margin-bottom: 6px; }
.rashi-name { font-size: 13px; font-weight: 700; }

/* Festival List */
.festival-list { border-radius: 12px; box-shadow: var(--shadow-md); margin-bottom: 32px; border: 1px solid var(--border); }
.fl-sub { display: none; }
.fl-item { gap: 16px; padding: 16px 20px; }
.fl-date { border-radius: 8px; width: 56px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.fl-date-day { font-size: 22px; margin-bottom: 2px; }
.fl-date-mon { font-size: 11px; font-weight: 600; }
.fl-info { display: flex; flex-direction: column; gap: 6px; }
.fl-name { font-size: 16px; line-height: 1.3; }
.fl-tag { font-size: 11px; padding: 4px 10px; border-radius: 4px; align-self: flex-start; }

/* Post Cards */
.post-card { border-radius: 12px; box-shadow: var(--shadow-md); border: 1px solid var(--border); }
.pc-thumb { aspect-ratio: 16 / 9; height: auto; font-size: 40px; position: relative; overflow: hidden; }
.pc-thumb img { width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0; }
.pc-cat { top: 12px; left: 12px; font-size: 11px; padding: 4px 10px; border-radius: 4px; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }
.pc-body { padding: 20px; }
.pc-title { font-size: 18px; line-height: 1.45; margin-bottom: 12px; }
.pc-excerpt { font-size: 14px; line-height: 1.6; margin-bottom: 16px; -webkit-line-clamp: 3; }
.pc-footer { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 500; border-top: 1px solid var(--border); padding-top: 16px; }
.pc-read { font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }

/* Horizontal Post (hpost) */
.hpost { border-radius: 12px; box-shadow: var(--shadow-sm); margin-bottom: 16px; border: 1px solid var(--border); align-items: stretch; }
.hpost-thumb { width: 140px; font-size: 26px; }
.hpost-body { padding: 16px; justify-content: center; }
.hpost-cat { font-size: 11px; margin-bottom: 6px; }
.hpost-title { font-size: 16px; line-height: 1.4; margin-bottom: 8px; }
.hpost-date { font-size: 12px; font-weight: 500; }

/* Section Headers */
.section-hdr { gap: 16px; margin-bottom: 20px; }
.section-hdr-title { font-size: 20px; margin: 0; }
.section-hdr-bar { height: 3px; border-radius: 2px; }
.section-hdr-link { font-size: 14px; font-weight: 700; padding: 4px 8px; min-height: 32px; display: inline-flex; align-items: center; }

/* FW SECTION (Full Width) */
.fw-section { margin-bottom: 32px; }
.fw-head { gap: 12px; margin-bottom: 20px; padding-bottom: 12px; }
.fw-head-title { font-size: 20px; margin: 0; }
.fw-head-emoji { font-size: 24px; }
.fw-head-link { font-size: 14px; padding: 4px 8px; }

/* Category Strip Chips (Scrollable App-like) */
.cat-strip { gap: 12px; margin-bottom: 28px; padding-bottom: 8px; margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
.cat-chip { padding: 8px 16px; font-size: 14px; gap: 8px; border-radius: 50px; font-weight: 600; min-height: 40px; box-shadow: 0 2px 4px rgba(0,0,0,0.03); }
.cat-chip-icon { font-size: 16px; }
}

/* ── Very small (≤ 380px) ── */
@media (max-width: 380px) {
  .hero-title { font-size: 18px; }
  .panchang-header h2 { font-size: 15px; }
  .rashi-grid { grid-template-columns: repeat(2, 1fr); }
  .pw-grid { grid-template-columns: 1fr; }
  .fl-name { font-size: 15px; }
}

/* Auto Ads Grid Safeguards */
.hero-grid .google-auto-placed,
.pw-grid .google-auto-placed,
.rashi-grid .google-auto-placed,
.festival-list .google-auto-placed,
.cat-strip .google-auto-placed,
.main-layout .google-auto-placed {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    margin: 32px 0 !important;
    justify-self: center;
}
