/* =============================================
   GLOBAL STYLES — Psychiatrist Website
   Palette: Calm Violet + Warm Cream
   Fonts: Cormorant Garamond + DM Sans + Noto Naskh Arabic
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=DM+Sans:wght@300;400;500;600&family=Noto+Naskh+Arabic:wght@400;500;600;700&display=swap');

:root {
  /* Colors — Dr. Hamouda brand: warm brown / cream */
  --clr-bg:         #FAF7F4;
  --clr-bg-alt:     #F4EDE6;
  --clr-surface:    #FFFFFF;
  --clr-primary:    #7B3A10;
  --clr-primary-lt: #9E5227;
  --clr-primary-dk: #4E2008;
  --clr-accent:     #B07848;
  --clr-accent-lt:  #D9BC9E;
  --clr-gold:       #C4933A;
  --clr-text:       #2A1A0E;
  --clr-text-mid:   #5A4030;
  --clr-text-light: #9E8070;
  --clr-border:     #E8D8C8;

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-arabic:  'Noto Naskh Arabic', serif;

  /* Spacing */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  7rem;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;
  --radius-xl: 48px;

  /* Shadows */
  --shadow-sm: 0 2px 12px rgba(92,74,127,0.07);
  --shadow-md: 0 8px 32px rgba(92,74,127,0.12);
  --shadow-lg: 0 20px 60px rgba(92,74,127,0.16);

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur: 300ms;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background-color: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Grain texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}

/* ── Typography ─────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
  color: var(--clr-primary-dk);
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.2rem; }

p { color: var(--clr-text-mid); font-size: 1.05rem; line-height: 1.8; text-wrap: pretty; }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

/* Arabic text */
.ar {
  font-family: var(--font-arabic);
  direction: rtl;
  text-align: right;
}

/* ── Layout Utilities ───────────────────────── */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-xl) 0;
}

.section--alt {
  background-color: var(--clr-bg-alt);
}

.section-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clr-accent);
  margin-bottom: 0.75rem;
}

.section-title {
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--clr-text-mid);
  max-width: 520px;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-md); }

/* ── Buttons ────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--clr-primary);
  color: white;
  box-shadow: 0 4px 20px rgba(92,74,127,0.3);
}

.btn-primary:hover {
  background: var(--clr-primary-dk);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(92,74,127,0.35);
}

.btn-outline {
  background: transparent;
  color: var(--clr-primary);
  border: 1.5px solid var(--clr-accent);
}

.btn-outline:hover {
  background: var(--clr-bg-alt);
  border-color: var(--clr-primary);
}

.btn-ghost {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1.5px solid rgba(255,255,255,0.4);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.25);
}

/* ── Navigation ─────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 0;
  transition: all var(--dur) var(--ease);
}

.nav.scrolled {
  background: rgba(250,248,245,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--clr-border);
  padding: 0.7rem 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--clr-primary-dk);
  line-height: 1.2;
}

.nav-logo span {
  display: block;
  font-size: 0.7rem;
  font-family: var(--font-body);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clr-accent);
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--clr-text-mid);
  transition: color var(--dur) var(--ease);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--clr-primary);
  transition: width var(--dur) var(--ease);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--clr-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-lang {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--clr-accent);
  cursor: pointer;
  border: 1px solid var(--clr-accent-lt);
  padding: 0.3rem 0.7rem;
  border-radius: 100px;
  transition: all var(--dur) var(--ease);
}

.nav-lang:hover {
  background: var(--clr-bg-alt);
  color: var(--clr-primary);
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.nav-hamburger span {
  width: 24px;
  height: 2px;
  background: var(--clr-primary);
  border-radius: 2px;
  transition: all var(--dur) var(--ease);
  display: block;
}

/* ── Cards ──────────────────────────────────── */
.card {
  background: var(--clr-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--clr-border);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
  transition: all var(--dur) var(--ease);
}

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

/* ── Decorative ─────────────────────────────── */
.deco-blob {
  position: absolute;
  border-radius: 60% 40% 55% 45% / 50% 60% 40% 50%;
  background: var(--clr-accent-lt);
  opacity: 0.18;
  pointer-events: none;
}

.divider {
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--clr-gold), var(--clr-accent));
  border-radius: 2px;
  margin: 1rem 0 1.5rem;
}

/* ── Tags / Badges ──────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--clr-bg-alt);
  color: var(--clr-primary);
  border: 1px solid var(--clr-accent-lt);
}

/* ── Footer ─────────────────────────────────── */
.footer {
  background: var(--clr-primary-dk);
  color: rgba(255,255,255,0.75);
  padding: var(--space-lg) 0 var(--space-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: var(--space-md);
}

.footer-brand h3 {
  font-family: var(--font-display);
  color: white;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.footer-brand p {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
}

.footer-col h4 {
  color: rgba(255,255,255,0.5);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: var(--font-body);
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col a {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  transition: color var(--dur) var(--ease);
}

.footer-col a:hover { color: white; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
}

.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur) var(--ease);
}

.social-link:hover { background: rgba(255,255,255,0.2); }

.social-link svg { width: 16px; height: 16px; fill: white; }

/* ── Page Hero (inner pages) ────────────────── */
.page-hero {
  padding: 10rem 0 5rem;
  background: linear-gradient(135deg, var(--clr-bg-alt) 0%, var(--clr-bg) 100%);
  position: relative;
  overflow: hidden;
}

.page-hero-content {
  position: relative;
  z-index: 2;
}

.page-hero h1 { margin-bottom: 0.75rem; }
.page-hero p { font-size: 1.15rem; max-width: 500px; }

/* ── Animations ─────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

.anim-fade-up {
  opacity: 0;
  animation: fadeUp 0.7s var(--ease) forwards;
}

.anim-delay-1 { animation-delay: 0.1s; }
.anim-delay-2 { animation-delay: 0.2s; }
.anim-delay-3 { animation-delay: 0.3s; }
.anim-delay-4 { animation-delay: 0.4s; }

/* ── Form elements ──────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--clr-text);
}

.form-control {
  padding: 0.8rem 1rem;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--clr-text);
  background: var(--clr-surface);
  outline: none;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  width: 100%;
}

.form-control:focus {
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px rgba(92,74,127,0.12);
}

textarea.form-control { resize: vertical; min-height: 140px; }

/* ── Quote mark ─────────────────────────────── */
.quote-mark {
  font-family: var(--font-display);
  font-size: 5rem;
  line-height: 0.5;
  color: var(--clr-accent-lt);
  margin-bottom: 0.5rem;
  display: block;
}

/* ── Stars ──────────────────────────────────── */
.stars {
  color: var(--clr-gold);
  font-size: 0.9rem;
  letter-spacing: 2px;
}

/* ── Mobile nav ─────────────────────────────── */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--clr-bg);
  z-index: 99;
  padding: 6rem 2rem 2rem;
  flex-direction: column;
  gap: 1.5rem;
}

.mobile-nav.open { display: flex; }

.mobile-nav a {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--clr-primary-dk);
  border-bottom: 1px solid var(--clr-border);
  padding-bottom: 1rem;
}

/* ── Responsive ─────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  :root { --space-xl: 4rem; --space-lg: 3rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
}
