/* ============================================
   KEYSAR NIHUL PROJEKTIM — קיסר ניהול פרויקטים
   Royal Black & Gold theme
   ============================================ */

:root {
  --black: #0a0a0a;
  --black-soft: #141414;
  --black-card: #1c1c1c;
  --gold: #d4af37;
  --gold-light: #f4d77a;
  --gold-deep: #b8941f;
  --cream: #f5ecd6;
  --text: #e8e2d0;
  --text-muted: #a39d8e;
  --border-gold: rgba(212, 175, 55, 0.3);
  --shadow-gold: 0 8px 32px rgba(212, 175, 55, 0.15);
  --gradient-gold: linear-gradient(135deg, #b8941f 0%, #f4d77a 50%, #b8941f 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

/* ============ A11y: skip link ============ */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 1000;
  background: var(--gold);
  color: var(--black);
  padding: 0.75rem 1.25rem;
  border-radius: 4px;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s;
}
[dir="rtl"] .skip-link { left: auto; right: 1rem; }
.skip-link:focus { top: 1rem; outline: 2px solid var(--gold-light); outline-offset: 2px; }

/* ============ A11y: global focus-visible ring ============ */
:focus { outline: none; } /* prevent doubled rings */
:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 2px;
  border-radius: 2px;
}
a:focus-visible,
button:focus-visible,
.lang-btn:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
}
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 1px;
}

/* ============ A11y: reduced-motion ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  /* Defeat any transform-based hover lift that survives the universal rule */
  .service-card:hover,
  .btn-primary:hover,
  .contact-item:hover { transform: none !important; }
}

/* ============ A11y: screen-reader-only utility ============
   Use for visible-to-AT but visually-hidden text (e.g. lightbox prev/next
   button labels, modal close, image counter "image 3 of 12"). Per WCAG
   2.4.4 (Link Purpose) & 4.1.2 (Name, Role, Value).
   ============ */
.sr-only,
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ============ A11y: RTL/LTR directional arrow vars ============
   In Hebrew/Arabic (dir="rtl"), the visual "previous" item sits to the RIGHT
   and "next" sits to the LEFT — the OPPOSITE of LTR. Lightbox JS should
   read these CSS custom properties via getComputedStyle(root) to remap
   ArrowLeft/ArrowRight keys to the correct semantic prev/next action.

   Usage from JS:
     const dir = getComputedStyle(document.documentElement).getPropertyValue('--logical-prev-key').trim();
     // dir === 'ArrowRight' in RTL, 'ArrowLeft' in LTR
     element.addEventListener('keydown', e => {
       if (e.key === dir) goPrev();
       else if (e.key === getComputedStyle(...).getPropertyValue('--logical-next-key').trim()) goNext();
     });

   For modal/lightbox focus-trap boundaries (Home/End remain unchanged):
     --logical-prev-key  : key that means "go to previous image" semantically
     --logical-next-key  : key that means "go to next image" semantically
   ============ */
:root {
  --logical-prev-key: ArrowLeft;
  --logical-next-key: ArrowRight;
}
[dir="rtl"] {
  --logical-prev-key: ArrowRight;
  --logical-next-key: ArrowLeft;
}

/* ============ A11y: forced-colors (Windows High Contrast Mode) ============
   When a user enables Windows High Contrast, our gradient backgrounds and
   gold text-fill become invisible. Force semantic system colors so primary
   actions, focus, and outlines remain perceivable. Per WCAG 1.4.11 + 1.4.1.
   ============ */
@media (forced-colors: active) {
  .btn,
  .lang-btn,
  .service-card,
  .contact-item,
  .contact-form,
  .gallery-item {
    border: 1px solid CanvasText;
    forced-color-adjust: none;
  }
  :focus-visible {
    outline: 3px solid Highlight !important;
    outline-offset: 2px !important;
  }
  .hero h1 {
    -webkit-text-fill-color: CanvasText !important;
    background: transparent !important;
    color: CanvasText !important;
  }
  .skip-link {
    background: Canvas;
    color: CanvasText;
    border: 2px solid CanvasText;
  }
}

