:root {
  --bg: #050505;
  --bg-alt: #0b0b0f;
  --fg: #f5f5f5;
  --muted: #a8a8b3;
  --accent: #7ef9ff;
  --accent-strong: #59f4c8;
  --border: rgba(255, 255, 255, 0.08);
  --glass: rgba(255, 255, 255, 0.04);
  --font: "Space Grotesk", "Inter", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

/* Hide scrollbar for Chrome, Safari and Opera */
::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
html {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: radial-gradient(circle at top, #13131f, var(--bg));
  color: var(--fg);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  position: relative;
  overflow: hidden;
  padding: 2.5rem clamp(1.5rem, 5vw, 4rem);
  padding-top: 7rem;
}

.grid-bg {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(var(--border) 1px, transparent 1px) 0 0 / 120px 120px,
    linear-gradient(90deg, var(--border) 1px, transparent 1px) 0 0 / 120px 120px,
    radial-gradient(circle at 20% 20%, rgba(94, 94, 255, 0.12), transparent 45%),
    radial-gradient(circle at 80% 0%, rgba(89, 244, 200, 0.08), transparent 35%);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

.site-header {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(1100px, calc(100% - 2rem));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  backdrop-filter: blur(16px);
  background: rgba(5, 5, 9, 0.78);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  z-index: 10;
  transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1); /* Smoother transition */
}

.site-header.scrolled {
  top: 0.75rem;
  padding: 0.5rem 1rem;
  width: min(900px, calc(100% - 2rem));
  background: rgba(5, 5, 9, 0.9);
}

.logo-chip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 0.15rem;
  background: #050505;
  object-fit: contain;
  display: block;
}

.logo-text {
  font-weight: 600;
  letter-spacing: 0.03em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: flex-end;
  margin-left: auto;
  flex: 1;
  flex-wrap: nowrap;
}

.site-nav a {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.72);
  transition: color 200ms ease;
}

.site-nav a:hover {
  color: var(--fg);
}

.pill-link {
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--fg);
  font-weight: 600;
}

main {
  position: relative;
  z-index: 1;
}

.hero {
  padding: 6rem 0 4rem;
  max-width: 900px;
}

.hero h1 {
  font-size: clamp(2.8rem, 8vw, 5.4rem);
  line-height: 1.05;
  margin: 1.5rem 0;
  letter-spacing: -0.02em;
}

.accent {
  color: var(--accent);
}

.outline {
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.6);
}

.hero p {
  color: var(--muted);
  font-size: 1.2rem;
  max-width: 720px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.glass {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 0.85rem 1.8rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease, background 0.4s ease, box-shadow 0.4s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}

.btn.primary {
  background: linear-gradient(120deg, #59f4c8, #7ef9ff);
  color: #020202;
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.08);
  color: var(--fg);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn.full {
  width: 100%;
  text-align: center;
}

.btn:hover {
  transform: translateY(-2px);
}

.medzon-ai-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.4rem;
  min-width: 230px;
  transition: transform 220ms ease, box-shadow 220ms ease;
  box-shadow: 0 10px 30px rgba(126, 249, 255, 0.15);
}

.card[data-service="medzon-ai"] {
  text-align: center;
  background: radial-gradient(circle at top, rgba(126, 249, 255, 0.25), rgba(5, 5, 10, 0.85))
      fixed,
    linear-gradient(130deg, rgba(89, 244, 200, 0.2), rgba(5, 5, 10, 0.9));
  border: 1px solid rgba(126, 249, 255, 0.45);
  position: relative;
}

.card[data-service="medzon-ai"]::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(120deg, rgba(126, 249, 255, 0.6), transparent 70%);
  opacity: 0.4;
  pointer-events: none;
}

.card[data-service="medzon-ai"] > * {
  position: relative;
  z-index: 1;
}

.card[data-service="medzon-ai"] ul {
  text-align: right;
}

