/* ====================== */
/* RESET AND GLOBAL STYLES */
/* ====================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Nunito Sans', sans-serif;
}

/* General container styling */
.container {
  max-width: 1280px;
  min-width: 280px;
  margin: 0 auto;
  padding: 0; 
}

/* Main content styles */
main {
  margin-top: 64px; /* Space for the fixed header */
  width: 100%;
}


/* ====================== */
/* FILTERS AND SORTING */
/* ====================== */
.filters {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 24px;
  padding: 16px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  margin: 0 auto 24px;
  max-width: 540px;
  overflow-x: auto;
}

/* Slider group - takes most space */
.filter-item.slider-group {
  flex: 1 1 auto;
  min-width: 140px;
  position: relative;
}

/* Custom slider container with inner label */
.custom-slider {
  position: relative;
  height: 50px;
  width: 100%;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
}

/* Colored fill background */
.slider-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background-color: rgba(0, 123, 255, 0.15);
  pointer-events: none;
  z-index: 0;
}

/* Actual range input - covers the whole area */
.custom-slider input[type="range"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0; /* Hide the default slider */
  cursor: pointer;
  z-index: 2;
  margin: 0;
  padding: 0;
}

/* Text inside the slider */
.slider-text {
  position: absolute;
  left: 15px;
  top: 0;
  height: 100%;
  display: flex;
  align-items: center;
  color: #333;
  font-size: 14px;
  font-weight: 600;
  pointer-events: none;
  z-index: 1;
}

.gb-value {
  font-weight: 600;
  color: #007BFF;
  margin-left: 5px;
}

/* Custom thumb indicator */
.slider-thumb {
  position: absolute;
  height: 50px;
  width: 3px;
  background-color: #007BFF;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 1;
}

/* Sorting group - fixed width */
.filter-item.sort-group {
  flex: 0 0 auto;
  position: relative;
  width: 110px;
  min-width: 116px;
}

/* Custom select wrapper */
.custom-select {
  position: relative;
  width: 100%;
  height: 50px;
}

/* Hidden but functional select */
.custom-select select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  height: 100%;
  padding: 0 15px 0 40px; /* Space for icon */
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: white;
  color: #333;
  font-size: 14px;
  font-weight: 600; /* Made consistent with slider text */
  cursor: pointer;
  outline: none;
  z-index: 1;
}

.custom-select select:hover, 
.custom-select select:focus {
  border-color: #007BFF;
}

/* Material icon inside select */
.custom-select .sort-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #555;
  font-size: 20px;
  pointer-events: none;
  z-index: 2;
}

/* Custom dropdown arrow */
.custom-select::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #555;
  pointer-events: none;
}

/* Very small screen adjustments */
@media (max-width: 380px) {
  .filters {
    padding: 10px 12px;
    gap: 12px;
  }
  
  .custom-slider, .custom-select {
    height: 45px; /* Slightly reduce height */
  }
  
  .slider-text, .custom-select select {
    font-size: 13px; /* Slightly smaller text */
  }
}

/* ====================== */
/* HEADER AND NAVIGATION */
/* ====================== */

/* Site header (reusable component) */
.site-header {
  background: linear-gradient(to right, rgba(39, 100, 255, 0.90), rgba(36, 0, 109, 0.90));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 1px 10px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  height: 64px;
  overflow: hidden;
}

/* Expanded header state */
.site-header.expanded {
  height: 100vh;
  overflow-y: auto;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  flex-wrap: wrap;
}

/* Logo */
.logo {
  height: 30px;
  width: auto;
  max-width: 180px;
  display: block;
}

.logo-link {
  display: block;
}

/* Menu toggle button */
.menu-toggle {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 4px;
}

.menu-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.menu-toggle.active span {
  color: #007bff;
}

/* Navigation container */
.main-nav {
  width: 100%;
  margin-top: 12px;
  display: none;
}

.main-nav.active {
  display: block;
}

/* Navigation list */
.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-list > li {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-list > li > a {
  color: white;
  display: block;
  padding: 15px;
  text-decoration: none;
}

.nav-list > li > a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Dropdown styles */
.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  background: transparent;
}

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

.dropdown-menu li a {
  color: white;
  display: block;
  padding: 12px 15px 12px 30px;
  text-decoration: none;
}

.dropdown-menu li a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Desktop navigation styles */
@media (min-width: 768px) {
  .site-header {
    height: 64px;
    overflow: visible;
  }

  .menu-toggle {
    display: none;
  }

  .site-header .container {
    flex-wrap: nowrap;
  }

  .main-nav {
    width: auto;
    margin-top: 0;
    display: block;
  }

  .nav-list {
    display: flex;
    align-items: center;
  }

  .nav-list > li {
    border: none;
    position: relative;
  }

  .nav-list > li > a {
    padding: 8px 15px;
  }

  .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border-radius: 0 0 4px 4px;
    background: linear-gradient(to right, rgba(39, 100, 255, 0.90), rgba(36, 0, 109, 0.90));
    max-height: none; 
    overflow: visible; 
    padding: 4px 0;
  }

  .dropdown:hover .dropdown-menu {
    display: block;
    animation: fadeIn 0.2s ease;
  }
  
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

