/* ============================================================
   SIHIRLI MATEMATİK — style.css
   ============================================================ */

:root {
  --hdr: 4rem;
  --ink: #0d0b1e;
  --ink-2: #3b3860;
  --cream: #f9f7f2;
  --gold: #c8a84b;
  --gold-light: #f0d98a;
  --teal: #0e9f8e;
  --violet: #5b4fcf;
  --white: #ffffff;
  --radius: 16px;
  --shadow: 0 20px 60px rgba(13,11,30,.12);
  --ff-display: 'Playfair Display', Georgia, serif;
  --ff-body: 'DM Sans', sans-serif;
  --ease: cubic-bezier(.4,0,.2,1);
}

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;1,400&family=DM+Sans:wght@300;400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--ff-body);
  background: var(--cream);
  color: var(--ink);
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: .45;
}
ul { list-style: none; }
a { text-decoration: none; color: inherit; }

/* ============================================================
   HEADER & NAV
   ============================================================ */
.header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 200;
  background: var(--ink);
  transition: background .3s var(--ease), box-shadow .3s var(--ease);
}
.header.scrolled {
  background: rgba(13,11,30,.96);
  backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 rgba(200,168,75,.25);
}
.nav {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 2rem;
  height: var(--hdr);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logo img { height: 46px; width: auto; display: block; }

.nav__list {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav__link {
  color: rgba(255,255,255,.78);
  font-size: .875rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: .3rem;
  position: relative;
  padding: .5rem 0;          /* üst/alt padding — hover alanını genişletir */
  transition: color .25s;
  cursor: pointer;
}
.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width .3s var(--ease);
}
.nav__link:hover { color: var(--white); }
.nav__link:hover::after { width: 100%; }

/* ── DROPDOWN ── */
.dropdown__item { position: relative; }

/*
  Boşluk sorununu çözen köprü:
  ::before pseudo-elementi nav__link ile menü arasındaki
  boşluğu görünmez şekilde kapatır — hover hiç kopmaz.
*/
.dropdown__item::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 1.5rem;           /* dropdown__menu'nün top offset'i kadar */
  background: transparent;
}

.dropdown__menu {
  position: absolute;
  top: calc(100% + 1.5rem); /* ::before yüksekliğiyle eşleşmeli */
  left: 0;
  min-width: 200px;
  background: rgba(13,11,30,.97);
  border: 1px solid rgba(200,168,75,.2);
  border-radius: 10px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.dropdown__item:hover .dropdown__menu {
  opacity: 1;
  pointer-events: initial;
  transform: translateY(0);
}

.dropdown__link {
  display: block;
  padding: .75rem 1.25rem;
  font-size: .82rem;
  letter-spacing: .03em;
  color: rgba(255,255,255,.75);
  transition: background .2s, color .2s;
}
.dropdown__link:hover {
  background: rgba(200,168,75,.12);
  color: var(--gold-light);
}

.dropdown__arrow {
  font-size: 1rem;
  transition: transform .3s;
}
.dropdown__item:hover .dropdown__arrow { transform: rotate(180deg); }

.nav__toggle {
  display: none;
  cursor: pointer;
  color: var(--white);
  font-size: 1.5rem;
  background: none;
  border: none;
}

/* ── MOBİL NAV ── */
@media (max-width: 900px) {
  .nav__toggle { display: block; }

  .nav__list {
    position: fixed;
    top: var(--hdr); left: 0;
    width: 100%;
    height: calc(100vh - var(--hdr));
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(13,11,30,.99);
    overflow-y: auto;
    padding: 1rem 0 3rem;
    transform: translateX(-100%);
    transition: transform .35s var(--ease);
    z-index: 150;
  }
  .nav__list.open { transform: translateX(0); }

  .nav__link {
    padding: 1rem 2rem;
    width: 100%;
    font-size: .95rem;
    border-bottom: 1px solid rgba(255,255,255,.06);
  }
  .nav__link::after { display: none; }

  /* Mobilde ::before köprüsü gerekmez */
  .dropdown__item::before { display: none; }

  .dropdown__menu {
    position: static;
    opacity: 1 !important;
    pointer-events: initial !important;
    transform: none !important;
    border: none;
    border-radius: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s ease;
  }
  .dropdown__item.is-open .dropdown__menu { max-height: 300px; }
  .dropdown__link { padding-left: 3rem; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--ink);
  padding-top: var(--hdr);
}

/* Gradient arka plan */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 70% 50%, rgba(91,79,207,.35) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 20% 60%, rgba(14,159,142,.2) 0%, transparent 65%),
    linear-gradient(160deg, #0d0b1e 40%, #1a1440);
}

