/* Shared polish for the homepage and Kundali page. */
html { min-width: 320px; max-width: 100%; overflow-x: clip; }
body { max-width: 100%; overflow-x: clip; }
img, svg, video, canvas { max-width: 100%; }
button, input, select, textarea { min-width: 0; }
.hero { align-items: center; }
.kundali-art { align-self: center !important; }

/* Keep the blog and Explore as separate, clearly spaced homepage sections. */
.about.section { padding-bottom: clamp(58px, 7vw, 92px); }
.explore.section { padding-top: clamp(62px, 8vw, 100px); }
.explore-blog.section { max-width: 1240px; margin: 0 auto; padding: clamp(64px, 8vw, 90px) clamp(16px, 5vw, 28px) clamp(32px, 4vw, 48px); border: 0; }
.explore-blog .section-heading { align-items: end; }
.explore-blog .section-heading > p { max-width: 410px; }
.explore-blog-title { margin: 12px 0 0; font-size: clamp(2rem, 3.5vw, 3.1rem); line-height: 1; letter-spacing: -.06em; }
.explore-blog .blog-grid { margin-top: 28px; }
.explore-blog > .text-link { display: inline-block; margin-top: 24px; }

/* Student offer details are legible and grouped, with minimal data collection. */
.student-fields { min-width: 0; margin: 4px 0; padding: 14px; border: 1.5px solid rgba(23,35,126,.22); background: #f4f0ff; }
.student-fields legend { padding: 0 6px; color: var(--purple); font: 600 .7rem "DM Mono"; }
.student-fields label { display: block; margin-bottom: 12px; }
.student-fields .student-confirm { display: flex; align-items: flex-start; gap: 8px; line-height: 1.45; }
.student-fields input[type="checkbox"] { display: inline-block; flex: 0 0 20px; width: 20px; height: 20px; margin: 0; padding: 0; accent-color: var(--purple); }
.student-privacy-note { margin: 6px 0 0; color: #566193; font-size: .72rem; line-height: 1.5; }

/* GeoNames-backed birthplace suggestions in the booking dialog. */
.booking-place-picker { position: relative; min-width: 0; }
.booking-place-picker > label { display: block; }
.booking-place-picker > input { display: block; width: 100%; }
.booking-place-results { position: absolute; z-index: 80; top: calc(100% - 48px); left: 0; right: 0; max-height: min(48vh, 340px); overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--ink); background: var(--cream); box-shadow: 4px 5px 0 var(--ink); display: none; }
.booking-place-results.open { display: block; }
.booking-place-results .place-option { display: block; width: 100%; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); background: var(--cream); color: var(--ink); text-align: left; cursor: pointer; font: 600 .8rem "DM Sans", sans-serif; }
.booking-place-results .place-option:hover, .booking-place-results .place-option:focus-visible { background: #eee9ff; outline: 2px solid var(--purple); outline-offset: -2px; }
.booking-place-results .place-option small { display: block; margin-top: 3px; color: #566193; font: 400 .68rem "DM Sans", sans-serif; }
.booking-place-results .place-option[role="status"] { color: #566193; cursor: default; }
.booking-place-hint { display: block; margin-top: 5px; color: #566193; font-size: .68rem; line-height: 1.4; }
.booking-place-picker .field-error { display: block; margin-top: 5px; }
.booking-place-picker .field-error[hidden] { display: none; }
.chat-question-field { display: grid; gap: 5px; }
.chat-question-field[hidden] { display: none; }
.chat-question-field label { display: block; }
.chat-question-inputs { display: grid; gap: 9px; }
.chat-question-field .chat-question-input-label { display: grid; gap: 4px; color: var(--ink); font-size: .78rem; font-weight: 600; }
.chat-question-field textarea { display: block; width: 100%; min-height: 68px; resize: vertical; padding: 10px 12px; border: 1.5px solid var(--ink); border-radius: 0; background: #fffdf7; color: var(--ink); font: 400 .92rem/1.5 "DM Sans", sans-serif; }
.chat-question-field small, .contact-caution { display: block; color: #566193; font-size: .7rem; line-height: 1.45; }
.chat-question-field .field-error { color: #9a3f35; }
.contact-caution { margin-top: -8px; }

/* A clear but quiet disclaimer treatment. */
.trust .disclaimer { max-width: 870px; padding: clamp(14px, 2vw, 20px) clamp(16px, 3vw, 28px); border-left: 3px solid var(--coral); background: #f0eff8; color: #29356e; box-shadow: 2px 3px 0 rgba(23,35,126,.12); font: 600 clamp(.86rem, 1.1vw, 1rem)/1.55 "DM Sans", sans-serif; text-align: left; }

/* Give the Kundali image and its caption separate visual space. */
.kundali-art { gap: 0; background: none !important; }
.kundali-art picture { position: relative; z-index: 0; }
.kundali-art img { display: block; }
.kundali-art figcaption { position: relative; z-index: 1; width: fit-content; max-width: 100%; margin: 24px auto 0; padding: 13px 18px 0; border-top: 1px solid rgba(23,35,126,.2); background: var(--cream); line-height: 1.55; }

/* A small circular arrow gives the return link direction without a heavy pill. */
.kundali-header .kundali-back { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 5px 8px 5px 5px; border: 0; border-radius: 999px; background: transparent; color: #405b4a; font: 600 .78rem "DM Sans", sans-serif; text-decoration: none; transition: color .2s ease; }
.kundali-header .kundali-back:hover, .kundali-header .kundali-back:focus-visible { background: transparent; color: var(--ink); outline: 2px solid rgba(113,141,122,.38); outline-offset: 2px; }
.back-arrow { display: inline-grid; flex: 0 0 32px; width: 32px; height: 32px; place-items: center; border: 1px solid rgba(64,91,74,.32); border-radius: 50%; color: #405b4a; transition: transform .2s ease, background-color .2s ease, border-color .2s ease; }
.back-arrow svg { display: block; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.kundali-back:hover .back-arrow { transform: translateX(-2px); border-color: #718d7a; background: #e8eee3; }

@media (min-width: 1600px) {
  .hero, .section, .site-header, footer { max-width: min(92vw, 1600px); }
  .explore-blog .blog-grid { gap: clamp(20px, 1.5vw, 30px); }
}

/* Center the artwork against the copy on tablets and laptops, keeping both
   sides of the hero balanced instead of pinning the image to the section top. */
@media (min-width: 721px) and (max-width: 1439px) {
  .hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    align-items: center;
    gap: clamp(22px, 4.4vw, 64px);
  }
  .hero-copy { min-width: 0; max-width: 620px; align-self: center; }
  .kundali-art {
    width: min(100%, clamp(280px, 30vw, 430px));
    max-width: 430px;
    justify-self: center;
    align-self: center !important;
    margin: 0 auto !important;
  }
  .kundali-art picture, .kundali-art img { width: 100%; }
  .kundali-art figcaption { margin-top: clamp(18px, 2vw, 26px); }
}

@media (min-width: 721px) and (max-width: 900px) {
  .hero { gap: clamp(18px, 3vw, 28px); padding-top: 36px; padding-bottom: 36px; }
  .hero h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); }
  .kundali-art { width: min(100%, clamp(280px, 34vw, 360px)); max-width: 360px; }
}

@media (max-width: 760px) {
  .hero { grid-template-columns: minmax(0, 1fr) !important; align-items: start; gap: 12px; }
  .hero-copy { order: 0; }
  .kundali-art { order: 1; width: min(100%, 480px); max-width: min(100%, 480px); margin: 8px auto 0 !important; align-self: center !important; }
  .about.section { padding-bottom: clamp(46px, 10vw, 72px); }
  .explore-blog.section { padding: 52px 20px 32px; }
  .explore.section { padding-top: 58px; }
  .explore-blog .section-heading { display: block; }
  .explore-blog .section-heading > p { max-width: 100%; }
  .explore-blog .blog-grid { grid-template-columns: 1fr; }
  .free-consultation.section { padding-top: 28px; }
  .free-consultation-card { grid-template-columns: minmax(0, 1fr); }
  .free-offer { justify-self: start; }
  .kundali-art figcaption { margin-top: 20px; padding-top: 11px; }
}

@media (max-width: 380px) {
  .explore-blog.section { padding-bottom: 28px; }
  .student-fields { padding: 11px; }
  .free-copy h2 { font-size: clamp(2rem, 9vw, 2.7rem); }
}
