/* Public-site layout fixes. Loaded in the document head before first paint. */
html { -webkit-text-size-adjust:100%; text-size-adjust:100%; }
body > nav { position:relative; z-index:100; }
main { min-width:0; }
main :where(div,section,article,ul,li) { min-width:0; }
main :where(img,video,iframe) { max-width:100%; }
main :where(.ql-editor,.prose,p,h1,h2,h3) { overflow-wrap:anywhere; }
main .ql-editor { overflow:visible; }
main .ql-editor img { height:auto!important; }
main main img { width:100%; height:auto!important; max-height:480px; object-fit:cover; }
main main [class*="md:w-[48.75rem]"] { width:min(100%,780px)!important; height:auto!important; }
/* Level 3 page banners should show the complete photograph at every width. */
main.max-w-6xl [data-phx-component] > .relative.lg\:pb-32.py-12.bg-white:has(> .absolute.inset-0 > img.max-w-full.object-cover) {
  padding:0!important;
  overflow:hidden;
}
main.max-w-6xl [data-phx-component] > .relative.lg\:pb-32.py-12.bg-white > .absolute.inset-0 {
  position:static;
}
main.max-w-6xl [data-phx-component] > .relative.lg\:pb-32.py-12.bg-white > .absolute.inset-0 > img {
  display:block;
  width:100%!important;
  height:auto!important;
  max-width:none;
  object-fit:contain;
}
main.max-w-6xl [data-phx-component] > .relative.lg\:pb-32.py-12.bg-white > .relative.max-w-7xl {
  position:absolute;
  inset:0;
  pointer-events:none;
}
/* The second Level 3 hero uses a 600 px image beside the introduction. */
main.max-w-6xl main.lg\:relative > div:has(> img.absolute.inset-0.object-cover) {
  height:auto!important;
  max-height:none!important;
}
main.max-w-6xl main.lg\:relative > div > img.absolute.inset-0.object-cover {
  position:static!important;
  display:block;
  width:100%!important;
  height:auto!important;
  max-height:none!important;
  padding:0!important;
  object-fit:contain;
}
/* Preserve the complete photo in the Level 3 offering cards. */
main.max-w-6xl img.object-cover.w-full.h-64.lg\:h-52.rounded-md {
  object-fit:contain;
  background:#f7f6f2;
}
/* Let page heroes grow with long quotes and descriptions instead of centering
   oversized text into the breadcrumb and clipping it below the fixed height. */