/* Parlayan top */
.hero::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(200,168,75,.1);
  top: -60px; right: 6%;
  filter: blur(80px);
  animation: float 9s ease-in-out infinite alternate;
}

@keyframes float {
  from { transform: translateY(0); }
  to   { transform: translateY(-28px); }
}

.hero__container {
  position: relative;
  z-index: 2;
  max-width: 680px;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 2rem;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(200,168,75,.15);
  border: 1px solid rgba(200,168,75,.35);
  border-radius: 100px;
  padding: .4rem 1.1rem;
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1.5rem;
}

.hero__title {
  font-family: var(--ff-display);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.08;
  letter-spacing: -.02em;
  margin-bottom: 1.5rem;
}

.hero__description {
  font-size: 1.1rem;
  line-height: 1.75;
  color: rgba(255,255,255,.6);
  max-width: 520px;
  margin-bottom: 2.5rem;
}

.hero__buttons {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── BUTONLAR ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  border-radius: 12px;
  padding: .9rem 2rem;
  font-family: var(--ff-body);
  font-size: .95rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform .25s, box-shadow .25s, background .25s;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--violet), var(--teal));
  color: var(--white);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(91,79,207,.4);
}

.btn-secondary {
  background: transparent;
  color: rgba(255,255,255,.8);
  border: 1.5px solid rgba(255,255,255,.2);
}
.btn-secondary:hover {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.4);
  color: var(--white);
  transform: translateY(-2px);
}

/* ============================================================
   BÖLÜM ORTAK
   ============================================================ */
.section { padding: 6rem 0; }

.section__title {
  font-family: var(--ff-display);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: var(--ink);
  text-align: center;
  margin-bottom: 3rem;
  letter-spacing: -.01em;
}

/* ============================================================
   FEATURES
   ============================================================ */
.features { background: var(--white); }

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.feature__card {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.feature__card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.feature__card i {
  font-size: 2.2rem;
  color: var(--violet);
  margin-bottom: 1.2rem;
  display: block;
}

.feature__card h3 {
  font-family: var(--ff-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: .6rem;
}

.feature__card p {
  font-size: .9rem;
  color: var(--ink-2);
  line-height: 1.65;
}

/* ============================================================
   PROGRAMS
   ============================================================ */
.programs { background: var(--cream); }

.programs__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.program__card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  border: 1.5px solid rgba(13,11,30,.07);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.program__card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: var(--violet);
}

.program__card h3 {
  font-family: var(--ff-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--violet);
  margin-bottom: .75rem;
}

.program__card p {
  font-size: .9rem;
  color: var(--ink-2);
  line-height: 1.65;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--ink);
  color: rgba(255,255,255,.7);
  padding: 5rem 2rem 0;
  position: relative;
  overflow: hidden;
}
.footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.footer__container {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 4rem;
}

.footer__logo { height: 50px; width: auto; margin-bottom: 1.25rem; display: block; }

.footer__brand p {
  font-size: .9rem;
  line-height: 1.75;
  max-width: 320px;
  color: rgba(255,255,255,.55);
}

.footer h4 {
  color: var(--white);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.footer__links li,
.footer__contact li { margin-bottom: .7rem; }

.footer__links a {
  color: rgba(255,255,255,.55);
  font-size: .9rem;
  transition: color .2s, padding-left .2s;
}
.footer__links a:hover { color: var(--gold-light); padding-left: .35rem; }

.footer__contact li {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .9rem;
  color: rgba(255,255,255,.55);
}
.footer__contact i { color: var(--gold); font-size: 1rem; }

.footer__social { display: flex; gap: .75rem; margin-top: 1.5rem; }
.footer__social a {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(200,168,75,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  color: rgba(255,255,255,.65);
  transition: background .25s, color .25s, border-color .25s, transform .25s;
}
.footer__social a:hover {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
  transform: translateY(-3px);
}

.footer__bottom {
  max-width: 1240px;
  margin: 3.5rem auto 0;
  border-top: 1px solid rgba(255,255,255,.07);
  padding: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .8rem;
  color: rgba(255,255,255,.3);
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
[data-reveal].visible { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .footer__container { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
  .footer__brand { grid-column: span 2; }
}

@media (max-width: 768px) {
  .features__grid,
  .programs__grid { grid-template-columns: 1fr; }
  .hero__title { font-size: clamp(2.2rem, 8vw, 3.2rem); }
}

@media (max-width: 680px) {
  .footer__container { grid-template-columns: 1fr; gap: 2rem; }
  .footer__brand { grid-column: auto; }
  .footer__bottom { flex-direction: column; gap: .5rem; text-align: center; }
  .hero__buttons { flex-direction: column; align-items: flex-start; }
}