/* the-open-studio.com — mobile-first, RTL */
:root {
  --olive: #7c8967;
  --olive-dark: #5c6a4c;
  --maroon: #7a2020;
  --cream: #efe9d2;
  --text: #33321f;
  --max-width: 1100px;
}

* { box-sizing: border-box; }

html { direction: rtl; }

body {
  margin: 0;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.6;
}

a { color: inherit; }

.skip-link {
  position: absolute;
  right: -999px;
  top: 0;
  background: #fff;
  padding: 8px 12px;
  z-index: 100;
}
.skip-link:focus { right: 8px; top: 8px; }

/* Header */
.site-header {
  background: var(--olive);
  display: flex;
  flex-direction: column;
}
.header-inner {
  display: flex;
  flex-direction: column;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}
.logo-block, .hero-block {
  flex: 1 1 100%;
}
.logo-block img, .hero-block img {
  display: block;
  width: 100%;
  height: auto;
}

/* Mobile nav (hamburger via checkbox hack) */
.nav-toggle { display: none; }
.nav-toggle-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--olive-dark);
  color: #fff;
  padding: 14px 18px;
  font-size: 1.1rem;
  cursor: pointer;
}
.nav-toggle-label .hamburger {
  width: 26px;
  height: 20px;
  position: relative;
}
.nav-toggle-label .hamburger span {
  display: block;
  position: absolute;
  right: 0; left: 0;
  height: 3px;
  background: #fff;
  border-radius: 2px;
}
.nav-toggle-label .hamburger span:nth-child(1) { top: 0; }
.nav-toggle-label .hamburger span:nth-child(2) { top: 8px; }
.nav-toggle-label .hamburger span:nth-child(3) { top: 16px; }

.site-nav {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  background: var(--olive);
}
.nav-toggle:checked ~ .site-nav {
  max-height: 600px;
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}
.site-nav a {
  display: block;
  padding: 12px 20px;
  color: #fff;
  text-decoration: none;
  font-size: 1.05rem;
}
.site-nav a:hover, .site-nav a[aria-current="page"] {
  background: var(--maroon);
}
.site-nav .sub-nav {
  padding-right: 20px;
  display: none;
}
.site-nav .sub-nav.is-open {
  display: block;
}
.site-nav .sub-nav a { font-size: 0.95rem; opacity: 0.9; }

/* Main content */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 18px 48px;
}
h1 { font-size: 1.6rem; margin-top: 0; }
h2 { font-size: 1.25rem; color: var(--olive-dark); }

.card {
  background: #fff;
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Team / workshop grids — mobile: single column */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.grid figure { margin: 0; }
.grid img { width: 100%; height: auto; border-radius: 8px; display: block; }

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.gallery-grid img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
}
.gallery-categories {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* Contact form */
form.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 480px;
}
form.contact-form label { font-weight: 600; }
form.contact-form input,
form.contact-form textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
}
form.contact-form button {
  background: var(--maroon);
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 6px;
  font-size: 1.05rem;
  cursor: pointer;
}
.consent-note { font-size: 0.85rem; color: #555; }

/* Footer */
.site-footer {
  background: var(--maroon);
  color: #fff;
  text-align: center;
  padding: 16px;
  font-size: 0.9rem;
}
.site-footer a { color: #fff; text-decoration: underline; }

/* Tablet and up */
@media (min-width: 700px) {
  .header-inner { flex-direction: row; }
  .nav-toggle-label { display: none; }

  .site-body {
    display: grid;
    grid-template-columns: 260px 1fr;
    align-items: start;
    gap: 0 20px;
    max-width: var(--max-width);
    margin: 0 auto;
  }
  main { grid-column: 2; grid-row: 1; }
  .site-nav {
    grid-column: 1;
    grid-row: 1;
    max-height: none;
    overflow: visible;
    background: transparent;
    padding-top: 24px;
  }
  .site-nav ul { padding: 0; }
  .site-nav a {
    background: var(--olive);
    border-radius: 4px;
    margin-bottom: 6px;
  }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery-categories { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 980px) {
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---- Focus visibility (accessibility) ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
label:focus-visible {
  outline: 3px solid #1a56db;
  outline-offset: 2px;
}

/* ---- Cookie notice ---- */
.cookie-notice {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  background: #222;
  color: #fff;
  padding: 14px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  font-size: 0.9rem;
}
/* The rule above sets display:flex unconditionally, which otherwise beats
   the browser's built-in "hidden" behavior once dismissed via JS (an
   author stylesheet always wins over the UA default, even without
   higher specificity). This makes the [hidden] state win instead, so
   dismissing the notice actually removes it from view. */
.cookie-notice[hidden] {
  display: none;
}
.cookie-notice a { color: #9cc5ff; }
.cookie-notice p { margin: 0; flex: 1 1 260px; }
.cookie-notice button {
  background: var(--maroon);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  flex: 0 0 auto;
}

/* ---- Accessibility toolbar ---- */
.a11y-toggle {
  position: fixed;
  bottom: calc(18px + var(--cookie-notice-h, 0px));
  left: 18px;
  z-index: 210;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--olive-dark);
  color: #fff;
  border: 2px solid #fff;
  font-size: 1.6rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.a11y-panel {
  position: fixed;
  bottom: calc(78px + var(--cookie-notice-h, 0px));
  left: 18px;
  z-index: 210;
  background: #fff;
  color: var(--text);
  border-radius: 8px;
  padding: 16px;
  width: 240px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.a11y-panel h2 { font-size: 1rem; margin: 0 0 10px; }
.a11y-panel button {
  display: block;
  width: 100%;
  text-align: right;
  padding: 8px 10px;
  margin-bottom: 6px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #f5f5f0;
  cursor: pointer;
  font-size: 0.95rem;
}
.a11y-panel button:hover { background: #e9e9df; }
.a11y-panel p { margin: 8px 0 0; font-size: 0.85rem; }

/* ---- Accessibility states ---- */
.a11y-contrast {
  filter: contrast(1.25) grayscale(0.1);
}
.a11y-contrast body { background: #fff; color: #000; }
.a11y-contrast .site-nav a { background: #000; color: #fff; }
.a11y-underline a { text-decoration: underline !important; }

@media (min-width: 700px) {
  .a11y-toggle, .a11y-panel { left: 24px; }
}

/* ---- WhatsApp contact links ---- */
.whatsapp-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 420px;
}
.whatsapp-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #25d366;
  color: #fff;
  text-decoration: none;
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 600;
}
.whatsapp-btn:hover { background: #1ebc59; }
