/* ============================================
   HEADER CSS - SesYalitimci.com
   Topbar + Main Header + Navigation
   ============================================ */

/* === MAIN HEADER === */
.main-header {
  background-color: #0f2a78;
  padding: 10px 0;
  position: sticky;
  top: 0;
  z-index: 1200;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.main-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo img {
  height: 44px;
  width: auto;
}

/* Search Bar */
.header-search {
  flex: 1;
  max-width: 420px;
  position: relative;
}

.header-search input {
  width: 100%;
  height: 34px;
  padding: 8px 42px 8px 12px;
  border: none;
  border-radius: 0;
  font-size: 0.82rem;
  outline: none;
  background: var(--white);
  color: var(--text-dark);
}

.header-search input::placeholder {
  color: var(--gray-500);
}

.header-search button {
  position: absolute;
  right: 0;
  top: 0;
  width: 36px;
  height: 34px;
  background-color: transparent;
  color: var(--gray-700);
  border-left: 1px solid #d9d9d9;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: var(--transition);
}

.header-search button:hover {
  background-color: rgba(0, 0, 0, 0.06);
  color: var(--gray-700);
}

/* Header Right Info */
.header-info {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--white);
  flex-shrink: 0;
}

.header-phone {
  display: flex;
  align-items: center;
  color: var(--white);
  font-weight: 400;
  font-size: 0.74rem;
  white-space: nowrap;
}

.header-phone:hover {
  color: var(--accent);
}

.header-links {
  display: flex;
  align-items: center;
  gap: 0;
}

.header-links a {
  color: var(--white);
  font-size: 0.64rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 0 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.25);
  transition: var(--transition);
}

.header-links a:last-child {
  border-right: none;
  padding-right: 0;
}

.header-links a:hover {
  color: var(--accent);
}

/* === NAVIGATION BAR === */
.nav-bar {
  background-color: #efefef;
  border-bottom: 1px solid #dadada;
  position: sticky;
  top: 64px;
  z-index: 1190;
  box-shadow: none;
}

.nav-bar .container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.nav-menu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-menu>li {
  position: relative;
  flex: 1 1 auto;
}

.nav-menu>li>a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 13px 10px;
  color: #222;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.35px;
  transition: var(--transition);
  white-space: nowrap;
  border-right: 1px solid #dddddd;
}

.nav-menu>li:last-child>a {
  border-right: none;
}

.nav-menu>li>a:hover,
.nav-menu>li.active>a {
  color: #0f2a78;
  background-color: #f9f9f9;
}

.nav-menu>li>a .dropdown-arrow {
  font-size: 0.6rem;
  transition: transform 0.3s ease;
}

/* Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  min-width: 240px;
  box-shadow: var(--shadow-lg);
  border-top: 2px solid #0f2a78;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.nav-menu>li:hover>.dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li a {
  display: block;
  padding: 9px 14px;
  color: var(--text-dark);
  font-size: 0.76rem;
  font-weight: 500;
  border-bottom: 1px solid var(--gray-100);
  transition: var(--transition);
}

.dropdown-menu li a:hover {
  background-color: var(--primary);
  color: var(--white);
  padding-left: 25px;
}

/* === MOBILE TOGGLE === */
.mobile-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--gray-700);
  padding: 10px;
  cursor: pointer;
}

.mobile-contact-info {
  display: none;
}

/* === RESPONSIVE === */
@media (max-width: 1200px) {
  .nav-menu>li {
    flex: 0 0 auto;
  }

  .nav-menu {
    justify-content: flex-start;
  }

  .nav-menu>li>a {
    padding: 11px 8px;
    font-size: 0.72rem;
  }
}

body.mobile-menu-open {
  overflow: hidden;
}

@media (max-width: 992px) {
  .main-header {
    display: none;
  }

  .header-info {
    display: none;
  }

  .header-search {
    max-width: 300px;
  }

  .nav-bar {
    top: 0;
    position: sticky;
    z-index: 1400;
  }

  .nav-bar .container {
    justify-content: flex-end;
    min-height: 54px;
  }

  .mobile-toggle {
    display: block;
    margin-left: auto;
    font-size: 1.45rem;
    color: #2a2a2a;
    background: transparent;
    border: 1px solid #d6dbe8;
    border-radius: 6px;
    width: 42px;
    height: 36px;
    padding: 0;
    position: relative;
    z-index: 1402;
  }

  .mobile-toggle.is-open {
    position: fixed;
    top: 10px;
    right: 10px;
    background: #fff;
    color: #111;
    border-color: #c8cedf;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  }

  .nav-menu {
    display: none;
    position: fixed;
    top: 54px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    z-index: 1300;
    width: 100vw;
    max-height: calc(100vh - 54px);
    overflow-y: auto;
    border-top: 1px solid #e8ecf5;
    padding-bottom: 24px;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-menu > li {
    width: 100%;
    flex: 0 0 auto;
  }

  .nav-menu>li>a {
    padding: 13px 16px;
    border-bottom: 1px solid var(--gray-200);
    border-right: none;
    width: 100%;
    font-size: 0.8rem;
    justify-content: space-between;
  }

  .dropdown-menu {
    position: static;
    box-shadow: none;
    border-top: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    background: #f6f8fc;
  }

  .dropdown-menu.active {
    display: block;
  }

  .dropdown-menu li a {
    padding: 10px 16px 10px 28px;
    font-size: 0.76rem;
  }

  .nav-menu>li.open>a .dropdown-arrow {
    transform: rotate(180deg);
  }

  .mobile-contact-info {
    display: grid;
    gap: 0;
    border-top: 1px solid #e4e8f2;
    background: #f8f9fc;
  }

  .mobile-contact-info a {
    display: block;
    padding: 11px 16px;
    border-bottom: 1px solid #e8ecf5;
    font-size: 0.78rem;
    color: #1f2f58;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
  }
}

@media (max-width: 576px) {
  .mobile-toggle.is-open {
    top: 8px;
    right: 10px;
  }

  .nav-menu {
    top: 54px;
    max-height: calc(100vh - 54px);
  }
}