/* ==========================================================================
   Sidi Kaouki Travel — Design 03
   Visual values (colours, sizes, spacing) are carried over from the approved
   Design 03 stylesheet. Sections follow page order.
   ========================================================================== */

:root {
  --bg: #fffaf4;
  --header-bg: #fff9f3;
  --ink: #351c17;
  --ink-soft: #51443d;
  --muted: #6f5a50;
  --clay: #a94d2b;
  --clay-dark: #8f3f22;
  --link: #a04423;
  --line: #ebded2;
  --sand: #fae8d9;
  --green: #427858;
  --green-dark: #36654a;
  --error: #b3261e;
  --footer: #a95536;
  --serif: 'Libre Baskerville', Georgia, serif;
  --sans: 'DM Sans', Arial, sans-serif;
  --header-h: 52px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 13px; overflow-x: hidden; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--serif); letter-spacing: -.055em; font-weight: 700; }
h2 { font-size: 27px; }
p { line-height: 1.45; }
ul { margin: 0; }
svg { flex-shrink: 0; }
[id] { scroll-margin-top: 20px; }

.wrap { width: calc(100% - 44px); max-width: 1044px; margin: auto; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Shared line-icon look */
.ico, .search-icon, .meta-ico, .lineico, .roundicon svg, .contact-mark, .chev, .menu-toggle svg, .dialog-close svg, .brand-mark, .footer-mark {
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.ico { width: 16px; height: 16px; }

/* Keyboard focus — visible on every interactive element */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--clay); outline-offset: 2px; border-radius: 4px; }
main:focus-visible { outline: none; }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; font-weight: 700; }
.skip-link:focus { top: 10px; }

