
:root{
  --bg: #fbfaf8;
  --surface: #ffffff;
  --ink: #141414;
  --muted: #6b6b6b;
  --line: rgba(0,0,0,.08);

  --accent: #3a2e2a;
  --accent2:#b89f92;

  --btn: #3a2e2a;
  --btnText: #ffffff;

  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;

  --shadow: 0 14px 38px rgba(0,0,0,.10);
  --shadow-soft: 0 8px 22px rgba(0,0,0,.08);

  --container: 1160px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.35;
}
a{ color: inherit; text-decoration:none; }
img, video{ max-width:100%; display:block; }

.container{
  width: min(var(--container), calc(100% - 40px));
  margin-inline:auto;
}

.skiplink{
  position:absolute; left:-999px; top:auto; width:1px; height:1px; overflow:hidden;
}
.skiplink:focus{
  left:16px; top:16px; width:auto; height:auto; padding:10px 12px;
  background:#fff; border:1px solid var(--line); border-radius:12px; z-index:9999;
}

.topbar{
  position: sticky;
  top:0;
  z-index: 80;
  backdrop-filter: blur(10px);
  background: rgba(251,250,248,.78);
  border-bottom: 1px solid var(--line);
}
.topbar-inner{
  display:flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  gap: 14px;
}

.brand{
  display:flex;
  flex-direction:column;
  line-height:1;
  padding: 8px 10px;
  border-radius: 14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.65);
}
.brand .rada{
  font-family: "Great Vibes", cursive;
  font-size: 32px;
  letter-spacing: .4px;
  color: var(--accent);
}
.brand .cheese{
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  opacity:.92;
  margin-top: 2px;
}

.nav{
  display:flex;
  align-items:center;
  gap: 14px;
  flex-wrap: wrap;
}
.nav a{
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 999px;
}
.nav a[aria-current="page"]{
  background: rgba(184,159,146,.22);
  border: 1px solid rgba(0,0,0,.06);
}

.tools{
  display:flex;
  align-items:flex-start;
  gap: 12px;
}
.lang-wrap{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap: 6px;
}
.lang-select{
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.75);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--accent);
  outline: none;
}
.lang-select:focus{ box-shadow: 0 0 0 3px rgba(184,159,146,.35); }

.social{ display:flex; gap: 8px; }
.icon-btn{
  width: 40px; height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.75);
  display:grid; place-items:center;
  transition: transform .15s ease;
}
.icon-btn:hover{ transform: translateY(-1px); }
.icon{ width: 18px; height: 18px; fill: currentColor; color: var(--accent); }

.mobile-toggle{
  display:none;
  width:44px; height:44px;
  border-radius: 14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.75);
}
.mobile-toggle svg{ width:22px; height:22px; color: var(--accent); }
@media (max-width: 980px){
  .nav{ display:none; }
  .mobile-toggle{ display:grid; place-items:center; }
}
.mobile-drawer{
  display:none;
  border-top: 1px solid var(--line);
  padding: 10px 0 14px;
}
.mobile-drawer a{
  display:block;
  padding: 10px 12px;
  border-radius: 14px;
  color: var(--accent);
  font-weight: 700;
}
.mobile-drawer a:hover{ background: rgba(184,159,146,.18); }

.hero{
  position:relative;
  height: clamp(360px, 60vh, 620px);
  overflow:hidden;
  border-bottom: 1px solid var(--line);
  background:#111;
}
.hero video{
  position:absolute; inset:0;
  width:100%; height:100%;
  object-fit: cover;
  transform: scale(1.02);
}
.hero::after{
  content:"";
  position:absolute; inset:0;
  background:
    radial-gradient(1200px 600px at 50% 35%, rgba(255,255,255,.18), transparent 60%),
    linear-gradient(to bottom, rgba(0,0,0,.22), rgba(0,0,0,.45));
  pointer-events:none;
}

.portrait-link{
  position:absolute;
  left:50%;
  top: 50%;
  transform: translate(-50%,-50%);
  z-index: 10;
  display:grid;
  place-items:center;
  width: min(374px, 62vw);
  aspect-ratio: 1/1;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.45);
  background: rgba(255,255,255,.10);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.portrait-link:hover{
  transform: translate(-50%,-50%) scale(1.01);
  border-color: rgba(255,255,255,.70);
  box-shadow: 0 18px 46px rgba(0,0,0,.22);
}
.portrait{
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow:hidden;
  background: rgba(255,255,255,.12);
}
.portrait img{ width:100%; height:100%; object-fit:cover; }

