/* ============================================
   Dr. Kheder Kutmah Medical — Custom Styles
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 300;
  line-height: 1.7;
  color: #1e293b;
  background-color: #ffffff;
  overflow-x: hidden;
}

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

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

ul {
  list-style: none;
}

/* --- Utility --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.text-center {
  text-align: center;
}

.accent {
  color: #0d9488;
}

/* --- Section shared --- */
.section {
  padding: 100px 0;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #0d9488;
  margin-bottom: 16px;
  position: relative;
  padding-left: 32px;
}

.section-label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 1px;
  background-color: #0d9488;
}

.text-center .section-label {
  padding-left: 0;
}

.text-center .section-label::before {
  display: none;
}

.section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  line-height: 1.2;
  color: #0f172a;
  margin-bottom: 20px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: #475569;
  max-width: 600px;
  line-height: 1.8;
}

.text-center .section-subtitle {
  margin: 0 auto;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 14px 28px;
  border-radius: 6px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn-primary {
  background-color: #0d9488;
  color: #ffffff;
  border-color: #0d9488;
}

.btn-primary:hover {
  background-color: #0f766e;
  border-color: #0f766e;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.25);
}

.btn-ghost {
  background-color: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-ghost:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.8);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  transition: box-shadow 0.3s ease;
}

.nav.scrolled {
  box-shadow: 0 1px 20px rgba(15, 23, 42, 0.08);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 500;
  color: #0f172a;
}

.nav-logo svg {
  color: #0d9488;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-menu a {
  font-size: 0.875rem;
  font-weight: 400;
  color: #475569;
  transition: color 0.2s ease;
  position: relative;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: #0d9488;
  transition: width 0.25s ease;
}

.nav-menu a:hover {
  color: #0d9488;
}

.nav-menu a:hover::after {
  width: 100%;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #0d9488 !important;
  background-color: #f0fdfa;
  border: 1px solid #ccfbf1;
  padding: 8px 16px;
  border-radius: 6px;
  transition: all 0.2s ease !important;
}

.nav-cta::after {
  display: none !important;
}

.nav-cta:hover {
  background-color: #ccfbf1 !important;
  color: #0f766e !important;
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background-color: #0f172a;
  transition: all 0.3s ease;
  transform-origin: center;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 5px);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -5px);
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(145deg, #0f766e 0%, #0d9488 30%, #14b8a6 55%, #2dd4bf 75%, #5eead4 100%);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: radial-gradient(circle at 1px 1px, #ffffff 1px, transparent 0);
  background-size: 32px 32px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 780px;
  padding: 120px 24px 80px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 100px;
  padding: 8px 20px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 32px;
  backdrop-filter: blur(4px);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #5eead4;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.4); }
}

.hero-headline {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  font-weight: 500;
  line-height: 1.15;
  color: #ffffff;
  margin-bottom: 24px;
}

.hero-accent {
  font-style: italic;
  font-weight: 500;
  position: relative;
}

.hero-accent::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 2px;
}

.hero-subtitle {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.8;
  max-width: 600px;
  margin: 0 auto 40px;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 56px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 500;
  color: #ffffff;
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.2);
}

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
  animation: scroll-anim 2s ease-in-out infinite;
}

@keyframes scroll-anim {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* --- Services --- */
.services {
  background-color: #ffffff;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 56px;
}

.service-card {
  padding: 36px 28px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #0d9488, #2dd4bf);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.service-card:hover {
  border-color: #ccfbf1;
  box-shadow: 0 8px 32px rgba(13, 148, 136, 0.08);
  transform: translateY(-2px);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background-color: #f0fdfa;
  color: #0d9488;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.service-card:hover .service-icon {
  background-color: #0d9488;
  color: #ffffff;
}

.service-card h3 {
  font-size: 1.05rem;
  font-weight: 500;
  color: #0f172a;
  margin-bottom: 12px;
}

.service-card p {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.75;
}

/* --- About --- */
.about {
  background-color: #f8fafc;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-image-wrap {
  position: relative;
}

.about-image {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  z-index: 2;
}

.about-image img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  display: block;
}

.about-image-accent {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 100%;
  height: 100%;
  border: 2px solid #ccfbf1;
  border-radius: 16px;
  z-index: 1;
}

.about-content .section-label {
  margin-bottom: 16px;
}

.about-text {
  font-size: 0.975rem;
  color: #475569;
  line-height: 1.85;
  margin-bottom: 16px;
}

.about-values {
  margin-top: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.value-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.value-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background-color: #f0fdfa;
  color: #0d9488;
  margin-top: 2px;
}

.value-item span {
  font-size: 0.875rem;
  color: #334155;
  line-height: 1.5;
  padding-top: 6px;
}

/* --- Approach --- */
.approach {
  background-color: #ffffff;
}

.approach-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 56px;
  position: relative;
}

.approach-steps::before {
  content: '';
  position: absolute;
  top: 28px;
  left: 12.5%;
  right: 12.5%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #ccfbf1, #ccfbf1, transparent);
}

.step {
  text-align: center;
  padding: 0 16px;
  position: relative;
}

