/* TIPKOD — Responsive Overrides */

/* ---- Admin bar: mobilde fixed değil, scroll ediyor — offset sıfırla ---- */
@media screen and (max-width: 782px) {
  .admin-bar .tk-nav {
    top: 0 !important;
  }
  .admin-bar .tk-nav-links {
    top: 66px !important;
  }
}

/* ---- Hamburger (hidden on desktop) ---- */
.tk-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
}
.tk-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #E8EBF0;
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.tk-hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.tk-hamburger.is-open span:nth-child(2) { opacity: 0; }
.tk-hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Tablet (≤ 900px): 3-col → 2-col ---- */
@media (max-width: 900px) {
  .tk-services-grid,
  .tk-projects-grid,
  .tk-ai-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* ---- Projects page ---- */
@media (max-width: 640px) {
  .tk-proj-page-main {
    padding-top: 100px !important;
    padding-bottom: 60px !important;
  }
  .tk-proj-page-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ---- Large mobile (≤ 768px): hero stacks ---- */
@media (max-width: 768px) {
  .tk-hero-grid {
    grid-template-columns: 1fr !important;
  }
  .tk-hero-terminal {
    display: none !important;
  }
}

/* ---- Mobile (≤ 640px) ---- */
@media (max-width: 640px) {
  /* Navbar: show burger, hide links */
  .tk-hamburger {
    display: flex !important;
  }
  .tk-nav-links {
    display: none !important;
    flex-direction: column;
    align-items: flex-start;
    position: fixed;
    top: calc(var(--wp-admin-bar-height, 0px) + 66px);
    left: 0;
    right: 0;
    background: rgba(10, 13, 20, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 28px 24px 36px;
    gap: 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 99;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  }
  .tk-nav-links.is-open {
    display: flex !important;
  }
  /* Make CTA link full width on mobile nav */
  .tk-nav-links a:last-of-type {
    width: 100%;
    justify-content: center;
  }

  /* About */
  .tk-about-grid {
    grid-template-columns: 1fr !important;
  }

  /* Services → 1 col */
  .tk-services-grid {
    grid-template-columns: 1fr !important;
  }

  /* Projects → 1 col */
  .tk-projects-grid {
    grid-template-columns: 1fr !important;
  }

  /* AI pipeline: vertical stack */
  .tk-pipeline {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .tk-pipeline > span {
    display: none !important;
  }

  /* AI features → 1 col */
  .tk-ai-grid {
    grid-template-columns: 1fr !important;
  }

  /* Contact → 1 col */
  .tk-contact-grid {
    grid-template-columns: 1fr !important;
  }

  /* Reduce vertical section padding */
  #top    { padding-top: 100px !important; padding-bottom: 60px !important; }
  #about, #services, #work, #contact {
    padding-top: 60px !important;
    padding-bottom: 60px !important;
  }
}