body {
  font-family: 'Heebo', 'Rubik', 'Segoe UI', system-ui, sans-serif;
  background: var(--black);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(212, 175, 55, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(212, 175, 55, 0.04) 0%, transparent 40%);
}

html { overflow-x: hidden; }
img { max-width: 100%; height: auto; }

[dir="rtl"] body { font-family: 'Heebo', 'Rubik', 'Frank Ruhl Libre', serif; }
[dir="ltr"] body { font-family: 'Cormorant Garamond', 'Playfair Display', 'Segoe UI', serif; }
[lang="ar"] body { font-family: 'Cairo', 'Amiri', 'Tajawal', sans-serif; }
[lang="ru"] body { font-family: 'Playfair Display', 'EB Garamond', 'Segoe UI', serif; }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; color: var(--cream); }

/* ============ Navigation ============ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-gold);
  padding: 0.8rem 2rem;
  padding-left: max(2rem, env(safe-area-inset-left, 2rem));
  padding-right: max(2rem, env(safe-area-inset-right, 2rem));
  transition: all 0.3s;
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: nowrap;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--gold);
  text-decoration: none;
}
.nav-logo img { height: 42px; width: 42px; object-fit: contain; border-radius: 50%; border: 1px solid var(--border-gold); }

.nav-links {
  display: flex;
  gap: 1.8rem;
  list-style: none;
}
.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}
.nav-links a:hover { color: var(--gold); }
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.3s;
}
.nav-links a:hover::after { width: 100%; }

.lang-switcher {
  display: flex;
  gap: 0.3rem;
  align-items: center;
}
.lang-btn {
  background: transparent;
  border: 1px solid var(--border-gold);
  color: var(--text-muted);
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
  font-weight: 600;
}
.lang-btn:hover, .lang-btn.active {
  background: var(--gold);
  color: var(--black);
  border-color: var(--gold);
}

.menu-toggle { display: none; background: none; border: none; color: var(--gold); font-size: 1.5rem; cursor: pointer; }

/* ============ Hero ============ */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 6rem 1.5rem 3rem;
  /* Own generated interior (no stock, no third-party branding). Gold-tinted
     dark veil keeps the gold type legible and ties the photo to the palette. */
  background-color: var(--black);
  background-image:
    linear-gradient(180deg, rgba(10,10,10,0.55) 0%, rgba(10,10,10,0.35) 45%, var(--black) 100%),
    radial-gradient(ellipse at 50% 40%, rgba(212,175,55,0.14) 0%, transparent 60%),
    url('/assets/hero.jpg');
  background-image:
    linear-gradient(180deg, rgba(10,10,10,0.55) 0%, rgba(10,10,10,0.35) 45%, var(--black) 100%),
    radial-gradient(ellipse at 50% 40%, rgba(212,175,55,0.14) 0%, transparent 60%),
    image-set(url('/assets/hero.webp') type('image/webp'), url('/assets/hero.jpg') type('image/jpeg'));
  background-position: center;
  background-size: cover;
}
@media (max-width: 700px) {
  .hero {
    background-image:
      linear-gradient(180deg, rgba(10,10,10,0.6) 0%, rgba(10,10,10,0.4) 45%, var(--black) 100%),
      url('/assets/hero-mobile.jpg');
    background-image:
      linear-gradient(180deg, rgba(10,10,10,0.6) 0%, rgba(10,10,10,0.4) 45%, var(--black) 100%),
      image-set(url('/assets/hero-mobile.webp') type('image/webp'), url('/assets/hero-mobile.jpg') type('image/jpeg'));
  }
}
/* Thin gold hairline at the bottom edge of the hero — frames the transition into content */
.hero::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212,175,55,0.6), transparent);
  pointer-events: none;
}

