/* Dr. Amr Attia - Cardiothoracic Surgery Bilingual Web App Styles (v7) */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #0b2545;
  --primary-light: #134074;
  --accent: #008080;
  --accent-hover: #006666;
  --gold: #c59b27;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --shadow-sm: 0 2px 8px rgba(11, 37, 69, 0.06);
  --shadow-md: 0 12px 30px rgba(11, 37, 69, 0.12);
  --radius: 16px;
  --transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Cairo', 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.75;
  overflow-x: hidden;
}

html[lang="en"] body {
  font-family: 'Plus Jakarta Sans', 'Cairo', sans-serif;
}

/* 2-Tier Site Header */
.site-header {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-top-bar {
  background: var(--primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.42rem 1.25rem;
}

.top-bar-inner {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
}

.install-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.9rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.install-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff !important;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.8rem;
  transition: var(--transition);
  white-space: nowrap;
}

.lang-switch:hover {
  background: #fff;
  color: var(--primary) !important;
  transform: translateY(-1px);
}

.header-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  object-fit: contain;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.25;
  white-space: nowrap;
}

.brand-subtitle {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
  line-height: 1.35;
}

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.nav-menu a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 600;
  font-size: 0.86rem;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a.active {
  background-color: rgba(0, 128, 128, 0.12);
  color: var(--accent);
}

.nav-menu a.nav-highlight {
  background: rgba(197, 155, 39, 0.12);
  color: #8a6910;
  border: 1px solid rgba(197, 155, 39, 0.35);
}

.nav-menu a.nav-highlight.active,
.nav-menu a.nav-highlight:hover {
  background: var(--gold);
  color: #fff;
}

.mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.42rem 0.75rem;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--primary);
  flex-shrink: 0;
}

/* Hero Sections */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 65%, var(--accent) 100%);
  color: #fff;
  padding: 4rem 1.5rem;
  position: relative;
  overflow: hidden;
}

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

.hero-split {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  align-items: center;
  gap: 2.5rem;
}

.hero-inner {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 0.35rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(1.85rem, 4vw, 2.85rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

.hero p {
  font-size: 1.08rem;
  opacity: 0.94;
  margin-bottom: 1.75rem;
}

.hero-photo-wrap {
  display: flex;
  justify-content: center;
}

.hero-photo {
  width: 100%;
  max-width: 340px;
  border-radius: 22px;
  border: 4px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28);
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}

.btn-group {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.hero-centered .btn-group {
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.45rem;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-family: inherit;
  font-size: 0.94rem;
  transition: var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 128, 128, 0.3);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.btn-outline:hover {
  background: #fff;
  color: var(--primary);
}

.btn-dark {
  background: var(--primary);
  color: #fff;
}

.btn-dark:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

.btn-danger {
  background: #fee2e2;
  color: #b91c1c;
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
  border-radius: 8px;
}

.btn-danger:hover {
  background: #fecaca;
}

/* Main Container & Cards */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-header h2 {
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  color: var(--primary);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(0, 128, 128, 0.35);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(0, 128, 128, 0.1);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.card h3 {
  color: var(--primary);
  font-size: 1.2rem;
  margin-bottom: 0.85rem;
  font-weight: 700;
}

.card ul {
  padding-inline-start: 1.25rem;
  color: var(--text-dark);
}

.card li {
  margin-bottom: 0.5rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 2rem;
  align-items: center;
}

.anchor-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.anchor-pill {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  color: var(--primary);
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.anchor-pill:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Accordion */
.accordion-item {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.accordion-header {
  width: 100%;
  background: var(--bg-white);
  border: none;
  padding: 1.25rem 1.5rem;
  text-align: start;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

.accordion-header:hover {
  background: #f1f5f9;
}

.accordion-icon {
  font-size: 1.25rem;
  color: var(--accent);
  transition: transform 0.3s ease;
}

.accordion-item.open .accordion-icon {
  transform: rotate(45deg);
}

.accordion-body {
  display: none;
  padding: 0 1.5rem 1.5rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

.accordion-item.open .accordion-body {
  display: block;
}

.accordion-body ul {
  padding-inline-start: 1.3rem;
}

.accordion-body li {
  margin-bottom: 0.55rem;
}

/* Valvular Surgery INR Callout Box inside After-Surgery Accordion */
.valvular-inr-callout {
  margin-top: 1.25rem;
  padding: 1.15rem 1.25rem;
  border-radius: 12px;
  background: linear-gradient(to left, #f0fdfa, #f8fafc);
  border: 1px solid rgba(0, 128, 128, 0.3);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

html[lang="en"] .valvular-inr-callout {
  background: linear-gradient(to right, #f0fdfa, #f8fafc);
}

/* Forms */
.form-card {
  max-width: 680px;
  margin: 0 auto;
  background: var(--bg-white);
  padding: 2.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 1.15rem;
}

.form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--primary);
  font-size: 0.95rem;
}

.form-control {
  width: 100%;
  padding: 0.72rem 0.95rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 128, 128, 0.15);
}

/* INR Tracker Specific Styles */
.inr-layout {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 1.75rem;
  align-items: start;
}

.inr-status-box {
  padding: 1.15rem;
  border-radius: 12px;
  margin-top: 1.25rem;
  font-weight: 600;
  border: 1px solid transparent;
  display: none;
}

.inr-status-box.show {
  display: block;
}

.status-therapeutic {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

.status-low {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}

.status-high {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.badge-ok { background: #d1fae5; color: #065f46; }
.badge-low { background: #fef3c7; color: #92400e; }
.badge-high { background: #fee2e2; color: #991b1b; }

.inr-table-wrap {
  overflow-x: auto;
  margin-top: 1rem;
}

.inr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.inr-table th,
.inr-table td {
  padding: 0.75rem 0.85rem;
  text-align: start;
  border-bottom: 1px solid var(--border-color);
}

.inr-table th {
  background: #f1f5f9;
  color: var(--primary);
  font-weight: 700;
}

.chart-box {
  width: 100%;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.schedule-banner {
  background: linear-gradient(to left, #f0fdfa, #ffffff);
  border-inline-start: 4px solid var(--accent);
  padding: 1rem 1.25rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

html[lang="en"] .schedule-banner {
  background: linear-gradient(to right, #f0fdfa, #ffffff);
}

.social-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
  margin-top: 1.25rem;
}

.social-btn {
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.social-btn:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease-out, transform 0.65s ease-out;
}

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

.site-footer {
  background: var(--primary);
  color: #fff;
  text-align: center;
  padding: 2.5rem 1.5rem;
  margin-top: 3rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

.copyright {
  font-size: 0.85rem;
  opacity: 0.8;
}

@media (max-width: 1120px) {
  .mobile-toggle {
    display: inline-block;
  }
  .top-bar-inner {
    justify-content: center;
  }
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
  }
  .nav-menu.open {
    display: flex;
  }
  .nav-menu li {
    width: 100%;
  }
  .nav-menu a {
    display: block;
    width: 100%;
  }
  .hero-split,
  .about-grid,
  .inr-layout {
    grid-template-columns: 1fr;
  }
  .hero-split {
    text-align: center;
  }
  .hero-split .btn-group {
    justify-content: center;
  }
}
