/* ==========================================================================
   Dr. Hisham Genedy — ENT & Rhinoplasty Consultant
   Design system: "Consulting Room" — a quiet, confident clinical identity
   ========================================================================== */
:root {
  --ink: #12201d;
  --pine: #143d34;
  --pine-deep: #0d2b24;
  --pine-tint: #eaf1ee;
  --brass: #a97a3b;
  --brass-tint: #f8efe0;
  --stone: #f6f5f2;
  --paper: #ffffff;
  --line: #e3e0d8;
  --text-main: #1c2622;
  --text-muted: #667069;

  --shadow-sm: 0 2px 8px rgba(20, 61, 52, 0.06);
  --shadow-md: 0 12px 28px rgba(18, 32, 29, 0.10);
  --shadow-lg: 0 24px 48px rgba(18, 32, 29, 0.16);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --font-display: 'Fraunces', 'Tajawal', serif;
  --font-body: 'Plus Jakarta Sans', 'Tajawal', sans-serif;

  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--stone);
  color: var(--text-main);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

body[dir="rtl"] {
  font-family: 'Tajawal', var(--font-body);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 12% 8%, rgba(20, 61, 52, 0.05), transparent 45%),
    radial-gradient(circle at 88% 92%, rgba(169, 122, 59, 0.06), transparent 40%);
  z-index: -1;
}

.container {
  padding: 48px 44px;
  background: var(--paper);
  border-radius: var(--radius-lg);
  margin: 32px auto;
  width: 92%;
  max-width: 1150px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}

.container.hidden {
  display: none !important;
}

.container.active-page {
  animation: pageFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
}

body[dir="rtl"] h1,
body[dir="rtl"] h2,
body[dir="rtl"] h3,
body[dir="rtl"] h4 {
  font-family: 'Tajawal', var(--font-body);
  font-weight: 800;
}

.section-title {
  font-size: 1.9rem;
  text-align: center;
  margin-bottom: 8px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 34px;
}

/* Header / Navbar */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.25rem;
  font-family: var(--font-display);
}

.logo-badge {
  background: var(--pine);
  color: var(--brass-tint);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav-logo-sub {
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.01em;
}

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

.nav-links a {
  text-decoration: none;
  color: var(--text-main);
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.92rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 7px;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--pine-tint);
  color: var(--pine);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-lang {
  background: var(--stone);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.83rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  font-family: inherit;
}

.btn-lang:hover {
  border-color: var(--pine);
  color: var(--pine);
}

.btn-book-nav {
  background: var(--pine);
  color: var(--paper) !important;
  padding: 10px 20px !important;
  border-radius: 50px !important;
}

.btn-book-nav:hover {
  background: var(--pine-deep);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--ink);
  cursor: pointer;
}

/* Hero Section */
.hero-wrapper {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.badge-tag {
  background: var(--pine-tint);
  color: var(--pine);
  padding: 7px 15px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 7px;
}

.badge-tag i { color: var(--brass); }

.hero-title {
  font-size: 2.7rem;
  line-height: 1.2;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 18px;
}

body[dir="rtl"] .hero-title { font-weight: 800; font-size: 2.5rem; }

.hero-title .accent-line {
  display: inline-block;
  position: relative;
}

.hero-title .accent-line::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 10px;
  background: var(--brass-tint);
  z-index: -1;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--pine);
  color: var(--paper);
  padding: 14px 28px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  font-size: 0.98rem;
  font-family: inherit;
}

.btn-primary:hover {
  background: var(--pine-deep);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--paper);
  color: var(--ink);
  padding: 14px 28px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  transition: var(--transition);
  font-size: 0.98rem;
}

.btn-secondary:hover {
  border-color: var(--pine);
  color: var(--pine);
}

.social-links-bar {
  display: flex;
  gap: 16px;
  margin-top: 26px;
  align-items: center;
}

.social-links-bar a {
  color: var(--text-muted);
  font-size: 1.15rem;
  transition: var(--transition);
}

.social-links-bar a:hover { color: var(--pine); }

.hero-image-container { text-align: center; }

.hero-image-frame {
  position: relative;
  display: inline-block;
}

.hero-image-frame img {
  width: 100%;
  max-width: 380px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 6px solid var(--paper);
  outline: 1px solid var(--line);
}

.hero-image-card {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--paper);
  padding: 12px 22px;
  border-radius: 50px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  width: 86%;
}

