:root {
  --purple: #532b81;
  --purple-dark: #3a0d8c;
  --teal: #00cda0;
  --cyan: #18d5d8;
  --text: #1a1a2e;
  --muted: #5a5a6a;
  --bg: #f7f5fb;
  --white: #ffffff;
  --shadow: 0 12px 40px rgba(83, 43, 129, 0.12);
  --radius: 16px;
  --font-ar: "Tajawal", "Segoe UI", Tahoma, sans-serif;
  --font-en: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

#home {
  scroll-margin-top: 5rem;
}

body {
  margin: 0;
  font-family: var(--font-ar);
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html[lang="en"] body {
  font-family: var(--font-en);
  line-height: 1.65;
  letter-spacing: -0.015em;
}

html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4,
html[lang="ar"] .stat-value,
html[lang="ar"] .btn {
  font-family: var(--font-ar);
  letter-spacing: 0;
}

html[lang="en"] h1,
html[lang="en"] h2,
html[lang="en"] h3,
html[lang="en"] h4,
html[lang="en"] .stat-value,
html[lang="en"] .btn {
  font-family: var(--font-en);
  letter-spacing: -0.02em;
}

html[lang="ar"] .section-head h2,
html[lang="ar"] .hero h1 {
  line-height: 1.3;
}

html[lang="en"] .section-head h2,
html[lang="en"] .hero h1 {
  line-height: 1.15;
}

a {
  color: var(--purple);
  text-decoration: none;
}

a:hover {
  color: var(--teal);
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  width: min(1140px, 92vw);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(83, 43, 129, 0.08);
}

.site-header.nav-is-open {
  border-bottom-color: transparent;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.75rem 0;
  position: relative;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.main-nav-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.main-nav-wrap .nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.2rem 0.45rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav-wrap .nav > li {
  flex-shrink: 0;
}

.main-nav-wrap .nav-link,
.main-nav-wrap .nav-btn {
  font-size: 0.8rem;
}

.site-header .logo {
  flex-shrink: 0;
  z-index: 102;
}

.lang-toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.48rem 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(83, 43, 129, 0.22);
  background: linear-gradient(180deg, #fff 0%, #f3effa 100%);
  color: var(--purple);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(83, 43, 129, 0.08);
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.lang-toggle:hover {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
  transform: translateY(-1px);
}

.lang-toggle:hover .nav-ico {
  color: #fff;
}

.lang-toggle-text {
  line-height: 1;
  min-width: 2.5rem;
  text-align: center;
}

.site-header .nav {
  gap: 0.5rem 0.75rem;
}

/* Unified nav icons & buttons */
.nav-ico {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.nav-ico--arrow {
  width: 14px;
  height: 14px;
  opacity: 0.9;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  color: var(--text) !important;
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
  color: var(--purple) !important;
  background: rgba(83, 43, 129, 0.07);
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.8rem;
  white-space: nowrap;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.25s, box-shadow 0.25s, filter 0.25s;
}

.nav-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  color: #fff !important;
}

.nav-btn--contact {
  background: linear-gradient(135deg, #532b81 0%, #6b3fa8 100%);
  box-shadow: 0 4px 14px rgba(83, 43, 129, 0.3);
}

.nav-btn--portal {
  background: linear-gradient(135deg, #0a6b8a 0%, #00a88a 50%, #00cda0 100%);
  box-shadow: 0 4px 14px rgba(0, 168, 138, 0.35);
}

.nav-btn--staff {
  background: linear-gradient(135deg, #3a0d8c 0%, #532b81 50%, #00a88a 100%);
  box-shadow: 0 4px 14px rgba(83, 43, 129, 0.35);
}

.logo img,
.footer-logo {
  height: 52px;
  width: auto;
  display: block;
}

.nav {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 1rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}

.nav a:hover {
  color: var(--purple);
}

/* legacy class aliases */
.nav-staff,
.nav-portal {
  display: inline-flex;
}

.footer-nav .footer-staff {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.footer-nav .footer-staff svg {
  width: 16px;
  height: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(90deg, #530087 -20%, #00cda0 120%);
  color: #fff;
  box-shadow: 0 8px 24px rgba(83, 43, 129, 0.25);
}

.btn-outline {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.8);
  color: #fff;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(83, 43, 129, 0.2);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  color: var(--purple);
  z-index: 102;
  flex-shrink: 0;
}

.menu-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.site-header.nav-is-open .menu-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header.nav-is-open .menu-toggle-bar:nth-child(2) {
  opacity: 0;
}

.site-header.nav-is-open .menu-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(26, 10, 48, 0.45);
  backdrop-filter: blur(2px);
}

body.nav-open {
  overflow: hidden;
}

.nav-link--in-drawer {
  display: none;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
      135deg,
      rgba(83, 43, 129, 0.92) 0%,
      rgba(0, 205, 160, 0.75) 100%
    ),
    radial-gradient(circle at 20% 80%, rgba(24, 213, 216, 0.3), transparent 50%);
  color: #fff;
  padding: 5rem 0 4.5rem;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  margin: 0 0 1rem;
  line-height: 1.25;
}

.hero p {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  max-width: 640px;
  margin: 0 auto 2rem;
  opacity: 0.95;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.stats-showcase {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 3.5rem;
  perspective: 800px;
}

.stat-card {
  position: relative;
  text-align: center;
  padding: 1.85rem 1.25rem 1.55rem;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.08) 100%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(14px);
  overflow: hidden;
  opacity: 1;
  transform: translateY(0) scale(1);
  transition:
    opacity 0.6s ease,
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease,
    border-color 0.35s ease;
  transition-delay: calc(var(--i) * 0.12s);
}

.stats-showcase.is-visible .stat-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.stats-showcase.is-visible .stat-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(0, 205, 160, 0.55);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--teal), var(--cyan), var(--purple));
  opacity: 0.85;
}

.stat-card-glow {
  position: absolute;
  top: -40%;
  left: 50%;
  width: 120%;
  height: 80%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(0, 205, 160, 0.3) 0%, transparent 70%);
  pointer-events: none;
  animation: statGlow 4s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.5s);
}

