/* Header & Navigation Styles */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 1rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--text);
  flex-shrink: 0;
}

.logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), #6366f1);
  color: #fff;
  flex-shrink: 0;
}

.brand-name span {
  color: var(--primary);
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.nav-link {
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: var(--surface-subtle);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.mobile-menu-btn {
  display: none;
}

/* Mobile Drawer */
.mobile-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.mobile-drawer.open {
  display: block;
}

.drawer-content {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 85%;
  max-width: 320px;
  background: var(--surface);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-left: 1px solid var(--border);
  overflow-y: auto;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
}

.drawer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.drawer-link {
  display: block;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  transition: background 0.15s ease;
}

.drawer-link:hover {
  background: var(--surface-subtle);
  color: var(--primary);
}

/* Global Search Component */
.search-wrapper {
  position: relative;
  max-width: 680px;
  margin: 0 auto;
  text-align: left;
  width: 100%;
}

.search-input-box {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.4rem 0.75rem 0.4rem 1.25rem;
  box-shadow: var(--shadow-md);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-input-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.search-input-box input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  outline: none;
  padding: 0.6rem 0.5rem;
  font-size: 1rem;
  color: var(--text);
}

.search-clear-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.35rem;
  display: none;
}

.search-clear-btn:hover {
  color: var(--text);
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 420px;
  overflow-y: auto;
  display: none;
  z-index: 90;
}

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

.search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s ease;
  gap: 0.75rem;
}

.search-item:last-child {
  border-bottom: none;
}

.search-item:hover,
.search-item.highlighted {
  background: var(--surface-subtle);
}

.search-item-info {
  flex: 1;
  min-width: 0;
}

.search-item-info h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-item-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-item-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ============================================================
   Language Switcher & Modal Styles
   ============================================================ */
.btn-lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-lang-toggle:hover {
  background: var(--surface-2);
  border-color: var(--primary);
  color: var(--primary);
}

.lang-btn-text {
  font-size: 0.85rem;
}

.drawer-lang-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--primary);
  border-radius: 8px;
  background: rgba(2, 132, 199, 0.08);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}

/* Language Selection Modal */
.lang-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lang-modal-backdrop.active {
  display: flex;
}

.lang-modal-dialog {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.75rem;
  box-shadow: var(--shadow-lg);
  animation: modalFadeIn 0.25s ease;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.lang-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.lang-modal-close {
  background: none;
  border: none;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
}

.lang-modal-close:hover {
  color: var(--text);
}

.lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.lang-card-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.lang-card-btn:hover {
  border-color: var(--primary);
  background: rgba(2, 132, 199, 0.05);
}

.lang-card-btn.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.lang-card-btn.active .lang-name,
.lang-card-btn.active .lang-sub {
  color: #fff;
}

.lang-flag {
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}

.lang-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.lang-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ============================================================
   Back Buttons (Header, Breadcrumbs & Floating)
   ============================================================ */
.header-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  margin-right: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.header-back-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn-breadcrumb-back {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-breadcrumb-back:hover {
  background: var(--primary);
  color: #fff;
}

/* Floating FAB for mobile reading */
.floating-back-fab {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 99;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.1rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 30px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.floating-back-fab:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* ============================================================
   Google Translate Bar Suppression (AdSense Clean UI)
   ============================================================ */
.goog-te-banner-frame.skiptranslate,
.goog-te-banner-frame {
  display: none !important;
}

body {
  top: 0px !important;
}

.goog-tooltip,
.goog-tooltip:hover {
  display: none !important;
}

.goog-text-highlight {
  background-color: transparent !important;
  box-shadow: none !important;
}

#goog-gt-tt {
  display: none !important;
  visibility: hidden !important;
}

/* ============================================================
   Cookie Consent Banner (AdSense & GDPR)
   ============================================================ */
.cookie-consent-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1050;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1rem 0;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
  transition: opacity 0.3s ease;
}

.cookie-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-text {
  font-size: 0.88rem;
  color: var(--text);
  margin: 0;
  flex: 1;
  min-width: 260px;
  line-height: 1.5;
}

