/* Baitullah Travels 1.0.2 - mobile, tablet and touch layouts.
   Loaded AFTER the saved theme so layout fixes do not reset fonts or colors.
   Breakpoints: phone <=640px, tablet <=1100px, compact navigation <=1180px.
   Screen-only rules keep invoices printable in their original tabular format. */
:root { --touch-size:44px; }
[hidden] { display:none !important; }
.drawer-close, .nav-backdrop { display:none; }
.table-scroll-hint { display:none; }
@media screen {
  html { -webkit-text-size-adjust:100%; text-size-adjust:100%; }
  body { margin:0; min-width:0; }
  *, *::before, *::after { box-sizing:border-box; }
  :where(main,aside,section,article,nav,header,footer,form,fieldset) { min-width:0; }
  :where(.container,.header-inner,.hero-inner,.chairman-grid,.package-grid,.feature-grid,
    .home-about-wrap,.home-about,.footer-grid,.form-grid,.detail-grid,.stats-grid,
    .media-grid,.admin-quick-grid,.repeater-fields,.invoice-top,.invoice-bill,
    .invoice-notes,.section-heading,.panel-title,.button-row,.save-bar)>* { min-width:0; }
  :where(h1,h2,h3,h4,p,small,label,dt,dd,.pre-line,.notice,.breadcrumbs,.eyebrow) { overflow-wrap:anywhere; }
  :where(.panel,.package-card,.auth-card,.booking-summary,.invoice-paper,.admin-workspace) { max-width:100%; }
  .panel { --panel-pad:28px; }
  .container { max-width:1180px; }
  .brand { min-width:0; max-width:100%; }
  .brand>span { min-width:0; }
  .brand img { flex:0 0 auto; }
  .brand strong, .brand small { white-space:normal; overflow-wrap:anywhere; }
  .button { white-space:normal; text-align:center; overflow-wrap:anywhere; min-height:var(--touch-size); }
  .button-row { flex-wrap:wrap; }
  .button-row>form { margin:0; }
  .button-row .button { max-width:100%; }
  .header-inner { position:static; }
  .site-header { position:relative; }
  .main-nav { min-width:0; flex-wrap:wrap; }
  .main-nav a { min-width:0; }
  .header-account { min-height:44px; min-width:44px; justify-content:center; }
  .hero-copy { min-width:0; }
  .hero-copy .button-row { gap:14px; }
  .hero-quote { overflow-wrap:anywhere; }
  .hero-quote span { line-height:1.7; }
  .package-grid { align-items:stretch; }
  .package-card { display:flex; flex-direction:column; }
  .package-body { flex:1; display:flex; flex-direction:column; }
  .package-body h3 { font-size:var(--card-title); }
  .package-meta { margin-bottom:0; }
  .package-meta span { min-width:0; overflow-wrap:anywhere; align-items:flex-start; }
  .package-bottom { margin-top:auto; padding-top:18px; gap:12px; flex-wrap:wrap; }
  .package-meta + .package-bottom { margin-top:20px; }
  .package-bottom .price { white-space:normal; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
  .package-image>img { object-fit:cover; }
  .section-heading>div { max-width:100%; }
  .section-heading>.button { flex-shrink:0; }
  .section-packages>.container>.section-heading>div { max-width:calc(100% - 170px); }
  .chairman-sign { flex-wrap:wrap; }
  .chairman-portrait { max-width:100%; }
  .signature { max-width:min(180px,100%); }
  .feature-grid { grid-template-columns:repeat(5,minmax(0,1fr)); }
  .footer-grid { grid-template-columns:1.2fr .8fr 1.1fr 1.1fr; }
  .footer-links a, .socials a { overflow-wrap:anywhere; }
  .section-footer .with-icon { display:block; overflow-wrap:anywhere; }
  .section-footer .with-icon .icon { margin-right:9px; vertical-align:-3px; }
  .section-footer .with-icon span { display:inline; }
  .newsletter-form { max-width:100%; }
  .newsletter-form input { width:0; flex:1; }
  .newsletter-form button { min-height:44px; min-width:44px; }
  .home-about-wrap { max-width:1180px; }
  .filter-bar { flex-wrap:wrap; }
  .filter-bar>.field { min-width:0; flex:1 1 155px; }
  .filter-bar>.button { flex:0 1 auto; }
  .field { min-width:0; max-width:100%; }
  input,select,textarea { min-width:0; max-width:100%; }
  input[type=file] { width:100%; }
  fieldset { margin:0; }
  .summary-image { max-width:none; width:calc(100% + var(--panel-pad)*2); margin:calc(-1 * var(--panel-pad)) calc(-1 * var(--panel-pad)) 20px; }
  .summary-lines { grid-template-columns:minmax(0,1fr) minmax(0,1.15fr); }
  .summary-lines dt,.summary-lines dd { min-width:0; word-break:normal; overflow-wrap:anywhere; }
  .account-nav { flex-wrap:wrap; }
  .account-nav a, .account-nav button { min-height:44px; display:inline-flex; align-items:center; }
  .account-nav form { flex-shrink:0; }
  .stat-card { min-width:0; }
  .stat-card>div { min-width:0; }
  .stat-card strong { overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
  .panel-title { flex-wrap:wrap; }
  .panel-title>a { min-height:44px; display:inline-flex; align-items:center; }
  .table-scroll { display:block; min-width:0; max-width:100%; width:100%; overflow-x:auto; overscroll-behavior-x:contain; -webkit-overflow-scrolling:touch; }
  .table-scroll>table { width:100%; }
  .table-scroll td { overflow-wrap:anywhere; }
  .table-scroll[data-overflow="true"]>.table-scroll-hint { display:block; font-size:12px; color:var(--muted); padding:5px 0 10px; }
  .table-scroll:focus-visible { outline:2px solid var(--gold); outline-offset:3px; }
  .table-package { min-width:210px; max-width:330px; }
  .table-package>div { min-width:0; }
  .table-package img { flex-shrink:0; }
  .cell-value { min-width:0; }
  .transaction-detail { min-width:0; width:270px; max-width:100%; }
  .review-form .button-row { flex-wrap:wrap; }
  .style-preview { overflow-wrap:anywhere; }
  .style-preview .button { max-width:100%; }
  .save-bar { flex-wrap:wrap; max-width:100%; }
  .save-bar>span { flex:1 1 140px; }
  .admin-sidebar { overscroll-behavior:contain; }
  .admin-workspace { min-width:0; }
  .admin-topbar { min-width:0; gap:20px; }
  .topbar-actions { min-width:0; }
  .admin-account-link { min-width:0; max-width:260px; }
  .admin-account-link span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .admin-menu a,.admin-menu summary { min-height:44px; }
  .media-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .media-grid .panel { min-width:0; }
  .media-grid input { min-width:0; }
  .invoice-paper { width:100%; overflow:visible; }
  .invoice-top>div:first-child { flex:1; }
  .invoice-title { flex:0 1 40%; overflow-wrap:anywhere; }
  .invoice-bill>div { flex:1; }
  .invoice-totals .summary-lines { max-width:100%; }
  .invoice-table { min-width:550px; }
  .invoice-table.compact { min-width:600px; }
  .invoice-notes { flex-wrap:wrap; }
  .invoice-table-scroll { margin-bottom:15px; }
  .print-toolbar { flex-wrap:wrap; }
  .whatsapp-float { right:max(18px,env(safe-area-inset-right)); bottom:max(18px,env(safe-area-inset-bottom)); }
  .installer { width:100%; }
  .install-page .check { min-width:0; flex-wrap:wrap; }
  .install-page .check>* { min-width:0; overflow-wrap:anywhere; }
  .install-page .check>b { text-align:right; margin-left:auto; }
}
/* Condensed header: also covers iPad landscape and tablets with long menus. */
@media screen and (max-width:1180px) {
  .header-inner { display:flex; flex-wrap:wrap; gap:14px; }
  .header-inner>.brand { flex:1 1 180px; }
  .header-phone { display:none; }
  .header-actions { order:2; gap:12px; }
  .header-account span { display:inline; }
  .nav-toggle { display:grid; order:3; margin:0; width:44px; height:44px; flex:0 0 44px; border-radius:9px; }
  .main-nav { display:none; position:absolute; top:100%; left:0; right:0; padding:12px max(20px,calc((100vw - 1180px)/2)); background:var(--header-menu-bg,#fff); color:var(--ink); box-shadow:0 12px 22px #0002; border-top:1px solid var(--line); max-height:calc(100vh - var(--site-header-height,110px)); max-height:calc(100dvh - var(--site-header-height,110px)); overflow-y:auto; overscroll-behavior:contain; z-index:80; }
  .main-nav.open { display:flex; flex-direction:column; align-items:stretch; gap:0; }
  .main-nav a { display:block; padding:13px 12px; min-height:46px; font-size:16px; border-bottom:1px solid var(--line); white-space:normal; color:var(--ink); }
  .main-nav a:last-child { border-bottom:0; }
  .main-nav a:hover:after { display:none; }
  .nav-toggle[aria-expanded="true"] { background:#edf5ef; }
}
/* Tablet portrait and landscape; never leave an invisible sidebar using space. */
@media screen and (min-width:641px) and (max-width:1100px) {
  .container { width:calc(100% - 48px); }
  .hero-copy { width:62%; max-width:640px; }
  .hero-photo { left:16%; background-position:center; }
  .section-hero { min-height:450px; }
  .hero-quote { max-width:220px; padding-left:16px; }
  .hero-quote span { font-size:23px; }
  .hero-quote small { font-size:12px; }
  .feature-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:26px 0; }
  .feature { padding:0 18px; border-right:1px solid var(--line); }
  .feature:nth-child(3n),.feature:last-child { border-right:0; }
  .package-grid,.package-grid.columns-2,.package-grid.columns-4 { grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px; }
  .package-image>img { height:190px; }
  .package-body { padding:22px; }
  .package-bottom { flex-wrap:wrap; }
  .chairman-grid { grid-template-columns:190px minmax(0,1fr); gap:32px; }
  .chairman-portrait>img,.portrait-placeholder { height:218px; }
  .home-about-wrap { grid-template-columns:1fr; gap:12px; }
  .home-about { grid-template-columns:minmax(180px,.7fr) minmax(0,1.3fr); gap:28px; }
  .section-testimonials { margin-bottom:30px; }
  .footer-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:34px; }
  .stats-grid,.admin-main .stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
  .service-cards { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .admin-main .admin-quick-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .media-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .cta-inner { padding-right:0; gap:26px; }
}
@media screen and (max-width:1100px) {
  .detail-grid,.admin-main .detail-grid { grid-template-columns:minmax(0,1fr); gap:20px; }
  .sticky-card { position:static; }
  .booking-summary { order:-1; }
  .booking-summary .summary-image { display:none; }
  .booking-summary .summary-lines { max-width:550px; }
  .stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .admin-sidebar { width:min(300px,calc(100% - 48px)); max-width:100%; visibility:hidden; pointer-events:none; transform:translateX(-102%); transition:transform .2s ease,visibility 0s .2s; z-index:120; height:100vh; height:100dvh; padding-bottom:env(safe-area-inset-bottom); box-shadow:12px 0 40px #0003; }
  .admin-sidebar.open { visibility:visible; pointer-events:auto; transform:translateX(0); transition:transform .2s ease; }
  .admin-brand { padding-top:64px; }
  .admin-sidebar .drawer-close { display:grid; position:absolute; top:max(12px,env(safe-area-inset-top)); right:14px; width:44px; height:44px; color:#fff; border-color:#ffffff55; font:32px/1 Arial,sans-serif; }
  .admin-sidebar .brand strong { font-size:19px; }
  .admin-sidebar .brand small { font-size:9px; }
  .admin-workspace { margin-left:0; width:100%; }
  .admin-toggle { display:grid; width:44px; height:44px; flex:0 0 44px; }
  .admin-topbar { padding:12px 24px; height:auto; min-height:70px; }
  .workspace-title { display:none; }
  .topbar-actions { flex:1; justify-content:flex-end; width:auto; gap:24px; }
  .topbar-actions a { min-height:44px; }
  .topbar-actions a:first-child { font-size:13px; }
  .topbar-actions .icon-button { width:44px; height:44px; }
  .admin-main { padding:28px 24px; }
  .nav-backdrop:not([hidden]) { display:block; position:fixed; inset:0; z-index:115; background:#041f19a6; touch-action:none; }
  html.drawer-open,body.drawer-open { overflow:hidden; }
  .save-bar { bottom:max(8px,env(safe-area-inset-bottom)); }
}
@media screen and (min-width:641px) and (max-width:820px) {
  .hero-copy { width:85%; }
  .hero-quote { display:none; }
  .form-grid,.repeater-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .section-heading { gap:18px; align-items:flex-start; }
  .section-heading>.button { max-width:170px; }
  .about-page-grid { grid-template-columns:minmax(0,1fr); }
}
/* Phone layouts. Tables become labelled cards; invoices keep a scrollable table. */
@media screen and (max-width:640px) {
  .container { width:calc(100% - 32px); }
  .header-inner { gap:10px; }
  .header-inner>.brand { flex-basis:150px; }
  .brand { gap:8px; }
  .brand img { width:34px !important; height:40px; object-fit:contain; }
  .brand strong { font-size:16px; line-height:1.2; letter-spacing:0; }
  .brand small { font-size:8px; line-height:1.45; }
  .header-actions { gap:8px; }
  .header-actions .button.small { padding:10px 14px; min-height:44px; font-size:14px; }
  .header-account { font-size:14px; }
  .header-account .icon { width:21px; height:21px; }
  .header-actions .header-account span { display:none; }
  .section-hero { min-height:430px; }
  .hero-photo { inset:0; background-position:60% center; }
  .section-hero:after { background:linear-gradient(90deg,#043b32ef,#043b32be 62%,#043b3260); }
  .hero-inner { display:block; }
  .hero-copy { width:100%; max-width:560px; }
  .hero-copy .eyebrow { font-size:.85em; }
  .hero-copy p { max-width:100%; font-size:1em; }
  .hero-copy .button-row { gap:14px; }
  .hero-copy .button { min-height:48px; }
  .hero-quote { display:none; }
  .feature-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px 0; }
  .feature { padding-inline:12px; border-right:1px solid var(--line); }
  .feature:nth-child(3) { border-right:1px solid var(--line); }
  .feature:nth-child(even) { border-right:0; }
  .feature:last-child:nth-child(odd) { grid-column:1/-1; border-right:0; }
  .feature h3 { font-size:var(--card-title); }
  .feature p { font-size:.85em; }
  .feature>.icon { width:28px; height:28px; }
  .chairman-grid { grid-template-columns:minmax(0,1fr); gap:24px; }
  .chairman-portrait { width:165px; margin:0 auto; }
  .chairman-portrait>img,.portrait-placeholder { height:180px; }
  .chairman-message { text-align:inherit; }
  .chairman-message .quote-text { padding-left:15px; margin:20px 0; }
  .chairman-sign { justify-content:flex-start; gap:18px; }
  .portrait-seal { right:-10px; }
  .section-heading { flex-direction:column; align-items:stretch; gap:18px; }
  .section-heading>div,.section-packages>.container>.section-heading>div { max-width:100%; }
  .section-heading>.button { align-self:flex-start; min-height:44px; max-width:100%; }
  .section-heading p { font-size:1em; }
  .package-grid,.package-grid.columns-2,.package-grid.columns-4 { grid-template-columns:minmax(0,1fr); gap:22px; }
  .package-image>img { width:100%; height:auto; aspect-ratio:16 / 9; max-height:290px; }
  .package-body { padding:20px; }
  .package-bottom { flex-wrap:wrap; gap:14px; }
  .package-bottom .button.small { min-height:44px; padding:10px 16px; }
  .package-bottom .price { font-size:23px; }
  .cta-inner { flex-direction:column; align-items:flex-start; gap:22px; padding-right:0; }
  .cta-art { width:100%; }
  .home-about-wrap { grid-template-columns:minmax(0,1fr); gap:4px; }
  .home-about { grid-template-columns:minmax(0,1fr); gap:24px; padding-block:0; }
  .home-about>img { width:min(230px,100%); margin:0 auto; }
  .section-testimonials { padding-inline:22px; margin-top:10px; margin-bottom:32px; }
  .carousel-controls .icon-button { width:44px; height:44px; }
  .footer-grid { grid-template-columns:minmax(0,1fr); gap:30px; }
  .footer-grid>div:first-child,.footer-grid>div:last-child { grid-column:auto; }
  .section-footer .brand strong { font-size:20px; }
  .section-footer .brand small { font-size:10px; }
  .section-footer .with-icon { font-size:15px; }
  .footer-links { gap:1px; }
  .footer-links a { padding:8px 0; min-height:40px; }
  .socials a { min-height:40px; display:inline-flex; align-items:center; padding:8px 10px; }
  .footer-bottom { flex-direction:column; gap:14px; line-height:1.7; }
  .newsletter-form { margin-top:15px; }
  .form-grid,.repeater-fields { grid-template-columns:minmax(0,1fr); gap:0; }
  .form-grid>.field { grid-column:1/-1; }
  .panel { --panel-pad:20px; padding:var(--panel-pad); border-radius:12px; margin-bottom:20px; }
  .detail-grid,.admin-main .detail-grid { gap:0; }
  .detail-cover { height:auto; max-height:300px; object-fit:cover; }
  .gallery-thumbs { gap:8px; }
  .gallery-thumbs button { width:78px; flex:0 0 78px; min-height:52px; }
  .gallery-thumbs img { width:78px; }
  input:not([type=checkbox]):not([type=radio]):not([type=color]),select,textarea { font-size:16px; min-height:46px; }
  .field>span { font-size:14px; line-height:1.5; }
  .field { margin-bottom:18px; }
  .filter-bar { gap:12px; }
  .filter-bar>.field { flex:1 1 100%; min-width:0; }
  .filter-bar>.button { width:100%; min-height:46px; }
  .checkbox { min-height:34px; }
  .checkbox input { width:20px; height:20px; }
  .account-nav { gap:7px 16px; flex-wrap:wrap; overflow:visible; white-space:normal; font-size:14px; padding-bottom:14px; }
  .account-nav a { padding:4px 0; }
  .account-nav form { margin-left:auto; }
  .account-nav .icon { display:inline-block; width:18px; height:18px; }
  .stats-grid,.admin-main .stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .stat-card,.admin-main .stat-card { padding:17px 13px; flex-direction:column; align-items:flex-start; gap:10px; }
  .stat-card strong,.admin-main .stat-card strong { font-size:clamp(17px,4.4vw,22px); line-height:1.5; }
  .stat-card span:not(.stat-icon),.admin-main .stat-card span:not(.stat-icon) { font-size:12px; }
  .stat-icon { width:36px; height:36px; }
  .summary-lines dt,.summary-lines dd { font-size:14px; }
  .auth-card { width:calc(100% - 32px); max-width:460px; --panel-pad:24px; }
  .auth-links { gap:10px; }
  .auth-links a { min-height:40px; display:inline-flex; align-items:center; }
  .page-heading { margin-bottom:24px; }
  .service-cards,.about-page-grid { grid-template-columns:minmax(0,1fr); gap:20px; }
  .admin-main { padding:24px 16px; }
  .admin-topbar { padding:10px 16px; gap:12px; }
  .topbar-actions { gap:12px; }
  .topbar-actions .visit-site { font-size:12px; }
  .topbar-actions .admin-account-link { max-width:120px; font-size:13px; }
  .topbar-actions a .icon { display:inline-block; flex-shrink:0; }
  .topbar-actions .visit-site .icon { display:none; }
  .admin-main .section-heading p { font-size:14px; }
  .admin-main .section-heading h1 { font-size:28px; }
  .admin-main .stats-grid { gap:12px; }
  .admin-quick-grid,.admin-main .admin-quick-grid { grid-template-columns:minmax(0,1fr); gap:16px; }
  .admin-main .admin-quick-grid>.panel { margin:0; }
  .media-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .media-grid .panel { padding:12px; }
  .media-grid img { height:120px; }
  .media-grid input { font-size:13px !important; }
  .media-grid .text-button { min-height:44px; }
  .repeater-row { padding:15px; }
  .repeater-row .text-button { min-height:40px; }
  .style-preview { padding:20px; }
  .style-preview h3 { overflow-wrap:anywhere; }
  .save-bar { position:static; padding:16px; gap:12px; }
  .save-bar>.button { flex:1 1 100%; min-height:46px; font-size:15px; }
  .save-bar>span { flex-basis:100%; font-size:12px; }
  /* Keep every record field and action; do not hide columns on phones. */
  .table-scroll.has-cards { overflow:visible; }
  .table-scroll.has-cards>.table-scroll-hint { display:none !important; }
  table.responsive-cards.is-labelled { display:block; width:100%; min-width:0; border:0; }
  table.responsive-cards.is-labelled>thead { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); clip-path:inset(50%); white-space:nowrap; }
  table.responsive-cards.is-labelled>tbody { display:block; width:100%; }
  table.responsive-cards.is-labelled>tbody>tr { display:block; padding:10px 14px; margin:0 0 16px; border:1px solid var(--line); border-radius:10px; background:#fff; width:100%; }
  table.responsive-cards.is-labelled>tbody>tr:last-child { margin-bottom:0; }
  table.responsive-cards.is-labelled td { display:grid; grid-template-columns:minmax(82px,.8fr) minmax(0,1.35fr); gap:12px; min-width:0; width:100%; padding:12px 0; border:0; border-bottom:1px solid var(--line); font-size:14px; white-space:normal; text-align:left; }
  table.responsive-cards.is-labelled td:last-child { border-bottom:0; }
  table.responsive-cards.is-labelled td::before { content:attr(data-label); color:var(--muted); font-size:12px; font-weight:600; text-transform:none; letter-spacing:0; overflow-wrap:anywhere; }
  table.responsive-cards.is-labelled td[data-label=""] { grid-template-columns:minmax(0,1fr); }
  table.responsive-cards.is-labelled td[data-label=""]::before { display:none; }
  table.responsive-cards.is-labelled .cell-value { min-width:0; overflow-wrap:anywhere; }
  table.responsive-cards.is-labelled td small { font-size:12px; }
  table.responsive-cards.is-labelled .button { max-width:100%; }
  table.responsive-cards.is-labelled .table-package { min-width:0; width:100%; flex-direction:column; align-items:flex-start; gap:10px; }
  table.responsive-cards.is-labelled .table-package img { width:100%; max-width:170px; height:auto; aspect-ratio:16/9; }
  table.responsive-cards.is-labelled details { width:100%; }
  table.responsive-cards.is-labelled details summary { min-height:44px; padding-top:4px; }
  table.responsive-cards.is-labelled td:has(details[open]) { grid-template-columns:minmax(0,1fr); }
  table.responsive-cards.is-labelled .transaction-detail { width:100%; max-width:none; min-width:0; }
  table.responsive-cards.is-labelled .transaction-detail p { font-size:14px; }
  table.responsive-cards.is-labelled .badge { max-width:100%; white-space:normal; }
  table.responsive-cards.is-labelled .button-row { flex-direction:column; align-items:stretch; gap:8px; }
  table.responsive-cards.is-labelled .button-row .text-button { min-height:40px; }
  .print-page { padding:16px 12px; }
  .print-toolbar { gap:10px; justify-content:stretch; margin-bottom:16px; }
  .print-toolbar .button { flex:1 1 135px; min-height:44px; font-size:14px; padding:10px 12px; }
  .invoice-paper { padding:22px 18px; width:100%; overflow:visible; }
  .invoice-top { flex-direction:column; gap:24px; }
  .invoice-title { text-align:left; flex-basis:auto; }
  .invoice-title h1 { font-size:var(--heading-size); }
  .invoice-title>b { font-size:15px; }
  .invoice-top .brand strong { font-size:19px; }
  .invoice-top p { font-size:13px; }
  .invoice-bill { flex-direction:column; gap:22px; }
  .invoice-bill>div:last-child { text-align:left; }
  .invoice-bill p { font-size:14px; }
  .invoice-totals .summary-lines { width:100%; }
  .invoice-notes { flex-direction:column; align-items:flex-start; gap:22px; font-size:13px; }
  .invoice-notes>p { max-width:100%; }
  .invoice-notes>div { min-width:0; text-align:left; }
  .receipt-paper .summary-lines { grid-template-columns:minmax(0,1fr) minmax(0,1.3fr); }
  .receipt-paper .summary-lines dt,.receipt-paper .summary-lines dd { font-size:14px; }
  .whatsapp-float { width:48px; height:48px; right:max(14px,env(safe-area-inset-right)); bottom:max(14px,env(safe-area-inset-bottom)); }
  .sample-notice { padding-bottom:72px; }
  .install-page .installer { padding:0 16px; margin:18px auto; }
  .install-page .install-head { padding:14px 0; }
  .install-page .checks { grid-template-columns:minmax(0,1fr); }
  .install-page .save-bar button { width:100%; }
}
/* Two balanced header rows instead of squeezing four controls into 320px. */
@media screen and (max-width:520px) {
  .header-inner { display:grid; grid-template-columns:minmax(0,1fr) 44px; gap:12px; }
  .header-inner>.brand { grid-column:1; grid-row:1; }
  .header-inner>.nav-toggle { grid-column:2; grid-row:1; justify-self:end; }
  .header-actions { grid-column:1/-1; grid-row:2; width:100%; gap:12px; }
  .header-actions>.header-account { flex:1; justify-content:center; border:1px solid var(--line); border-radius:7px; padding:9px; gap:7px; }
  .header-actions>.header-account span { display:inline; }
  .header-actions>.button { flex:1; }
  .header-inner .brand strong { font-size:18px; }
  .header-inner .brand small { font-size:9px; }
  .header-inner .brand img { width:38px !important; height:43px; }
  .package-bottom>div { flex:1 1 100%; }
  .package-bottom>.button { flex:1 1 100%; }
  .topbar-actions .admin-account-link { max-width:90px; }
  .topbar-actions .admin-account-link .icon { display:none; }
  .media-grid { grid-template-columns:minmax(0,1fr); }
  .media-grid img { height:190px; }
}
@media screen and (max-width:359px) {
  .container { width:calc(100% - 24px); }
  .admin-main { padding-inline:12px; }
  .panel { --panel-pad:16px; }
  .admin-topbar { padding-inline:12px; gap:8px; }
  .topbar-actions { gap:8px; }
  .topbar-actions .admin-account-link { max-width:65px; }
  .stat-card strong,.admin-main .stat-card strong { font-size:16px; }
  table.responsive-cards.is-labelled>tbody>tr { padding-inline:11px; }
  table.responsive-cards.is-labelled td { grid-template-columns:minmax(68px,.72fr) minmax(0,1.3fr); gap:10px; }
  .receipt-paper .summary-lines { grid-template-columns:minmax(0,1fr); }
  .receipt-paper .summary-lines dd { text-align:left; padding-top:0; }
  .receipt-paper .summary-lines dt { border-bottom:0; padding-bottom:5px; }
}
@media screen and (hover:none) {
  .button:hover,.package-card:hover { transform:none; }
  .package-card:hover .package-image>img { transform:none; }
  .text-button { min-height:40px; }
}
@media (prefers-reduced-motion:reduce) {
  .admin-sidebar { transition:none; }
}
@media print {
  .nav-backdrop,.drawer-close,.table-scroll-hint { display:none !important; }
  .invoice-table-scroll,.table-scroll { overflow:visible !important; max-height:none; }
  .invoice-paper { overflow:visible !important; }
  .cell-value { display:contents; }
  table.responsive-cards.is-labelled { display:table !important; }
  table.responsive-cards.is-labelled thead { display:table-header-group !important; }
  table.responsive-cards.is-labelled tbody { display:table-row-group !important; }
  table.responsive-cards.is-labelled tr { display:table-row !important; }
  table.responsive-cards.is-labelled td { display:table-cell !important; }
  table.responsive-cards.is-labelled td::before { display:none !important; }
}

/* Homepage V2 responsive */
@media (max-width:1100px){
  .home2-hero-grid{grid-template-columns:1fr 1fr;gap:42px}.home2-visual{min-height:520px}.home2-feature-grid{grid-template-columns:repeat(3,1fr)}.home2-feature:nth-child(4),.home2-feature:nth-child(5){grid-column:auto}.home-v2 .chairman-grid{grid-template-columns:280px 1fr;gap:48px}.home2-story-grid{grid-template-columns:1fr}.home2-testimonials{min-height:380px}.home2-cta-copy{padding:48px 42px}.home-v2 .main-nav{gap:14px}
}
@media (max-width:820px){
  .home-v2 .site-header{position:relative}.home-v2 .header-inner{min-height:74px}.home2-hero{padding-top:30px}.home2-hero-grid{grid-template-columns:1fr;gap:32px}.home2-hero-copy{padding-bottom:0}.home2-hero h1{font-size:clamp(48px,10vw,68px)}.home2-hero h2{font-size:29px}.home2-visual{min-height:460px}.home2-photo-card{inset:0 20px 16px 20px;border-radius:26px 26px 70px 26px}.home2-float-one{left:0;top:52px}.home2-float-two{right:0;bottom:52px}.home2-feature-grid{grid-template-columns:repeat(2,1fr)}.home-v2 .section-chairman{padding:70px 0}.home-v2 .chairman-grid{grid-template-columns:230px 1fr;gap:34px}.home-v2 .chairman-portrait>img,.home-v2 .portrait-placeholder{height:330px}.home2-packages{padding:75px 0}.home2-section-head{align-items:flex-start}.home2-cta-card{grid-template-columns:1fr}.home2-cta-image{min-height:300px}.home2-cta-image:after{background:linear-gradient(180deg,transparent 55%,#0a5544 100%)}.home2-about{grid-template-columns:1fr 1fr}.home2-about-media{min-height:410px}
}
@media (max-width:640px){
  .home2-hero{padding:20px 0 34px}.home2-hero h1{font-size:48px;letter-spacing:-1.4px}.home2-hero h2{font-size:25px}.home2-hero-copy>p{font-size:15px}.home2-actions{gap:14px;margin:24px 0}.home2-primary{width:100%}.home2-video{width:100%;justify-content:center}.home2-trust{grid-template-columns:1fr 1fr 1fr}.home2-trust>div{padding:0 9px}.home2-trust b{font-size:17px}.home2-trust span{font-size:10px}.home2-visual{min-height:390px}.home2-photo-card{inset:0;border-radius:22px 22px 55px 22px}.home2-photo-copy{left:22px;right:22px;bottom:20px}.home2-arabic{font-size:25px}.home2-floating-card{padding:11px 12px;min-width:0}.home2-floating-card b{font-size:12px}.home2-floating-card small{font-size:9px}.home2-float-one{left:-4px;top:28px}.home2-float-two{right:-4px;bottom:42px}.home2-feature-grid{grid-template-columns:1fr;gap:10px}.home2-feature{min-height:0;display:grid;grid-template-columns:48px 1fr;gap:14px;align-items:start;padding:18px}.home2-feature-icon{margin:0}.home2-feature-no{display:none}.home2-features{padding-bottom:50px}.home-v2 .section-chairman{padding:58px 0}.home-v2 .chairman-grid{grid-template-columns:1fr;gap:30px}.home-v2 .chairman-portrait{max-width:310px;margin:auto}.home-v2 .chairman-portrait>img,.home-v2 .portrait-placeholder{height:350px}.home-v2 .chairman-message h2{font-size:34px}.home-v2 .quote-text{font-size:16px}.home2-packages{padding:62px 0}.home2-section-head{display:block}.home2-section-head h2,.home2-story h2{font-size:36px}.home2-section-head .home2-text-link{margin-top:18px}.home-v2 .home2-packages .package-image>img{height:220px}.home2-cta{padding-bottom:70px}.home2-cta-card{border-radius:22px}.home2-cta-image{min-height:230px}.home2-cta-copy{padding:34px 24px}.home2-cta-copy h2{font-size:34px}.home2-story{padding-bottom:70px}.home2-story-grid{gap:16px}.home2-about{grid-template-columns:1fr;border-radius:22px}.home2-about-media{min-height:280px}.home2-about-copy{padding:32px 24px}.home2-testimonials{padding:34px 24px;border-radius:22px}.home2-testimonials h2{font-size:31px}.home-v2 .section-footer{border-radius:28px 28px 0 0}
}

/* Homepage v3 responsive */
@media screen and (max-width:1100px){.home3-hero{padding:58px 0}.home3-hero-shell{grid-template-columns:1fr 1fr;gap:38px}.home3-image-frame,.home3-image-frame>img{min-height:500px;height:500px}.home3-route-card{left:-20px}.home3-feature-grid{grid-template-columns:repeat(3,1fr)}.home3-feature-grid article:nth-child(3){border-right:0}.home3-feature-grid article:nth-child(n+4){border-top:1px solid #ffffff17}.home3-package-grid{grid-template-columns:repeat(2,1fr)}.home3-tools-grid{grid-template-columns:repeat(2,1fr)}.home3-gallery-grid{grid-template-columns:1fr 1fr}.home3-gallery-item:nth-child(1){grid-row:span 1}.home3-gallery-item:nth-child(4){grid-column:span 1}.home3-video-grid{grid-template-columns:repeat(2,1fr)}.home3-story-grid{grid-template-columns:1fr}.home-v3 .chairman-grid{grid-template-columns:260px 1fr;gap:48px}.home-v3 .chairman-portrait>img,.home-v3 .portrait-placeholder{height:320px}.journey-tools-grid{grid-template-columns:1fr}.notification-list{grid-template-columns:1fr 1fr}}
@media screen and (max-width:640px){.home3-hero{padding:38px 0 48px}.home3-hero-shell{grid-template-columns:1fr;gap:34px}.home3-hero-copy h1{font-size:52px}.home3-subtitle{font-size:29px}.home3-hero-copy>p{font-size:16px}.home3-mini-stats{gap:12px;justify-content:space-between}.home3-mini-stats b{font-size:17px}.home3-image-frame,.home3-image-frame>img{min-height:420px;height:420px}.home3-image-frame{border-radius:140px 140px 22px 22px}.home3-route-card{left:10px;right:10px;bottom:-18px}.home3-feature-grid{grid-template-columns:1fr 1fr}.home3-feature-grid article,.home3-feature-grid article:nth-child(3){border-right:1px solid #ffffff17}.home3-feature-grid article:nth-child(even){border-right:0}.home3-feature-grid article:nth-child(n+3){border-top:1px solid #ffffff17}.home3-heading{align-items:flex-start;flex-direction:column;margin-bottom:25px}.home3-heading h2{font-size:38px}.home3-package-grid,.home3-tools-grid,.home3-video-grid{grid-template-columns:1fr}.home3-package-photo img{height:240px}.home3-gallery-grid{display:flex;overflow:auto;scroll-snap-type:x mandatory;margin-right:-20px;padding-right:20px}.home3-gallery-item{min-width:82vw;height:320px;scroll-snap-align:start}.home3-about-card{grid-template-columns:1fr;padding:17px}.home3-about-photo{height:280px}.home3-final-card{padding:34px 26px;align-items:flex-start;flex-direction:column}.home3-final-card h2{font-size:34px}.home-v3 .section-chairman{padding:54px 0}.home-v3 .chairman-grid{grid-template-columns:1fr;gap:28px}.home-v3 .chairman-portrait{max-width:280px;margin:auto}.home-v3 .chairman-message h2{font-size:38px}.journey-tools-grid,.notification-list{grid-template-columns:1fr}.document-row{grid-template-columns:1fr auto}.document-row .text-link{grid-column:1/-1}.document-review{grid-template-columns:1fr}.installment-row{grid-template-columns:1fr auto}.installment-row .badge{grid-column:1/-1;justify-self:start}}

@media screen and (max-width:640px){.home3-video-count{align-self:flex-start}.video-modal{padding:14px}.video-modal-dialog{width:100%}.video-modal-close{right:0;top:-50px}}
