/* DisplayComponent.css */

.slider-section {
  position: relative;
}

.no-marker {
  text-decoration: none !important;
  list-style-type: none !important;
}

.small-heading {
  text-decoration: none !important;
  list-style-type: none !important;
  padding-left: 0 !important;
}

.small-heading a {
  text-decoration: none !important;
  color: #000;
}

.small-heading a:hover {
  color: rgb(94, 152, 138);
}

.custom-list-style {
  list-style: none !important;
  padding-left: 0;
}

.category-item {
  position: relative;
  padding-left: 0;
}

.superclass-dot {
  text-decoration: none !important;
  color: #000;
}

.superclass-dot:hover {
  color: rgb(94, 152, 138);
}

.slider-section img {
  width: 100%;
}

.bg-light {
  height: 100%;
}

.img-fluid {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Modal positioning fixes */
.custom-modal {
  position: absolute;
  top: 0;
  left: 98%;
  width: 600px;
  max-height: 70vh;
  overflow-y: auto;
  background: white;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  z-index: 1050;
  margin-left: 0px;
  border: 1px solid #e5e7eb;
}

.modal-content {
  position: relative;
  background: #fff;
  padding: 1.5rem;
  width: 100%;
  max-width: 100%;
  margin: 0;
  border: none;
  box-shadow: none;
  border-radius: 8px;
}

/* Ensure category list container has relative positioning */
.home-category {
  position: relative;
}

/* Category item hover container */
.category-item {
  position: relative;
}

.subcategory-grid .row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -8px;
}

.subcategory-grid .col-6,
.subcategory-grid .col-md-4 {
  padding: 0 8px;
  margin-bottom: 1rem;
}

.modal-body {
  padding: 0;
}

/* Mobile First Styles */
@media (max-width: 767.98px) {
  .slider-section {
    padding-top: 1rem !important;
  }
  
  .container-fluid {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  .non-slider-image {
    margin-bottom: 1rem;
    border-radius: 8px;
  }
  
  .home-category {
    max-height: 400px;
    overflow-y: auto;
  }

  /* Mobile modal adjustments */
  .custom-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95vw;
    max-height: 80vh;
    margin-left: 0;
  }
  
  .modal-content {
    padding: 1rem;
    max-height: 78vh;
    overflow-y: auto;
  }
  
  .subcategory-grid .col-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
  
  .ul-list {
    margin-bottom: 0.5rem;
  }
}

/* Tablet Styles */
@media (min-width: 768px) and (max-width: 991.98px) {
  .container-fluid {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  
  .non-slider-image {
    margin-bottom: 1.5rem;
  }

  /* Tablet modal adjustments */
  .custom-modal {
    width: 500px;
  }
}

/* Desktop Styles */
@media (min-width: 992px) {
  .col-lg-3 {
    flex: 0 0 auto;
    width: 25%;
  }
}

/* Ensure modal doesn't overflow on smaller screens */
@media (max-width: 1399.98px) {
  .custom-modal {
    max-width: calc(100vw - 300px);
  }
}

/* NEW: Modal viewport boundary detection */
.custom-modal.viewport-adjusted {
  bottom: auto !important;
}

/* Slider improvements for mobile */
/* .slick-dots {
  bottom: 10px !important;
}

.slick-dots li button:before {
  font-size: 10px !important;
  color: #fff !important;
  opacity: 0.5 !important;
}

.slick-dots li.slick-active button:before {
  opacity: 1 !important;
  color: #fff !important;
} */

/* Category item hover effects */
.category-item {
  transition: all 0.2s ease-in-out;
}

.haveChild:hover {
  color: #f38023 !important;
  background-color: #f8f9fa;
}

.text-color:hover {
  color: #f38023 !important;
}

.text-primary {
  text-decoration: none;
  color: #ff9933 !important;
}

/* Image optimization */
.slider-section img {
  object-fit: fill;
  transition: transform 0.3s ease;
}

.slider-section a:hover img {
  transform: scale(1.02);
}

/* Loading states */
.slider-section .slick-slider {
  position: relative;
}

.slider-section .slick-track {
  display: flex;
}

.slider-section .slick-slide {
  height: auto;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .slider-section * {
    transition: none !important;
    animation: none !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .bg-light {
    background-color: #fff !important;
    border: 2px solid #000;
  }
  
  .category-item {
    border-bottom: 2px solid #000;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .bg-light {
    background-color: #2d3748 !important;
    color: #fff;
  }
  
  .category-item a {
    color: #e2e8f0 !important;
  }
  
  .modal-content {
    background-color: #2d3748;
    color: #fff;
  }
  
  .small-heading a,
  .superclass-dot {
    color: #e2e8f0 !important;
  }
}

/* Very small screens */
@media (max-width: 375px) {
  .subcategory-grid .col-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }
  
  .slider-section {
    padding-top: 0.5rem !important;
  }
}

/* Ensure proper spacing on all devices */
.slider-section .row {
  margin-left: 0;
  margin-right: 0;
}

.slider-section .container-fluid {
  padding-left: 12px;
  padding-right: 12px;
}

@media (min-width: 768px) {
  .slider-section .container-fluid {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (min-width: 1200px) {
  .slider-section .container-fluid {
    padding-left: 32px;
    padding-right: 32px;
  }
}

/* Remove underline from all links in this component */
.slider-section a,
.slider-section a:hover,
.slider-section a:focus,
.slider-section a:active,
.slider-section a:visited {
  text-decoration: none !important;
}

/* Specific styles for category links */
.home-category a,
.home-category a:hover {
  text-decoration: none !important;
}

/* Modal links */
.custom-modal a,
.custom-modal a:hover {
  text-decoration: none !important;
}