@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;600;700;800;900&display=swap');

:root {
  --sand: #E9E2D8;
  --off-white: #F8F5F1;
  --blue: #7FA8B8;
  --blue-soft: #A8C3CC;
  --green: #8FAF7A;
  --text: #25313A;
  --text-muted: #68706D;
  --white: #FFFFFF;
  --border: rgba(37, 49, 58, 0.14);
  --shadow-soft: 0 22px 52px rgba(37, 49, 58, 0.14);
  --shadow-card: 0 14px 34px rgba(37, 49, 58, 0.11);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --container: 1160px;
  --header-height: 120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  direction: rtl;
  font-family: "Rubik", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 0%, rgba(127, 168, 184, 0.24), transparent 28%),
    radial-gradient(circle at 92% 10%, rgba(143, 175, 122, 0.18), transparent 30%),
    linear-gradient(180deg, var(--off-white) 0%, var(--sand) 100%);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  background: rgba(248, 245, 241, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.navbar {
  width: min(var(--container), calc(100% - 40px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: max-content;
  color: var(--text);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.brand-logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
}

.brand-text {
  font-size: 1.45rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.96rem;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(127, 168, 184, 0.25);
  color: #335C6C;
}

.home-main,
.page-main {
  width: min(var(--container), calc(100% - 40px));
  flex: 1;
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - var(--header-height) - 58px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  padding: 28px 0 24px;
}

.hero-kicker,
.section-kicker {
  margin: 0 0 10px;
  color: #5D7F8E;
  font-size: clamp(0.92rem, 1.1vw, 1.08rem);
  font-weight: 900;
}

.hero-title {
  max-width: 1040px;
  margin: 0 auto 14px;
  font-size: clamp(2.05rem, 3.9vw, 4rem);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.045em;
}

.hero-subtitle {
  max-width: 760px;
  margin: 0 auto 24px;
  color: var(--text-muted);
  font-size: clamp(0.98rem, 1.25vw, 1.16rem);
  line-height: 1.55;
  font-weight: 600;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 24px;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
}

.topic-card,
.learning-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--off-white);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(255,255,255,0.62);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.topic-card:hover,
.learning-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-soft);
}

.topic-card {
  height: 245px;
  min-height: 245px;
  isolation: isolate;
}

.topic-card-bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topic-card-overlay {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(37,49,58,0.08), rgba(37,49,58,0.56)),
    linear-gradient(90deg, rgba(127,168,184,0.34), rgba(143,175,122,0.16));
}

.topic-card-content {
  height: 100%;
  padding: 26px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  text-align: right;
  color: var(--white);
}

.topic-icon {
  width: 54px;
  height: 54px;
  margin-bottom: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(248,245,241,0.26);
  backdrop-filter: blur(10px);
  font-size: 1.45rem;
  color: var(--white);
}

.topic-card h2 {
  margin: 0 0 7px;
  font-size: clamp(1.45rem, 2vw, 2.1rem);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.topic-card p {
  margin: 0;
  color: rgba(255,255,255,0.88);
  font-weight: 600;
  line-height: 1.45;
}

.compact-page {
  padding: 30px 0 56px;
}

.page-intro {
  text-align: center;
  max-width: 880px;
  margin: 0 auto 28px;
}

.page-intro h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(2rem, 3.2vw, 3.3rem);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.page-intro p {
  max-width: 740px;
  margin: 14px auto 0;
  color: var(--text-muted);
  font-size: clamp(0.98rem, 1.25vw, 1.14rem);
  line-height: 1.58;
  font-weight: 600;
}

.external-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(143, 175, 122, 0.22);
  color: #526D44;
  font-size: 0.92rem;
  font-weight: 800;
}

.learning-grid,
.course-grid {
  display: grid;
  grid-template-columns: repeat(var(--cards-count, 4), minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
}

.learning-card {
  display: flex;
  flex-direction: column;
  min-height: 360px;
}

.learning-card img {
  width: 100%;
  height: 225px;
  object-fit: cover;
  background: var(--blue-soft);
}
.learning-card-body {
  flex: 1;
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  background: rgba(248, 245, 241, 0.95);
}

.learning-card-body span {
  display: inline-block;
  margin-bottom: 2px;
  color: #5D7F8E;
  font-size: 0.92rem;
  font-weight: 900;
}

.learning-card-body h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.28rem, 1.7vw, 1.74rem);
  line-height: 1.18;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.learning-card-body p {
  max-width: 92%;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.96rem;
  line-height: 1.45;
  font-weight: 600;
}

.learning-card-body strong {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  margin-top: 6px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(143, 175, 122, 0.25);
  color: #526D44;
  font-size: 1.2rem;
}