.hero-image-card i { color: var(--brass); font-size: 1.3rem; }
.hero-image-card strong { display: block; font-size: 0.9rem; text-align: left; }
body[dir="rtl"] .hero-image-card strong { text-align: right; }
.hero-image-card span { font-size: 0.75rem; color: var(--text-muted); display: block; text-align: left; }
body[dir="rtl"] .hero-image-card span { text-align: right; }

/* Cards & Grids */
.glass-card {
  background: var(--paper);
  border-radius: var(--radius-md);
  padding: 26px;
  border: 1px solid var(--line);
  transition: var(--transition);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 28px;
}

.service-card {
  text-align: start;
  border-top: 3px solid var(--pine);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.service-icon {
  width: 56px;
  height: 56px;
  background: var(--pine-tint);
  color: var(--pine);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
  transition: var(--transition);
}

.service-card:hover .service-icon {
  background: var(--pine);
  color: var(--paper);
}

.service-card h4 { margin-bottom: 8px; font-size: 1.05rem; }
.service-card p { color: var(--text-muted); font-size: 0.94rem; }

.pub-card { border-inline-start: 3px solid var(--brass); }
.pub-card h4 { font-size: 1.05rem; margin-bottom: 4px; }
.pub-card p { color: var(--text-muted); font-size: 0.88rem; }

.cert-card { text-align: center; }
.cert-icon { font-size: 2.2rem; color: var(--brass); margin-bottom: 10px; }
.cert-card p { font-size: 0.88rem; color: var(--text-muted); margin-top: 5px; }

.grid-2col {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.gallery-grid img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--line);
}

.gallery-grid img:hover { transform: scale(1.02); box-shadow: var(--shadow-md); }

.instructions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
  margin-top: 24px;
}

.instruction-card { border-inline-start: 3px solid var(--pine); }
.instruction-card h4 { color: var(--pine); font-size: 1.12rem; margin-bottom: 12px; }
.instruction-card ul { padding-inline-start: 18px; line-height: 1.85; color: var(--text-main); }

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
  margin-top: 24px;
}

/* Forms */
.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 0.92rem;
  text-align: left;
}
body[dir="rtl"] .form-group label { text-align: right; }

.form-control, input[type="text"], input[type="tel"], input[type="date"], select, textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
  background: var(--stone);
  color: var(--text-main);
}

.form-control:focus, input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--pine);
  background: var(--paper);
  box-shadow: 0 0 0 3px rgba(20, 61, 52, 0.12);
}

/* Floating music widget */
.music-player {
  position: fixed;
  bottom: 22px;
  inset-inline-end: 22px;
  z-index: 10000;
  background: var(--paper);
  padding: 8px 16px 8px 8px;
  border-radius: 50px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}

body[dir="rtl"] .music-player { padding: 8px 8px 8px 16px; }

.music-toggle-btn {
  background: var(--pine);
  color: var(--paper);
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
}

.music-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.85);
  padding: 36px 20px;
  text-align: center;
  margin-top: 50px;
  border-top: 3px solid var(--brass);
}

.site-footer p:first-child { font-weight: 600; }

.site-footer .footer-fine {
  margin-top: 6px;
  font-size: 0.82rem;
  opacity: 0.6;
}

/* Lightbox */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(18, 32, 29, 0.9);
  z-index: 99999;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.lightbox-overlay img {
  max-width: 90%;
  max-height: 82%;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}

/* Responsive Design / Media Queries */
@media (max-width: 900px) {
  .container { padding: 24px 16px; width: 95%; margin: 15px auto; }

  .hero-wrapper {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-badges, .hero-actions, .social-links-bar {
    justify-content: center;
  }

  .hero-subtitle { max-width: none; margin-inline: auto; }

  .nav-links {
    position: fixed;
    top: 70px;
    inset-inline-end: -100%;
    width: 280px;
    height: calc(100vh - 70px);
    background: var(--paper);
    flex-direction: column;
    padding: 26px 18px;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    align-items: stretch;
    overflow-y: auto;
    z-index: 1000;
    border-inline-start: 1px solid var(--line);
  }

  .nav-links.mobile-active { inset-inline-end: 0; }

  .hamburger { display: block; }
}

/* Print stylesheet */
@media print {
  header, .site-footer, .btn-lang, .hamburger, .hero-actions, .btn-book-nav, .music-player {
    display: none !important;
  }
  .container {
    box-shadow: none !important;
    border: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}
