/* ==========================================================================
   layout.css
   - Global overflow safety + sticky footer base
   - Navbar layout (pill) + dropdown
   ========================================================================== */

/* 1) Global anti-overflow + sticky footer altyapısı */
html,
body {
  height: 100%;
  width: 100%;
  margin: 0;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

img,
svg,
video,
iframe {
  max-width: 100%;
  height: auto;
}

.page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1 0 auto;
}

/* 2) Navbar */
.nav-wrap {
  border-bottom: 1px solid rgba(11, 60, 93, 0.18);
  padding-bottom: 14px;

  /* Dropdown kırpılmasın + navbar üstte dursun */
  overflow: visible;
  position: relative;
  z-index: 99999;
}

.nav-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fff;
  border: 1px solid rgba(11, 60, 93, 0.12);
  border-radius: 999px;
  padding: 12px 16px;

  overflow: visible;
  position: relative;
  z-index: 99999;
}

/* 3) Brand / Logo */
.brand {
  padding-left: 6px;
  color: #111;
  display: flex;
  align-items: center;
}

.navbar-logo {
  height: 52px;
  width: auto;
  display: block;
}

/* 4) Menu Links */
.navbar-nav .nav-link {
  color: #222;
  font-weight: 600;
  border-radius: 999px;
  padding: 10px 14px;
  transition: color 120ms ease;
  letter-spacing: 0.1px;
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* underline pseudo-element tıklamayı engellemesin */
.navbar-nav .nav-link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 6px;
  height: 2px;
  background: rgba(11, 60, 93, 0.55);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  pointer-events: none;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
  transform: scaleX(1);
}

.navbar-nav .nav-link.active::after {
  background: var(--brand-blue);
}
/* =========================
   NAVBAR CTA (Desktop: İletişim)
   ========================= */

.nav-right{ display:flex; align-items:center; gap: 8px; }

.cta-btn{
  background: #0b1d36;
  color: #fff !important;
  text-decoration: none !important;

  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: .1px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 10px 22px rgba(0,0,0,.10);

  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.cta-btn:hover{
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 14px 28px rgba(0,0,0,.16);
}

.cta-btn:active{
  transform: translateY(0);
  box-shadow: 0 8px 18px rgba(0,0,0,.12);
}

/* İletişim sayfasındayken seçili görünüm */
.cta-btn.is-active{
  outline: 3px solid rgba(15, 36, 67, .18);
}


/* 5) Mobile hamburger */
.menu-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

/* 6) Dropdown (Classic / Şık) */
.nav-item.has-dropdown {
  position: relative;
}

.dropdown-menu-simple {
  list-style: none;
  margin: 0;
  padding: 6px;

  display: none;
  position: absolute;

  top: 100%;
  left: 0;
  margin-top: 10px;

  min-width: 240px;
  background: #fff;

  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;

  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.05);

  z-index: 999999;
  pointer-events: auto;

  opacity: 0;
  transform: translateY(4px);
  transition: opacity 140ms ease, transform 140ms ease;
}

/* Hover bridge (kopmasın) */
.dropdown-menu-simple::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -10px;
  height: 10px;
}

.dropdown-menu-simple a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;

  color: #111;
  font-weight: 600;
  letter-spacing: 0.1px;
}

.dropdown-menu-simple a:hover {
  background: rgba(0, 0, 0, 0.04);
}

.dropdown-menu-simple li + li {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.dropdown-menu-simple li a {
  padding-top: 12px;
  padding-bottom: 12px;
}

/* Hover open */
@media (hover: hover) and (pointer: fine) {
  .nav-item.has-dropdown:hover > .dropdown-menu-simple,
  .nav-item.has-dropdown:focus-within > .dropdown-menu-simple {
    display: block;
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile/JS open */
.nav-item.has-dropdown.open > .dropdown-menu-simple {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* 7) Responsive */
@media (min-width: 992px) {
  #mainNavbar {
    display: flex !important;
    flex: 1 1 auto;
    justify-content: center;
    min-width: 0;
  }

  #mainNavbar .navbar-nav {
    flex-direction: row !important;
    flex-wrap: nowrap;
    gap: 6px;
  }
}

/* 7) Responsive */
@media (min-width: 992px) {
  #mainNavbar {
    display: flex !important;
    flex: 1 1 auto;
    justify-content: center;
    min-width: 0;
  }

  #mainNavbar .navbar-nav {
    flex-direction: row !important;
    flex-wrap: nowrap;
    gap: 6px;
  }

  /* Desktop: menü yazıları tek satır + biraz küçük */
  #mainNavbar .navbar-nav .nav-link{
    font-size: 0.95rem;
    white-space: nowrap;
  }

  /* Desktop: CTA buton metni de tek satır */
  .nav-right .cta-btn{
    white-space: nowrap;
  }
}

@media (max-width: 991.98px) {
  .navbar-logo {
    height: 56px;
  }

  #mainNavbar {
    width: 100%;
  }

  #mainNavbar .navbar-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding-top: 8px;
  }

  #mainNavbar .nav-link {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
  }

  .nav-pill {
    flex-wrap: wrap;
    border-radius: 24px;
    padding: 10px 14px;
  }

  .navbar-nav .nav-link::after {
    left: 16px;
    right: 16px;
    bottom: 6px;
    background: rgba(11, 60, 93, 0.35);
  }

  .navbar-nav .nav-link.active::after {
    background: var(--brand-blue);
  }

  /* Mobilde dropdown menü navbar içinde blok */
  .dropdown-menu-simple {
    position: static;
    min-width: unset;
    box-shadow: none;
    margin-top: 8px;
    opacity: 1;
    transform: none;
  }

  .dropdown-menu-simple::before {
    display: none;
  }
}

