/* ============================================================
   NOVUM CLINIC – Global Stylesheet
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --primary:       #1a5f7a;
  --primary-dark:  #134a61;
  --primary-light: #2980a0;
  --accent:        #e8a020;
  --accent-light:  #f0b84a;
  --white:         #ffffff;
  --off-white:     #f7f9fc;
  --light-gray:    #eef1f5;
  --mid-gray:      #b0bec5;
  --text-dark:     #1c2b36;
  --text-body:     #3d5166;
  --text-muted:    #6b8096;
  --border:        #dce5ec;
  --shadow-sm:     0 1px 4px rgba(26,95,122,.08);
  --shadow-md:     0 4px 16px rgba(26,95,122,.12);
  --shadow-lg:     0 8px 32px rgba(26,95,122,.16);
  --radius:        10px;
  --radius-lg:     18px;
  --transition:    0.28s ease;
  --header-h:      80px;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-body);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
ul { list-style: none; }

/* ---------- Typography ---------- */
h1,h2,h3,h4,h5,h6 {
  font-family: 'Lora', Georgia, serif;
  color: var(--text-dark);
  line-height: 1.25;
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h4 { font-size: 1.1rem; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ---------- Container ---------- */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: var(--radius);
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-align: center;
  line-height: 1.3;
}
.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--white);
}
.btn-accent {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}
.btn-accent:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
  color: var(--white);
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}
.btn-outline-white {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn-outline-white:hover {
  background: var(--white);
  color: var(--primary);
}
.btn-lg { padding: 16px 40px; font-size: 1.05rem; }
.btn-sm { padding: 9px 20px; font-size: .85rem; }

/* ---------- Section Helpers ---------- */
.section { padding: 88px 0; }
.section-alt { background: var(--off-white); }
.section-dark { background: var(--text-dark); color: var(--white); }
.section-dark h2, .section-dark h3, .section-dark h4 { color: var(--white); }
.section-label {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 10px;
}
.section-label-white { color: var(--accent-light); }
.section-title { margin-bottom: 16px; }
.section-intro {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 48px;
}
.section-header { margin-bottom: 52px; }
.section-header-center { text-align: center; }
.section-header-center .section-intro { margin-left: auto; margin-right: auto; }
.divider {
  width: 48px; height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin: 16px 0 24px;
}
.divider-center { margin-left: auto; margin-right: auto; }

/* ---------- Header ---------- */
.site-header {
  position: static;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 100%;
}
.logo { flex-shrink: 0; display: flex; align-items: center; }
.logo-img { height: 48px; width: auto; object-fit: contain; }
.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  flex-wrap: nowrap;
}
.main-nav a {
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-body);
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  transition: all var(--transition);
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--primary);
  background: var(--light-gray);
}
.header-cta { flex-shrink: 0; }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: all var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Page Hero ---------- */
.page-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
  padding: 80px 0 72px;
  color: var(--white);
}
.page-hero h1 { color: var(--white); margin-bottom: 14px; }
.page-hero p { color: rgba(255,255,255,.82); font-size: 1.1rem; max-width: 560px; }
.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: .82rem;
  color: rgba(255,255,255,.6);
  margin-bottom: 20px;
}
.breadcrumb a { color: rgba(255,255,255,.7); }
.breadcrumb a:hover { color: var(--white); }
.breadcrumb span { color: rgba(255,255,255,.4); }