/* ---------- Buttons ---------- */
.btn { border: 0; border-radius: 9px; padding: 12px 20px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; font-weight: 700; text-align: center; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.terracotta { background: var(--clay); color: #fff; }
.terracotta:hover { background: var(--clay-dark); }
.outline { background: #fffaf5; border: 1px solid var(--clay); color: var(--ink); }
.outline:hover { background: #fbeee3; }
.text-link { background: none; border: 0; padding: 0; color: var(--link); font-size: 12px; font-weight: 700; text-align: left; }
.text-link:hover, .section-head a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Header ---------- */
.header { height: var(--header-h); background: var(--header-bg); display: flex; align-items: center; justify-content: space-between; padding: 0 max(28px, calc((100vw - 1080px) / 2)); gap: 20px; position: relative; z-index: 30; }
.brand { display: flex; align-items: center; gap: 5px; color: #371f1a; font: 700 20px/1 Georgia, serif; min-width: 0; flex-shrink: 0; }
.brand-mark { width: 66px; height: 42px; stroke-width: 2.1; }
.brand small { display: block; font-size: 18px; }

.site-nav { font-size: 12px; font-weight: 600; }
.nav-list { display: flex; align-items: center; gap: 20px; list-style: none; padding: 0; white-space: nowrap; }
.nav-list > li > a, .sub-toggle { display: inline-flex; align-items: center; gap: 3px; padding: 8px 0; position: relative; }
.nav-list > li > a::after, .sub-toggle::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; background: var(--clay); transform: scaleX(0); transition: transform .15s ease; }
.nav-list > li > a:hover::after, .sub-toggle:hover::after, .nav-list > li > a.is-active::after, .sub-toggle.is-active::after { transform: scaleX(1); }
.sub-toggle { background: none; border: 0; font-weight: 600; font-size: 12px; }
.chev { width: 13px; height: 13px; stroke-width: 2.2; transition: transform .15s ease; }
.sub-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }

.has-sub { position: relative; }
.submenu { display: none; position: absolute; top: calc(100% + 8px); left: -16px; min-width: 200px; list-style: none; margin: 0; padding: 8px; background: #fffaf4; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgba(51, 26, 16, .12); }
.submenu::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; } /* hover bridge */
.sub-toggle[aria-expanded="true"] + .submenu { display: block; }
.submenu a { display: block; padding: 9px 10px; border-radius: 7px; font-weight: 600; }
.submenu a:hover, .submenu a:focus-visible { background: var(--sand); color: var(--clay-dark); }
.submenu li:first-child a { color: var(--link); }

.nav-right { display: flex; align-items: center; gap: 16px; font-size: 12px; white-space: nowrap; }
.nav-right .lang { font-weight: 600; }
.nav-book { padding: 10px 14px; font-size: 12px; }
.menu-toggle { display: none; background: transparent; border: 0; width: 44px; height: 44px; margin-right: -10px; align-items: center; justify-content: center; color: var(--ink); }
.menu-toggle svg { width: 26px; height: 26px; }
.menu-toggle .ico-close, .menu-toggle[aria-expanded="true"] .ico-open { display: none; }
.menu-toggle[aria-expanded="true"] .ico-close { display: block; }

/* ---------- Hero ---------- */
.hero { height: 304px; position: relative; background: linear-gradient(100deg, #f9d8c1 0%, #f7decb 38%, #edccb5 100%); }
.hero-pic { position: absolute; inset: 0; overflow: hidden; }
/* Same placement as the original CSS background: right-aligned, 110% tall, 37% vertical position */
.hero-img { position: absolute; right: 0; top: -3.7%; height: 110%; width: auto; max-width: none; }
.hero-pic::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #f8dfca 0%, rgba(248, 222, 202, .93) 24%, rgba(248, 222, 202, .07) 58%); }
.hero::after { content: ""; position: absolute; inset: 70% 0 0; background: linear-gradient(transparent, rgba(143, 86, 47, .08)); pointer-events: none; }
.hero-inner { position: relative; z-index: 1; max-width: 1016px; margin: auto; padding: 28px 22px 0; } /* 972px text column + side padding on tablets */
.hero-text { max-width: 510px; }
.overline { font-size: 10px; font-weight: 700; letter-spacing: .22em; }
.hero-text .overline { margin: 0 0 10px; }
.tiny-rule { display: block; width: 43px; height: 2px; background: var(--clay); margin-bottom: 13px; }
.hero h1 { font-size: 39px; line-height: 1.07; margin-bottom: 8px; }
.hero-text > p:last-child { font-size: 14px; line-height: 1.43; max-width: 400px; }

/* ---------- Search bar ---------- */
.search-icon { width: 23px; height: 23px; color: var(--clay); stroke-width: 1.5; }

/* ---------- Activity shortcuts ---------- */
.categories { max-width: 988px; margin: 20px auto 23px; display: grid; grid-template-columns: repeat(6, 1fr); text-align: center; gap: 10px; }
.categories a { display: flex; align-items: center; flex-direction: column; gap: 5px; font-family: Georgia, serif; font-size: 16px; color: #1f1613; padding: 2px; border-radius: 10px; }
.roundicon { width: 63px; height: 63px; display: flex; align-items: center; justify-content: center; background: var(--sand); border-radius: 50%; color: var(--clay); transition: background-color .15s ease, transform .15s ease; }
.roundicon svg { width: 32px; height: 32px; stroke-width: 1.4; }
.categories a:hover .roundicon { background: #f6dcc7; transform: translateY(-2px); }

/* ---------- Activity cards ---------- */
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; gap: 12px; }
.section-head h2 { margin: 0; font-size: 28px; min-width: 0; }
.section-head a { color: var(--link); font-size: 12px; font-weight: 700; white-space: nowrap; }
.featured { padding: 1px 16px 0; }
.booking-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.booking-card { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: #fffaf4; transition: border-color .15s ease, box-shadow .15s ease; }
.booking-card:hover { border-color: #e0c9b8; box-shadow: 0 6px 18px rgba(51, 26, 16, .06); }
.card-media { height: 143px; position: relative; background: #e8ded1; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.tag { position: absolute; top: 11px; left: 12px; color: #fff; background: var(--clay); border-radius: 8px; font-size: 11px; padding: 5px 12px; }
.heart { position: absolute; top: 7px; right: 11px; color: #fff; font: 34px/1 Georgia, serif; pointer-events: none; }
.booking-copy { padding: 8px 10px 9px; min-height: 56px; display: flex; justify-content: space-between; align-items: center; gap: 5px; }
.booking-copy h3 { font-size: 16px; letter-spacing: -.045em; margin: 0 0 7px; }
.booking-copy > div { min-width: 0; }
.booking-copy p { font-size: 11px; margin: 0; color: var(--ink-soft); display: flex; align-items: center; gap: 5px; }
.booking-copy p .meta-ico { flex-shrink: 0; }
.meta-ico { width: 12px; height: 12px; }
.meta-ico + .meta-ico, p > .meta-ico:not(:first-child) { margin-left: 8px; }
.card-cta { background: transparent; color: var(--clay); border: 0; font-size: 12px; font-weight: 700; align-self: flex-end; white-space: nowrap; flex-shrink: 0; padding: 6px 4px; margin: -6px -4px; border-radius: 6px; }
.card-cta:hover { color: var(--clay-dark); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Surf / kids features ---------- */
.feature-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 25px; }
.big-feature { height: 217px; border-radius: 11px; position: relative; overflow: hidden; display: flex; align-items: center; background: #e8ded1; }
.big-feature img { position: absolute; right: 0; top: 0; height: 100%; width: 54%; object-fit: cover; z-index: 0; }
.big-feature::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, #c4e1ed 0%, #c4e1ed 38%, rgba(196, 225, 237, .08) 72%); }
.kids-big::after { background: linear-gradient(90deg, #f4d6c0 0%, #f4d6c0 38%, rgba(244, 214, 192, .02) 75%); }
.panel-content { position: relative; z-index: 2; padding: 25px 29px; }
.panel-content .overline { font-size: 9px; margin-bottom: 13px; }
.panel-content h2 { font-size: 27px; white-space: nowrap; margin-bottom: 7px; }
.panel-content p:not(.overline) { font-size: 12px; margin-bottom: 12px; max-width: 205px; }
.big-feature .btn { font-size: 11px; padding: 9px 16px; }

/* ---------- Gallery ---------- */
.photo-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.photo-row img { width: 100%; height: 120px; object-fit: cover; border-radius: 10px; background: #e8ded1; }

/* ---------- Tips / stays / contact ---------- */
.bottom-info { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 32px; margin-top: 25px; margin-bottom: 15px; padding: 0 34px; }
.bottom-info h2 { font-size: 20px; margin: 0 0 7px; letter-spacing: -.045em; display: flex; align-items: center; }
.lineico { width: 18px; height: 18px; color: var(--clay); margin-right: 10px; stroke-width: 1.6; }
.bottom-info p { font-size: 12px; margin-bottom: 13px; }
.tips ul { list-style: none; padding: 0; margin: 13px 0 11px; }
.tips li { font-size: 12px; margin-bottom: 7px; }
.tips li::before { content: '✓'; margin-right: 12px; color: var(--clay); font-weight: 700; }
.stays img { width: 100%; height: 108px; object-fit: cover; border-radius: 8px; margin: 8px 0 6px; background: #e8ded1; }
.contact { position: relative; border-radius: 12px; padding: 17px 22px 14px; background: #f9e7d9; overflow: hidden; }
.contact-mark { width: 30px; height: 30px; color: var(--clay); float: left; margin-right: 9px; stroke-width: 1.8; }
.contact h2 { padding-top: 3px; white-space: nowrap; }
.contact p { clear: both; padding-top: 8px; }
.contact .btn { width: 100%; padding: 9px 12px; font-size: 12px; margin: 3px 0; white-space: normal; }
.contact-green { background: var(--green); color: #fff; }
.contact-green:hover { background: var(--green-dark); }
.contact-outline { border: 1px solid var(--clay); background: transparent; color: var(--clay); }
.contact-outline:hover { background: #fbeee3; }
.noscript { color: var(--error); }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer); color: #fff; font-size: 11px; }
.footer-main { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 0 4.5%; }
.footer-legal { border-top: 1px solid rgba(255, 255, 255, .18); padding: 9px 4.5% 11px; }
.footer-legal nav { gap: 6px 18px; opacity: .92; }
.footer-logo { display: flex; align-items: center; gap: 10px; font: 16px/1 Georgia, serif; }
.footer-mark { width: 24px; height: 14px; stroke-width: 3.5; }
.footer-name span { margin-left: 20px; }
.motto { white-space: nowrap; }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer nav a:hover { text-decoration: underline; text-underline-offset: 3px; }
.site-footer :focus-visible { outline-color: #fff; }
.copyright { white-space: nowrap; opacity: .92; }

/* ---------- Mobile booking shortcut ---------- */
.mobile-cta { display: none; }

/* ---------- Booking dialog ---------- */
dialog { width: min(520px, calc(100% - 24px)); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow: auto; border: 0; border-radius: 15px; padding: 23px; color: var(--ink); background: #fffdf9; box-shadow: 0 12px 80px rgba(0, 0, 0, .33); overscroll-behavior: contain; }
dialog::backdrop { background: rgba(32, 17, 11, .69); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-head h2 { margin: 0; font-size: 24px; }
.dialog-close { border: 0; background: transparent; width: 44px; height: 44px; margin: -10px -12px -10px 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; color: var(--ink); }
.dialog-close:hover { background: #f6ebe1; }
.dialog-close svg { width: 22px; height: 22px; }
.hint { margin: 12px 0 16px; color: var(--muted); font-size: 13px; background: #fbefe4; padding: 10px 12px; border-radius: 9px; }
.hint strong { color: var(--ink); }

#request-form { display: grid; gap: 12px; }
.field { display: grid; gap: 5px; align-content: start; min-width: 0; }
.field label { font-weight: 600; }
.req { color: var(--clay); }
.field input, .field textarea, .field select { border: 1px solid #d9c2b3; border-radius: 7px; padding: 10px; width: 100%; min-height: 44px; background: #fff; font-size: 16px; } /* 16px stops iOS zooming on focus */
.field textarea { resize: vertical; min-height: 80px; }
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible { outline: 2px solid var(--clay); outline-offset: 0; border-color: var(--clay); }
.field [aria-invalid="true"] { border-color: var(--error); background: #fff8f7; }
.field-help { margin: 0; font-size: 12px; color: var(--muted); }
.field-error { margin: 0; font-size: 12px; color: var(--error); font-weight: 600; }
.field-error:empty { display: none; }
.twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-status { margin: 0; color: var(--error); font-weight: 600; }
.form-status:empty { display: none; }
.req-note { margin: -4px 0 0; font-size: 12px; color: var(--muted); }
.submit-btn { width: 100%; min-height: 46px; font-size: 14px; }
.submit-btn[disabled] { opacity: .7; cursor: progress; }

#step-done { margin-top: 14px; }
.done-title { font-size: 19px; margin-bottom: 8px; letter-spacing: -.04em; }
.done-lead { font-size: 14px; }
#request-text { white-space: pre-wrap; word-break: break-word; font-family: var(--sans); font-size: 13px; line-height: 1.5; margin: 0 0 14px; background: #fff5e8; padding: 12px; border-radius: 9px; border: 1px solid var(--line); max-height: 220px; overflow: auto; }
.done-actions { display: grid; gap: 8px; }
.done-actions .btn { width: 100%; min-height: 46px; font-size: 14px; }
.small { font-size: 12px; color: var(--muted); margin: 10px 0 0; }
.small:empty { display: none; }
.config-warning { font-size: 12px; background: #fff3cd; border: 1px solid #e8cf80; color: #5c4600; padding: 8px 10px; border-radius: 8px; margin: 10px 0 0; }
#step-done .text-link { margin-top: 12px; padding: 8px 0; }

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Narrow desktop / tablet landscape: tighten the nav so it still fits on one line */
@media (max-width: 1180px) {
  .nav-list { gap: 16px; }
  .nav-right { gap: 14px; }
}
@media (max-width: 1100px) {
  .header { gap: 16px; }
  .brand { font-size: 18px; }
  .brand small { font-size: 16px; }
  .brand-mark { width: 54px; }
  .nav-list { gap: 12px; }
  .nav-right { gap: 12px; }
  .nav-right .lang { display: none; }
  .nav-book { padding: 10px 12px; }
}

/* Tablet and below: hamburger menu */
@media (max-width: 1000px) {
  .header { padding: 0 20px; }
  .menu-toggle { display: inline-flex; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; padding: 8px 20px 18px; box-shadow: 0 12px 16px rgba(0, 0, 0, .07); max-height: calc(100vh - var(--header-h)); overflow-y: auto; font-size: 15px; }
  .site-nav.open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; white-space: normal; }
  .nav-list > li { border-bottom: 1px solid #f1e6dc; }
  .nav-list > li:last-child { border-bottom: 0; }
  .nav-list > li > a, .sub-toggle { display: flex; width: 100%; min-height: 48px; padding: 12px 0; font-size: 15px; justify-content: space-between; }
  .nav-list > li > a::after, .sub-toggle::after { display: none; }
  .nav-list > li > a.is-active, .sub-toggle.is-active { color: var(--clay); }
  .chev { width: 18px; height: 18px; }
  .submenu { position: static; border: 0; box-shadow: none; padding: 0 0 10px 12px; min-width: 0; background: transparent; }
  .submenu::before { display: none; }
  .submenu a { padding: 12px 10px; min-height: 44px; font-size: 14px; }
}

@media (max-width: 850px) {
  .brand-mark { width: 46px; }
  .nav-right { gap: 10px; }
  .nav-book { display: none; }
  .bottom-info { padding: 0; }
  .feature-pair { gap: 9px; }
  .panel-content { padding: 18px; }
  .panel-content h2 { font-size: 22px; }
  .booking-copy h3 { font-size: 14px; }
  .booking-copy p { font-size: 10px; }

  /* Booking shortcut that stays within reach on phones and tablets */
  .mobile-cta { display: block; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 25; transform: translateY(calc(100% + 24px)); visibility: hidden; transition: transform .2s ease, visibility .2s; }
  .mobile-cta.is-visible { transform: none; visibility: visible; }
  .mobile-cta .btn { width: 100%; min-height: 50px; font-size: 15px; box-shadow: 0 8px 24px rgba(51, 26, 16, .25); }
  .contact h2 { white-space: normal; }
}

/* Tablet portrait: footer wraps instead of squeezing */
@media (max-width: 850px) and (min-width: 631px) {
  .footer-main { flex-wrap: wrap; padding-top: 16px; padding-bottom: 16px; row-gap: 12px; }
  .booking-copy { flex-direction: column; align-items: flex-start; }
  .card-cta { align-self: flex-start; }
}

@media (max-width: 630px) {
  :root { --header-h: 60px; }
  .hero { height: 460px; }
  .hero-img { top: auto; bottom: 0; height: 75%; }
  .hero-inner { padding: 36px 22px; }
  .hero h1 { font-size: 34px; }
  .hero-text > p:last-child { font-size: 13px; }
  .categories { grid-template-columns: repeat(3, 1fr); gap: 19px 5px; padding: 10px 14px; }
  .roundicon { width: 54px; height: 54px; }
  .roundicon svg { width: 28px; height: 28px; }
  .categories a { font-size: 14px; }
  .featured { padding: 0; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .section-head h2 { font-size: 23px; }
  .section-head a { font-size: 12px; padding-top: 0; }
  .booking-cards { grid-template-columns: 1fr; gap: 13px; }
  .card-media { height: 210px; }
  .booking-copy { padding: 12px; }
  .booking-copy h3 { font-size: 18px; }
  .booking-copy p { font-size: 12px; }
  .card-cta { font-size: 14px; padding: 10px 6px; margin: -10px -6px; }
  .feature-pair { grid-template-columns: 1fr; margin-top: 16px; }
  .big-feature { height: 220px; }
  .panel-content h2 { font-size: 24px; }
  .big-feature .btn { font-size: 12px; padding: 11px 16px; }
  .photo-row { gap: 6px; }
  .photo-row img { height: 82px; }
  .bottom-info { grid-template-columns: 1fr; gap: 28px; margin-top: 26px; }
  .bottom-info p, .tips li { font-size: 14px; }
  .text-link { font-size: 14px; padding: 8px 0; }
  .stays img { height: 180px; }
  .contact h2 { white-space: normal; }
  .contact .btn { font-size: 14px; min-height: 46px; }
  .site-footer { font-size: 13px; }
  .footer-main { height: auto; padding: 20px; flex-wrap: wrap; gap: 16px 28px; }
  .footer-legal { padding: 12px 20px 16px; }
  .site-footer nav { gap: 4px 16px; }
  .site-footer nav a { padding: 8px 0; }

  dialog { padding: 18px; width: calc(100% - 16px); max-height: calc(100dvh - 16px); }
  .dialog-head h2 { font-size: 21px; }
}

/* Very small phones (320px) */
@media (max-width: 430px) {
  .hero { height: 495px; }
}

@media (max-width: 360px) {
  .hero-inner { padding: 30px 18px; }
  .booking-copy p { font-size: 11px; }
  .twocol { grid-template-columns: 1fr; }
  .categories a { font-size: 13px; }
  .panel-content { padding: 16px; }
  .panel-content h2 { font-size: 22px; }
}

@media (max-width: 480px) {
  .twocol { grid-template-columns: 1fr; }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