.site-footer {
  padding: 20px;
  text-align: center;
  margin-top: auto;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 700;
  border-top: 1px solid var(--border);
  background: rgba(248, 245, 241, 0.62);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(37, 49, 58, 0.42);
  backdrop-filter: blur(8px);
  overflow: auto;
}

.modal-overlay.is-open { display: flex; }

.about-modal {
  width: min(1040px, 94vw);
  max-height: 88vh;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--off-white);
  box-shadow: 0 28px 80px rgba(37, 49, 58, 0.28);
}

.about-modal-header {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 28px;
  background: rgba(248, 245, 241, 0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.about-modal-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.modal-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(168, 195, 204, 0.32);
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 900;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.modal-close:hover {
  background: rgba(143, 175, 122, 0.34);
}

.about-modal-body {
  max-height: calc(88vh - 80px);
  overflow-y: auto;
  padding: 26px 28px 30px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 26px;
}

.about-info,
.team-card {
  background: rgba(255,255,255,0.44);
  border: 1px solid rgba(37,49,58,0.10);
  border-radius: var(--radius-lg);
}

.about-info {
  padding: 28px;
  text-align: right;
}

.about-info h3,
.team-panel-title {
  margin: 0 0 20px;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.about-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.about-list div {
  display: grid;
  grid-template-columns: 126px 1fr;
  gap: 14px;
  align-items: start;
}

.about-list dt {
  color: var(--text-muted);
  font-weight: 800;
}

.about-list dd {
  margin: 0;
  color: var(--text);
  font-weight: 600;
  line-height: 1.45;
}

.about-list a,
.team-card a {
  color: #526D44;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.logo-strip {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
}

.logo-strip img {
  width: auto;
  height: auto;
  max-width: 145px;
  max-height: 58px;
  object-fit: contain;
  padding: 12px 16px;
  border-radius: 18px;
  background: rgba(168, 195, 204, 0.24);
}

.team-panel { display: grid; align-content: start; gap: 16px; }

.team-card {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 16px;
  align-items: center;
  padding: 16px;
  text-align: right;
}

.team-card img {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(168, 195, 204, 0.32);
}

.team-card h3 {
  margin: 0 0 5px;
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 900;
}

.team-card a {
  font-size: 0.92rem;
  line-height: 1.35;
  word-break: break-word;
}

@media (max-width: 1050px) {
  .learning-grid.three-cards { grid-template-columns: repeat(2, minmax(260px, 1fr)); }
  .learning-card img { height: 205px; }
}

@media (max-width: 900px) {
  :root { --header-height: auto; }
  .site-header { height: auto; }
  .navbar {
    width: min(var(--container), calc(100% - 28px));
    padding: 13px 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .nav-links {
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 4px;
  }
  .home-main,
  .page-main { width: min(var(--container), calc(100% - 28px)); }
  .hero { min-height: auto; padding: 30px 0 36px; }
  .hero-title { font-size: clamp(2rem, 8.3vw, 3.55rem); }
  .topic-grid,
  .learning-grid,
  .learning-grid.three-cards { grid-template-columns: 1fr; max-width: 720px; }
  .topic-card { height: 205px; min-height: 205px; }
  .learning-card { min-height: auto; }
  .about-modal-body { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .brand-logo { width: 38px; height: 38px; }
  .brand-text { font-size: 1.25rem; }
  .nav-link { font-size: 0.88rem; padding: 8px 10px; }
  .hero-title { font-size: clamp(1.76rem, 10vw, 2.76rem); }
  .hero-subtitle { font-size: 0.95rem; }
  .topic-card { height: 178px; min-height: 178px; border-radius: 22px; }
  .topic-card-content { padding: 20px; }
  .topic-icon { width: 46px; height: 46px; margin-bottom: 12px; }
  .topic-card h2 { font-size: 1.34rem; }
  .topic-card p { font-size: 0.92rem; }
  .compact-page { padding-top: 24px; }
  .learning-card { border-radius: 22px; }
  .learning-card img { height: 158px; }
  .learning-card-body { padding: 18px; }
  .learning-card-body h2 { font-size: 1.22rem; }
  .about-modal { width: 100%; max-height: 94vh; border-radius: 20px; }
  .modal-overlay { padding: 12px; align-items: flex-start; }
  .about-modal-header { padding: 18px; }
  .about-modal-header h2 { font-size: 1.25rem; }
  .about-modal-body { padding: 18px; max-height: calc(94vh - 74px); }
  .about-info { padding: 20px; }
  .about-list div { grid-template-columns: 1fr; gap: 4px; padding-bottom: 10px; border-bottom: 1px solid rgba(37,49,58,0.08); }
  .team-card { grid-template-columns: 58px 1fr; gap: 12px; padding: 14px; }
  .team-card img { width: 58px; height: 58px; }
  .team-card a { font-size: 0.84rem; }
}
