.mobile-only {
  display: flex !important;
}

@media (min-width: 1301px) {
  .mobile-only {
    display: none !important;
  }
}

.desktop-only {
  display: none !important;
}

@media (min-width: 1301px) {
  .desktop-only {
    display: block !important;
  }
}

.header-container {
  width: 95%;
  max-width: 1680px;
  margin-inline: auto;
  padding: 0 20px;
}

/* Header Layout */
.site-header {
  position: relative;
  z-index: 1000;
  width: 100%;
}

.top-bar {
  background: #08121d;
  color: var(--white);
  padding: 8px 0;
  font-size: 0.85rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.brand-message {
  font-family: var(--font-heading);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--white);
  opacity: 1;
  font-weight: 600;
  overflow-wrap: anywhere;
}

@media (max-width: 768px) {
  .brand-message {
    display: none;
  }
}

.emergency-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
}

.emergency-link a {
  color: var(--white) !important;
  text-decoration: none;
  font-weight: 700;
}

.emergency-link a:hover {
  color: var(--red) !important;
}

.emergency-link:hover {
  color: var(--white);
  opacity: 0.9;
}

.main-nav-wrapper {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(15px);
  /* border-bottom removed for professional clean look */
  transition: all 0.3s ease;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.main-nav-wrapper.is-sticky {
  box-shadow: var(--shadow-lg);
  background: var(--white);
}

.main-nav {
  display: flex;
  align-items: center;
  height: 84px;
  transition: height 0.3s ease;
  gap: 40px;
  /* Stronger separation between logo and nav links */
  min-width: 0;
  padding: 0;
  /* Remove padding to be absolute flush-left within container */
}

.main-nav>.logo,
.main-nav>.nav-links,
.main-nav>.header-right {
  min-width: 0;
}

.is-sticky .main-nav {
  height: 70px;
}

.logo {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.logo img {
  max-height: 60px;
  width: auto;
  height: auto;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 0 0 auto;
  min-width: 0;
}

.nav-list {
  display: flex;
  gap: 18px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.nav-list li {
  flex-shrink: 0;
  min-width: fit-content;
}

.logo-item {
  margin-right: 0;
}

.nav-link {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: .92rem;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  display: inline-block;
  vertical-align: middle;
  gap: 4px;
  white-space: nowrap;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 10px 0;
}

.nav-link:hover,
.nav-link.active {
  color: var(--red);
}

/* =====================================================================
   Cok dilli nav daraltma
   - Almanca (de): kelimeler uzun (Dienstleistungen, Schadensschätzer...)
   - Bulgarca (bg): Kiril. Artik Oswald kullaniliyor ama yine de uzun
     kelimeler (Електронна реставрация, Ултразвуково почистване...)
     toplam genisligi artiriyor.
   Bu dillerde font-size, gap ve letter-spacing hafif kuculterek
   nav'in tek satirda sigmasi saglanir. TR/EN etkilenmez.
   ===================================================================== */
html[lang="de"] .nav-list,
html[lang="bg"] .nav-list {
  gap: 12px;
}

html[lang="de"] .nav-link,
html[lang="bg"] .nav-link {
  font-size: 0.82rem;
  letter-spacing: 0.2px;
}

html[lang="de"] .nav-link,
html[lang="bg"] .nav-link {
  max-width: 150px;
}

.nav-search-btn {
  background: none;
  border: none;
  color: var(--navy);
  cursor: pointer;
  padding: 10px;
  display: flex;
  align-items: center;
  transition: color 0.3s ease;
}

.nav-search-btn:hover {
  color: var(--red);
}

.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  min-width: 240px;
  max-width: min(300px, calc(100vw - 2rem));
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius);
  padding: 12px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  overflow: hidden;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  padding: 10px 24px;
  font-weight: 500;
  color: var(--text-mid);
  transition: var(--transition);
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.dropdown-item:hover {
  background: var(--surface);
  color: var(--red);
}

/* Footer Layout */
.cta-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  padding: 60px 0;
  color: var(--white);
  border-top: 3px solid var(--red);
  border-bottom: 3px solid var(--red);
  text-align: center;
}

.cta-banner h2 {
  color: var(--white) !important;
}

.site-footer {
  background: var(--navy);
  padding: 80px 0 0;
  color: var(--white);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  margin-bottom: 60px;
  align-items: start;
}

.footer-logo {
  max-height: 52px;
  width: auto;
  object-fit: contain;
  margin-bottom: 16px;
  display: inline-block;
  background: #ffffff;
  padding: 6px 14px;
  border-radius: var(--radius-sm, 6px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.footer-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  text-transform: uppercase;
  margin-bottom: 24px;
  color: var(--white);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-link {
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
}

.footer-link:hover {
  color: var(--white);
  padding-left: 4px;
}

.social-links {
  display: flex;
  gap: 16px;
  margin-top: 24px;
}

.social-links a {
  color: var(--white) !important;
  opacity: 0.8;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.social-links a:hover {
  opacity: 1;
  transform: translateY(-3px);
  background: var(--red);
  color: var(--white) !important;
}

.social-links svg {
  width: 20px;
  height: 20px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
}

/* Mobile Nav */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--navy);
}

@media (min-width: 1301px) and (max-width: 1440px) {
  .nav-list {
    gap: 6px;
  }

  .nav-link {
    font-size: 0.75rem;
    max-width: 140px;
    letter-spacing: 0.2px;
  }

  .btn-primary {
    padding: 9px 12px;
    font-size: 0.78rem;
  }

  .lang-dropdown-btn {
    padding: 5px 10px;
    gap: 6px;
    font-size: 0.75rem;
  }

  .main-nav {
    height: 80px;
    gap: 8px;
  }

  .header-right {
    gap: 8px;
  }
}

@media (max-width: 1300px) {
  .main-nav {
    gap: 12px;
  }

  .nav-links {
    display: none;
    overflow: hidden;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: auto;
    width: 100%;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(13, 27, 42, 0.08);
    box-shadow: var(--shadow-lg);
    padding: 16px 0 24px;
    z-index: 999;
  }

  .nav-links.is-open {
    display: block;
  }

  .nav-list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }

  .nav-link {
    justify-content: space-between;
    padding: 14px 24px;
    border-bottom: 1px solid rgba(13, 27, 42, 0.08);
    font-size: 1rem;
    max-width: none;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .dropdown-menu {
    position: static;
    min-width: 0;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: rgba(13, 27, 42, 0.035);
    transition: max-height 0.25s ease;
  }

  .dropdown:hover .dropdown-menu {
    transform: none;
  }

  .dropdown.is-open .dropdown-menu,
  .dropdown:focus-within .dropdown-menu {
    max-height: 520px;
  }

  .dropdown-item {
    padding: 12px 32px;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(13, 27, 42, 0.05);
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .menu-toggle {
    display: block;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .top-bar {
    padding: 6px 0;
  }

  .top-bar-content {
    justify-content: center;
  }

  .top-bar-content>div:last-child {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }

  .emergency-link {
    gap: 8px;
    font-size: 0.8rem;
  }

  .emergency-link i {
    width: 16px !important;
    height: 16px !important;
  }

  .emergency-link a {
    font-size: 0.85rem;
  }

  .main-nav {
    height: 70px;
  }

  .is-sticky .main-nav {
    height: 70px;
  }

  .logo img {
    max-height: 52px;
  }

  .header-right {
    gap: 10px;
    flex: 1 1 auto;
    justify-content: flex-end;
    min-width: 0;
  }

  .header-right .btn-primary {
    padding: 10px 12px;
    font-size: 0.8rem;
  }

  .search-toggle {
    width: 38px;
    height: 38px;
    padding: 0;
    flex: 0 0 38px;
  }

  .menu-toggle {
    width: 40px;
    height: 40px;
    padding: 0;
    flex: 0 0 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(13, 27, 42, 0.1);
    border-radius: 50%;
    background: var(--surface);
  }

  .container {
    padding-inline: 1.25rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .cta-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .cta-actions {
    align-items: center !important;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 16px;
    /* Slightly smaller on mobile for fit */
  }

  .top-bar-content>div:last-child {
    gap: 8px;
  }

  .lang-dropdown-btn {
    padding: 6px 10px;
    gap: 6px;
    max-width: 118px;
  }

  .lang-dropdown-btn #current-lang-label {
    min-width: 2ch;
  }

  .lang-dropdown-btn .hide-on-small {
    display: none;
  }

  .emergency-link a {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .header-right .btn-primary {
    max-width: 126px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 10px 10px;
    line-height: 1.1;
    flex: 0 0 auto;
  }

  .nav-link,
  .dropdown-item {
    overflow-wrap: anywhere;
  }

  .hero-title {
    font-size: 2.2rem !important;
  }

  .section-title {
    font-size: 1.8rem !important;
  }
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  background: var(--red);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  border: none;
  outline: none;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--red-dark);
  transform: translateX(-50%) translateY(-5px);
}

/* Language Dropdown */
.lang-dropdown {
  position: relative;
  display: inline-block;
}

.lang-dropdown-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--white);
  padding: 6px 14px;
  border-radius: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: var(--transition);
}

.lang-dropdown-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--navy-mid);
  min-width: 140px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  z-index: 2000;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lang-dropdown.is-active .lang-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-dropdown-menu button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  text-align: left;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.lang-dropdown-menu button:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
}

.lang-dropdown-menu button.active {
  color: var(--red);
  font-weight: 700;
}