.hero-content {
  max-width: 900px;
  z-index: 2;
  position: relative;
}

.hero-logo {
  width: 200px;
  height: 200px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold);
  box-shadow: 0 0 60px rgba(212, 175, 55, 0.4), inset 0 0 30px rgba(0,0,0,0.5);
}
@media (prefers-reduced-motion: no-preference) {
  .hero-logo { animation: floatLogo 4s ease-in-out infinite; }
}

@keyframes floatLogo {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.hero-tagline {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--cream);
  margin-bottom: 0.5rem;
  font-style: italic;
  letter-spacing: 0.15em;
}
.hero-tagline-sub {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 2rem;
}

.hero-divider {
  width: 120px;
  height: 2px;
  background: var(--gradient-gold);
  margin: 1.5rem auto;
  position: relative;
}
.hero-divider::before, .hero-divider::after {
  content: '◆';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  background: var(--black);
  padding: 0 0.4rem;
}
.hero-divider::before { left: -10px; }
.hero-divider::after { right: -10px; }

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  min-height: 44px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: all 0.3s;
  letter-spacing: 0.05em;
  -webkit-tap-highlight-color: rgba(212,175,55,0.3);
}
.btn-primary {
  background: var(--gradient-gold);
  color: var(--black);
  box-shadow: var(--shadow-gold);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(212, 175, 55, 0.35); }

.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 2px solid var(--gold);
}
.btn-outline:hover { background: var(--gold); color: var(--black); }

/* ============ Sections ============ */
section {
  padding: 5rem 1.5rem;
  position: relative;
}
.container {
  max-width: 1280px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}
.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--gold);
  margin-bottom: 0.8rem;
  letter-spacing: 0.02em;
}
.section-header .section-divider {
  width: 80px;
  height: 2px;
  background: var(--gradient-gold);
  margin: 0.8rem auto;
}
.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ============ Services ============ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 1.5rem;
}
.service-card {
  background: var(--black-card);
  border: 1px solid var(--border-gold);
  padding: 2rem 1.5rem;
  border-radius: 8px;
  text-align: center;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient-gold);
  transform: scaleX(0);
  transition: transform 0.4s;
}
.service-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
}
.service-card:hover::before { transform: scaleX(1); }

.service-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--black);
  border: 2px solid var(--gold);
  border-radius: 50%;
  font-size: 1.8rem;
  color: var(--gold);
  transition: background 0.3s, box-shadow 0.3s;
}
.service-icon svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.service-card:hover .service-icon {
  background: rgba(212,175,55,0.1);
  box-shadow: 0 0 24px rgba(212,175,55,0.25);
}
.service-card h3 {
  color: var(--cream);
  font-size: 1.25rem;
  margin-bottom: 0.8rem;
}
.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ============ About ============ */
.about {
  background: var(--black-soft);
  border-top: 1px solid var(--border-gold);
  border-bottom: 1px solid var(--border-gold);
}
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}
.about-image {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-gold);
  box-shadow: var(--shadow-gold);
  aspect-ratio: 4/3;
  background: url('/assets/about.jpg') center/cover;
  background-image: image-set(url('/assets/about.webp') type('image/webp'), url('/assets/about.jpg') type('image/jpeg'));
  position: relative;
}
/* Gold corner brackets — a subtle "framed craftsmanship" accent */
.about-image::before,
.about-image::after {
  content: '';
  position: absolute;
  width: 34px; height: 34px;
  border: 2px solid var(--gold);
  opacity: 0.85;
  pointer-events: none;
}
.about-image::before { top: 12px; inset-inline-start: 12px; border-inline-end: 0; border-bottom: 0; }
.about-image::after  { bottom: 12px; inset-inline-end: 12px; border-inline-start: 0; border-top: 0; }
.about-content h2 { color: var(--gold); font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 1rem; }
.about-content .lead { font-size: 1.15rem; color: var(--cream); margin-bottom: 1rem; }
.about-content p { color: var(--text-muted); margin-bottom: 1rem; }
.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-gold);
}
.stat { text-align: center; }
.stat-num { font-size: 2rem; color: var(--gold); font-weight: 700; }
.stat-label { font-size: 0.85rem; color: var(--text-muted); }