/* ---------- Hero (Homepage) ---------- */
.hero {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--text-dark);
}
.hero-background {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-background img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20,40,55,.58);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 100px 0 80px;
  max-width: 640px;
}
.hero-content .section-label { color: var(--accent-light); }
.hero-content h1 { color: var(--white); margin-bottom: 20px; }
.hero-content p { color: rgba(255,255,255,.85); font-size: 1.15rem; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Stats Strip ---------- */
.stats-strip {
  background: var(--primary);
  padding: 40px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.stat-item {
  text-align: center;
  padding: 20px 16px;
  border-right: 1px solid rgba(255,255,255,.15);
}
.stat-item:last-child { border-right: none; }
.stat-number {
  display: block;
  font-family: 'Lora', serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label {
  font-size: .82rem;
  color: rgba(255,255,255,.72);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 500;
}

/* ---------- About Grid ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.about-grid.reverse { direction: rtl; }
.about-grid.reverse > * { direction: ltr; }
.about-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.about-image img { width: 100%; height: 420px; object-fit: cover; }
.about-body .section-label { display: block; }
.about-body h2 { margin-bottom: 12px; }
.about-body p { color: var(--text-body); }

/* ---------- Timeline ---------- */
.timeline { margin: 32px 0 0; }
.timeline-item {
  display: flex;
  gap: 20px;
  padding-bottom: 28px;
  position: relative;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 19px; top: 36px;
  bottom: 0; width: 2px;
  background: var(--border);
}
.timeline-item:last-child::before { display: none; }
.tl-dot {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem;
  font-weight: 700;
  flex-shrink: 0;
  position: relative; z-index: 1;
}
.tl-content h4 { color: var(--text-dark); margin-bottom: 4px; font-family: 'Poppins',sans-serif; font-weight: 600; }
.tl-content p { font-size: .9rem; color: var(--text-muted); margin: 0; }

/* ---------- Cards Grid ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.card-image { height: 200px; overflow: hidden; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-image img { transform: scale(1.04); }
.card-body { padding: 24px; }
.card-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  background: var(--light-gray);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  color: var(--primary);
}
.card-icon svg { width: 24px; height: 24px; }
.card-tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--primary);
  background: var(--light-gray);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}
.card-body h3 { font-size: 1.15rem; margin-bottom: 10px; color: var(--text-dark); }
.card-body p { font-size: .9rem; color: var(--text-muted); margin-bottom: 16px; }
.card-link { font-size: .88rem; font-weight: 600; color: var(--primary); display: inline-flex; align-items: center; gap: 4px; }
.card-link:hover { color: var(--primary-dark); }

/* ---------- Program Detail ---------- */
.program-detail { padding: 80px 0; border-bottom: 1px solid var(--border); }
.program-detail:last-child { border-bottom: none; }
.program-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.program-detail-grid.reverse { direction: rtl; }
.program-detail-grid.reverse > * { direction: ltr; }
.program-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.program-image img { width: 100%; height: 380px; object-fit: cover; }
.program-number {
  font-family: 'Lora', serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--light-gray);
  line-height: 1;
  margin-bottom: -10px;
}
.program-body h2 { margin-bottom: 12px; }
.program-body p { color: var(--text-body); }
.program-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.program-tag {
  font-size: .78rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--light-gray);
  color: var(--primary);
}

/* ---------- Quote Section ---------- */
.quote-section {
  background: var(--primary);
  padding: 80px 0;
  text-align: center;
}
.quote-text {
  font-family: 'Lora', serif;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  color: var(--white);
  max-width: 800px;
  margin: 0 auto 20px;
  font-style: italic;
  line-height: 1.5;
}
.quote-author {
  font-size: .9rem;
  color: rgba(255,255,255,.7);
  font-weight: 500;
}

/* ---------- CTA Banner ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--text-dark) 0%, var(--primary-dark) 100%);
  padding: 80px 0;
  text-align: center;
}
.cta-banner h2 { color: var(--white); margin-bottom: 14px; }
.cta-banner p { color: rgba(255,255,255,.75); font-size: 1.05rem; max-width: 560px; margin: 0 auto 32px; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Values Cards ---------- */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.value-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.value-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.value-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius);
  background: var(--light-gray);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  color: var(--primary);
}
.value-icon svg { width: 26px; height: 26px; }
.value-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.value-card p { font-size: .9rem; color: var(--text-muted); }