.section{ padding: 38px 0; }
.section-title{ text-align:center; margin-bottom: 18px; }
.section-title h1, .section-title h2{
  margin:0 0 8px;
  font-size: clamp(24px, 3vw, 38px);
  color: var(--accent);
  letter-spacing: -0.02em;
  white-space: pre-line;
}
.section-title h1[data-i18n="home.title"]{
  font-size: clamp(18px, 2.25vw, 29px);
}

.section-title p{
  margin:0 auto;
  max-width: 820px;
  color: var(--muted);
  font-size: 15px;
  white-space: pre-line;
}

.preline{ white-space: pre-line; }
.section-title p:empty{ display:none; }
.notice h3:empty{ display:none; }
ul:empty{ display:none; }


.grid-courses{
  display:grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-top: 18px;
}
@media (max-width: 1200px){ .grid-courses{ grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px){ .grid-courses{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px){ .grid-courses{ grid-template-columns: 1fr; } }
/* Anchor targets for course cards (so sticky topbar doesn't cover them) */
.grid-courses .card[id]{
  scroll-margin-top: 110px;
}
.grid-courses .card:target{
  outline: 2px solid rgba(181, 125, 0, .35);
  outline-offset: 3px;
}


.card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow:hidden;
  box-shadow: var(--shadow-soft);
  display:flex;
  flex-direction: column;
  min-height: 360px;
}
.card-media{
  aspect-ratio: 1179 / 1973; /* taller image area */
  background: linear-gradient(135deg, rgba(184,159,146,.25), rgba(58,46,42,.10));
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow:hidden;
}
.card-media img{ width:100%; height:100%; object-fit: cover; }
.card-body{
  padding: 16px 16px 12px;
  display:flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.card-title{
  text-align:center;
  margin:0;
  font-size: 16px;
  font-weight: 800;
  color: var(--accent);
}
.card-desc{
  margin:0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-line;
}
.card-footer{
  padding: 0 16px 16px;
  display:flex;
  flex-direction: column;
  gap: 10px;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--btn);
  color: var(--btnText);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .02em;
  border: 1px solid rgba(0,0,0,.12);
  transition: transform .15s ease, filter .15s ease;
  width:100%;
}
.btn:hover{ transform: translateY(-1px); filter: brightness(1.03); }
.btn.secondary{
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(0,0,0,.14);
}

/* Buy buttons - Offset shadow outline (style 2)
   Designed for a light cream background: black frame + black text + tactile shadow.
   Covers both:
   - courses page buttons (data-product-key)
   - individual course page buttons (data-course-buy)
*/
.btn[data-product-key],
.btn[data-course-buy]{
  background: transparent;
  color: #111;
  border: 2px solid #111;
  cursor: pointer;
  box-shadow: 4px 4px 0 #111;
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.btn.secondary[data-product-key],
.btn.secondary[data-course-buy]{
  background: transparent;
  color: #111;
  border: 2px solid #111;
  box-shadow: 4px 4px 0 #111;
}
.btn[data-product-key]:hover,
.btn[data-course-buy]:hover{
  transform: translate(2px,2px);
  box-shadow: 2px 2px 0 #111;
  background: rgba(17,17,17,.04);
}
.btn[data-product-key]:active,
.btn[data-course-buy]:active{
  transform: translate(4px,4px);
  box-shadow: 0 0 0 #111;
  background: rgba(17,17,17,.06);
}
.btn[data-product-key]:focus-visible,
.btn[data-course-buy]:focus-visible{
  outline: 3px solid rgba(17,17,17,.35);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce){
  .btn[data-product-key],
  .btn[data-course-buy]{ transition: none; }
  .btn[data-product-key]:hover,
  .btn[data-course-buy]:hover,
  .btn[data-product-key]:active,
  .btn[data-course-buy]:active{ transform: none; }
}

/* Clickable course covers on courses page */
.card-media-link{
  display:block;
  height:100%;
  width:100%;
  border-radius: inherit;
  overflow:hidden;
}
.card-media-link:focus-visible{
  outline: 3px solid rgba(0,0,0,.25);
  outline-offset: 2px;
}
.card-media-link img{ cursor:pointer; }
.card-media-link:hover img{ transform: scale(1.02); }
.card-media img{ transition: transform .2s ease; }

/* Hide bottom buy buttons on course pages */
.course-buy--bottom{ display:none; }

.small{ font-size: 12px; color: var(--muted); }

.notice{
  background: rgba(255,255,255,.75);
  border:1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
}
.notice h3{ margin:0 0 8px; color: var(--accent); }
.notice ul{ margin:0; padding-left: 18px; color: var(--muted); }
.notice li{ margin: 6px 0; }

.form{ display:grid; gap: 12px; max-width: 640px; }
.input, textarea{
  width:100%;
  border:1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
  background: rgba(255,255,255,.85);
  outline:none;
}
.input:focus, textarea:focus{ box-shadow: 0 0 0 3px rgba(184,159,146,.35); }
textarea{ min-height: 140px; resize: vertical; }

/* Contact form helpers */
.hp-field{
  position:absolute !important;
  left:-9999px !important;
  width:1px !important;
  height:1px !important;
  overflow:hidden !important;
}
.form-status{ margin: 0; }
.form-status.is-success{ color: var(--accent); font-weight: 700; }
.form-status.is-error{ color: #8b1a1a; font-weight: 700; }
.btn[disabled]{
  opacity: .7;
  cursor: not-allowed;
  transform: none !important;
  filter: none !important;
}

.footer{
  border-top: 1px solid var(--line);
  padding: 26px 0 40px;
  color: var(--muted);
  font-size: 13px;
}
.footer-row{
  display:flex;
  flex-wrap:wrap;
  gap: 12px 18px;
  justify-content: space-between;
  align-items: center;
}
.footer a{ color: var(--accent); opacity: .9; }
.footer a:hover{ opacity: 1; text-decoration: underline; }

.cookie-banner{ position: fixed; left: 14px; right: 14px; bottom: 14px; z-index: 999; display:none; }
.cookie-inner{
  max-width: 980px; margin: 0 auto;
  background: rgba(255,255,255,.92);
  border:1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  display:flex; gap: 12px;
  align-items:flex-start;
  justify-content: space-between;
  flex-wrap:wrap;
}
.cookie-inner p{ margin:0; color: var(--muted); font-size: 13px; max-width: 640px; }
.cookie-actions{ display:flex; gap: 10px; flex-wrap: wrap; }
.cookie-actions button{
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.14);
  background: #fff;
  font-weight: 900;
  color: var(--accent);
}
.cookie-actions button.primary{
  background: var(--btn);
  color: var(--btnText);
  border-color: rgba(0,0,0,.12);
}

/* About page banner */
.page-banner{position:relative;min-height:480px;overflow:hidden;border-bottom:1px solid var(--line);background:#111}
.page-banner video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transform:scale(1.02)}
.page-banner::after{content:"";position:absolute;inset:0;background:radial-gradient(900px 420px at 50% 30%, rgba(255,255,255,.18), transparent 60%),linear-gradient(to bottom, rgba(0,0,0,.20), rgba(0,0,0,.55));pointer-events:none}
.page-banner-inner{position:relative;z-index:2;padding:48px 0 54px}

@media (prefers-reduced-motion: reduce){
  .portrait-link,.icon-btn,.btn{transition:none !important}
}
/* Mobile only: keep hamburger visible + place it BEFORE language (no HTML changes) */
@media (max-width: 980px){
  /* Give the top bar a bit more usable width on phones */
  .topbar .container{
    width: calc(100% - 24px);
  }

  /* Ensure the right-side controls can shrink and stay inside the viewport */
  .topbar-inner{
    gap: 10px;
  }

  .tools{
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0; /* allows flex children to shrink instead of overflow */
  }

  /* Visual reorder only */
  .mobile-toggle{ order: 1; }
  .lang-wrap{ order: 2; }

  /* Critical: let social icons wrap on small screens to reduce required width */
  .social{
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 220px; /* keeps 5 icons visible but prevents pushing hamburger off-screen */
  }
}

/* Disabled buy button state (safe fallback) */
.is-disabled{ opacity:.55; cursor:not-allowed; }

/* Smooth anchor scrolling (respects reduced motion) */
@media (prefers-reduced-motion: no-preference){
  html{ scroll-behavior:smooth; }
}

.course-banner-wrap{width:100vw;margin-left:calc(50% - 50vw);}

/* Base wrapper */
.course-banner{display:block;}

/* Legacy 3-image banner support (kept for fallback / old assets) */
.course-banner--grid{display:flex;gap:0;}
.course-banner--grid img{flex:1 1 33.333%;width:33.333%;height:320px;object-fit:cover;display:block;}
@media(max-width:768px){.course-banner--grid{flex-direction:column;}.course-banner--grid img{width:100%;height:240px;}}

/* 1-video full-width banners (vertical phone video) */
.course-banner video{
  width:100%;
  height: clamp(420px, 85vh, 960px);
  object-fit: cover;
  display:block;
}

@media(max-width:768px){
  .course-banner video{ height: clamp(420px, 88vh, 820px); }
}
.course-buy{display:flex;gap:12px;margin-top:14px;}
.course-buy .btn{width:100%;}
@media(max-width:520px){.course-buy{flex-direction:column;}}

/* Course essentials (bold important info) */
.course-essentials{
  margin: 10px 0 12px;
  font-size: 1.02rem;
  line-height: 1.35;
}

/* Course contents list: bullets only for the "adapted for" line */
#contentsBlock ul[data-i18n-list]{
  list-style: none;
  padding-left: 0;
  margin: 10px 0 0;
}
#contentsBlock ul[data-i18n-list] li{
  margin: 8px 0;
}
#contentsBlock ul[data-i18n-list] li.list-bullet{
  position: relative;
  padding-left: 18px;
  font-weight: 700;
}
#contentsBlock ul[data-i18n-list] li.list-bullet::before{
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
}
#contentsBlock ul[data-i18n-list] li.list-indent{
  padding-left: 18px;
  margin-left: 18px;
}

