/* ========================================
   COMPONENTS.CSS - Consolidated Component Styles
   ======================================== */

/* ========================================
   APPLIANCE SECTIONS
   ======================================== */

/* Legacy Appliance Sections - Compatibility Layer */

/* Miele announcement with watermark background */
section.miele-announcement,
section.service-section.miele-announcement {
    position: relative;
    background-color: var(--color-background) !important;
    background-image: url('../img/content/miele-watermark.webp') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

section.miele-announcement::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.3);
    z-index: 0;
    pointer-events: none;
}

section.miele-announcement .container {
    position: relative;
    z-index: 1;
}

/* ========================================
   LAYOUT UTILITIES - TREVEN PATTERN
   ======================================== */

/* Section Background Classes */
.section-bg-white {
  background-color: var(--color-background) !important;
}

.section-bg-light {
  background-color: var(--color-background-light) !important;
}

.section-bg-dark {
  background-color: var(--color-background-dark) !important;
}

/* Full Width Section Wrapper */
.section-wrapper {
  width: 100%;
  position: relative;
}

/* Ensure dividers work well with backgrounds */
.section-divider {
  background-color: transparent;
  position: relative;
  z-index: 1;
}

/* ========================================
   SIMPLE HERO
   ======================================== */

/* Override theme-preservation.css for hero titles */
.header__inner h1,
.header__inner h2,
.header__inner h3,
.header__inner h4,
.header__inner h5,
.header__inner p {
  color: var(--color-text-light) !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8) !important;
}

.header__inner h1 {
  font-size: 3rem !important;
  font-weight: 700 !important;
  margin: 0 !important;
}

/* Ensure the inner header text container is properly styled */
.inner_header_text,
.inner_header_text h1,
.inner_header_text h2,
.inner_header_text h3,
.inner_header_text h4,
.inner_header_text h5,
.inner_header_text p {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--color-text-light) !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8) !important;
}

/* Responsive adjustments */
@media only screen and (max-width: 767.98px) {
  .header__inner h1 {
    font-size: 2rem !important;
  }
}

@media only screen and (max-width: 575.98px) {
  .header__inner h1 {
    font-size: 1.5rem !important;
  }
}

/* ========================================
   CTA SECTION
   ======================================== */

.cta-section .cta-title {
  color: #ffffff !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 1px 1px 2px rgba(0, 0, 0, 0.9) !important;
  font-weight: bold !important;
}

.cta-section h5.cta-title {
  color: #ffffff !important;
}

.cta-section .cta-content h5 {
  color: #ffffff !important;
}

/* Override Bootstrap h5 styles in CTA section */
.cta-section h5,
.cta-section .h5 {
  color: #ffffff !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 1px 1px 2px rgba(0, 0, 0, 0.9) !important;
}

/* Specific override for any inherited color */
section.cta-section h5.cta-title.mb-4 {
  color: #ffffff !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 1px 1px 2px rgba(0, 0, 0, 0.9) !important;
}

/* CTA Button Styles - White button with pill shape */
.cta-section .btn {
  background-color: #ffffff !important;
  color: #333333 !important;
  border: 2px solid #ffffff !important;
  font-weight: bold !important;
  text-shadow: none !important;
  transition: all 0.3s ease !important;
  border-radius: 50px !important;
  padding: 12px 30px !important;
}

.cta-section .btn:hover {
  background-color: transparent !important;
  color: #ffffff !important;
  border: 2px solid #ffffff !important;
  text-shadow: none !important;
  border-radius: 50px !important;
}

.cta-section .btn:focus,
.cta-section .btn:active {
  background-color: #ffffff !important;
  color: #333333 !important;
  border: 2px solid #ffffff !important;
  box-shadow: none !important;
  border-radius: 50px !important;
  text-shadow: none !important;
}

/* ========================================
   SCROLL ANIMATIONS
   ======================================== */

