/* TUM bilesenlerin media query'leri (980px / 640px / 420px) + visually-hidden */

@media (max-width: 980px) {
  header {
    position: static;
  }

  .topbar {
    align-items: center;
  }

  nav {
    justify-content: center;
  }

  .hero,
  .split,
  .focus-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 3rem;
  }

  .hero-visual {
    min-height: 430px;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .news-showcase {
    grid-template-columns: 1fr;
  }

  .news-sidebar {
    padding-left: 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(16, 24, 40, 0.16);
    border-left: 0;
  }

  .impact-hero-row {
    grid-template-columns: 1fr;
  }

  .impact-stats-panel {
    grid-template-columns: 1fr;
  }

  .impact-highlight {
    min-height: auto;
  }

  .impact-newspaper {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .impact-newspaper article:nth-child(odd) {
    border-left: 0;
  }

  .impact-newspaper article:nth-child(n + 3) {
    border-top: 1px solid rgba(16, 24, 40, 0.18);
  }

  .member-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 720px;
  }

  .member-card,
  .member-card:nth-child(4),
  .member-card:nth-child(5) {
    grid-column: auto;
  }

  .cta-panel {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  header {
    position: sticky;
  }

  .topbar {
    min-height: 64px;
    padding: 0.8rem 4.4rem 0.8rem 1rem;
  }

  .brand {
    align-items: center;
  }

  .brand-title {
    max-width: 100%;
    font-size: clamp(1.15rem, 5.2vw, 1.55rem);
    line-height: 1.15;
  }

  .menu-toggle {
    position: absolute;
    right: 1rem;
    display: inline-flex;
  }

  nav {
    display: none;
    max-height: calc(100vh - 64px);
    width: 100%;
    padding: 0.75rem 1rem 1rem;
    overflow-y: auto;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.98);
  }

  nav.is-open {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 0.35rem;
  }

  nav a,
  nav .dropbtn {
    width: 100%;
    justify-content: flex-start;
  }

  nav .dropdown {
    width: 100%;
    margin-left: 0;
  }

  nav .dropdown::before {
    display: none !important;
  }

  nav .dropbtn {
    justify-content: space-between;
  }

  nav .dropbtn::after {
    transition: transform 0.2s ease;
  }

  nav .dropdown.is-open .dropbtn::after {
    transform: translateY(1px) rotate(225deg);
  }

  nav .dropdown-content {
    display: none;
    position: static;
    width: 100%;
    margin: 0.15rem 0 0.4rem;
    padding: 0.35rem;
    border-color: #edf2f7;
    background: #f8fafc;
    box-shadow: none;
  }

  nav .dropdown:hover .dropdown-content,
  nav .dropdown:focus-within .dropdown-content {
    display: none;
  }

  nav .dropdown.is-open .dropdown-content {
    display: block;
  }

  nav .dropdown-content a {
    padding-left: 1rem;
  }

  .nav-badge,
  .nav-volunteer {
    justify-content: center;
  }

  .hero-visual {
    min-height: 360px;
  }

  .visual-panel.large {
    inset: 0 0 18% 0;
  }

  .visual-panel.small {
    width: 58%;
    height: 32%;
    border-width: 6px;
  }

  .metric-strip {
    left: 0;
    bottom: 2rem;
    grid-template-columns: 1fr;
    width: 62%;
  }

  .metric {
    padding: 0.55rem;
  }

  .spotlight {
    padding-top: 1.5rem;
  }

  .news-main h3 {
    font-size: clamp(2.15rem, 12vw, 3.25rem);
  }

  .news-main img {
    aspect-ratio: 1.18 / 1;
  }

  .impact-visual {
    height: 400px;
    min-height: 0;
  }

  .impact-copy {
    right: 1.1rem;
    left: 1.1rem;
    bottom: 3.1rem;
  }

  /* h3 boyutu artık tek yerden, kart genişliğine göre yönetiliyor
     (bkz. .impact-copy h3) — burada ayrı bir override tutulmuyor */

  .impact-updates-head {
    align-items: start;
    flex-direction: column;
  }

  .impact-tabs {
    justify-content: flex-start;
  }

  .impact-stat-grid {
    grid-template-columns: 1fr;
  }

  .impact-stat {
    grid-column: auto;
    min-height: 0;
  }

  .impact-dots {
    right: auto;
    left: 1.1rem;
    bottom: 1.2rem;
  }

  .impact-newspaper {
    grid-template-columns: 1fr;
  }

  .impact-newspaper article,
  .impact-newspaper article:nth-child(odd) {
    border-left: 0;
  }

  .impact-newspaper article + article,
  .impact-newspaper article:nth-child(n + 3) {
    border-top: 1px solid rgba(16, 24, 40, 0.18);
  }

  .member-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .member-grid {
    grid-template-columns: 1fr;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