@media (min-width:1024px) {
  main main.lg\:relative > div[class*="lg:h-[37.5rem]"] { height:auto!important; min-height:37.5rem; }
}
main [class~="md:w-7/12"], main [class~="md:w-8/12"] { width:min(100%,78ch); }
main iframe[src*="youtube"], main iframe[src*="vimeo"] { width:100%; height:auto; aspect-ratio:16/9; }
.av-table-scroll { width:100%; max-width:100%; overflow-x:auto; overscroll-behavior-inline:contain; -webkit-overflow-scrolling:touch; }
.av-table-scroll table { min-width:100%; max-width:none; }
main pre { max-width:100%; overflow-x:auto; }
main form :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),select,textarea) { box-sizing:border-box; max-width:100%; font-size:16px; }
main form :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),select,button) { min-height:44px; }
main form textarea { min-height:140px; }
main .g-recaptcha { max-width:100%; overflow-x:auto; }
body > nav .group:focus-within > ul { display:block; }
body > nav .group:nth-last-child(-n+2) > ul { right:0; left:auto; }
:where(a,button,input,select,textarea):focus-visible { outline:2px solid #9a5340; outline-offset:3px; }
#auroville-chat-root { right:max(16px,env(safe-area-inset-right))!important; bottom:max(16px,env(safe-area-inset-bottom))!important; }
#auroville-chat-root:not([data-av-chat-open="true"]) { bottom:calc(40px + env(safe-area-inset-bottom))!important; }
#av-chat-box { width:min(360px,calc(100vw - 32px))!important; height:min(520px,calc(var(--av-visible-height,100dvh) - 64px))!important; max-height:calc(var(--av-visible-height,100dvh) - 64px)!important; margin-bottom:0!important; }
#av-chat-input { font-size:16px!important; }
#av-chat-close { min-width:36px; min-height:36px; }
#av-chat-send { min-height:40px; }

/* Keep each Matrimandir topic beside its own explanation on the homepage. */
main .av-matrimandir-source { display:none!important; }
main .av-matrimandir-section { padding:48px 32px; position:relative; z-index:50; }
main .av-matrimandir-inner { max-width:1120px; margin-inline:auto; }
main .av-matrimandir-title { margin:0 0 32px; font-size:30px; line-height:1.25; font-weight:700; }
main .av-matrimandir-list { display:grid; gap:32px; padding:0; margin:0; list-style:none; }
main .av-matrimandir-row { display:grid; grid-template-columns:minmax(0,32%) minmax(0,1fr); gap:36px; align-items:start; }
main .av-matrimandir-label { display:flex; align-items:flex-start; gap:10px; font-size:clamp(20px,2.2vw,28px); line-height:1.4; font-weight:700; }
main .av-matrimandir-bullet { flex:none; line-height:inherit; }
main .av-matrimandir-details { padding-top:2px; min-width:0; font-size:16px; line-height:1.7; }
main .av-matrimandir-details h2 { margin:0 0 14px; font-size:clamp(20px,1.8vw,24px); line-height:1.35; font-weight:700; }
main .av-matrimandir-details p { margin:0 0 12px; }
main .av-matrimandir-details p:last-child { margin-bottom:0; }
main .av-matrimandir-details a { color:inherit!important; text-decoration:underline; text-underline-offset:2px; }

@media (max-width:1023px) {
  main .av-matrimandir-section { margin-inline:-16px; padding:32px 24px!important; }
  main .av-matrimandir-title { margin-bottom:24px; }
  main .av-matrimandir-row { gap:24px; }
  body > nav > div { padding-inline:12px!important; }
  body > nav > div > .flex { gap:4px; min-height:64px; height:auto!important; }
  body > nav > div > .flex > :first-child { flex:1; min-width:0; }
  body > nav > div > .flex > :first-child .flex { padding-inline:0!important; }
  body > nav a[href="/"] span.mr-10 { margin-right:0!important; }
  body > nav a[href="/"] img { width:clamp(112px,36vw,168px)!important; height:auto!important; }
  body > nav #custom_translate_btn { width:32px!important; height:32px!important; flex-shrink:0; }
  body > nav button[aria-controls="mobile-menu"] { min-width:44px; min-height:44px; }
  #mobile-menu { display:none!important; max-height:calc(100dvh - 88px); overflow-y:auto; padding:8px 0; }
  body > nav:has([aria-controls="mobile-menu"][aria-expanded="true"]) #mobile-menu { display:block!important; }
  #mobile-menu button { min-height:44px; text-align:left; justify-content:space-between; font-size:16px; padding:10px 14px; }
  #mobile-menu button::after { content:'+'; font-size:22px; }
  #mobile-menu button[aria-expanded="true"]::after { content:'−'; }
  #mobile-menu [x-show="open"], #mobile-menu [x-show="open"] > div { position:static!important; width:100%!important; }
  #mobile-menu [data-av-submenu] { display:none!important; }
  #mobile-menu [data-av-open="true"] { display:block!important; }
  #mobile-menu a { white-space:normal; text-align:left; justify-content:flex-start; min-height:40px; padding:10px 22px; font-size:15px; }
  body > nav #demo-2 { position:relative; width:44px; height:44px; }
  body > nav #demo-2_q { box-sizing:border-box!important; position:absolute; right:0; top:0; width:44px!important; height:44px!important; max-width:calc(100vw - 32px); padding:8px 36px 8px 10px; transition:width .15s; }
  body > nav #demo-2_q:focus { width:min(260px,calc(100vw - 32px))!important; z-index:102; }
  body > nav #demo-2 .mt-1 { margin-top:0; height:44px; }
  body > nav #demo-2 .pointer-events-none { height:44px; z-index:103; }
  body > nav #demo-2 > div > span { pointer-events:none; }
  main { padding-inline:16px!important; }
  main .pr-32 { padding-right:0!important; }
  main .pr-32 > div { width:100%; }
  main .mx-10 { margin-inline:0!important; }
  main .mb-96 { margin-bottom:48px!important; }
  main main { padding-inline:0!important; margin-top:24px!important; }
  main h1, main h1 span, main .text-6xl, main .text-5xl { font-size:clamp(28px,4.5vw,40px)!important; line-height:1.2!important; }
  main .text-4xl { font-size:clamp(24px,3.4vw,32px)!important; line-height:1.3!important; }
  main .text-3xl { font-size:clamp(22px,3vw,28px)!important; line-height:1.35!important; }
  main main > div > .text-4xl { font-size:clamp(18px,2.5vw,24px)!important; line-height:1.45!important; }
  main .ql-editor { padding-inline:0; font-size:16px; line-height:1.75; }
  main nav[aria-label="Breadcrumb"] a { padding:10px 6px; margin-right:0; font-size:14px; }
  main .carousel { margin-inline:-16px; width:calc(100% + 32px)!important; }
  main .carousel-item { height:clamp(200px,40vw,410px)!important; }
  main .carousel-item > img { width:100%!important; height:100%!important; object-fit:cover; }
  main .carousel-item > .absolute { font-size:13px; line-height:1.4; padding:9px 42px; }
  main .bg-bgorg { margin-inline:-16px; padding:28px 22px!important; }
  main .bg-bgorg > div, main .bg-bgorg .ql-editor { font-size:clamp(18px,2.6vw,23px)!important; line-height:1.65!important; }
  main div.lg\:grid-cols-3.bg-bgyellow { margin-inline:-16px; padding:28px 22px!important; }
  main div.lg\:grid-cols-3.bg-bgyellow .text-3xl { font-size:clamp(23px,3vw,30px)!important; line-height:1.3!important; }
  main div.lg\:grid-cols-3.bg-bgyellow .mt-8 { margin-top:20px!important; }
  main div.lg\:grid-cols-3.bg-bgyellow .-mt-5 { margin-top:0!important; padding-inline:0!important; }
  main div.lg\:grid-cols-3.bg-bgyellow :is(h2,strong) { overflow-wrap:normal; }
  main div.lg\:grid-cols-3.bg-bgyellow h2 { font-size:20px!important; margin-block:0 12px; }
  main div.lg\:grid-cols-3.bg-bgyellow p { margin-block:0 16px; }
  main div.lg\:grid-cols-3.bg-bgyellow h2:not(:first-child) { margin-top:24px; }
  .av-home-sections-group { padding:0!important; margin:24px auto!important; }
  .av-home-section-cards { margin:0!important; padding:0!important; }
  .av-home-card-grid { grid-template-columns:repeat(2,minmax(0,1fr))!important; gap:14px!important; }
  .av-home-card-item img { height:auto!important; aspect-ratio:4/3; }
  .av-home-card-title { font-size:15px!important; padding:10px 7px!important; }
  main section.body-font > div > .flex.flex-wrap { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin:0!important; }
  main section.body-font > div > .flex.flex-wrap > div { width:auto!important; margin:0!important; padding:0!important; }
  main section.body-font img { height:auto!important; aspect-ratio:4/3; object-fit:cover; }
  main section.body-font .text-xl { font-size:16px; line-height:1.4; }
  main .grid.grid-cols-1.sm\:grid-cols-2 { grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-inline:0!important; }
  main .grid.grid-cols-1.sm\:grid-cols-2 img { height:auto!important; aspect-ratio:4/3; object-fit:cover; }
  main .text-5xl, main .text-4xl { padding-bottom:20px; }
  main .bg-orange-300 { margin:32px 0!important; height:auto!important; padding:0!important; overflow:hidden; }
  main .bg-orange-300 > div:first-child { position:static!important; width:100%!important; height:220px!important; }
  main .bg-orange-300 > div:first-child img { padding:0!important; width:100%!important; height:100%!important; object-fit:cover; }
  main .bg-orange-300 > div:nth-child(2) { padding:24px!important; }
  main .bg-orange-300 > div:nth-child(2) > div { width:100%!important; margin:0!important; padding:0!important; }
  main .bg-orange-300 .flex.items-center { flex-wrap:wrap; gap:12px; }
  main .bg-orange-300 button { margin-left:0!important; }
  main .bg-orange-300 .text-lg { font-size:16px; line-height:1.7; }
  main .grid.grid-flow-row-dense, main .border-t.space-y-4 { margin-inline:0!important; }
  main .pb-48 { padding-bottom:32px!important; }
  .mso_footer :is(a,p) { overflow-wrap:anywhere; }
}

@media (min-width:640px) and (max-width:1023px) {
  main .av-home-card-grid { grid-template-columns:repeat(4,minmax(0,1fr))!important; }
  main section.body-font > div > .flex.flex-wrap { grid-template-columns:repeat(3,minmax(0,1fr)); }
  main .grid.grid-cols-1.sm\:grid-cols-2 { grid-template-columns:repeat(3,minmax(0,1fr)); }
  main .bg-orange-300 { display:grid; grid-template-columns:1fr 1fr; }
  main .bg-orange-300 > div:first-child { height:100%!important; }
}
@media (min-width:768px) and (max-width:1023px) {
  main div.lg\:grid-cols-3.bg-bgyellow { display:grid; grid-template-columns:1fr 2fr; gap:24px; }
  main div.lg\:grid-cols-3.bg-bgyellow .mt-8 { margin-top:0!important; }
  main > div > div.py-4.lg\:py-8 > .lg\:grid-cols-12 { display:grid; grid-template-columns:1fr 1fr; gap:24px; align-items:center; }
  main > div > div.py-4.lg\:py-8 > .lg\:grid-cols-12 > div { width:100%!important; margin-inline:0!important; margin-top:0!important; }
  main > div > div.py-4.lg\:py-8 > .lg\:grid-cols-12 img { width:100%!important; height:auto!important; aspect-ratio:4/3; object-fit:cover; }
  main > div > div.py-4.lg\:py-8 > .lg\:grid-cols-12 .mt-12 { margin-top:0!important; }
}
@media (max-width:639px) {
  main .av-matrimandir-row { grid-template-columns:1fr; gap:10px; }
  main .av-matrimandir-list { gap:28px; }
  main .av-matrimandir-label { font-size:21px; }
  main .av-matrimandir-details h2 { font-size:19px; }
  body > nav > div { padding-inline:8px!important; }
  body > nav > div > .flex { gap:2px; }
  #auroville-chat-root[data-av-chat-open="true"] { left:max(12px,env(safe-area-inset-left))!important; right:max(12px,env(safe-area-inset-right))!important; top:calc(var(--av-visible-top,0px) + 12px)!important; bottom:auto!important; }
  #auroville-chat-root[data-av-chat-open="true"] #av-chat-box { width:100%!important; height:min(560px,calc(var(--av-visible-height,100dvh) - 24px))!important; max-height:calc(var(--av-visible-height,100dvh) - 24px)!important; box-sizing:border-box; }
  main h1, main h1 span { font-size:30px!important; line-height:1.2!important; }
  main .grid-cols-2 { gap:14px; }
  .mso_footer .grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  main .text-center.w-100 { text-align:left; margin-top:20px; }
  main .text-center.w-100 .text-4xl { padding:0; }
}
@media (prefers-reduced-motion:reduce) {
  body > nav *, .carousel *, .av-home-card-item { transition:none!important; animation:none!important; }
}