/* About page */
.about-hero{ padding: 18px 0 8px; }
.about-portrait{
  width: min(420px, 90vw);
  margin: 0 auto;
  border-radius: 0;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.10);
  box-shadow: var(--shadow-soft);
  background: transparent;
}
.about-portrait img{ width:100%; height:auto; object-fit: contain; display:block; }
.about-content{ max-width: 920px; margin: 0 auto; }
.about-content p{ margin: 0 0 12px; color: var(--text); }
.about-content p strong{ color: var(--accent); }
.about-banner{
  width: 100%;
  max-height: 520px;
  overflow:hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #000;
}
.about-banner video{ width:100%; height:100%; max-height: 520px; object-fit: cover; display:block; }

.about-gap{ height: 18px; }


/* RTL support for Arabic
   IMPORTANT: we target multiple hooks because some browsers/cache states may not reflect `dir`
   immediately. Any of these will activate RTL layout:
   - html[dir="rtl"] (ideal)
   - html.is-rtl (JS hook)
   - html[lang="ar"] (fallback)
*/
html[dir="rtl"] body,
html.is-rtl body,
html[lang="ar"] body { direction: rtl; }

html[dir="rtl"] .nav,
html.is-rtl .nav,
html[lang="ar"] .nav,
html[dir="rtl"] header,
html.is-rtl header,
html[lang="ar"] header,
html[dir="rtl"] .section-title,
html.is-rtl .section-title,
html[lang="ar"] .section-title { text-align: right; }

