/* AFRA V6.17 – visible layout repair, desktop/tablet/mobile. Loaded LAST.
   This file intentionally isolates final page layout from legacy CSS overrides. */
:root{
  --afra17-bg:#f3f7fc;
  --afra17-surface:#ffffff;
  --afra17-ink:#153959;
  --afra17-muted:#58718a;
  --afra17-border:#d8e5ef;
  --afra17-accent:#c52846;
  --afra17-shadow:0 18px 42px rgba(21,56,94,.08);
}
/* All page layouts: never let a prior desktop grid constrain small widths. */
body[data-travel-page]{
  background:linear-gradient(180deg,#edf5fb 0%,#f8fbff 420px,#f3f7fc 100%)!important;
  color:var(--afra17-ink)!important;
  min-width:320px;
  overflow-x:clip;
}
body[data-travel-page] *,body[data-travel-page] *::before,body[data-travel-page] *::after{box-sizing:border-box}
body[data-travel-page] main.tp-container,
body[data-travel-page] .tp-container{
  width:min(1340px,calc(100% - 48px))!important;
  max-width:none!important;
  min-width:0!important;
  margin-inline:auto!important;
}
body[data-travel-page] #pageContent{width:100%!important;min-width:0!important;max-width:100%!important;min-height:48vh!important;display:block!important}
body[data-travel-page] .tp-breadcrumb{min-height:0!important;padding:22px 0 13px!important;color:#647e99!important}
body[data-travel-page] .tp-section-heading{margin:18px 0 21px!important;gap:12px!important;align-items:flex-start!important;max-width:100%!important}
body[data-travel-page] .tp-section-heading>div{min-width:0;max-width:100%}
body[data-travel-page] .tp-lead{font-size:clamp(27px,3.15vw,44px)!important;line-height:1.5!important;font-weight:900!important;letter-spacing:-.55px!important;overflow-wrap:break-word}
body[data-travel-page] .tp-sub{max-width:72ch!important;font-size:14px!important;line-height:2!important;color:var(--afra17-muted)!important}
body[data-travel-page] .tp-kicker{font-size:11px!important;padding:7px 12px!important;margin-bottom:12px!important}
body[data-travel-page] .tp-head{min-width:0!important;max-width:100%!important}
body[data-travel-page] .tp-head-actions{min-width:0}
body[data-travel-page] .tp-nav{min-width:0!important}
body[data-travel-page] .tp-nav>a{transition:background .2s,color .2s,transform .2s!important}
body[data-travel-page] .tp-topbar{background:rgba(255,255,255,.94)!important}
body[data-travel-page] .tp-btn{min-height:46px;max-width:100%;white-space:normal;text-align:center;line-height:1.6}
/* Destination pages: large, almost empty rectangles replaced by balanced imagery and copy. */
body[data-travel-page] .tp-hero{
  display:grid!important;
  grid-template-columns:minmax(0,1.07fr) minmax(320px,.93fr)!important;
  min-height:272px!important;
  max-height:none!important;
  align-items:stretch!important;
  margin:10px 0 28px!important;
  border-radius:25px!important;
  overflow:hidden!important;
  background:#fff!important;
  border:1px solid var(--afra17-border)!important;
  box-shadow:var(--afra17-shadow)!important;
}
body[data-travel-page] .tp-hero>div:first-child{min-width:0!important;display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:center!important;padding:30px 35px!important;gap:7px}
body[data-travel-page] .tp-hero h1{font-size:clamp(26px,2.65vw,38px)!important;line-height:1.45!important;margin:2px 0 7px!important;color:#153a5e!important}
body[data-travel-page] .tp-hero p{font-size:14px!important;line-height:2!important;color:#627a92!important;margin:0 0 12px!important;max-width:60ch!important}
body[data-travel-page] .tp-hero>img{display:block!important;width:100%!important;height:100%!important;min-height:272px!important;max-height:355px!important;object-fit:cover!important;object-position:center!important;align-self:stretch}
body[data-travel-page] .tp-hero .tp-btn{margin-top:5px}
/* Countries/services cards: equal heights, photo at top, no giant empty fields. */
body[data-travel-page] .tp-card-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:20px!important;justify-content:stretch!important;align-items:stretch!important;max-width:100%!important}
body[data-travel-page] .tp-package-card,
body[data-travel-page] .tp-country-card,
body[data-travel-page] .tp-service-card{
  display:flex!important;flex-direction:column!important;width:100%!important;min-width:0!important;
  max-width:none!important;margin:0!important;min-height:0!important;
  border-radius:21px!important;background:#fff!important;
  border:1px solid var(--afra17-border)!important;box-shadow:var(--afra17-shadow)!important;
  overflow:hidden!important;color:#173a5b!important;
}
body[data-travel-page] .tp-card-photo{display:block!important;width:100%!important;height:auto!important;min-height:0!important;aspect-ratio:8/5.5!important;overflow:hidden!important}
body[data-travel-page] .tp-card-photo img{width:100%!important;height:100%!important;object-fit:cover!important;opacity:1!important}
body[data-travel-page] .tp-card-body{flex:1 1 auto!important;display:flex!important;flex-direction:column!important;gap:10px!important;padding:18px!important;min-height:0!important;height:auto!important}
body[data-travel-page] .tp-card-body h3{color:#133758!important;font-size:20px!important;line-height:1.55!important;overflow-wrap:anywhere}
body[data-travel-page] .tp-card-body p{color:#617b94!important;font-size:13px!important;line-height:1.95!important;overflow-wrap:anywhere}
body[data-travel-page] .tp-card-links{margin-top:auto!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
body[data-travel-page] .tp-card-links a{min-width:0!important;min-height:44px!important;display:grid!important;place-items:center!important;padding:9px!important;font-size:12px!important;line-height:1.6!important}
body[data-travel-page] .tp-filter{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important;padding:18px!important;border-radius:20px!important;margin:22px 0!important;background:#fff!important;border:1px solid var(--afra17-border)!important}
body[data-travel-page] .tp-filter label{min-width:0!important;width:100%!important;color:#496b8b!important;font-size:13px!important}
body[data-travel-page] .tp-filter input,body[data-travel-page] .tp-filter select{height:48px!important;min-width:0!important;width:100%!important;background:#f9fcff!important;color:#153a5a!important;border-color:#cbddeb!important}
body[data-travel-page] .tp-empty{grid-column:1/-1;max-width:100%;padding:26px 20px!important;border-radius:18px!important;font-size:14px!important;line-height:1.9!important;color:#55718e!important}
/* Booking: space is divided deliberately; the form never collapses to a sliver. */
body[data-travel-page="request"] .tp-section-heading{padding:14px 0 0!important}
body[data-travel-page="request"] .tp-steps{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px!important;margin:15px 0 20px!important;align-items:stretch!important}
body[data-travel-page="request"] .tp-step{
  display:flex!important;align-items:center!important;gap:10px!important;min-width:0!important;
  min-height:65px!important;padding:12px 16px!important;margin:0!important;
  background:#fff!important;color:#406381!important;border:1px solid #d9e6f1!important;
  border-radius:16px!important;font-size:13px!important;line-height:1.55!important;
  box-shadow:0 8px 20px rgba(22,65,105,.04)!important;
}
body[data-travel-page="request"] .tp-step.active{background:#164d7d!important;color:white!important;border-color:#164d7d!important;box-shadow:0 12px 23px rgba(23,74,119,.18)!important}
body[data-travel-page="request"] .tp-step b{display:grid!important;place-items:center!important;flex:0 0 33px!important;width:33px!important;height:33px!important;margin:0!important;background:#e6f0f9!important;color:#164d7d!important;border-radius:12px!important;font-size:15px!important}
body[data-travel-page="request"] .tp-step.active b{background:#fff!important;color:#164d7d!important}
body[data-travel-page="request"] #bookingArea.tp-booking-grid{
  display:grid!important;grid-template-columns:minmax(0,1fr) minmax(290px,335px)!important;
  align-items:start!important;gap:22px!important;max-width:100%!important;
}
body[data-travel-page="request"] .tp-form-panel,
body[data-travel-page="request"] .tp-summary-panel{
  width:100%!important;max-width:100%!important;min-width:0!important;
  padding:25px!important;background:white!important;color:#173955!important;
  border:1px solid var(--afra17-border)!important;border-radius:22px!important;
  box-shadow:var(--afra17-shadow)!important;
}
body[data-travel-page="request"] .tp-summary-panel{top:110px!important;position:sticky!important;overflow:hidden!important}
body[data-travel-page="request"] .tp-summary-panel h3{color:#153858!important;font-size:20px!important;line-height:1.6!important;overflow-wrap:anywhere!important}
body[data-travel-page="request"] .tp-summary-panel p{color:#58738d!important;font-size:13px!important;line-height:2!important;overflow-wrap:anywhere!important}
body[data-travel-page="request"] .tp-summary-figure{display:block;width:100%!important;height:auto!important;aspect-ratio:16/10!important;object-fit:cover!important;border-radius:16px!important;margin-bottom:16px!important}
body[data-travel-page="request"] #stepForm{display:block!important;min-width:0!important;width:100%!important}
body[data-travel-page="request"] .tp-form-step:not([hidden]){display:block!important;min-height:0!important}
body[data-travel-page="request"] .tp-form-step h2{font-size:22px!important;line-height:1.55!important;margin:0 0 18px!important;color:#153a5e!important}
body[data-travel-page="request"] .tp-form-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:17px!important;align-items:start!important}
body[data-travel-page="request"] .tp-form-grid label{display:flex!important;flex-direction:column!important;gap:7px!important;min-width:0!important;width:100%!important;font-size:13px!important;line-height:1.8!important;font-weight:800!important;color:#325776!important}
body[data-travel-page="request"] .tp-form-grid label.wide{grid-column:1/-1!important}
body[data-travel-page="request"] .tp-form-grid input,
body[data-travel-page="request"] .tp-form-grid select,
body[data-travel-page="request"] .tp-form-grid textarea{
  display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;
  min-height:49px!important;padding:11px 13px!important;border:1px solid #ccddea!important;
  border-radius:12px!important;background:#f9fcff!important;color:#153a5a!important;
  opacity:1!important;font:500 14px/1.6 Vazirmatn,Tahoma,sans-serif!important;
}
body[data-travel-page="request"] .tp-form-grid textarea{min-height:112px!important;resize:vertical}
body[data-travel-page="request"] .tp-form-grid input:focus,
body[data-travel-page="request"] .tp-form-grid select:focus,
body[data-travel-page="request"] .tp-form-grid textarea:focus{outline:2px solid rgba(45,118,180,.25)!important;outline-offset:0;border-color:#4385b9!important}
body[data-travel-page="request"] .tp-form-grid input::placeholder,
body[data-travel-page="request"] .tp-form-grid textarea::placeholder{color:#8da2b7!important;opacity:1}
body[data-travel-page="request"] .tp-form-actions{display:flex!important;gap:10px!important;justify-content:flex-start!important;flex-wrap:wrap!important;padding-top:17px!important;margin-top:18px!important;border-top:1px solid #e1ebf3!important}
body[data-travel-page="request"] .tp-form-actions button{min-width:140px!important;min-height:47px!important}
body[data-travel-page="request"] .tp-price-box{margin:12px 0!important;padding:14px!important}
body[data-travel-page="request"] .tp-price-box strong{font-size:24px!important;overflow-wrap:anywhere!important}
body[data-travel-page="request"] .tp-success{max-width:800px!important;margin-inline:auto!important}
/* Home sections: eliminate giant gaps and ensure FAQs are readable rather than narrow rows. */
body:has(#main) .section{scroll-margin-top:100px}
.faq-section{padding-block:62px!important;background:linear-gradient(180deg,#f7fafc,#eaf3fa)!important}
.faq-section .container{width:min(1280px,calc(100% - 48px))!important}
.faq-section .faq-layout{display:grid!important;grid-template-columns:minmax(230px,.72fr) minmax(0,1.28fr)!important;gap:46px!important;align-items:start!important}
.faq-section .faq-layout>div{min-width:0!important}
.faq-section .faq-layout>div:first-child{padding-top:5px}
.faq-section .faq-layout h2{font-size:clamp(27px,2.8vw,40px)!important;line-height:1.55!important;color:#153b61!important}
.faq-section .faq-layout>div:first-child>p{font-size:14px!important;line-height:2!important;color:#637c94!important;max-width:48ch!important}
.faq-section .faq-list{display:grid!important;gap:11px!important;width:100%!important;min-width:0!important;max-width:100%!important;align-content:start!important}
.faq-section .faq-list details{
  display:block!important;margin:0!important;padding:0 19px!important;
  width:100%!important;min-width:0!important;max-width:100%!important;
  border:1px solid #d9e6f0!important;border-radius:16px!important;
  background:#fff!important;box-shadow:0 8px 20px rgba(20,58,98,.05)!important;
  color:#173b60!important;overflow:hidden!important;
}
.faq-section .faq-list details[open]{border-color:#b5cfdf!important;box-shadow:0 13px 27px rgba(17,57,97,.09)!important}
.faq-section .faq-list details summary{
  min-height:65px!important;display:flex!important;align-items:center!important;
  justify-content:space-between!important;gap:15px!important;
  list-style:none!important;cursor:pointer!important;padding:14px 0!important;
  color:#153958!important;font-size:14px!important;font-weight:850!important;
  line-height:1.9!important;white-space:normal!important;text-align:right!important;
}
.faq-section .faq-list details summary::-webkit-details-marker{display:none!important}
.faq-section .faq-list details summary>span{
  flex:0 0 31px!important;display:grid!important;place-items:center!important;
  width:31px!important;height:31px!important;margin-inline-start:auto!important;
  border-radius:50%!important;background:#f0f6fc!important;border:1px solid #d5e4f0!important;
  color:#b92543!important;font-size:18px!important;line-height:1!important;
  transition:transform .2s!important;
}
.faq-section .faq-list details[open] summary>span{transform:rotate(45deg)}
.faq-section .faq-list details p{margin:0!important;padding:0 0 18px!important;color:#546f89!important;font-size:13px!important;line-height:2.1!important;overflow-wrap:anywhere}
/* General imagery and the primary nav should behave consistently. */
#header .afra-main-nav>a{min-height:42px!important}
.service-card.rich-card{min-width:0!important}
.service-card.rich-card .service-media img{width:100%!important;height:100%!important;object-fit:cover!important}
/* Tablet: switch from squeezed columns to full-width form + summary. */
@media(max-width:1080px){
  body[data-travel-page="request"] #bookingArea.tp-booking-grid{grid-template-columns:minmax(0,1fr)!important;gap:16px!important}
  body[data-travel-page="request"] .tp-summary-panel{position:static!important;display:grid!important;grid-template-columns:minmax(0,210px) minmax(0,1fr)!important;align-items:center!important;gap:8px 18px!important}
  body[data-travel-page="request"] .tp-summary-figure{grid-row:1/5!important;aspect-ratio:8/5.5!important;margin:0!important}
  body[data-travel-page] .tp-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body[data-travel-page] .tp-hero{grid-template-columns:minmax(0,1fr) minmax(220px,.8fr)!important}
  .faq-section .faq-layout{gap:24px!important}
}
@media(max-width:760px){
  body[data-travel-page] .tp-container,body[data-travel-page] main.tp-container{width:calc(100% - 28px)!important}
  body[data-travel-page] .tp-hero{grid-template-columns:1fr!important;margin:7px 0 23px!important;border-radius:21px!important}
  body[data-travel-page] .tp-hero>div:first-child{padding:22px 20px!important}
  body[data-travel-page] .tp-hero>img{height:205px!important;min-height:0!important;max-height:205px!important}
  body[data-travel-page] .tp-lead{font-size:clamp(26px,7vw,35px)!important}
  body[data-travel-page] .tp-card-grid{grid-template-columns:1fr!important;gap:15px!important}
  body[data-travel-page] .tp-filter{grid-template-columns:1fr!important;padding:14px!important}
  body[data-travel-page="request"] .tp-steps{gap:7px!important}
  body[data-travel-page="request"] .tp-step{min-height:74px!important;flex-direction:column!important;gap:6px!important;align-items:center!important;justify-content:center!important;padding:10px 6px!important;text-align:center!important;font-size:11px!important}
  body[data-travel-page="request"] .tp-step b{width:29px!important;height:29px!important;flex-basis:29px!important;font-size:13px!important}
  body[data-travel-page="request"] .tp-form-panel,body[data-travel-page="request"] .tp-summary-panel{padding:17px!important;border-radius:19px!important}
  body[data-travel-page="request"] .tp-summary-panel{grid-template-columns:1fr!important}
  body[data-travel-page="request"] .tp-summary-figure{grid-row:auto!important;height:155px!important;aspect-ratio:auto!important;margin-bottom:4px!important}
  body[data-travel-page="request"] .tp-form-grid{grid-template-columns:1fr!important;gap:14px!important}
  body[data-travel-page="request"] .tp-form-grid label.wide{grid-column:auto!important}
  body[data-travel-page="request"] .tp-form-actions button{flex:1!important;min-width:0!important}
  .faq-section{padding-block:48px!important}
  .faq-section .container{width:calc(100% - 28px)!important}
  .faq-section .faq-layout{grid-template-columns:1fr!important;gap:20px!important}
  .faq-section .faq-list details{padding-inline:15px!important}
}
/* The user can choose dark mode; keep all panels and form labels in the SAME palette. */
html[data-theme="dark"] body[data-travel-page]{background:linear-gradient(180deg,#0e233d,#122b47)!important;color:#eaf3ff!important}
html[data-theme="dark"] body[data-travel-page] .tp-topbar{background:rgba(13,35,60,.96)!important;border-color:#2b5173!important}
html[data-theme="dark"] body[data-travel-page] .tp-hero,
html[data-theme="dark"] body[data-travel-page] .tp-country-card,
html[data-theme="dark"] body[data-travel-page] .tp-package-card,
html[data-theme="dark"] body[data-travel-page] .tp-service-card,
html[data-theme="dark"] body[data-travel-page] .tp-filter,
html[data-theme="dark"] body[data-travel-page="request"] .tp-form-panel,
html[data-theme="dark"] body[data-travel-page="request"] .tp-summary-panel{
  background:#172f4b!important;border-color:#355773!important;color:#edf6ff!important;
}
html[data-theme="dark"] body[data-travel-page] .tp-hero h1,
html[data-theme="dark"] body[data-travel-page] .tp-card-body h3,
html[data-theme="dark"] body[data-travel-page="request"] .tp-form-step h2,
html[data-theme="dark"] body[data-travel-page="request"] .tp-summary-panel h3{color:#f0f8ff!important}
html[data-theme="dark"] body[data-travel-page] .tp-hero p,
html[data-theme="dark"] body[data-travel-page] .tp-card-body p,
html[data-theme="dark"] body[data-travel-page="request"] .tp-summary-panel p,
html[data-theme="dark"] body[data-travel-page] .tp-sub{color:#bdd0e1!important}
html[data-theme="dark"] body[data-travel-page="request"] .tp-step{background:#1a3856!important;color:#d0e3f6!important;border-color:#3a5f7e!important}
html[data-theme="dark"] body[data-travel-page="request"] .tp-step.active{background:#245b87!important;color:#fff!important}
html[data-theme="dark"] body[data-travel-page="request"] .tp-form-grid label,
html[data-theme="dark"] body[data-travel-page] .tp-filter label{color:#dcecff!important}
html[data-theme="dark"] body[data-travel-page="request"] .tp-form-grid input,
html[data-theme="dark"] body[data-travel-page="request"] .tp-form-grid select,
html[data-theme="dark"] body[data-travel-page="request"] .tp-form-grid textarea,
html[data-theme="dark"] body[data-travel-page] .tp-filter input,
html[data-theme="dark"] body[data-travel-page] .tp-filter select{
  background:#102740!important;color:#f4f9ff!important;border-color:#426687!important;
}
html[data-theme="dark"] .faq-section{background:linear-gradient(180deg,#11263f,#0c2139)!important}
html[data-theme="dark"] .faq-section .faq-layout h2{color:#f1f7ff!important}
html[data-theme="dark"] .faq-section .faq-layout>div:first-child>p{color:#bbd0e2!important}
html[data-theme="dark"] .faq-section .faq-list details{background:#183451!important;border-color:#3a5e7b!important;color:#edf6ff!important}
html[data-theme="dark"] .faq-section .faq-list details summary{color:#edf6ff!important}
html[data-theme="dark"] .faq-section .faq-list details p{color:#c2d3e3!important}
html[data-theme="dark"] .faq-section .faq-list details summary>span{background:#244966!important;border-color:#426a89!important;color:#ffc3d0!important}
@media(prefers-reduced-motion:reduce){.faq-section .faq-list details summary>span,body[data-travel-page] .tp-nav>a{transition:none!important}}
/* A single country or package should be a featured card, not a card stranded at the edge. */
body[data-travel-page] .tp-card-grid:has(> .tp-country-card:only-child),
body[data-travel-page] .tp-card-grid:has(> .tp-package-card:only-child){grid-template-columns:minmax(0,420px)!important;justify-content:center!important}
@media(max-width:760px){
 body[data-travel-page] .tp-card-grid:has(> .tp-country-card:only-child),
 body[data-travel-page] .tp-card-grid:has(> .tp-package-card:only-child){grid-template-columns:minmax(0,1fr)!important}
}
