/* ============================================================
   NAVBAR.CSS — All header, navigation, logo, dropdown,
   off-canvas mobile menu, and language selector styles.
   Load AFTER style1.css and BEFORE page-specific CSS.
   ============================================================ */

/* ── HEADER ── */
.header {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
  animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

/* ── LOGO ── */
.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  animation: fadeInLeft 0.8s ease-out;
}

@keyframes fadeInLeft {
  from { transform: translateX(-50px); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}

.logo-icon {
  width: 110px;
  height: 110px;
  position: relative;
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2c3e50;
  letter-spacing: 0.5px;
}

.brand-tagline {
  font-size: 0.75rem;
  color: #7f8c8d;
  letter-spacing: 1px;
}

/* ── PRIMARY NAV ── */
.nav-primary {
  display: flex;
  align-items: center;
  gap: 2rem;
  animation: fadeInRight 0.8s ease-out;
}

@keyframes fadeInRight {
  from { transform: translateX(50px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

.nav-link {
  text-decoration: none;
  color: #2c3e50;
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #ff6b6b, #f06595);
  transition: width 0.3s ease;
}

.nav-link:hover        { color: #ff6b6b; }
.nav-link:hover::after { width: 100%; }

/* ── LANGUAGE / SOCIAL ── */
.language-selector {
  display: flex;
  gap: 0.5rem;
  border-left: 1px solid #e0e0e0;
  padding-left: 1.5rem;
}

.lang-link {
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
}

.lang-link.active {
  background: rgba(255, 77, 77, 0.1);
  color: #ff4d4d;
}

.lang-link:hover {
  background: rgba(255, 107, 107, 0.05);
}

/* ── SECONDARY HEADER ── */
.header-secondary {
  background: white;
  border-top: 1px solid #f0f0f0;
}

.nav-secondary {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  gap: 2.5rem;
}

.nav-secondary-link {
  text-decoration: none;
  color: #2c3e50;
  font-size: 1rem;
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.3s ease;
}

.nav-secondary-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #ff6b6b, #f06595);
  transition: width 0.3s ease;
}

.nav-secondary-link.active::after,
.nav-secondary-link:hover::after {
  width: 100%;
}

.nav-secondary-link.active { color: #ff6b6b; }

/* ── DROPDOWN (desktop) ── */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 120%;
  left: 0;
  background: #fff;
  min-width: 180px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  border-radius: 8px;
  overflow: hidden;
  color: #2c3e50;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: all 0.3s ease;
}

.dropdown-item {
  display: block;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: #2c3e50;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.dropdown-item:hover {
  background: #f5f5f5;
  color: #ff4d4d;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ── HAMBURGER TOGGLE ── */
.menu-toggle {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  z-index: 1102;               /* stays above off-canvas panel */
  position: relative;
  transition: transform 0.3s ease, color 0.3s ease;
  line-height: 1;
}

.menu-toggle.active {
  transform: rotate(90deg);
  color: #ff6b6b;
}

/* Desktop wrapper — transparent to layout */
.mobile-menu {
  display: flex;
  align-items: center;
}

/* ============================================================
   OFF-CANVAS BACKDROP (shown only when menu is open on mobile)
   ============================================================ */
.menu-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1099;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.menu-backdrop.active {
  display: block;
  opacity: 1;
}

/* ============================================================
   RESPONSIVE — TABLET / MOBILE  (OFF-CANVAS SIDEBAR)
   Triggers at <= 992px so medium tablets also get the sidebar.
   ============================================================ */
@media (max-width: 992px) {
  .header-container {
    flex-direction: row;
    justify-content: space-between;
  }

  .menu-toggle { display: block; }

  /* -------- OFF-CANVAS PANEL -------- */
  .mobile-menu {
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    background: #ffffff;
    box-shadow: -15px 0 40px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1100;
    overflow-y: auto;
    padding-top: 5rem;
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-menu.active {
    transform: translateX(0);
  }

  /* Nav inside the off-canvas */
  .nav-primary,
  .nav-secondary {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .nav-primary {
    padding: 1rem 1.5rem 2rem;
    gap: 0;
    animation: none;
  }

  .nav-secondary {
    padding: 1rem 1.5rem;
    gap: 0;
    border-top: 1px solid #eee;
  }

  .nav-link,
  .nav-secondary-link {
    font-size: 1rem;
    font-weight: 500;
    color: #2c3e50;
    padding: 1rem 0.5rem;
    border-bottom: 1px solid #f0f0f0;
    width: 100%;
    display: block;
    transition: all 0.25s ease;
  }

  .nav-link::after,
  .nav-secondary-link::after { display: none; }

  .nav-link:hover {
    color: #ff6b6b;
    padding-left: 1rem;
    background: rgba(255, 107, 107, 0.04);
  }

  .nav-secondary-link.active { color: #ff4d4d; }

  /* Dropdown becomes an accordion */
  .dropdown { width: 100%; }

  .dropdown .dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .dropdown .dropdown-toggle::after {
    content: '+';
    font-size: 1.2rem;
    font-weight: 400;
    color: #999;
    transition: transform 0.3s, color 0.3s;
    position: static;
    background: none;
    width: auto;
    height: auto;
  }

  .dropdown.active .dropdown-toggle::after {
    content: '−';
    color: #ff6b6b;
  }

  .dropdown-menu {
    position: static;
    box-shadow: none;
    background: #f9f9f9;
    border-radius: 0;
    min-width: 0;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    display: block;
  }

  .dropdown.active .dropdown-menu { max-height: 500px; }

  .dropdown-item {
    padding: 0.75rem 1.5rem;
    text-align: left;
    font-size: 0.9rem;
    border-bottom: 1px solid #eee;
  }

  .dropdown-item:last-child { border-bottom: none; }

  /* Language / social block inside off-canvas */
  .language-selector {
    margin: 2.5rem;
    padding: 1rem;
    background: #f7f7f7;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    gap: 1rem;
    border: 1px solid #eee;
    border-left: 1px solid #eee;
    padding-left: 1rem;
  }

  /* Logo sizing */
  .logo { gap: 0.5rem; }
  .logo-icon { width: 90px; height: 90px; }
  .brand-name    { font-size: 1.1rem; }
  .brand-tagline { font-size: 0.6rem; }

  /* Body scroll lock when drawer open */
  body.menu-open { overflow: hidden; }
}

/* Stagger-in for links when panel opens */
.mobile-menu.active .nav-primary > a,
.mobile-menu.active .nav-primary > .dropdown,
.mobile-menu.active .nav-primary > .language-selector {
  animation: fadeSlide 0.4s ease forwards;
  opacity: 0;
}

.mobile-menu.active .nav-primary > :nth-child(1) { animation-delay: 0.10s; }
.mobile-menu.active .nav-primary > :nth-child(2) { animation-delay: 0.15s; }
.mobile-menu.active .nav-primary > :nth-child(3) { animation-delay: 0.20s; }
.mobile-menu.active .nav-primary > :nth-child(4) { animation-delay: 0.25s; }
.mobile-menu.active .nav-primary > :nth-child(5) { animation-delay: 0.30s; }

@keyframes fadeSlide {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0);   }
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-btn {
  background: transparent;
  border: none;
  /* font-size: 14px;
  font-weight: 600; */
  font-size: 0.95rem;
  font-weight: 500;
  color: #2c3e50;
  cursor: pointer;
  padding: 10px 13px;
}

.dropdown-menu {
  display: none;
  position: absolute;
  background: #fff;
  min-width: 220px;
  border-radius: 12px;
  /* padding: 10px 0; */
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  top: 100%;
  left: 0;
  z-index: 1000;
}

.dropdown-item {
  display: block;
  padding: 12px 20px;
  color: #2c3e50;
  text-decoration: none;
  font-size: 16px;
}

.dropdown-item:hover {
  background: #f5f5f5;
}

.dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown.active .dropdown-menu {
  display: block;
}

/* ── Phones ── */
@media (max-width: 480px) {
  .logo-icon    { width: 80px; height: 80px; }
  .brand-name    { font-size: 1rem; }
  .brand-tagline { font-size: 0.55rem; }

  .header-container {
    gap: 0.75rem;
    padding: 0.75rem 1rem;
  }

  .mobile-menu { width: 280px; }

  .nav-link,
  .nav-secondary-link { font-size: 0.95rem; }
}


@media (max-width: 992px) {

  .dropdown-menu {
    position: static;
    width: 100%;
    box-shadow: none;
    border-radius: 12px;
    margin-top: 0.5rem;
    background: #f7f7f7;
  }

  .dropdown-item {
    padding: 14px 20px;
  }

}