/* Dark Version - Identity: Dark Backgrounds, Light Text */
/* Original Identity Reference: #000000 #e9e3d5 #ffffff #231f20 */
:root {
  --ink: #e9e3d5;        /* Light cream for main text */
  --charcoal: #dad3c2;    /* Soft light gray for secondary text */
  --cream: #2a2622;       /* Dark warm background (replaces cream) */
  --paper: #121010;       /* Deep dark background (replaces white) */
  --muted: rgba(218, 211, 194, 0.72); /* Muted light text */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 4.25rem;
  --reveal-duration: 2.5s;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Tajawal", system-ui, sans-serif;
  font-weight: 400;
  color: var(--charcoal);
  background-color: var(--paper);
  line-height: 1.65;
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

h1,
h2,
h3,
.logo {
  font-family: "Cormorant Garamond", "Tajawal", serif;
  font-weight: 600;
  color: var(--ink);
  line-height:1.15;
}

/* Dark pattern overlay */
.pattern-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.15; /* Slightly more visible on dark */
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L60 30L30 60L0 30Z' fill='none' stroke='%23e9e3d5' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 72px 72px;
}

body > *:not(.pattern-bg) {
  position: relative;
  z-index: 1;
}

.container {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

/* Header - Dark version */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(18, 16, 16, 0.92); /* Dark background */
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(233, 227, 213, 0.15); /* Lighter border */
  transition: box-shadow 0.35s var(--ease-out), transform 0.35s var(--ease-out);
  z-index: 999999999999 !important;
}

.site-header.is-scrolled {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1200px, 94vw);
  margin-inline: auto;
  min-height: var(--header-h);
  padding-block: 0.35rem;
}

.logo {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 1.1rem;
}
.nav_mobile{
    display: none;
  }
.site-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--charcoal);
  text-decoration: none;
  position: relative;
  padding-block: 0.25rem;
}

.site-nav a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: inline-end;
  transition: transform 0.35s var(--ease-out);
}

html[dir="ltr"] .site-nav a::after {
  transform-origin: right;
}

html[dir="rtl"] .site-nav a::after {
  transform-origin: left;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  /* transform: scaleX(1); */
}

.lang-switch {
  display: flex;
  border: 1px solid rgba(233, 227, 213, 0.3);
  border-radius: 999px;
  overflow: hidden;
}
.lang_mobile{
  display: none;
  
}
.lang-btn {
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.45rem 0.85rem;
  border: none;
  background: transparent;
  color: var(--charcoal);
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}

.lang-btn.active {
  background: var(--ink);
  color: var(--paper);
}

.lang-btn:not(.active):hover {
  background: rgba(233, 227, 213, 0.15);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.site-header.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.site-header.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hero - Dark gradient */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--header-h) + 3rem) 0 4rem;
  background: linear-gradient(165deg, #1e1b18 0%, var(--paper) 65%, #0a0909 100%);
  position: relative;
}

.hero-grid {
  width: min(1120px, 95vw);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr ;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.hero-lead {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 36ch;
  margin: 0 0 1.75rem;
}

.hero-actions {
  /* display: flex; */
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 20px;
}
 .showfordesktop{
    display: flex;
  }
  .showformobile{
    display: none;
  }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), background 0.25s, color 0.25s, border-color 0.25s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.btn-primary:hover {
  background: #f2ecd9;
  border-color: #f2ecd9;
  color: #0a0909;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: rgba(233, 227, 213, 0.5);
}

.btn-ghost:hover {
  border-color: var(--ink);
  background: rgba(233, 227, 213, 0.15);
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.hero-card {
  width: 100%;
  border-radius: 1.25rem;
  padding: 1px;
  background: transparent;
  /* background: linear-gradient(145deg, var(--ink), var(--charcoal)); */
  /* box-shadow: 0 28px 60px rgba(0, 0, 0, 0.4); */
}

.hero-card-inner {
  /* height: 100%; */
  border-radius: calc(1.25rem - 1px);
  /* background: var(--paper); */
  display: flex;
  /* flex-direction: column; */
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.hero-card-inner img{
  border-radius: calc(1.25rem - 1px);

}
.prof_info{
  max-width: 50%;
}
@media (max-width: 960px) {
  .prof_info{
    max-width: 100%;
  }
}
.hero-stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink);
}