/* ---------- Team Grid ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.team-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}
.team-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.team-photo {
  height: 220px;
  overflow: hidden;
  background: var(--light-gray);
  display: flex; align-items: center; justify-content: center;
}
.team-photo img { width: 100%; height: 100%; object-fit: cover; }
.team-info { padding: 22px 20px; }
.team-info h3 { font-size: 1.05rem; margin-bottom: 4px; }
.team-role {
  font-size: .82rem;
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 8px;
  display: block;
}
.team-info p { font-size: .85rem; color: var(--text-muted); }

/* ---------- News Grid ---------- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.news-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.news-img { height: 200px; overflow: hidden; }
.news-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.news-card:hover .news-img img { transform: scale(1.04); }
.news-body { padding: 22px; }
.news-meta { font-size: .78rem; color: var(--text-muted); margin-bottom: 8px; display: flex; gap: 12px; }
.news-body h3 { font-size: 1rem; margin-bottom: 8px; color: var(--text-dark); }
.news-body p { font-size: .88rem; color: var(--text-muted); margin-bottom: 12px; }

/* ---------- Finance Table ---------- */
.finance-table { width: 100%; border-collapse: collapse; margin-bottom: 40px; }
.finance-table th {
  background: var(--primary);
  color: var(--white);
  padding: 12px 16px;
  text-align: left;
  font-size: .88rem;
  font-weight: 600;
}
.finance-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: .9rem; }
.finance-table tr:last-child td { border-bottom: none; }
.finance-table tr:nth-child(even) td { background: var(--off-white); }
.finance-table .total td { font-weight: 700; color: var(--text-dark); background: var(--light-gray); }

/* ---------- Contact Form ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Poppins', sans-serif;
  font-size: .9rem;
  color: var(--text-body);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,95,122,.1);
}
.form-group textarea { resize: vertical; min-height: 130px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-success {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: .9rem;
  margin-top: 16px;
  display: none;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--text-dark);
  color: rgba(255,255,255,.7);
  padding: 64px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1.2fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand .logo { margin-bottom: 16px; }
.footer-brand p { font-size: .88rem; line-height: 1.65; }
.footer-col h4 {
  color: var(--white);
  font-family: 'Poppins', sans-serif;
  font-size: .88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 18px;
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
  color: rgba(255,255,255,.65);
  font-size: .88rem;
  transition: color var(--transition);
}
.footer-col ul li a:hover { color: var(--accent-light); }
.footer-col address {
  font-style: normal;
  font-size: .88rem;
  line-height: 1.75;
  color: rgba(255,255,255,.65);
}
.footer-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 0;
  font-size: .82rem;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Accordion ---------- */
.accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}
.accordion-trigger {
  width: 100%;
  background: var(--white);
  border: none;
  padding: 18px 20px;
  text-align: left;
  font-family: 'Poppins', sans-serif;
  font-size: .95rem;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background var(--transition);
}
.accordion-trigger:hover { background: var(--off-white); }
.accordion-trigger::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--primary);
  transition: transform var(--transition);
  flex-shrink: 0;
}
.accordion-item.open .accordion-trigger::after { transform: rotate(45deg); }
.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease, padding .35s ease;
  background: var(--off-white);
}
.accordion-item.open .accordion-body { max-height: 400px; }
.accordion-body-inner { padding: 16px 20px 20px; font-size: .9rem; color: var(--text-body); }

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

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 16px 24px 24px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    gap: 4px;
    z-index: 99;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 10px 12px; font-size: .9rem; }
  .header-cta { display: none; }
  .header-cta.open { display: block; }
  .about-grid, .program-detail-grid, .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-grid.reverse, .program-detail-grid.reverse { direction: ltr; }
  .cards-grid, .values-grid, .team-grid, .news-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  :root { --header-h: 68px; }
  .section { padding: 60px 0; }
  .cards-grid, .values-grid, .team-grid, .news-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-content { padding: 80px 0 60px; }
  .hero-actions { flex-direction: column; }
  .cta-actions { flex-direction: column; align-items: center; }
  .form-row { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