/* ============ Gallery ============ */
/* Filter chips (radiogroup) — gold border, lift+glow on hover, filled when active */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin: -1rem 0 2rem;
  padding: 0 0.5rem;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: transparent;
  border: 1.5px solid var(--gold);
  color: var(--gold);
  padding: 0.55rem 1.1rem;
  min-height: 40px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out, background 0.2s ease-out, color 0.2s ease-out, border-color 0.2s ease-out;
  -webkit-tap-highlight-color: transparent;
}
.filter-chip .chip-count {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.85em;
}
.filter-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 18px rgba(212, 175, 55, 0.25);
  background: rgba(212, 175, 55, 0.07);
}
.filter-chip:hover .chip-count { color: var(--cream); }
.filter-chip.active {
  background: var(--gradient-gold);
  color: var(--black);
  border-color: var(--gold-light);
  box-shadow: 0 6px 22px rgba(212, 175, 55, 0.35);
}
.filter-chip.active .chip-count { color: rgba(10,10,10,0.7); }
.filter-chip:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
}

/* Grid — true responsive flow. Masonry-feel via mixed landscape/portrait spans on wide viewports. */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
  transition: opacity 0.25s ease-out;
}
.gallery-grid.is-filtering { opacity: 0.15; }

@media (min-width: 600px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
}
@media (min-width: 1024px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
  /* Landscape photos span 2 cols when next to a portrait — creates editorial rhythm */
  .gallery-item--landscape:nth-child(7n+1) { grid-column: span 2; }
}
@media (min-width: 1440px) {
  .gallery-grid { grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
  .gallery-item--landscape:nth-child(7n+1) { grid-column: span 2; }
}

.gallery-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-gold);
  background: var(--black-card);
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.gallery-item:hover {
  border-color: var(--gold);
  box-shadow: 0 10px 32px rgba(212, 175, 55, 0.18);
}

/* Card button fills the item, removes default button chrome */
.gallery-card {
  appearance: none;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: rgba(212,175,55,0.3);
}
.gallery-card picture,
.gallery-card img {
  display: block;
  width: 100%;
  height: 100%;
}
.gallery-card img {
  object-fit: cover;
  aspect-ratio: 4/3;
  transition: transform 0.5s ease-out;
  background: linear-gradient(110deg, #1a1a1a 25%, #232323 50%, #1a1a1a 75%);
  background-size: 200% 100%;
}
.gallery-item--portrait .gallery-card img { aspect-ratio: 3/4; }

@media (prefers-reduced-motion: no-preference) {
  .gallery-card img { animation: shimmerGold 2.4s linear infinite; }
  .gallery-card img[src] { animation: none; }
}
@keyframes shimmerGold {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.gallery-card:hover img,
.gallery-card:focus-visible img { transform: scale(1.06); }
.gallery-card:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
}

/* Dark-to-transparent gradient appears on hover/focus — caption surfaces above it */
.gallery-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,0.85));
  opacity: 0;
  transition: opacity 0.3s ease-out;
  pointer-events: none;
}
.gallery-item:hover .gallery-card::after,
.gallery-card:focus-visible::after { opacity: 1; }

.gallery-caption {
  position: absolute;
  bottom: 0.9rem;
  inset-inline-start: 1rem;
  inset-inline-end: 1rem;
  color: var(--cream);
  font-weight: 600;
  font-size: 0.95rem;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease-out, transform 0.25s ease-out;
  z-index: 2;
  text-shadow: 0 2px 8px rgba(0,0,0,0.9);
  text-align: start;
  pointer-events: none;
}
.gallery-item:hover .gallery-caption,
.gallery-card:focus-visible .gallery-caption {
  opacity: 1;
  transform: translateY(0);
}