.card[data-service="medzon-ai"] .btn.primary {
  background: linear-gradient(120deg, #7ef9ff, #59f4c8);
}

.card[data-service="medzon-ai"] .btn.primary:hover {
  filter: brightness(1.07);
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 18px 40px rgba(126, 249, 255, 0.25);
  background: linear-gradient(120deg, #59f4c8, #3bd7ff);
}

.card[data-service="medzon-ai"] .btn.primary:active {
  transform: translateY(-1px) scale(0.99);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 3rem;
}

.metric {
  font-size: 2rem;
  font-weight: 600;
}

.label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3rem;
}

.section-head h2 {
  font-size: clamp(2rem, 5vw, 3rem);
}

.section-head p {
  color: var(--muted);
}

.badge {
  display: inline-flex;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.services {
  padding: 5rem 0;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.card {
  padding: 1.75rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 7, 11, 0.65);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.5s ease, opacity 0.5s ease;
  opacity: 0.65;
  transform: translateY(20px);
  text-align: center;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(89, 244, 200, 0.2), transparent 55%);
  opacity: 0;
  transition: opacity 300ms ease;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(126, 249, 255, 0.6);
  opacity: 1;
}

.card:hover::after {
  opacity: 1;
}

.card-icon {
  font-size: 2rem;
}

.card-icon--telegram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
}

.telegram-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
}

.logo-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem;
}

.logo-icon img {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: cover;
}