.step-number {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.5rem;
  font-weight: 500;
  color: #0d9488;
  opacity: 0.2;
  line-height: 1;
  margin-bottom: 16px;
}

.step-line {
  display: none;
}

.step h3 {
  font-size: 1rem;
  font-weight: 500;
  color: #0f172a;
  margin-bottom: 12px;
}

.step p {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.75;
}

/* --- Testimonials --- */
.testimonials {
  background: linear-gradient(145deg, #0f766e, #14b8a6);
  position: relative;
  overflow: hidden;
}

.testimonials::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: radial-gradient(circle at 1px 1px, #ffffff 1px, transparent 0);
  background-size: 24px 24px;
}

.testimonials .section-label {
  color: rgba(255, 255, 255, 0.7);
}

.testimonials .section-label::before {
  background-color: rgba(255, 255, 255, 0.4);
}

.testimonials .section-title {
  color: #ffffff;
}

.testimonials .section-title .accent {
  color: #5eead4;
}

.testimonials .section-subtitle {
  color: rgba(255, 255, 255, 0.75);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 56px;
  position: relative;
  z-index: 2;
}

.testimonial-card {
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 36px 28px;
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

.testimonial-card:hover {
  background-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-4px);
}

.testimonial-quote {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 4rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.2);
  margin-bottom: -8px;
}

.testimonial-text {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.8;
  margin-bottom: 24px;
  font-weight: 300;
}

.testimonial-author {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.author-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: #ffffff;
}

.author-detail {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

/* --- Contact --- */
.contact {
  background-color: #f8fafc;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact-intro {
  font-size: 0.975rem;
  color: #475569;
  line-height: 1.85;
  margin-bottom: 36px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-item {
  display: flex;
  gap: 16px;
}

.contact-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background-color: #f0fdfa;
  color: #0d9488;
}

.contact-item strong {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #0f172a;
  margin-bottom: 4px;
}

.contact-item p {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.7;
}

.contact-item a {
  color: #0d9488;
  transition: color 0.2s ease;
}

.contact-item a:hover {
  color: #0f766e;
  text-decoration: underline;
}

/* Form */
.contact-form-wrap {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 40px;
}

.form-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 500;
  color: #0f172a;
  margin-bottom: 8px;
}

.form-note {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 28px;
}

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

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: #334155;
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 300;
  color: #0f172a;
  background-color: #f8fafc;
  transition: all 0.2s ease;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #0d9488;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #94a3b8;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-success {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 16px 20px;
  background-color: #f0fdfa;
  border: 1px solid #ccfbf1;
  border-radius: 8px;
  color: #0f766e;
  font-size: 0.9rem;
  font-weight: 400;
}

.form-success svg {
  flex-shrink: 0;
  color: #0d9488;
}

/* --- Map --- */
.map-section {
  border-top: 1px solid #e2e8f0;
}

.map-container {
  height: 380px;
  overflow: hidden;
}

/* --- Footer --- */
.footer {
  background-color: #0f172a;
  color: #94a3b8;
  padding: 72px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.footer-brand {
  max-width: 280px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 16px;
}

.footer-logo svg {
  color: #2dd4bf;
}

.footer-tagline {
  font-size: 0.875rem;
  line-height: 1.75;
  color: #64748b;
}

.footer-links strong,
.footer-contact strong {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #e2e8f0;
  margin-bottom: 20px;
}

.footer-links ul,
.footer-contact ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a,
.footer-contact a {
  font-size: 0.875rem;
  color: #64748b;
  transition: color 0.2s ease;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.footer-links a:hover,
.footer-contact a:hover {
  color: #2dd4bf;
}

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.875rem;
  line-height: 1.6;
}

.footer-contact svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: #2dd4bf;
}

.footer-bottom {
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: #475569;
}

.footer-disclaimer {
  font-size: 0.75rem !important;
  color: #334155 !important;
  max-width: 500px;
  text-align: right;
  line-height: 1.6;
}

/* --- Scroll Reveal (progressive enhancement) --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

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

  .approach-steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }

  .approach-steps::before {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: stretch;
    padding: 24px;
    gap: 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-menu a {
    padding: 14px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 1rem;
  }

  .nav-menu a::after {
    display: none;
  }

  .nav-cta {
    margin-top: 8px;
    justify-content: center;
    border: none;
    background-color: #f0fdfa;
    border-radius: 8px;
  }

  .hero-content {
    padding: 100px 24px 60px;
  }

  .hero-stats {
    gap: 20px;
  }

  .stat-number {
    font-size: 1.4rem;
  }

  .section {
    padding: 72px 0;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-image img {
    height: 360px;
  }

  .about-image-accent {
    top: -12px;
    right: -12px;
  }

  .about-values {
    grid-template-columns: 1fr;
  }

  .approach-steps {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact-form-wrap {
    padding: 28px;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-disclaimer {
    text-align: center;
  }

  .hero-scroll {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-stats {
    flex-direction: column;
    gap: 16px;
  }

  .stat-divider {
    width: 40px;
    height: 1px;
  }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