@keyframes statGlow {
  0%, 100% { opacity: 0.4; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.85; transform: translateX(-50%) scale(1.1); }
}

.stat-icon-wrap {
  position: relative;
  z-index: 1;
  width: 52px;
  height: 52px;
  margin: 0 auto 1rem;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.75));
  color: var(--purple);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  animation: statIconFloat 3.5s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.35s);
}

.stat-icon-wrap svg {
  width: 26px;
  height: 26px;
}

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

.stat-value {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.stat-title {
  position: relative;
  z-index: 1;
  margin: 0.5rem 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
}

.stat-desc {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.88;
  line-height: 1.5;
}

@media (max-width: 992px) {
  .stats-showcase {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .stats-showcase {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin-inline: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stat-card,
  .stat-card-glow,
  .stat-icon-wrap {
    animation: none !important;
    transition: none !important;
  }
  .stats-showcase.is-visible .stat-card {
    opacity: 1;
    transform: none;
  }
}

/* Sections */
section {
  padding: 4.5rem 0;
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3rem;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--purple);
  margin: 0 0 0.75rem;
}

.section-head p {
  color: var(--muted);
  margin: 0;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  border-inline-start: 4px solid var(--teal);
}

.about-card h3 {
  color: var(--purple);
  margin-top: 0;
}

/* Services */
.services {
  background: var(--white);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform 0.25s, box-shadow 0.25s;
  border: 1px solid rgba(83, 43, 129, 0.06);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.service-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--purple), var(--teal));
  color: #fff;
}

.service-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--purple-dark);
}

.service-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

/* Contact */
.contact {
  background: linear-gradient(180deg, var(--bg) 0%, #ebe6f5 100%);
}

.locations-block {
  margin-bottom: 2.5rem;
}

.locations-title {
  text-align: center;
  color: var(--purple);
  font-size: 1.35rem;
  margin: 0 0 1.25rem;
  font-weight: 800;
}

.branch-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.branch-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  border-radius: 12px;
  border: 2px solid rgba(83, 43, 129, 0.15);
  background: var(--white);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(83, 43, 129, 0.06);
}