.card .chip {
  display: inline-flex;
  padding: 0.25rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  margin: 0.75rem 0 1rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.card h3 {
  margin: 0 0 0.75rem;
}

.card p {
  color: var(--muted);
  min-height: 72px;
}

.card ul {
  margin: 1rem 0 0;
  padding-left: 0;
  list-style-position: inside;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
}

.text-right {
  text-align: right;
  direction: rtl;
}

.text-right ul,
.text-right ol {
  text-align: right;
  direction: rtl;
  list-style-position: inside;
  padding-right: 0;
  padding-left: 0;
}

.text-right li {
  text-align: right;
  direction: rtl;
}

/* Feature Video Container */
.feature-video-container {
  position: relative;
  width: 100%;
  border-radius: 1rem;
  overflow: hidden;
  margin-top: 1rem;
  border: 1px solid var(--border);
  background: #000;
}

.feature-video {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none; /* Prevent interaction */
}

/* UI Mockup Styles */
.ui-mockup {
  background: rgba(15, 15, 20, 0.9);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  padding: 1.5rem;
  max-width: 800px; /* Increased width for 3 photos */
  margin: 0 auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.ui-placeholder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.ui-placeholder-img {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 1rem;
  aspect-ratio: 3/4; /* Portrait aspect ratio for design mockups */
  position: relative;
  overflow: hidden;
}

.ui-placeholder-img::before {
  content: "Design Space";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.9rem;
  opacity: 0.5;
}

/* Intro Section (Heritage + Vision) */
.intro-section {
  position: relative;
  width: 100vw;
  height: 100vh; /* Full viewport height */
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: -7rem; /* Counteract page-shell padding to reach top */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  margin-bottom: 4rem;
}

.heritage-bg {
  position: absolute;
  inset: 0;
  background-image: url('assets/imam_ali.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.8;
  z-index: 0;
}

.intro-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

.intro-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
  padding-top: 7rem; /* Add padding to account for header visual balance if needed */
}

.heritage-text-block p {
  font-size: clamp(1.5rem, 5vw, 2.2rem);
  line-height: 1.6;
  color: #fff;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0,0,0,0.9);
}

.vision-text-block p {
  font-size: clamp(1.2rem, 4vw, 1.5rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  font-family: 'Reem Kufi', sans-serif;
  text-shadow: 0 2px 4px rgba(0,0,0,0.9);
}

[lang="ar"] .heritage-text-block p {
  font-family: "Reem Kufi", sans-serif;
  font-weight: 700;
  line-height: 1.8;
}

/* Main Content Animation Wrapper */
.main-content-wrapper {
  opacity: 0;
  transform: translateX(-100px); /* Start from left */
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.main-content-wrapper.in-view {
  opacity: 1;
  transform: translateX(0);
}

/* Remove old heritage section styles if no longer needed, or keep for safety */
.heritage-section {
  display: none; /* Hide old class usage if any remains */
}
.vision-section {
  display: none;
}

.stack {
  padding: 5rem 0;
}

.stack-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.stack-panel {
  padding: 1.5rem;
  border-radius: 1.2rem;
  border: 1px solid var(--border);
  background: rgba(10, 10, 16, 0.8);
  opacity: 0.65;
  transform: translateY(20px);
  transition: opacity 300ms ease, transform 300ms ease;
}

.stack-panel h3 {
  margin: 0 0 0.5rem;
}

.stack-panel p {
  color: var(--muted);
  font-size: 0.95rem;
}

.process {
  padding: 5rem 0;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.timeline-item {
  padding: 1.5rem;
  border-radius: 1.2rem;
  border: 1px solid var(--border);
  background: rgba(5, 5, 10, 0.8);
  opacity: 0.65;
  transform: translateY(20px);
  transition: opacity 300ms ease, transform 300ms ease;
}

.timeline-item span {
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.timeline-item h3 {
  margin: 0.5rem 0 0.5rem;
  text-align: center;
}

.timeline-item p {
  color: var(--muted);
  font-size: 0.95rem;
  text-align: right;
}

.in-view {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.cta {
  padding: 5rem 0 6rem;
}

.cta-panel {
  padding: 3rem;
  border-radius: 2rem;
  max-width: 720px;
  margin: 0 auto;
}

.cta-panel h2 {
  font-size: clamp(2rem, 5vw, 3.2rem);
}

.cta-panel p {
  color: var(--muted);
}

.eyebrow {
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
}

.cta-form {
  margin-top: 2rem;
  display: grid;
  gap: 1rem;
}

.cta-form label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
}

.cta-form input {
  border-radius: 1rem;
  border: 1px solid var(--border);
  padding: 0.9rem 1rem;
  background: rgba(0, 0, 0, 0.35);
  color: var(--fg);
  font-size: 1rem;
}

.cta-form input:focus {
  outline: 1px solid var(--accent);
}

.booking-modal {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center; /* Center vertically */
  padding: 1rem;
  z-index: 9999; /* Ensure it's on top of everything */
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease;
  overflow-y: auto; /* Allow scrolling if content is tall */
}

.booking-modal.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: fixed; /* Fixed to cover screen even when scrolling */
  inset: 0;
  background: rgba(5, 5, 15, 0.55);
  backdrop-filter: blur(6px);
}

.modal-panel {
  position: relative;
  width: min(520px, 100%);
  border-radius: 1.6rem;
  border: 1px solid var(--border);
  background: rgba(8, 8, 14, 0.95);
  padding: 2.4rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  transform: translateY(30px);
  transition: transform 250ms ease;
  margin: auto; /* Ensure centering in flex container */
  max-height: 90vh; /* Prevent overflowing screen height */
  overflow-y: auto; /* Scroll inside panel if needed */
}

.booking-modal.is-visible .modal-panel {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--fg);
  font-size: 1.25rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
}

.modal-copy {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.select-label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.select-wrapper {
  position: relative;
  display: block;
}

.modal-form select,
.modal-form input,
.modal-form textarea {
  width: 100%;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--fg);
  padding: 0.9rem 1rem;
  font-family: var(--font);
  font-size: 1rem;
}

.modal-form select {
  appearance: none;
  padding-right: 3rem;
  border: 1px solid transparent;
  background-image:
    linear-gradient(120deg, rgba(126, 249, 255, 0.4), rgba(89, 244, 200, 0.15)),
    radial-gradient(circle at top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

.select-arrow {
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 0.8rem;
  pointer-events: none;
}

.modal-form textarea {
  resize: vertical;
}

.modal-form select:focus,
.modal-form input:focus,
.modal-form textarea:focus {
  outline: 1px solid var(--accent);
}

.modal-note {
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

.modal-note a {
  color: var(--accent);
}

body.modal-open {
  overflow: hidden;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding: 2rem 0 1rem;
  color: var(--muted);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-note {
  font-size: 0.85rem;
}

@media (max-width: 720px) {
  .site-header {
    width: calc(100% - 1rem);
    top: 1rem;
    padding: 0.85rem 1rem;
  }

  .site-nav {
    width: 100%;
    justify-content: flex-end;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.85rem;
  }

  .site-nav a {
    white-space: nowrap;
  }

  .hero {
    padding-top: 4rem;
  }

  .cta-panel {
    padding: 2rem;
  }

  .page-shell {
    padding-top: 8.5rem;
  }

  .modal-panel {
    padding: 1.5rem;
    max-height: 85vh;
  }

  .booking-modal {
    padding: 1rem;
    align-items: center;
  }

  .intro-section {
    margin-top: -8.5rem;
  }
}

/* Language Switcher */
.lang-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border);
  color: var(--fg);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.9rem;
  transition: all 0.2s ease;
}
.lang-btn:hover {
  background: var(--accent);
  color: #000;
}

/* Modern Card Style */
.modern-card {
  padding: 0; /* Reset padding for image */
  overflow: hidden;
  background: rgba(10, 10, 15, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
  text-align: right;
}

.modern-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  border-color: var(--accent);
}

.card-media {
  width: 100%;
  height: 200px;
  background: #1a1a1a;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.modern-card:hover .card-img {
  transform: scale(1.05);
}

.card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

[dir="ltr"] .modern-card {
  text-align: left;
}

.card-content h3 {
  margin-top: 0;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--fg);
}

.card-content p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

/* Video in card */
.video-wrapper {
  height: 200px;
  background: #000;
}
.feature-video-container {
  margin-top: 0;
  border: none;
  border-radius: 0;
  height: 100%;
}
.feature-video {
  height: 100%;
  object-fit: cover;
}

/* Header adjustments */
.header-start {
  display: flex;
  align-items: center;
}

/* Hide images if they fail to load (handled by inline JS but good to have backup) */
.no-img .card-media {
  display: none;
}


/* Force header to always be LTR */
.site-header {
  direction: ltr !important;
  background: rgba(5, 5, 9, 0.25); /* More transparent/glassy */
  backdrop-filter: blur(20px); /* Stronger blur */
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.site-header.scrolled {
  background: rgba(5, 5, 9, 0.6); /* Slightly more opaque when scrolled but still glassy */
  backdrop-filter: blur(20px);
}

.site-header .site-nav {
  flex-direction: row;
}

/* Remove default focus outline (blue box) */
button:focus, a:focus, input:focus, select:focus, textarea:focus {
  outline: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent; /* Remove blue highlight on mobile tap */
}

/* Smoother animations */
.intro-section, .main-content-wrapper {
  will-change: opacity, transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); /* Luxurious smooth ease */
  transition-duration: 1.2s; /* Slower duration for extra smoothness */
}

.card {
  /* ... existing styles ... */
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), 
              box-shadow 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), 
              border-color 0.5s ease,
              opacity 0.5s ease;
}

.btn {
  /* ... existing styles ... */
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), 
              opacity 0.4s ease,
              background 0.4s ease,
              box-shadow 0.4s ease;
}

.site-header {
  /* ... existing styles ... */
  transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1); /* Even smoother header transition */
}

@media (max-width: 720px) {
  .site-header {
    width: calc(100% - 1rem);
    top: 0.5rem;
    padding: 0.4rem 0.8rem; /* Narrower height */
  }

  .logo-mark {
    width: 32px; /* Smaller logo on phone */
    height: 32px;
  }
  
  .logo-text {
    font-size: 0.9rem;
  }

  .site-nav {
    width: auto; /* Let it shrink */
    gap: 0.5rem;
  }

  /* Force contact button to be one line and smaller */
  .site-nav .btn.primary {
    padding: 0.4rem 0.9rem !important;
    font-size: 0.8rem !important;
    white-space: nowrap;
    min-width: auto;
    height: auto;
    min-height: 34px;
  }
  
  .lang-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav a {
    white-space: nowrap;
  }

