/* AstroTheme — shared layer: tokens, reset, header, footer, buttons, ads,
   modal and the components used on several pages (zodiac + kundali cards).
   Page-specific rules live in home.css (home page) and pages.css (inner pages).
   Every class is prefixed as- to stay out of the global CSS. */

/* ── Tokens ──────────────────────────────────────────────────────────────── */
:root {
  --as-ink: #1c2757;          /* navy headings */
  --as-text: #3d4459;
  --as-muted: #5b6175;
  --as-gold: #c98a1e;
  --as-gold-dk: #b47716;
  --as-gold-2: #d99a2b;
  --as-gold-soft: #fbeed6;
  --as-bg: #fdfaf6;
  --as-surface: #ffffff;
  --as-line: #e6e0d6;
  --as-line-soft: #f0ebe3;
  --as-rose: #fde8ec;  --as-rose-ink: #b4223f;  --as-rose-pill: #f8aeb8;
  --as-peach: #fdf2e3; --as-peach-ink: #9a5d0a; --as-peach-pill: #fbd38a;
  --as-sky: #e6f1fd;   --as-sky-ink: #2f3290;   --as-sky-pill: #9fd3fb;
  --as-mint: #e8f6ea;  --as-mint-ink: #2f9e5c;  --as-mint-pill: #a7e3b4;
  --as-lilac: #efeefd; --as-lilac-ink: #6c4fd1;
  --as-radius: 12px;
  --as-shadow: 0 10px 30px rgba(120, 90, 40, .12);
  --as-serif: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
  --as-display: 'Cormorant Garamond', 'Libre Baskerville', Georgia, serif;   /* hero headline */
  --as-sans: 'Poppins', 'Segoe UI', Roboto, Arial, sans-serif;
  --as-wrap: 1024px;
}

/* ── Reset / base ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body.as-body { margin: 0; background: var(--as-bg); color: var(--as-text); font: 400 15px/1.5 var(--as-sans);
  -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body.as-modal-open { overflow: hidden; }
body.as-has-anchor { padding-bottom: 70px; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--as-gold); }
h1, h2, h3, h4 { font-family: var(--as-serif); font-weight: 700; color: var(--as-ink); line-height: 1.2; margin: 0 0 .5em; }
:focus-visible { outline: 3px solid var(--as-gold); outline-offset: 3px; border-radius: 6px; }
.as-wrap { max-width: var(--as-wrap); margin: 0 auto; padding: 0 16px; }
.as-center { text-align: center; }
.as-main { min-height: 50vh; }
/* Soft-edged artwork: fades the square edges of the illustrated icons. */
.as-icon-img { -webkit-mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, #000 62%, transparent 100%);
  mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, #000 62%, transparent 100%); }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.as-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; cursor: pointer;
  font: 600 15px/1 var(--as-sans); padding: 13px 24px; border-radius: 8px; text-decoration: none;
  transition: background .15s, filter .15s, transform .15s; }