.gallery-badge {
  position: absolute;
  top: 0.7rem;
  inset-inline-start: 0.7rem;
  z-index: 2;
  background: rgba(10, 10, 10, 0.75);
  color: var(--gold);
  border: 1px solid var(--border-gold);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: none;
}

/* ============ Contact ============ */
.contact { background: var(--black); }
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 3rem;
}
.contact-info { padding: 1rem 0; }
.contact-info h3 { color: var(--gold); margin-bottom: 1.5rem; font-size: 1.4rem; }
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--black-card);
  border-radius: 6px;
  border: 1px solid var(--border-gold);
  transition: all 0.2s;
}
.contact-item:hover { border-color: var(--gold); transform: translateX(-4px); }
[dir="rtl"] .contact-item:hover { transform: translateX(4px); }
.contact-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background: var(--gradient-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--black);
  font-size: 1.2rem;
}
.contact-text { flex: 1; }
.contact-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; }
.contact-value { color: var(--cream); font-weight: 600; font-size: 1.05rem; word-break: break-word; overflow-wrap: anywhere; }
.contact-value a { color: var(--cream); text-decoration: none; }
.contact-value a:hover { color: var(--gold); }

.contact-form {
  background: var(--black-card);
  padding: 2.5rem;
  border-radius: 8px;
  border: 1px solid var(--border-gold);
}
.contact-form h3 { color: var(--gold); margin-bottom: 1.5rem; font-size: 1.4rem; }
.form-group { margin-bottom: 1.2rem; }
.form-group label {
  display: block;
  color: var(--text);
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  font-weight: 500;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--black);
  border: 1px solid var(--border-gold);
  color: var(--text);
  border-radius: 4px;
  font-size: 16px; /* ≥16px prevents iOS auto-zoom; also satisfies WCAG 1.4.4 minimum default */
  font-family: inherit;
  transition: border 0.2s;
}
.form-group input[aria-invalid="true"],
.form-group textarea[aria-invalid="true"],
.form-group select[aria-invalid="true"] {
  border-color: #f85149;
  box-shadow: 0 0 0 3px rgba(248, 81, 73, 0.15);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.form-submit { width: 100%; margin-top: 0.5rem; justify-content: center; }
.req { color: var(--gold); margin-inline-start: 2px; }
.whatsapp-alt {
  margin-top: 0.7rem;
  background: rgba(37,211,102,0.1);
  border-color: #25d366;
  color: #4ee084; /* a brighter green for ≥4.5:1 on dark card */
}
.whatsapp-alt:hover,
.whatsapp-alt:focus-visible { background: #25d366; color: #0a0a0a; }
.form-status { margin-top: 1rem; padding: 0.8rem; border-radius: 4px; font-size: 0.95rem; display: none; }
.form-status.success { background: rgba(46, 160, 67, 0.15); color: #6ee390; border: 1px solid #2ea043; display: block; }
.form-status.error { background: rgba(248, 81, 73, 0.15); color: #ff8a82; border: 1px solid #f85149; display: block; }

/* ============ Floating WhatsApp ============ */
.whatsapp-float {
  position: fixed;
  bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  left: max(1.25rem, env(safe-area-inset-left, 1.25rem));
  width: 60px;
  height: 60px;
  /* Darker green base (#128c7e — WhatsApp's deep brand color) so the white
     emoji glyph meets WCAG 1.4.11 (Non-text Contrast, ≥3:1) AND 1.4.3 for
     emoji as informative content. White-on-#25d366 was only 1.98:1.
     White-on-#128c7e ≈ 4.5:1. The lighter ring keeps brand recognition. */
  background: radial-gradient(circle, #25d366 0%, #128c7e 100%);
  border: 2px solid #128c7e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  text-decoration: none;
  /* Drop-shadow on the glyph adds a perceivable edge against the green BG */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  box-shadow: 0 4px 24px rgba(37, 211, 102, 0.5);
  z-index: 99;
  transition: transform 0.2s;
  -webkit-tap-highlight-color: transparent;
}
@media (prefers-reduced-motion: no-preference) {
  .whatsapp-float { animation: pulseGreen 2s infinite; }
}
.whatsapp-float:hover { transform: scale(1.1); }
[dir="rtl"] .whatsapp-float { left: max(1.25rem, env(safe-area-inset-left, 1.25rem)); right: auto; }

@keyframes pulseGreen {
  0%, 100% { box-shadow: 0 4px 24px rgba(37, 211, 102, 0.5); }
  50% { box-shadow: 0 4px 32px rgba(37, 211, 102, 0.8), 0 0 0 8px rgba(37, 211, 102, 0.2); }
}

/* ============ Footer ============ */
.footer {
  background: var(--black-soft);
  border-top: 1px solid var(--border-gold);
  padding: 3rem 1.5rem 1.5rem;
  text-align: center;
}
.footer-logo { width: 80px; height: 80px; margin: 0 auto 1rem; border-radius: 50%; }
.footer h4,
.footer .footer-brand { color: var(--gold); font-size: 1.2rem; margin-bottom: 0.5rem; font-weight: 700; line-height: 1.2; }
.footer p { color: var(--text); font-size: 0.95rem; margin-bottom: 0.3rem; }
.footer-bottom { color: var(--text); }
.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-gold);
  color: var(--text-muted);
  font-size: 0.85rem;
}
.footer-credit-line {
  margin-top: 0.85rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.7;
  letter-spacing: 0.04em;
}
.credit-link {
  color: var(--gold);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-inline-start: 0.4em;
  transition: opacity 0.2s, text-shadow 0.2s;
}
.credit-link:hover,
.credit-link:focus-visible {
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.55);
  opacity: 1;
}
.credit-link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ============ Responsive ============
   Breakpoints:
     ≤1024  small laptop / iPad Pro portrait
     ≤900   tablet → hamburger menu
     ≤768   iPad portrait
     ≤480   large mobile
     ≤380   small mobile (iPhone SE, iPhone 13 mini)
   ============================================ */

/* Small laptop / iPad Pro portrait */
@media (max-width: 1024px) {
  .navbar { padding: 0.7rem 1.5rem; }
  .nav-inner { gap: 1rem; }
  .nav-links { gap: 1.2rem; }
  section { padding: 4rem 1.25rem; }
  .about-grid { gap: 2rem; }
  .contact-grid { gap: 2rem; }
}

/* Tablet → switch to hamburger */
@media (max-width: 900px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(10, 10, 10, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-gold);
    gap: 0.6rem;
    text-align: center;
  }
  .nav-links a {
    display: block;
    padding: 0.85rem 0.5rem;
    min-height: 44px;
    font-size: 1rem;
  }
  .nav-links.open { display: flex; }
  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    font-size: 1.75rem;
    line-height: 1;
  }
  /* Hide secondary CTA in navbar on mobile — keep only logo + lang + hamburger */
  #nav-cta { display: none; }
  .lang-switcher { gap: 0.2rem; }
  .lang-btn { padding: 0.35rem 0.45rem; font-size: 0.7rem; min-height: 32px; }
  .hero-logo { width: 150px; height: 150px; }
  .hero { padding: 5rem 1.25rem 3rem; }
  .about-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .form-row { grid-template-columns: minmax(0, 1fr); }
  .about-stats { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
  .stat-num { font-size: 1.5rem; }
  .section-header { margin-bottom: 2.5rem; }
}

/* iPad / small tablet portrait */
@media (max-width: 768px) {
  /* gallery grid handled by mobile-first rules in .gallery-grid block */
  .services-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  .contact-form { padding: 1.75rem 1.25rem; }
  section { padding: 3.5rem 1rem; }
  .nav-logo span { font-size: 1rem; }
}

/* Large mobile */
@media (max-width: 480px) {
  .navbar { padding: 0.6rem 1rem; }
  .navbar {
    padding-left: max(1rem, env(safe-area-inset-left, 1rem));
    padding-right: max(1rem, env(safe-area-inset-right, 1rem));
  }
  .nav-inner { gap: 0.5rem; }
  .nav-logo span { display: none; } /* show only logo image to save space */
  .nav-logo img { height: 38px; width: 38px; }
  .lang-switcher { gap: 0.15rem; }
  .lang-btn { padding: 0.3rem 0.4rem; font-size: 0.68rem; min-height: 30px; border-radius: 3px; }

  .hero { padding: 4.5rem 1rem 2.5rem; }
  .hero-logo { width: 130px; height: 130px; margin-bottom: 1rem; }
  .hero-divider { width: 90px; margin: 1rem auto; }
  .hero-tagline-sub { font-size: 0.9rem; }
  .hero-cta { gap: 0.7rem; flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; justify-content: center; }

  section { padding: 3rem 0.9rem; }
  .container { padding: 0; }
  .section-header { margin-bottom: 2rem; }

  .services-grid { grid-template-columns: 1fr; gap: 1rem; }
  .service-card { padding: 1.6rem 1.25rem; }

  /* Tighter chips on small mobile */
  .filter-chip { padding: 0.45rem 0.85rem; font-size: 0.85rem; min-height: 36px; }

  .about-stats { gap: 0.4rem; padding-top: 1.5rem; margin-top: 1.5rem; }
  .stat-num { font-size: 1.3rem; }
  .stat-label { font-size: 0.75rem; }

  .contact-item { padding: 0.85rem; gap: 0.75rem; }
  .contact-icon { width: 40px; height: 40px; font-size: 1.05rem; }
  .contact-form { padding: 1.5rem 1rem; }
  .contact-form h3 { font-size: 1.2rem; }

  /* Prevent iOS auto-zoom on focus: inputs MUST be ≥16px font-size */
  .form-group input,
  .form-group textarea,
  .form-group select { font-size: 16px; padding: 0.8rem 0.9rem; }

  .footer { padding: 2.5rem 1rem 1.25rem; }
  .footer-logo { width: 64px; height: 64px; }

  .whatsapp-float { width: 54px; height: 54px; font-size: 1.6rem; }
}

/* Small mobile (iPhone SE) */
@media (max-width: 380px) {
  .navbar { padding: 0.55rem 0.75rem; }
  .nav-logo img { height: 34px; width: 34px; }
  .lang-btn { padding: 0.28rem 0.35rem; font-size: 0.65rem; }
  .menu-toggle { font-size: 1.5rem; min-width: 40px; min-height: 40px; }

  .hero-logo { width: 110px; height: 110px; }
  .hero h1 { font-size: clamp(1.7rem, 7vw, 2.2rem); }
  .hero-tagline { letter-spacing: 0.1em; }

  .contact-form { padding: 1.25rem 0.9rem; }
}

/* Landscape mobile — hero should not force 100vh content squeeze */
@media (max-height: 480px) and (orientation: landscape) {
  .hero { min-height: auto; padding: 5rem 1.25rem 2rem; }
  .hero-logo { width: 90px; height: 90px; margin-bottom: 0.6rem; }
}

/* ============ Scroll-in animations ============ */
/* Content always visible; .visible class adds a subtle entrance lift. */
.fade-in { opacity: 1; transform: translateY(0); transition: opacity 0.7s, transform 0.7s; }
.fade-in:not(.visible) { /* keep visible to avoid blank-content trap if observer fails or fullPage screenshot resizes viewport */ }
@media (prefers-reduced-motion: no-preference) {
  .js-enhanced .fade-in { opacity: 0; transform: translateY(20px); }
  .js-enhanced .fade-in.visible { opacity: 1; transform: translateY(0); }
}

/* ============ Lightbox ============ */
.lightbox {
  /* native <dialog> resets — go full-bleed */
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  max-width: 100vw;
  max-height: 100vh;
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}
.lightbox::backdrop {
  background:
    radial-gradient(circle at 0% 0%,   rgba(212,175,55,0.12) 0%, transparent 35%),
    radial-gradient(circle at 100% 100%, rgba(212,175,55,0.12) 0%, transparent 35%),
    rgba(3, 3, 3, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
body.lightbox-open { overflow: hidden; }
/* Keep the navbar from peeking through the backdrop on browsers where
   the top-layer/backdrop-filter combination renders unevenly. */
body.lightbox-open .navbar,
body.lightbox-open .whatsapp-aside { visibility: hidden; }

.lightbox-inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
}

.lightbox-figure {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  align-items: center;
  max-width: min(100%, 1200px);
  max-height: 100%;
  margin: 0;
}

.lightbox-picture { display: block; max-width: 100%; }
.lightbox-picture img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 9rem);
  height: auto;
  width: auto;
  object-fit: contain;
  border: 1px solid var(--border-gold);
  border-radius: 6px;
  box-shadow: 0 12px 60px rgba(0,0,0,0.7), 0 0 0 1px rgba(212,175,55,0.08);
  background: #000;
}