/* Initial state for animated elements */
.service-policy-item,
.service-box,
.brand-item {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Animation classes that can be added via JavaScript if needed */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Hover effects for better interactivity */
.service-policy-item:hover,
.service-box:hover,
.brand-item:hover {
  transform: translateY(-5px);
}

/* Ensure smooth transitions */
.service-policy-item,
.service-box,
.brand-item {
  will-change: transform;
}

/* Remove any conflicting styles */
.service-policy-item,
.service-box,
.brand-item {
  opacity: 1 !important;
}

/* Service link styles (replaces inline hover handlers) */
.service-link {
  color: #ffffff;
  text-decoration: none !important;
  transition: color 0.3s ease;
}
.service-box:hover .service-link,
.service-link:hover,
.service-link:active {
  color: #4a9eff;
}

/* Media queries for reduced motion */
@media (prefers-reduced-motion: reduce) {
  .service-policy-item,
  .service-box,
  .brand-item,
  .animate-on-scroll {
    transition: none;
    animation: none;
  }
}

/* ========================================
   REPAIR SERVICES CARDS
   ======================================== */

.service-card-wrapper {
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-color: #ffffff;
  overflow: hidden;
}

.service-card-wrapper:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.service-card-image-wrapper {
  position: relative;
  overflow: hidden;
}

.service-hover-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(1, 0, 150, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 8px 8px 0 0;
}

.service-hover-overlay h4,
.service-hover-overlay p {
  color: var(--color-text-light) !important;
}

.service-card-wrapper:hover .service-hover-overlay {
  opacity: 1;
}

.service-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
  background-color: #ffffff;
}

/* ========================================
   LOCATIONS WATERMARK
   ======================================== */

.locations-section {
  position: relative;
}

.locations-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('/assets/img/ui/watermark.svg');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  opacity: 0.5;
  z-index: 0;
  pointer-events: none;
}

.locations-section .container {
  position: relative;
  z-index: 1;
}

.locations-section .tab-content {
  position: relative;
  z-index: 2;
  background: #fff;
  padding: 50px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

/* Fix tab underline on hover and active */
.locations-section .nav-tabs .nav-link {
  color: #333 !important;
}

.locations-section .nav-tabs .nav-link:hover {
  border: none !important;
  border-bottom: 2px solid #010096 !important;
  color: #010096 !important;
}

.locations-section .nav-tabs .nav-link.active {
  border: none !important;
  border-bottom: 2px solid #010096 !important;
  color: #010096 !important;
}

/* ========================================
   PRIVACY POLICY
   ======================================== */

.privacy-policy-content ul {
  list-style-type: disc !important;
  padding-left: 2rem !important;
  margin-bottom: 1.5rem !important;
}

.privacy-policy-content ul li {
  margin-bottom: 0.5rem !important;
  display: list-item !important;
}

.privacy-policy-content ol {
  list-style-type: decimal !important;
  padding-left: 2rem !important;
  margin-bottom: 1.5rem !important;
}

.privacy-policy-content ol li {
  margin-bottom: 0.5rem !important;
  display: list-item !important;
}

.privacy-policy-content p {
  margin-bottom: 1rem;
}

/* ========================================
   HERO SLIDER TEXT STANDARDIZATION
   ======================================== */

/* All hero text should be white with black shadow */
.hero-slider-content h1,
.hero-slider-content h2,
.hero-slider-content h3,
.hero-slider-content h4,
.hero-slider-content h5,
.hero-slider-content p {
  color: #ffffff !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8) !important;
}

/* Ensure buttons also have proper contrast */
.hero-slider-content .btn-hero,
.hero-slider-content .btn-outline {
  text-shadow: none !important;
}

/* Hero section standardization */
.hero-section h1,
.hero-section h2,
.hero-section h3,
.hero-section h4,
.hero-section h5,
.hero-section p {
  color: #ffffff !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8) !important;
}

.hero-content h1,
.hero-content h2,
.hero-content h3,
.hero-content h4,
.hero-content h5,
.hero-content p {
  color: #ffffff !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8) !important;
}

.hero-text h1,
.hero-text h2,
.hero-text h3,
.hero-text h4,
.hero-text h5,
.hero-text p {
  color: #ffffff !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8) !important;
}
