/* Homepage Specific Styles */

/* Discover Section - Hero */
.discover {
  position: relative;
  display: flex;
  align-items: center;
  background: white;
  background-size: cover !important;
  color: white;
}

/* Mobile: Use min-height for full screen experience */
@media (max-width: 767px) {
  .discover {
    min-height: 100vh;
  }
}

/* Desktop: Let Tailwind aspect ratio control the height */
@media (min-width: 768px) {
  .discover {
    min-height: auto;
  }
}

/* Loading state - consistent background */
.discover.discover-loading {
  background: white !important;
  background-size: cover !important;
}

/* Gradient Overlay for all views */
.discover::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0) 10%);
  pointer-events: none;
  z-index: 11;
}


/* DiscoverSection Container adjustments for Desktop */
@media (min-width: 768px) {
  .discover .container {
    position: absolute;
    z-index: 3;
  }
}

.discover__list {
  overflow: hidden;
  list-style: none;
  margin: 0;
  padding: 0;
}

.discover__list-item {
  list-style: none;
  float: left;
  margin-right: 0.0625rem;
}

.discover__list-item a {
  display: inline-block;
  padding: 0.9375rem 2.7rem;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 1.0625rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.discover__list-item a i {
  float: left;
  display: inline-block;
  margin-top: 0.125rem;
  font-size: 1.25rem;
  margin-right: 0.625rem;
}

.discover__list-item a:hover,
.discover__list-item a.active-list {
  background: #fff;
  color: var(--color-primary);
}

.discover__form {
  padding: 1.875rem;
  margin-bottom: 1.5rem;
  background: #fff;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  align-items: center;
  max-width: none;
}

.discover__form select {
  height: 3.3125rem;
}

.discover__form-input {
  border: 1px solid transparent;
  border-bottom: 1px solid #adadad;
  width: 17.5rem;
  margin-right: 0.625rem;
  color: #999999;
  font-size: 0.9375rem;
  font-weight: 200;
  padding: 1rem 1.25rem;
  background: transparent;
  outline: none;
  border-radius: 0px;
  transition: all 0.2s ease-in-out;
}

.discover__form-input:focus {
  background: #fafafa;
  border-top: 1px solid #ebebeb;
  border-left: 1px solid #ebebeb;
  border-right: 1px solid #ebebeb;
  border-bottom: 1px solid var(--color-primary);
}

.discover__form-input::placeholder {
  color: #999999;
}

/* Select styling */
.discover__form-input[type="select"],
.discover__form select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
}

/* Search Button - Modern Corporate Styling with Outline Hover */

.btn-primary {
  background: var(--color-primary);
  border: 2px solid var(--color-primary);
  color: white;
  border-radius: 0.5rem; /* Added rounded corners */
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-1px);
}

/* Popular Sections */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header__title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-title);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-header__title::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--color-primary);
  border-radius: 2px;
}

.section-header__text {
  font-size: 1.125rem;
  color: var(--color-text);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Popular Sectors Grid */
.sectors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* Sectors Slider Layout - 2 rows, 4 items per row */
.sectors-slider-wrapper {
  margin-top: 2rem;
}

.sectors-slide {
  padding: 0 0.5rem;
}

.sectors-two-row-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sectors-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.sector-item {
  width: 100%;
}

/* Responsive adjustments for sectors slider */
@media (max-width: 1024px) {
  .sectors-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .sectors-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .sectors-two-row-grid {
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .sectors-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .sectors-slide {
    padding: 0 0.25rem;
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .discover__form {
    display: block;
    padding: 1.5rem;
  }
  
  .discover__form-input {
    width: 100%;
    margin-right: 0;
    margin-bottom: 0;
    display: block;
  }
  
  .discover__form .btn-primary {
    width: 100%;
    justify-content: center;
    margin-top: 1rem;
  }
  
  /* Optimize for tablets */
  .section-header {
    margin-bottom: 2rem;
  }
  
  .section-header__title {
    font-size: 2.25rem;
  }
}

@media (max-width: 768px) {
  .discover {
    min-height: auto; /* Adjust height for mobile */
  }
  
  /* Position search overlay at bottom for mobile */
  .search-overlay {
    bottom: -200px !important;
    top: auto !important;
  }
  
  /* Hide banner dots on mobile */
  .discover-banner-dots {
    display: none !important;
  }
  
  /* Container padding for mobile */
  .discover .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .discover__form {
    grid-template-columns: 1fr;
    padding: 1.5rem;
    margin: 0 1rem;
    margin-bottom: 0;
  }

  .discover__list {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin: 0 1rem;
    margin-bottom: 0;
  }
  
  .discover__list-item a {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .section-header__title {
    font-size: 2rem;
  }
  
  .sections-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .discover__form {
    margin: 0 1rem;
    padding: 1rem;
  }
  
  .discover__form-input {
    padding: 0.625rem 0.75rem;
    font-size: 0.9rem;
  }
  
  .btn-primary {
    padding: 0.625rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .section-header__title {
    font-size: 1.75rem;
  }
  
  .section-header__text {
    font-size: 1rem;
  }
  
  .sectors-grid {
    grid-template-columns: 1fr;
  }
}

/* Popular Packages Section Background */
.popular-packages-section {
  background: #fff;
  padding: 4rem 0;
}

.popular-sectors-section {
  background: #f8f9fa;
  padding: 4rem 0;
}

/* View More Button in Discover Section */
.discover__view-more {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  background: rgba(0, 0, 0, 0.3);
}

.discover__view-more-btn {
  padding-top: 0.75rem !important;
  padding-bottom: 0.75rem !important;
}

/* Animation for cards on homepage */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
}

.animate-fade-in:nth-child(1) { animation-delay: 0.1s; }
.animate-fade-in:nth-child(2) { animation-delay: 0.2s; }
.animate-fade-in:nth-child(3) { animation-delay: 0.3s; }
.animate-fade-in:nth-child(4) { animation-delay: 0.4s; }

/* Performance optimizations */
.discover img {
  will-change: opacity;
}

@media (prefers-reduced-motion: reduce) {
  .animate-fade-in {
    animation: none;
    opacity: 1;
    transform: none;
  }
  
  .discover img {
    transition: none;
  }
}

/* Hero CTA Enhancement */
.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  margin-top: 3rem;
}

.hero-cta h1 {
  font-size: 3.5rem;
  font-weight: 800;
  text-align: center;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  line-height: 1.1;
}

.hero-cta p {
  font-size: 1.25rem;
  text-align: center;
  margin: 0;
  opacity: 0.95;
  max-width: 600px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Banner Navigation Dots */
.discover-banner-dots {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 15;
}

.discover-banner-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.discover-banner-dot:hover {
  background: rgba(255, 255, 255, 0.8);
}

.discover-banner-dot.active {
  background: white;
  width: 30px;
  border-radius: 5px;
}

@media (max-width: 768px) {
  .hero-cta h1 {
    font-size: 2.5rem;
  }
  
  .hero-cta p {
    font-size: 1.1rem;
    padding: 0 1rem;
  }
  
  .discover-banner-dots {
    bottom: 10px;
  }
  
  .discover-banner-dot {
    width: 8px;
    height: 8px;
  }
  
  .discover-banner-dot.active {
    width: 24px;
  }
}

/* DiscoverSection Gradient Overlay for Desktop */
@media (min-width: 768px) {
  /* Desktop styles already handled above */
}