:root {
  /* Light medical green background */
  --bg: #f0fdf4;  /* emerald 50 */
  --bg-2: #ecfdf5; /* teal/emerald 50 */
  --card: #ffffff;
  --muted: #6b7280;
  --text: #0f172a;
  --brand: #10b981;       /* emerald 500 */
  --brand-dark: #047857;  /* emerald 700 */
  --brand-light: #ecfdf5; /* emerald 50 */
  --accent: var(--brand);
  --accent-2: #059669;    /* emerald 600 */
  --secondary: #84cc16;   /* lime 500 */
  --border: #e5e7eb;
  --shadow: 0 8px 24px rgba(2, 44, 51, 0.08);
}

html, body {
  padding: 0;
  margin: 0;
  background: radial-gradient(1200px 800px at 80% -10%, var(--bg-2), var(--bg));
  color: var(--text);
  font-family: "Cairo", "Tajawal", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.6; /* compact */
  position: relative;
}

/* علامة مائية للشعار */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('images/logo.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.05;
  z-index: -1;
  pointer-events: none;
}

.container {
  max-width: 1100px;
  padding: .5rem; /* more compact */
  margin-inline: auto;
}

.site-header {
  background: linear-gradient(135deg, rgba(16,185,129,0.18), rgba(4,120,87,0.18));
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.lang-switch { text-align: right; }
.lang-switch a {
  display: inline-block;
  padding: .25rem .6rem;
  border: 1px solid var(--border);
  border-radius: .375rem;
  background: #fff;
  color: var(--brand-dark);
  text-decoration: none;
  font-weight: 600;
}
html[dir="rtl"] .lang-switch { text-align: left; }
.site-header .container { padding-top: .4rem; padding-bottom: .4rem; }

.brand { display: flex; align-items: center; gap: .75rem; }
.brand img { height: 96px; width: auto; display: block; }
.brand-text { font-weight: 700; color: var(--brand-dark); font-size: 1.05rem; }

.site-title {
  margin: 0; /* compact */
  font-weight: 700;
  letter-spacing: .2px;
  font-size: 1.3rem; /* smaller */
}

.site-subtitle {
  margin: .05rem 0 0 0; /* tighter */
  color: var(--accent);
  font-weight: 600;
}

.site-date {
  margin: .15rem 0 0 0; /* tighter */
  color: var(--muted);
}

.section-title {
  margin: .75rem 0 .35rem 0; /* tighter */
  font-size: 1.1rem;
  border-inline-start: 4px solid var(--secondary);
  padding-inline-start: .6rem;
}

.muted { color: var(--muted); }

.day-tabs {
  display: flex;
  gap: .5rem;
  margin: .5rem 0 .5rem 0; /* compact */
}

.day-tab {
  appearance: none;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  padding: .35rem .75rem; /* compact */
  border-radius: .5rem;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}

.day-tab:hover { border-color: var(--accent); }
.day-tab.active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: linear-gradient(180deg, #ffffff, var(--brand-light)); }

.day-panel { display: none; }
.day-panel.active { display: block; }

.agenda-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: .75rem;
  overflow: hidden;
  /* subtle 3D look */
  box-shadow:
    0 10px 28px rgba(2, 44, 51, 0.14),
    0 4px 10px rgba(2, 44, 51, 0.10);
  position: relative;
  transition: box-shadow .2s ease, transform .2s ease;
}

.agenda-table thead th {
  text-align: start;
  background: linear-gradient(180deg, rgba(4,120,87,0.40) 0%, rgba(16,185,129,0.22) 60%, rgba(16,185,129,0.18) 100%);
  color: #073c32;
  font-weight: 700;
  border-bottom: 1px solid rgba(4,120,87,0.35);
}

/* top subtle highlight to enhance depth */
.agenda-table::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: .75rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

/* stronger elevation on hover */
.agenda-table:hover {
  transform: translateY(-1px);
  box-shadow:
    0 16px 40px rgba(2, 44, 51, 0.18),
    0 8px 16px rgba(2, 44, 51, 0.12);
}

.agenda-table th, .agenda-table td {
  padding: .5rem .6rem; /* more compact */
  border-bottom: 1px solid var(--border);
}

.agenda-table tbody tr:last-child td { border-bottom: none; }

.agenda-table tbody tr:hover { background: var(--brand-light); }

.agenda-table .time { white-space: nowrap; color: var(--brand-dark); font-variant-numeric: tabular-nums; font-weight: 600; }
.agenda-table .title { color: #0b3b3a; }
.agenda-table .speakers { color: #0f172a; }
.agenda-table .room { color: #0f3d3c; }

.speaker-cell { display: inline-flex; align-items: center; gap: .6rem; }
.speaker-img {
  width: 72px;
  height: 72px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  display: block;
  border: 2px solid rgba(16,185,129,0.35);
  background: #222;
  cursor: zoom-in;
}

/* Image lightbox modal */
.image-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.image-modal.open { display: flex; }

.image-modal img {
  max-width: 50vw;
  max-height: 55vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  border: 4px solid #ffffff;
}

.image-modal .backdrop { position: absolute; inset: 0; }
.image-modal .content { position: relative; cursor: zoom-out; max-width: 70vw; }
.image-modal .caption { 
  margin-top: .75rem;
  color: #fff;
  text-align: start;
  font-size: .98rem;
  line-height: 1.6;
  max-width: 70vw;
  max-height: 42vh;
  overflow: auto;
  white-space: pre-wrap;
}

.image-modal .close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
  border: 1px solid rgba(255,255,255,0.25);
  cursor: pointer;
}

.image-modal .close:hover { background: rgba(0,0,0,0.8); }
.image-modal .close:focus { outline: 2px solid #fff; outline-offset: 2px; }

/* Horizontal layout on large screens */
@media (min-width: 992px) {
  .image-modal .content { 
    display: flex; 
    align-items: flex-start; 
    gap: 1.25rem; 
    max-width: 80vw; 
  }
  .image-modal img { 
    max-width: 38vw; 
    max-height: 70vh; 
  }
  .image-modal .caption { 
    margin-top: 0; 
    max-width: 40vw; 
    max-height: 70vh; 
  }
}

.speaker-meta { color: var(--muted); font-size: .9em; }

.notes { display: grid; grid-template-columns: max-content 1fr; align-items: center; column-gap: .75rem; }
.notes .section-title { margin: 0; }
.notes ul { margin: 0; padding-inline-start: 1rem; }
.notes li { margin: .15rem 0; color: var(--muted); }

.site-footer {
  margin-top: .5rem; /* tighter */
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}

@media (max-width: 720px) {
  .agenda-table th:nth-child(4),
  .agenda-table td:nth-child(4) { display: none; }
}

@media print {
  :root { --bg: #ffffff; --text: #111827; --card: #ffffff; --border: #e5e7eb; --muted: #4b5563; }
  html, body { background: #ffffff; color: #111827; }
  .site-header, .site-footer, .day-tabs { display: none !important; }
  .container { max-width: none; padding: 0; }
  .agenda-table { box-shadow: none; }
  .section-title { border-color: #111827; }
}


