/* ==========================================================================
   COzuna Premium Styling Overrides
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Premium Language Switcher (Desktop & Mobile)
   -------------------------------------------------------------------------- */
.lang-switcher-wrapper {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  margin-left: 15px;
  z-index: 1000;
}

/* Hide the dropdown button trigger */
.lang-btn {
  display: none !important;
}

/* Style the dropdown container to become the static capsule */
.lang-dropdown {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: static !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  background: #f5f5f5 !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 100px !important;
  padding: 6px 18px !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03) !important;
  min-width: auto !important;
  gap: 0 !important;
  transition: all 0.3s ease !important;
}

/* Legibility adjustments when header is sticky / white */
.is-sticky .lang-dropdown,
header:not([data-transparent]) .lang-dropdown {
  background: #f0f2f5 !important;
  border-color: #e2e8f0 !important;
}

/* Individual language link overrides */
.lang-option {
  display: inline-flex !important;
  align-items: center !important;
  padding: 2px 4px !important;
  color: #64748b !important; /* Muted slate gray */
  text-decoration: none !important;
  font-size: 0 !important; /* Hide original text like 'English', 'Français' */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  font-weight: 600 !important;
  transition: color 0.2s ease !important;
  border-bottom: none !important;
  background: transparent !important;
}

/* Hide legacy emojis */
.lang-option .lang-flag {
  display: none !important;
}

/* Dynamically display short code from data-lang attribute */
.lang-option::before {
  content: attr(data-lang) !important;
  font-size: 13px !important;
  text-transform: uppercase !important;
  display: inline-block !important;
}

/* Hover state styling */
.lang-option:hover {
  color: #0f172a !important; /* Charcoal on hover */
  background: transparent !important;
}

/* Active language state styling */
.lang-option.active {
  color: #0f172a !important; /* Rich dark slate/charcoal */
  font-weight: 800 !important;
  background: transparent !important;
}

/* Clean vertical separator styling */
.lang-option:not(:last-child)::after {
  content: "|" !important;
  font-size: 12px !important;
  font-weight: 300 !important;
  color: #cbd5e1 !important; /* Soft line divider color */
  margin-left: 10px !important;
  margin-right: 6px !important;
  pointer-events: none !important;
}

/* --------------------------------------------------------------------------
   2. Mobile Drawer Switcher Layout
   -------------------------------------------------------------------------- */
.mobile-lang-container {
  padding: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin-top: 20px;
}

.mobile-lang-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: #687279;
  margin-bottom: 10px;
  letter-spacing: 0.05em;
}

.mobile-lang-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.mobile-lang-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  color: #111111 !important;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.mobile-lang-item.active {
  border-color: #ff1d25;
  background: rgba(255, 29, 37, 0.05);
  color: #ff1d25 !important;
}

/* --------------------------------------------------------------------------
   3. General Viewport/Mobile Overflow Fixes
   -------------------------------------------------------------------------- */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

/* Swiper carousel styling fixes for responsive display */
.swiper-slide {
  height: auto;
}

/* Prevent double horizontal scrollbar on small mobile widths */
.elementor-section-boxed > .elementor-container {
  max-width: 100% !important;
  padding-left: 15px;
  padding-right: 15px;
}

/* --------------------------------------------------------------------------
   4. Premium Glassmorphic "Back to Top" Button
   -------------------------------------------------------------------------- */
#scroll-to-top {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(17, 17, 17, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#scroll-to-top:hover {
  background: #ff1d25;
  border-color: #ff1d25;
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 10px 20px rgba(255, 29, 37, 0.3);
}

#scroll-to-top svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  transition: transform 0.2s ease;
}

#scroll-to-top:hover svg {
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   5. Search Button & Modal Removal Override
   -------------------------------------------------------------------------- */
.ct-header-search,
#search-modal {
  display: none !important;
}

/* --------------------------------------------------------------------------
   6. Global Responsiveness Safety & Fluid Design Guardrails
   -------------------------------------------------------------------------- */
/* Prevent title text from overflowing on ultra-narrow viewports */
h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word !important;
  word-wrap: break-word !important;
}

/* Prevent unconstrained media from creating horizontal scrollbars in content area */
.entry-content img,
.entry-content iframe,
.entry-content video {
  max-width: 100% !important;
  height: auto !important;
}

/* Optimize mobile language selectors for very small screens */
@media (max-width: 360px) {
  .mobile-lang-list {
    justify-content: center !important;
    gap: 6px !important;
  }
  .mobile-lang-item {
    padding: 6px 10px !important;
    font-size: 12px !important;
  }
}