.hero-card-inner strong {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.75rem;
  color: var(--ink);
}

.hero-card-inner p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.scroll-hint {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-line {
  display: block;
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--charcoal), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scaleY(0.85);
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
}

/* Sections - Dark alternating backgrounds */
.section {
  padding: clamp(4rem, 10vw, 6rem) 0;
}

.section:nth-of-type(even):not(.section-about) {
  background: var(--cream);
}

.section-head {
  max-width: 40rem;
  margin-bottom: 2.5rem;
}

.section-head h2 {
  font-size: clamp(2rem, 3.5vw, 2.65rem);
  margin: 0 0 0.5rem;
}

.section-sub {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

/* About - Dark cards */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(2rem, 4vw, 3rem);
}

.about-text p {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  color: var(--muted);
}

.about-highlights {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.65rem;
}

.about-highlights li {
  position: relative;
  padding-inline-start: 1.35rem;
  font-weight: 500;
}

.about-highlights li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
}

.about-aside {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.aside-block {
  background: rgba(18, 16, 16, 0.9);
  /* border: 1px solid rgba(233, 227, 213, 0.15); */
  border-radius: 1rem;
  padding: 1.35rem 1.5rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.aside-block h3 {
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
}

.aside-block p {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.aside-block a {
  color: var(--ink);
  font-weight: 600;
}

/* Services - Dark cards */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.service-card {
  background: rgba(18, 16, 16, 0.85);
  border-radius: 1rem;
  padding: 1.75rem 1.5rem;
  /* border: 1px solid rgba(233, 227, 213, 0.1); */
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s;
}

.section-services .service-card {
  background: rgba(18, 16, 16, 0.9);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.service-card h3 {
  font-size: 1.35rem;
  margin: 0 0 0.5rem;
}

.service-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

/* Timeline - Dark version */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-inline-start: 1px solid rgba(233, 227, 213, 0.2);
  margin-inline-start: 0.65rem;
}

.timeline-item {
  position: relative;
  padding-inline-start: 2rem;
  padding-bottom: 2.25rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  inset-inline-start: -0.4rem;
  top: 0.35rem;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 4px var(--cream);
}

.section-history .timeline-item::before {
  box-shadow: 0 0 0 4px var(--paper);
}

.timeline-year {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.timeline-item h3 {
  font-size: 1.25rem;
  margin: 0 0 0.35rem;
}

.timeline-item p {
  margin: 0;
  color: var(--muted);
}

/* Certificates - Dark cards */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.cert-card {
  background: var(--paper);
  border-radius: 1rem;
  padding: 1.5rem 1.25rem;
  /* border: 1px solid rgba(233, 227, 213, 0.1); */
  min-height: 180px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cert-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--cream), rgba(233, 227, 213, 0.2));
  border: 1px solid rgba(233, 227, 213, 0.2);
}

.cert-card h3 {
  font-size: 1.1rem;
  margin: 0;
}

.cert-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Gallery - Dark */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 140px;
  gap: 0.85rem;
}

.gallery-item {
  margin: 0;
  border-radius: 0.85rem;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #2a2622 0%, #1e1b18 50%, var(--ink) 100%);
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  transition: transform 0.45s var(--ease-out);
}

.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(233, 227, 213, 0.15), transparent 55%);
  pointer-events: none;
}

.gallery-item:hover {
  transform: scale(1.02);
}

.gallery-item.wide {
  grid-column: span 2;
}

.gallery-item.tall {
  grid-row: span 2;
}

.gallery-item figcaption {
  position: relative;
  z-index: 1;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--paper);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.65);
}

/* Videos - Dark */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.video-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.video-frame {
  aspect-ratio: 9/12.5;
  border-radius: 0.85rem;
  background: var(--charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  font-size: 0.88rem;
  text-align: center;
  padding: 1rem;
  border: 1px solid rgba(233, 227, 213, 0.2);
}

.video-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0.85rem;
}

.video-caption {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

/* Contact - Inverted colors for contrast */
.contact-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: var(--ink);
  color: var(--paper);
  padding: clamp(1.75rem, 4vw, 2.5rem);
  border-radius: 1.25rem;
}

.contact-panel h2 {
  color: var(--paper);
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
}