/* ====================== */
/* HERO SECTION */
/* ====================== */
.hero {
  background-color: #f2f2f2;
  text-align: center;
  padding: 40px 16px;
}

.hero h2 {
  font-size: 32px;
  margin-bottom: 16px;
}

.hero p {
  font-size: 18px;
  color: #555;
}

/* ====================== */
/* ABONNEMANG CARDS */
/* ====================== */
.abonnemang-list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: left;
  padding: 24px 16px;
}

.abonnemang-card {
  display: flex;
  flex-direction: column;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 16px;
  gap: 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  flex: 1 1 320px;
  max-width: 480px;
}

.card-body {
  display: flex;
  flex-direction: row; 
  gap: 16px;
}

.card-footer {
  display: flex;
  gap: 16px;
  margin-top: auto;
}

/* Card Left Column */
.card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.card-logo img {
  margin-top: -16px;
  margin-bottom: -4px;
  max-width: 100px;
  height: auto;
}

.price {
  font-weight: bold;
}

.price-currency {
  font-size: inherit;
  margin-left: 2px;
}

.price-unit {
  font-size: 12px;
  margin-left: 2px;
  vertical-align: baseline; 
}

.discount {
  font-size: 14px;
  color: #333;
}

/* Card Right Column */
.card-ratings {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rating-row {
  display: flex;
  flex-direction: column; 
  gap: 12px;
}

.rating-text-row {
  display: flex; 
  justify-content: space-between;
  align-items: center;
}

.rating-label {
  font-size: 14px;
  font-weight: bold;
  color: #333;
}

.rating-value {
  font-size: 14px;
  font-weight: bold;
  color: #333;
}

.rating-bar-container {
  position: relative;
  width: 100%;
  height: 2px; 
  background-color: #bbb; 
  border-radius: 1px;
}

.rating-bar {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%); 
  height: 12px; 
  background: #383838;
  border-radius: 8px;
  width: 0; 
  pointer-events: none;
}

.controlled-date {
  font-size: 12px;
  color: #666;
  margin-top: 8px;
  width: 100%;
  text-align: right;
}

/* Buttons */
.affiliate-button {
  background-color: #007BFF;
  color: white;
  font-weight: bold;
  align-content: center;
  text-align: center;
  padding: 8px 16px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 16px;
  min-height: 48px;
  width: calc(50% - 4px);
}

.affiliate-button:hover {
  background-color: #0056b3;
}

.secondary-button {
  background-color: #f5f5f5;
  color: #333;
  font-weight: bold;
  align-content: center;
  text-align: center;
  padding: 8px 16px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 16px;
  min-height: 48px;
  width: calc(50% - 4px);
}

.secondary-button:hover {
  background-color: #e0e0e0;
}

.operator-link {
  color: #333;
  text-decoration: none;
}

.operator-link:hover {
  color: #007BFF;
  text-decoration: underline;
}

/* ====================== */
/* OPERATOR PAGES */
/* ====================== */
.operator-page main {
  margin-top: 64px;
  background-color: #f9f9f9;
  padding-bottom: 40px;
}

.operator-hero {
  display: flex;
  background-color: white;
  padding: 32px 16px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  margin: 24px 16px;
  align-items: center;
}

.operator-logo {
  flex: 0 0 150px;
  padding-right: 24px;
}

.operator-logo img {
  max-width: 100%;
  height: auto;
}

.operator-info {
  flex: 1;
}

.operator-description {
  margin: 16px 0;
  font-size: 16px;
  line-height: 1.5;
  color: #444;
}

.operator-ratings {
  display: flex;
  gap: 24px;
  margin-top: 16px;
}

.rating-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.rating-score {
  font-size: 20px;
  font-weight: bold;
  color: #333;
}

.operator-offers {
  padding: 0 16px;
}

.operator-offers h2 {
  margin-bottom: 24px;
}

.operator-details {
  background-color: white;
  padding: 32px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  margin: 32px 16px;
}

.operator-content {
  margin: 16px 0 32px;
  line-height: 1.6;
}

.operator-content p {
  margin-bottom: 1.2em; /* Add space between paragraphs */
}

.operator-content ul {
  margin: 1.2em 0; /* Add space around lists */
}

.operator-content h2 {
  margin-top: 1.8em; /* Add more space before headings */
  margin-bottom: 0.8em; /* Add space after headings */
}

.operator-content p:last-child,
.operator-content ul:last-child {
  margin-bottom: 0; /* Remove bottom margin from last element */
}

.faq-container {
  margin-top: 24px;
}

.faq-item {
  border-bottom: 1px solid #eee;
  padding: 16px 0;
}

.faq-question {
  font-weight: bold;
  margin-bottom: 8px;
  cursor: pointer;
}

.faq-answer {
  color: #555;
}

/* Responsive fixes for operator pages */
@media (max-width: 768px) {
  .operator-hero {
    flex-direction: column;
    text-align: center;
  }
  
  .operator-logo {
    padding-right: 0;
    margin-bottom: 24px;
  }
  
  .operator-ratings {
    justify-content: center;
  }
}

/* ====================== */
/* FOOTER */
/* ====================== */
footer {
  background-color: #f2f2f2;
  padding: 24px 16px;
  text-align: center;
  color: #666;
  margin-top: 40px;
}