.as-btn-gold { background: linear-gradient(#d69a2c, #c98a1e); color: #fff; }
.as-btn-gold:hover { background: var(--as-gold-dk); }
.as-btn-ghost { background: #fff; color: var(--as-ink); border: 1.5px solid var(--as-line); }
.as-btn-ghost:hover { border-color: var(--as-gold); }
.as-btn-lg { padding: 16px 28px; font-size: 15.5px; }
.as-btn-block { width: 100%; }
.as-btn-outline { border: 1.5px solid; border-radius: 30px; padding: 9px 26px; font-size: 14px; font-weight: 500;
  background: rgba(255, 255, 255, .75); }
.as-btn-outline:hover { background: #fff; }
.as-pill { border-radius: 30px; padding: 9px 32px; font-size: 14.5px; color: var(--as-ink); }
.as-pill:hover { filter: brightness(.96); }
.as-pill-rose { background: var(--as-rose-pill); } .as-pill-peach { background: var(--as-peach-pill); }
.as-pill-sky { background: var(--as-sky-pill); }   .as-pill-mint { background: var(--as-mint-pill); }
.as-inline-link { background: none; border: 0; padding: 0; color: var(--as-gold); font: inherit; text-decoration: underline; cursor: pointer; }
.as-link { color: var(--as-gold); font-weight: 600; text-decoration: none; font-size: 14px; }
.as-link-sm { font-size: 13px; margin-top: 8px; display: inline-block; }

/* ── Header ──────────────────────────────────────────────────────────────── */
.as-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--as-line-soft); }
.as-header-bar { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  height: 74px; max-width: var(--as-wrap); margin: 0 auto; padding: 0 30px 0 38px; }
.as-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; flex-shrink: 0; }
.as-brand-sun { width: 64px; height: 62px; }
.as-brand-logo { max-height: 56px; width: auto; }
.as-brand-name { font: 700 32px/1 var(--as-serif); color: var(--as-ink); letter-spacing: -.5px; }
.as-brand-name span { color: var(--as-gold); }
.as-brand small { display: block; font: 400 12.5px var(--as-sans); color: var(--as-muted); margin-top: 4px; }
.as-nav { display: flex; gap: 34px; }
.as-nav a { position: relative; padding: 8px 0; color: var(--as-ink); text-decoration: none; font-weight: 500; font-size: 14.5px; }
.as-nav a:hover, .as-nav a.is-active { color: var(--as-gold); }
.as-nav a.is-active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 2.5px; background: var(--as-gold); border-radius: 2px; }
.as-header-cta { display: inline-flex; align-items: center; gap: 8px; border-radius: 30px; padding: 10px 24px 10px 18px; font-weight: 500;
  background: var(--as-gold); color: #fff; text-decoration: none; }
.as-header-cta.is-active { background: var(--as-gold-dk); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35); }
.as-header-cta-short { display: none; }
.as-header-cta:hover { background: var(--as-gold-dk); }
.as-menu-btn { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.as-menu-btn span { display: block; width: 24px; height: 2.5px; background: var(--as-ink); margin: 5px 0; border-radius: 2px; }

/* ── Breadcrumbs (article + blog pages) ─────────────────────────────────── */
.as-crumbs { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 14px;
  font-size: 13px; color: var(--as-muted); }
.as-crumbs a { color: var(--as-muted); text-decoration: none; }
.as-crumbs a:hover { color: var(--as-gold); }
.as-crumbs span { color: #c9b89c; font-size: 16px; line-height: 1; }
.as-crumbs .as-crumb-current { color: var(--as-ink); font-size: 13px; font-weight: 500; }

/* ── Section titles ──────────────────────────────────────────────────────── */
.as-section { padding: 40px 0; }
.as-section-tight { padding: 20px 0; }
.as-section-head { text-align: center; margin-bottom: 14px; }
.as-sun-mark { width: 28px; height: 28px; margin: 0 auto 4px; }
.as-section-head h2 { display: inline-flex; align-items: center; gap: 22px; font-size: clamp(21px, 3vw, 26px); margin: 0; }
.as-section-head h2::before, .as-section-head h2::after { content: ''; width: 58px; height: 2px; background: linear-gradient(90deg, transparent, var(--as-gold)); }
.as-section-head h2::after { transform: scaleX(-1); }
.as-section-head p { font-size: 13.5px; margin: 6px 0 0; }
.as-subhead { font-size: 21px; margin: 34px 0 14px; }

/* ── Tone backgrounds ────────────────────────────────────────────────────── */
.as-bg-rose { background: var(--as-rose); }   .as-bg-peach { background: var(--as-peach); }
.as-bg-sky { background: var(--as-sky); }     .as-bg-mint { background: var(--as-mint); }
.as-bg-lilac { background: var(--as-lilac); }

/* ── Zodiac artwork + cards ──────────────────────────────────────────────── */
.as-zimg { width: 86px; height: 72px; object-fit: contain; flex-shrink: 0; }
.as-zimg-sm { width: 40px; height: 36px; }
.as-zimg-lg { width: 120px; height: 100px; }
.as-zimg-xl { width: 150px; height: 125px; }
/* Per-sign card colours from the design. */
.as-z-aries { background: #fee9ef; }   .as-z-taurus { background: #fdf0e0; }    .as-z-gemini { background: #e8f5ff; }
.as-z-cancer { background: #e5f4fe; }  .as-z-leo { background: #fff3dc; }       .as-z-virgo { background: #e7f8ec; }
.as-z-libra { background: #f4effd; }   .as-z-scorpio { background: #feeaf1; }   .as-z-sagittarius { background: #fdeaea; }
.as-z-capricorn { background: #e4ecfe; } .as-z-aquarius { background: #ddf3fc; } .as-z-pisces { background: #efe7fe; }

.as-sign-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 12px; }
.as-sign-card { display: block; border-radius: var(--as-radius); text-align: center; padding: 8px 6px 10px; text-decoration: none; transition: transform .2s; }
.as-sign-card:hover { transform: translateY(-3px); }
.as-sign-card .as-zimg { margin: 0 auto; }
.as-sign-card strong { display: block; font: 700 15px/1.3 var(--as-serif); color: var(--as-ink); margin-top: 4px; }
.as-sign-card span { font-size: 12px; color: var(--as-text); }
.as-sign-grid-sm .as-zimg { width: 60px; height: 50px; }
.as-sign-grid-sm .as-sign-card strong { font-size: 14px; }
.as-sign-grid-sm .as-sign-card span { font-size: 10.5px; white-space: nowrap; }

.as-stars { color: #e5dccb; letter-spacing: 1px; white-space: nowrap; }
.as-stars .on { color: var(--as-gold-2); }

/* ── Kundali service cards ───────────────────────────────────────────────── */
.as-service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }
.as-service { display: flex; flex-direction: column; align-items: center; text-align: center; border-radius: var(--as-radius); padding: 14px 16px 16px; }
.as-service-img { height: 64px; width: auto; margin: 0 auto 10px; }
.as-service h3 { font-size: 18px; margin-bottom: 6px; }
.as-service p { font-size: 13.5px; line-height: 1.5; margin: 0 0 18px; }
.as-service .as-btn { margin-top: auto; }
.as-service-grid-sm { grid-template-columns: repeat(3, 1fr); }
.as-service-grid-sm .as-service-img { height: 48px; }
.as-service-grid-sm h3 { font-size: 16px; margin-bottom: 14px; }

/* ── Blog post cards (home + blog/category) ─────────────────────────────── */
.as-post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.as-post { display: flex; flex-direction: column; background: var(--as-surface); border-radius: var(--as-radius); overflow: hidden; text-decoration: none; border: 1px solid var(--as-line); transition: transform .15s, box-shadow .15s; }
.as-post:hover { transform: translateY(-2px); box-shadow: var(--as-shadow); }
.as-post-media { aspect-ratio: 16 / 9; background: linear-gradient(135deg, #fde5c3, #e2dcfa); display: grid; place-items: center; overflow: hidden; }
.as-post-media img { width: 100%; height: 100%; object-fit: cover; }
.as-post-noimg { font-size: 40px; color: var(--as-gold); }
.as-post-body { padding: 16px 18px 18px; }
.as-post-cat { font-size: 12px; font-weight: 600; color: var(--as-gold); text-transform: uppercase; letter-spacing: .08em; }
.as-post h3 { font-size: 18px; margin: 4px 0 6px; }
.as-post-date { font-size: 12.5px; color: var(--as-muted); }
.as-pager { display: flex; justify-content: center; gap: 12px; margin-top: 26px; }


/* ── Ads ─────────────────────────────────────────────────────────────────── */
.as-ad { margin: 24px auto; text-align: center; max-width: 100%; }
.as-ad.is-empty { display: none; }
.as-ad-label { display: block; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--as-muted); margin-bottom: 4px; }
.as-ad-slot { display: flex; justify-content: center; min-height: 50px; }
.as-ad-top { margin: 12px auto 0; }

/* ── Birth-details modal ─────────────────────────────────────────────────── */
.as-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.as-modal[hidden] { display: none; }
.as-modal-backdrop { position: absolute; inset: 0; background: rgba(28, 39, 87, .55); backdrop-filter: blur(3px); }
.as-modal-panel { position: relative; width: 100%; max-width: 548px; max-height: calc(100vh - 32px); overflow-y: auto; background: #fff;
  border-radius: 16px; padding: 26px 22px 22px; box-shadow: var(--as-shadow); animation: as-pop .18s ease-out; }
@keyframes as-pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.as-modal-x { position: absolute; top: 10px; right: 12px; width: 34px; height: 34px; border: 0; background: #f5efe5; border-radius: 50%; font-size: 22px; line-height: 1; cursor: pointer; color: var(--as-ink); }
.as-eyebrow { display: inline-block; font-size: 14px; font-weight: 500; letter-spacing: 1.4px; text-transform: uppercase; color: var(--as-gold); }
.as-modal-panel .as-eyebrow { font-size: 12px; }
.as-modal-panel h3 { font-size: 21px; margin: 6px 0 4px; }
.as-modal-sub { margin: 0 0 16px; font-size: 14px; }
#asBirthForm { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.as-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--as-ink); }
.as-field[hidden] { display: none; }
.as-field em { font-style: normal; font-weight: 400; color: var(--as-muted); }
.as-field input { width: 100%; height: 43px; padding: 0 12px; border: 1px solid #dcdcdc; border-radius: 6px; font: 400 14px var(--as-sans); color: var(--as-text); background: #fff; }
.as-field input:focus { outline: none; border-color: var(--as-gold); }
.as-field-full { grid-column: 1 / -1; }
.as-check { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.as-form-error { color: var(--as-rose-ink); font-size: 14px; margin: 0; font-weight: 500; }
#asModalSubmit { height: 47px; border-radius: 6px; }

.as-modal-saved { margin: -6px 0 14px; padding: 8px 12px; border-radius: 8px; background: var(--as-gold-soft); font-size: 13px; color: var(--as-ink); }
.as-modal-saved[hidden] { display: none; }

/* ── Kundali Milan promo banner (_macros.milan_banner) ───────────────────── */
.as-milan-banner { position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px;
  margin: 26px 0; padding: 24px 28px; border-radius: 20px; color: #d9d8f2;
  background: radial-gradient(360px 200px at 0% 50%, rgba(243, 193, 96, .28), transparent 70%),
              radial-gradient(420px 220px at 100% 0%, rgba(228, 106, 126, .32), transparent 70%),
              linear-gradient(120deg, #1c2757, #3b2a66);
  box-shadow: 0 18px 40px rgba(28, 39, 87, .22); }
.as-milan-banner::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(1.4px 1.4px at 22% 30%, #fff, transparent), radial-gradient(1px 1px at 58% 18%, #fff, transparent),
                    radial-gradient(1.2px 1.2px at 72% 78%, #fff, transparent), radial-gradient(1px 1px at 38% 84%, #fff, transparent),
                    radial-gradient(1.3px 1.3px at 90% 46%, #fff, transparent); }
.as-milan-banner > * { position: relative; z-index: 1; }
.as-milan-banner-art { display: grid; place-items: center; width: 96px; height: 96px; border-radius: 50%;
  background: radial-gradient(circle, #fff 55%, #fdeccf); border: 3px solid rgba(243, 193, 96, .6);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, .06), 0 0 34px rgba(243, 193, 96, .4); }
/* The artwork has a light backdrop; multiply blends it into the medallion. */
.as-milan-banner-art .as-service-img { height: 62px; margin: 0; mix-blend-mode: multiply; }
.as-milan-banner-eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; color: #f3c160; }
.as-milan-banner h3 { margin: 2px 0 4px; font: 700 clamp(22px, 2.6vw, 28px)/1.15 var(--as-display); color: #fff; }
.as-milan-banner p { margin: 0 0 12px; font-size: 14.5px; max-width: 520px; }
.as-milan-banner-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.as-milan-banner-chips li { padding: 4px 12px; border-radius: 30px; font-size: 12.5px; color: #f6e7c4;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); }
.as-milan-banner-chips b { color: #f3c160; }
.as-milan-banner .as-btn { border-radius: 30px; white-space: nowrap; }
@media (max-width: 760px) {
  .as-milan-banner { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 14px; padding: 24px 20px; }
  .as-milan-banner-art { width: 80px; height: 80px; }
  .as-milan-banner-art .as-service-img { height: 50px; }
  .as-milan-banner p { margin-left: auto; margin-right: auto; }
  .as-milan-banner-chips { justify-content: center; }
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.as-footer { background: var(--as-ink); color: #b9bcd8; margin-top: 40px; padding: 44px 0 20px; }
.as-footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 28px; }
.as-footer-brand { font: 700 22px var(--as-serif); color: #fff; margin-bottom: 8px; }
.as-footer h4 { color: #fff; font-size: 15px; margin-bottom: 10px; }
.as-footer a { display: block; color: #b9bcd8; text-decoration: none; font-size: 14px; padding: 3px 0; }
.as-footer a:hover { color: var(--as-gold-2); }
.as-footer p { font-size: 14px; margin: 0; }
.as-footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 28px; padding-top: 16px; display: flex; flex-direction: column; gap: 4px; }
.as-footer-bottom p { font-size: 12.5px; }

/* ── Responsive (shared) ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .as-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: #fff;
    border-top: 1px solid var(--as-line-soft); border-bottom: 1px solid var(--as-line-soft); padding: 8px 24px 16px; }
  .as-nav.is-open { display: flex; }
  .as-nav a { padding: 10px 0; }
  .as-nav a.is-active::after { display: none; }
  .as-menu-btn { display: block; }
  .as-header-bar { padding: 0 16px; }
  .as-header-cta { margin-left: auto; margin-right: 8px; padding: 9px 18px; }
  .as-sign-grid { grid-template-columns: repeat(4, 1fr); }
  .as-service-grid { grid-template-columns: 1fr 1fr; }
  .as-footer-grid { grid-template-columns: 1fr 1fr; }
  .as-post-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .as-brand-sun { width: 46px; height: 44px; }
  .as-brand-name { font-size: 25px; }
  .as-brand small { font-size: 11px; }
  .as-header-cta-long { display: none; }
  .as-header-cta-short { display: inline; }
  .as-header-cta { padding: 8px 14px 8px 10px; gap: 6px; font-size: 14px; }
  .as-sign-grid { grid-template-columns: repeat(3, 1fr); }
  .as-service-grid, .as-service-grid-sm { grid-template-columns: 1fr; }
  .as-section-head h2 { gap: 12px; }
  .as-section-head h2::before, .as-section-head h2::after { width: 30px; }
  #asBirthForm { grid-template-columns: 1fr; }
  .as-post-grid { grid-template-columns: 1fr; }
  .as-footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 380px) { .as-sign-grid { grid-template-columns: repeat(2, 1fr); } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* ── Next-year horoscope ribbon (base.html, from October on) ─────────────── */
.as-yr-ribbon { display: block; padding: 10px 16px; text-align: center; text-decoration: none; font-size: 14px; color: #fff;
  background: linear-gradient(90deg, #232a63, #3b2a66 50%, #232a63); }
.as-yr-ribbon b { color: #f3c160; }
.as-yr-ribbon:hover { filter: brightness(1.12); }