.contact-lead {
  margin: 0;
  max-width: 36rem;
  opacity: 0.9;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.contact-panel .btn-primary {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}

.contact-panel .btn-primary:hover {
  background: #2a2622;
  border-color: #2a2622;
  color: var(--ink);
}

/* Footer - Dark */
.site-footer {
  padding: 2.5rem 0;
  border-top: 1px solid rgba(233, 227, 213, 0.1);
  background: var(--paper);
}

.footer-inner {
  text-align: center;
}

.footer-name {
  font-family: "Cormorant Garamond", serif;
  font-weight: 700;
  font-size: 1.25rem;
  margin: 0 0 0.25rem;
}

.footer-tag {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-copy {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Scroll reveal - same as original */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity var(--reveal-duration) var(--ease-out),
    transform var(--reveal-duration) var(--ease-out);
}
/* من الشمال */
.reveal-left {
  transform: translateX(-100%);
}

/* من اليمين */
.reveal-right {
  transform: translateX(100%);
}

.reveal.is-visible {
  opacity: 1;
  transform:  translateX(0) translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.12s;
}

.services-grid .reveal:nth-child(2) {
  transition-delay: 0.08s;
}

.services-grid .reveal:nth-child(3) {
  transition-delay: 0.16s;
}

.services-grid .reveal:nth-child(4) {
  transition-delay: 0.24s;
}

.cert-grid .reveal:nth-child(2) {
  transition-delay: 0.06s;
}

.cert-grid .reveal:nth-child(3) {
  transition-delay: 0.12s;
}

.cert-grid .reveal:nth-child(4) {
  transition-delay: 0.18s;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .scroll-line {
    animation: none;
  }
}

/* Responsive - same as original */
@media (max-width: 960px) {
  .hero {
    min-height: 70vh;
    min-height: 70dvh;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-card{
    aspect-ratio: 0;
    width: 100%;
  }
  .hero-card-inner{
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
.hero-card-inner img{
  margin: auto;
}
  .hero-lead {
    margin-inline: auto;
  }

  .hero-actions {
    justify-content: center;
  }

 .showfordesktop{
    display: none;
  }
  .showformobile{
    display: flex;
    justify-content: center;
  }
  .hero-visual {
    order: -1;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .cert-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 120px;
  }

  .gallery-item.wide {
    grid-column: span 2;
  }

  .gallery-item.tall {
    grid-row: span 1;
  }

  .video-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  /* .nav-toggle {
    display: flex;
  } */

  /* .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--paper);
    flex-direction: column;
    padding: 1.25rem 1.5rem 1.5rem;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(35, 31, 32, 0.08);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s var(--ease-out), opacity 0.35s;
  } */
  .site-nav{
    display: none;
  }
  .nav_mobile{
    display: flex;
  }
  .site-header.nav-open .site-nav {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .header-inner {
    flex-wrap: wrap;
    justify-content: center;
  }

  .logo {
    display: none !important;
  }

  .nav-toggle {
    order: 1;
    margin-inline-start: auto;
  }

  .lang-switch {
    order: 2;
    display: none;
  }
 .lang_mobile{
    display: flex;
  }
  .site-nav {
    order: 3;
    width: 100%;
  }

  .cert-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 160px;
  }

  .gallery-item.wide {
    grid-column: span 1;
  }
}


.prof_info img{
  display: none;
}
@media (max-width: 960px) {
.prof_info img{
  display: block;
}
}


.faq-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.faq-card{
  background: var(--paper);
  padding: 0;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(35, 31, 32, 0.08);
}
.faq-question{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1rem 1.1rem;
  margin: 0;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 1.2rem;
  font-weight: 600;
  text-align: start;
  color: inherit;
  cursor: pointer;
  transition: background 0.2s var(--ease-out, ease);
}
.faq-question:hover{
  background: rgba(35, 31, 32, 0.04);
}
.faq-icon{
  flex-shrink: 0;
  font-size: 1rem;
  opacity: 0.65;
  transition: transform 0.25s var(--ease-out, ease);
}
.faq-card.is-open .faq-icon{
  transform: rotate(180deg);
}
.faq-answer{
  padding: 0 1.1rem 1rem;
}
.faq-answer p{
  margin: 0;
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.6;
}
@media (max-width: 576px) {
  .prof_info img{
    width: 150px !important;
  }
  .hero{
    padding-top: 20px;
  }
  .faq-grid{
    grid-template-columns: 1fr;
  }
}