/*
 * Theme-wide UI, Bangla typography, SVG, and responsive hardening.
 * Darsivo – Islamic School & Madrasa Management WordPress Theme
 */
:root{
  --edu-font-bn:"Noto Sans Bengali","Hind Siliguri","SolaimanLipi","Kalpurush",system-ui,-apple-system,"Segoe UI",sans-serif;
  --edu-touch:44px;
}
*,*::before,*::after{box-sizing:border-box}
html{overflow-x:hidden;scroll-behavior:smooth}
body{min-width:320px;overflow-x:hidden;font-family:var(--edu-font-bn);font-size:16px;line-height:1.65;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}
button,input,select,textarea{font:inherit}
img,video,iframe,svg{max-width:100%}
img{height:auto}
a,button,input,select,textarea{min-width:0}
button,a.button,.button,input[type="submit"],input[type="button"]{min-height:var(--edu-touch)}
.edu-svg-icon{display:inline-block;width:1.25em;height:1.25em;flex:0 0 auto;vertical-align:-.2em;overflow:visible}
.edu-svg-icon .edu-svg-fill{fill:currentColor;stroke:none}
.screen-reader-text:focus{z-index:100000}

/* Bilingual institutional identity. */
.site-brand{min-width:0!important;text-decoration:none}
.brand-mark{display:grid;place-items:center;flex:0 0 46px;width:46px;height:46px;border-radius:50%;background:rgba(255,255,255,.1);color:#ffd34e}
.brand-mark .edu-svg-icon{width:27px;height:27px}
.brand-copy{gap:1px;min-width:0!important;line-height:1.2!important}
.brand-copy strong{font-size:clamp(16px,1.18vw,20px)!important;line-height:1.24!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important}
.brand-copy small{margin:0!important;letter-spacing:0!important;white-space:normal!important}
.brand-copy .brand-name-en{font-family:system-ui,-apple-system,"Segoe UI",sans-serif;font-size:10px!important;line-height:1.25!important;opacity:.88}
.brand-copy .brand-tagline{font-size:11px!important;line-height:1.35!important;color:#d9e7f6;opacity:.9}
.header-inner{min-height:76px;height:auto!important;padding-top:7px!important;padding-bottom:7px!important}
.primary-nav a{font-size:14px!important;line-height:1.4!important}
.header-actions .button{font-size:14px}
.menu-toggle{display:none;place-items:center;border-radius:10px!important}
.menu-toggle .edu-svg-icon{width:27px;height:27px}
.menu-toggle[aria-expanded="true"] .edu-svg-icon--menu{display:none}
.menu-toggle[aria-expanded="true"]::before{content:"";width:25px;height:25px;background:linear-gradient(45deg,transparent 46%,currentColor 47% 53%,transparent 54%),linear-gradient(-45deg,transparent 46%,currentColor 47% 53%,transparent 54%)}

/* Content readability and component integrity. */
.site-main{min-width:0}
.container,.narrow-content{min-width:0}
.entry-content,.page-content-section,.section{overflow-wrap:anywhere}
.entry-content p,.section p{font-size:16px;line-height:1.75}
.section-heading h2{font-size:clamp(28px,4vw,48px);line-height:1.2}
.section-heading p{max-width:760px}
.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;white-space:normal;text-align:center}
.button .edu-svg-icon{width:18px;height:18px}
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),select,textarea{width:100%;max-width:100%;min-height:46px;font-size:16px;line-height:1.45}
textarea{min-height:120px;resize:vertical}
label{overflow-wrap:anywhere}
form .form-grid,.edu-settings-grid{min-width:0}
.eduvision-table-wrap,.table-responsive,.edu-app-table-wrap{width:100%;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
table{max-width:100%;border-collapse:collapse}
th,td{overflow-wrap:anywhere}

/* Real local SVG icons in cards. */
.program-image>span,.programs-detail-card-icon,.madrasa-islamic-card>span,.portal-feature-card>span{display:grid;place-items:center}
.program-image>span .edu-svg-icon{width:23px;height:23px}
.programs-detail-card-icon .edu-svg-icon{width:25px;height:25px}
.madrasa-islamic-card>span .edu-svg-icon{width:30px;height:30px}
.madrasa-social-link{font-family:inherit!important}
.madrasa-social-link .edu-svg-icon{width:17px;height:17px}
.photo-gallery-lightbox-close .edu-svg-icon{width:25px;height:25px}


/* Readable text across admissions, galleries, cards, notices, and portal forms. */
.entry-content small,.section small,.eduvision-form small,.eduvision-card small,
.bill-select-card small,.admission-payment-choices small,.admission-payment-instructions,
.campus-life-detail-highlights small,.programs-detail-benefits small,
.programs-detail-card-content li,.programs-detail-card-link,
.photo-gallery-overlay small,.photo-gallery-detail-overlay small,
.photo-gallery-detail-highlights span,.photo-gallery-detail-number{
  font-size:13px!important;
  line-height:1.55!important;
}
.chat-file{display:inline-flex;align-items:center;gap:8px;max-width:100%;overflow-wrap:anywhere}
.chat-file .edu-svg-icon{width:19px;height:19px}
.chat-file span{min-width:0;overflow-wrap:anywhere}
.card-grid,.program-grid,.portal-feature-grid,.madrasa-islamic-grid{min-width:0}
.program-card,.portal-feature-card,.madrasa-islamic-card,.dashboard-card{min-width:0;overflow:hidden}
.eduvision-form,.contact-form,.admission-form{width:100%;max-width:100%}
.eduvision-form .button,.contact-form .button,.admission-form .button{max-width:100%}

/* Footer readability. */
.site-footer{font-size:15px}
.site-footer h4{font-size:15px!important}
.site-footer>div a:not(.site-brand),.site-footer>div p{font-size:14px!important;line-height:1.6}
.footer-brand p{font-size:14px!important;max-width:390px!important}
.footer-bottom{font-size:13px!important;gap:12px;flex-wrap:wrap}

/* Prevent long Bangla/English names from clipping. */
.edu-admin-wrap,.eduvision-form,.eduvision-card,.eduvision-dashboard-section{max-width:100%}
.edu-admin-wrap h1,.eduvision-form h1,.eduvision-form h2,.eduvision-form h3{overflow-wrap:anywhere}

@media (max-width:1180px){
  .header-inner{gap:13px!important}
  .site-brand{max-width:330px!important;flex-basis:330px!important}
  .brand-copy .brand-tagline{display:none}
  .primary-nav .menu{gap:12px!important}
  .primary-nav a{font-size:12.5px!important}
}
@media (max-width:980px){
  .menu-toggle{display:grid!important;margin-left:auto}
  .site-brand{max-width:calc(100vw - 160px)!important;flex-basis:auto!important}
  .primary-nav{top:94px!important;height:calc(100dvh - 108px)!important}
  .admin-bar .primary-nav{top:140px!important;height:calc(100dvh - 154px)!important}
  .primary-nav .menu>li>a{font-size:16px!important;line-height:1.45!important;min-height:50px!important}
  .primary-nav .mobile-login-grid a,.primary-nav .mobile-account-link{font-size:15px!important;line-height:1.4}
  .header-dashboard{display:none!important}
  .footer-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:36px!important}
}
@media (max-width:680px){
  :root{--edu-touch:46px}
  body{font-size:16px}
  .container,.narrow-content{width:min(calc(100% - 24px),var(--edu-container))!important}
  .site-header{padding-inline:6px!important}
  .header-inner{min-height:72px!important;padding:7px 10px!important;border-radius:18px!important}
  .brand-mark{width:42px;height:42px;flex-basis:42px}
  .brand-mark .edu-svg-icon{width:24px;height:24px}
  .site-brand{max-width:calc(100vw - 88px)!important;gap:8px!important}
  .brand-copy strong{font-size:14px!important;line-height:1.25!important}
  .brand-copy .brand-name-en{font-size:10px!important;line-height:1.25!important}
  .brand-copy .brand-tagline{display:none}
  .primary-nav{left:8px!important;right:8px!important;top:88px!important;height:calc(100dvh - 98px)!important;padding:16px!important;border-radius:18px!important}
  .admin-bar .primary-nav{top:134px!important;height:calc(100dvh - 144px)!important}
  .mobile-login-grid{grid-template-columns:1fr!important}
  .section{padding:54px 0!important}
  .section-heading h2{font-size:30px}
  .section-heading p,.entry-content p,.section p{font-size:16px!important}
  .footer-grid{grid-template-columns:1fr!important;gap:28px!important}
  .footer-bottom{display:grid!important;grid-template-columns:1fr;text-align:center}
  .footer-cta-inner{align-items:stretch!important;flex-direction:column!important}
  .footer-cta .button{width:100%}
  .eduvision-table,.eduvision-table th,.eduvision-table td{font-size:14px}

  .hero-actions,.form-actions,.eduvision-form-actions{display:grid!important;grid-template-columns:1fr!important;width:100%!important}
  .hero-actions .button,.form-actions .button,.eduvision-form-actions .button{width:100%!important}
  .program-grid,.portal-feature-grid,.madrasa-islamic-grid,.dashboard-grid{grid-template-columns:1fr!important}
  .entry-content table{min-width:620px}
}
@media (max-width:420px){
  .brand-copy strong{font-size:14px!important}
  .brand-copy .brand-name-en{font-size:9.5px!important}
  .brand-mark{width:39px;height:39px;flex-basis:39px}
  .menu-toggle{width:40px!important;height:40px!important;padding:7px!important}
  .section-heading h2{font-size:27px}
}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}
}