.branch-tab small {
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0.75;
  margin-inline-start: 0.15rem;
}

.branch-tab-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal);
  flex-shrink: 0;
}

.branch-tab-dot--main {
  background: linear-gradient(135deg, var(--purple), var(--teal));
  box-shadow: 0 0 0 3px rgba(0, 205, 160, 0.25);
}

.branch-tab:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
}

.branch-tab.is-active {
  background: linear-gradient(135deg, var(--purple), #6b3fa8);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(83, 43, 129, 0.3);
}

.branch-tab.is-active .branch-tab-dot {
  background: #fff;
}

.map-panel {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(83, 43, 129, 0.1);
  background: var(--white);
}

.sirco-map {
  min-height: 420px;
  height: 420px;
  width: 100%;
  z-index: 1;
  background: #e8e4f0;
}

.sirco-map .leaflet-container {
  height: 100%;
  width: 100%;
  font-family: inherit;
}

.map-fallback {
  margin: 0;
  padding: 2rem 1.25rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.branch-detail {
  padding: 1.5rem;
  background: linear-gradient(180deg, #faf8fd 0%, #f0ecf8 100%);
  border-inline-start: 1px solid rgba(83, 43, 129, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.branch-detail-label {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 600;
}

.branch-detail h4 {
  margin: 0 0 0.65rem;
  color: var(--purple);
  font-size: 1.1rem;
  line-height: 1.35;
}

#branchDetailAddress {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
}

.branch-directions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  background: linear-gradient(90deg, #530087 -20%, #00cda0 120%);
  color: #fff !important;
  font-weight: 700;
  font-size: 0.85rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.branch-directions:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(83, 43, 129, 0.25);
  color: #fff !important;
}

.contact-branches-link {
  display: inline-block;
  margin-top: 0.35rem;
  font-weight: 700;
  font-size: 0.9rem;
}

.contact-item span:not(.icon) {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.social-bar {
  margin-top: 0.5rem;
  padding: 1rem 1.25rem;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

.social-bar-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.social-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  background: #000;
  color: #fff !important;
  font-weight: 700;
  transition: transform 0.2s, box-shadow 0.2s;
}

.social-icon svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.social-icon-text {
  font-size: 0.95rem;
}

.social-icon:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  color: #fff !important;
}

/* Leaflet pins */
.sirco-pin-wrap {
  background: none !important;
  border: none !important;
}

.sirco-pin {
  display: block;
  width: 28px;
  height: 28px;
  background: linear-gradient(145deg, #532b81, #00cda0);
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  margin: 6px 0 0 2px;
}

.leaflet-popup-content-wrapper {
  border-radius: 12px;
  font-family: inherit;
}

.leaflet-popup-content a {
  color: var(--purple);
  font-weight: 700;
}

@media (max-width: 900px) {
  .map-panel {
    grid-template-columns: 1fr;
  }

  .branch-detail {
    border-inline-start: none;
    border-top: 1px solid rgba(83, 43, 129, 0.08);
  }

  .sirco-map {
    min-height: 320px;
  }
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--white);
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.contact-item .icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.contact-item strong {
  display: block;
  color: var(--purple);
  margin-bottom: 0.2rem;
}

.form-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  border-radius: 12px;
  margin-bottom: 1.25rem;
}

.form-alert[hidden] {
  display: none !important;
}

.form-alert--success {
  background: linear-gradient(135deg, #e8faf5 0%, #f0fdf9 100%);
  border: 1px solid rgba(0, 205, 160, 0.45);
  color: #0d4d3f;
}

.form-alert--error {
  background: linear-gradient(135deg, #fff5f5 0%, #fef2f2 100%);
  border: 1px solid rgba(220, 53, 69, 0.35);
  color: #7a1f28;
}

.form-alert--error .form-alert-icon {
  color: #dc3545;
}

.form-alert-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  color: #00a88a;
}

.form-alert strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.form-alert p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.9;
  line-height: 1.5;
}

.contact-form {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.contact-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--teal);
  border-color: transparent;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Honeypot — hidden from users, visible to bots */
.form-hp {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

/* Footer */
.site-footer {
  background: #1a1528;
  color: rgba(255, 255, 255, 0.85);
  padding: 2.5rem 0 1.5rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2rem;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  font-size: 0.95rem;
}

.footer-nav a:hover {
  color: var(--teal);
}

.copyright {
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.7;
  margin: 1.25rem 0 0;
}

.temp-banner {
  background: linear-gradient(90deg, #7b2dfb, #00a0cf);
  color: #fff;
  text-align: center;
  padding: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
}

@media (max-width: 900px) {
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Projects gallery — hero row, preview row, expandable rest */
.projects {
  background: linear-gradient(180deg, #fff 0%, var(--bg) 100%);
}

.projects-gallery {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.projects-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: start;
}

.projects-more-btn {
  align-self: center;
  margin: 0.75rem auto 0;
  min-width: 14rem;
  padding: 0.95rem 2.25rem;
  font-size: 1.05rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--purple) 0%, #6b3fa8 45%, var(--teal) 100%);
  color: #fff;
  border: none;
  box-shadow: 0 10px 28px rgba(83, 43, 129, 0.32);
}

.projects-more-btn:hover {
  box-shadow: 0 14px 34px rgba(83, 43, 129, 0.4);
  filter: brightness(1.05);
}

.projects-more-btn svg {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}

.projects-more[hidden] {
  display: none !important;
}

.projects-more .projects-row {
  margin-top: 0;
}

.project-card {
  position: relative;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(83, 43, 129, 0.08);
  box-shadow: var(--shadow);
  min-height: 0;
}

.project-card img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: bottom;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.project-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  background: linear-gradient(0deg, rgba(26, 10, 48, 0.82) 0%, transparent 100%);
  pointer-events: none;
}

.project-card figcaption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 1;
  margin: 0;
  padding: 1rem 1.1rem;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .projects-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.stats-bar {
  display: none !important;
}

/* Tablet & mobile navigation */
@media (max-width: 991px) {
  .menu-toggle {
    display: flex;
  }

  .header-inner {
    flex-wrap: nowrap;
    position: relative;
    z-index: 202;
  }

  .main-nav-wrap {
    display: none;
    position: absolute;
    top: 100%;
    inset-inline: 0;
    z-index: 201;
    flex: none;
    background: #fff;
    border-bottom: 1px solid rgba(83, 43, 129, 0.12);
    box-shadow: 0 18px 48px rgba(26, 10, 48, 0.14);
    max-height: min(80vh, 560px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.35rem 4vw 1rem;
  }

  .site-header.nav-is-open .main-nav-wrap,
  .main-nav-wrap.open {
    display: block;
  }

  .main-nav-wrap .nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0 0.25rem;
    justify-content: flex-start;
  }

  .main-nav-wrap .nav > li {
    width: 100%;
  }

  .main-nav-wrap .nav-link,
  .main-nav-wrap .nav-btn,
  .main-nav-wrap .nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    box-sizing: border-box;
    font-size: 0.95rem;
  }

  .main-nav-wrap .nav-btn {
    margin-top: 0.15rem;
  }

  .logo img {
    height: 44px;
  }
}

@media (min-width: 992px) {
  .menu-toggle {
    display: none !important;
  }

  .nav-backdrop {
    display: none !important;
  }

  .main-nav-wrap {
    display: flex !important;
    position: static;
    max-height: none;
    overflow: visible;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
  }

  .header-inner {
    flex-wrap: nowrap;
    align-items: center;
  }

  .main-nav-wrap .nav {
    flex-wrap: nowrap;
    justify-content: flex-end;
  }

  html[lang="en"] .main-nav-wrap .nav-link,
  html[lang="en"] .main-nav-wrap .nav-btn {
    font-size: 0.76rem;
    padding-inline: 0.45rem;
  }
}

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

  .hero h1 {
    font-size: 1.85rem;
  }
}