html[dir="rtl"] ul,
html.is-rtl ul,
html[lang="ar"] ul,
html[dir="rtl"] ol,
html.is-rtl ol,
html[lang="ar"] ol { padding-inline-start: 1.25rem; padding-left: 0; padding-right: 1.25rem; }

html[dir="rtl"] .lang-select,
html.is-rtl .lang-select,
html[lang="ar"] .lang-select { direction: rtl; }


/* RTL: enforce mirrored header/nav layout (Safari can be picky with cascade) */
html[dir="rtl"] .topbar-inner,
html.is-rtl .topbar-inner,
html[lang="ar"] .topbar-inner{ flex-direction: row-reverse !important; }

html[dir="rtl"] .nav,
html.is-rtl .nav,
html[lang="ar"] .nav{ flex-direction: row-reverse !important; justify-content: flex-end; }

html[dir="rtl"] .tools,
html.is-rtl .tools,
html[lang="ar"] .tools{ flex-direction: row-reverse !important; }

html[dir="rtl"] .lang-wrap,
html.is-rtl .lang-wrap,
html[lang="ar"] .lang-wrap{ align-items: flex-start; }

/* RTL: mobile visual order tweaks */
@media (max-width: 980px){
  html[dir="rtl"] .mobile-toggle,
  html.is-rtl .mobile-toggle,
  html[lang="ar"] .mobile-toggle{ order: 2; }

  html[dir="rtl"] .lang-wrap,
  html.is-rtl .lang-wrap,
  html[lang="ar"] .lang-wrap{ order: 1; }

  html[dir="rtl"] .social,
  html.is-rtl .social,
  html[lang="ar"] .social{ justify-content: flex-start; }
}