.lightbox-badge {
  position: absolute;
  top: 0.4rem;
  inset-inline-start: 0.4rem;
  z-index: 3;
  background: rgba(10,10,10,0.85);
  color: var(--gold);
  border: 1px solid var(--border-gold);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox-caption-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  padding: 0 0.25rem;
  color: var(--cream);
  font-size: clamp(0.95rem, 2vw, 1.05rem);
}
.lightbox-caption { font-weight: 600; flex: 1; min-width: 0; }
.lightbox-counter {
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
  font-size: 0.95em;
  white-space: nowrap;
}

/* Buttons (close + prev + next) — uniform pill style */
.lightbox-btn {
  position: absolute;
  z-index: 4;
  background: rgba(10,10,10,0.7);
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.lightbox-btn:hover,
.lightbox-btn:focus-visible {
  background: var(--gold);
  color: var(--black);
  transform: scale(1.06);
  box-shadow: 0 6px 24px rgba(212,175,55,0.4);
}
.lightbox-btn:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }
.lightbox-btn[hidden] { display: none; }

.lightbox-close { top: 1rem; inset-inline-end: 1rem; }
.lightbox-prev  { top: 50%; inset-inline-start: 1rem; transform: translateY(-50%); }
.lightbox-next  { top: 50%; inset-inline-end: 1rem;   transform: translateY(-50%); }
.lightbox-prev:hover, .lightbox-prev:focus-visible { transform: translateY(-50%) scale(1.06); }
.lightbox-next:hover, .lightbox-next:focus-visible { transform: translateY(-50%) scale(1.06); }

@media (max-width: 600px) {
  .lightbox-btn { width: 44px; height: 44px; font-size: 1.4rem; }
  .lightbox-close { top: 0.6rem; inset-inline-end: 0.6rem; }
  .lightbox-prev  { inset-inline-start: 0.4rem; }
  .lightbox-next  { inset-inline-end: 0.4rem; }
  .lightbox-picture img { max-height: calc(100vh - 8rem); }
  .lightbox-caption-row { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
}

/* Reduced motion: kill scale animations on chips/cards/buttons */
@media (prefers-reduced-motion: reduce) {
  .filter-chip:hover { transform: none; box-shadow: none; }
  .gallery-card img { animation: none !important; }
  .gallery-card:hover img,
  .gallery-card:focus-visible img { transform: none; }
  .lightbox-btn:hover,
  .lightbox-btn:focus-visible { transform: none; }
  .lightbox-prev,
  .lightbox-next { transform: translateY(-50%); }
}
