/* CSS Overrides - Load this LAST to ensure it takes precedence */

/* Add padding to body to account for fixed header */
/* Desktop: top contact bar (~45px) + main navbar (~80px) = ~125px */
html body,
html body.body-bg {
    padding-top: 125px !important;
}

/* Ensure main content doesn't add extra padding */
html body .main-content,
html .main-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Override hero section padding since body already has padding - use high specificity */
html body .hero-section,
html body .hero-3,
html body section.hero-section,
html body section.hero-3,
html .hero-section.hero-3,
section.hero-section.hero-3 {
    padding-top: 0 !important;
    min-height: calc(100vh - 125px) !important;
}

/* Fix testimonial slider visibility */
.testimonial-slider-2 {
    overflow: visible !important;
}

.testimonial-slider-2 .swiper-wrapper {
    display: flex !important;
    transition-timing-function: linear !important;
}

.testimonial-slider-2 .swiper-slide {
    opacity: 1 !important;
    visibility: visible !important;
    flex-shrink: 0 !important;
}

.tesimonial-wrapper-2 {
    overflow: visible !important;
}

/* Fix button text visibility on hover */
.theme-btn:hover {
    color: #1a1a1a !important;
    background-color: #ffffff !important;
}

.theme-btn:hover::after {
    clip-path: circle(100% at 50% 50%) !important;
}

/* Remove border-radius from slider/carousel images */
.brand-slider img,
.brand-slide img,
.brand-image img,
.swiper-slide img,
[class*="slider"] img,
[class*="carousel"] img {
    border-radius: 0 !important;
}

/* Ensure contact box icons display properly within circular background */
.contact-box-items .icon img,
.contact-info-section .contact-box-items .icon img {
    border-radius: 0 !important;
    width: 48px !important;
    height: 48px !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

/* Font Awesome icon styling for contact boxes */
.contact-box-items .icon i,
.contact-info-section .contact-box-items .icon i {
    font-size: 32px !important;
    color: var(--white) !important;
    display: block !important;
    line-height: 1 !important;
}

.contact-box-items .icon,
.contact-info-section .contact-box-items .icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    /* Keep circular background - border-radius: 50% from main.css */
    overflow: hidden !important;
}

/* Remove spacing between service box rows */
.service-section .row.g-0.row-gap-0 {
    row-gap: 0 !important;
    column-gap: 0 !important;
    margin-bottom: 0 !important;
    gap: 0 !important;
}

.service-section .row.g-0.row-gap-0 > [class*="col-"] {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.service-section .service-box-items {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.service-section [class*="col-"] {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Specifically target the second row to remove top margin */
.service-section .row.g-0.row-gap-0 > [class*="col-"]:nth-child(n+4) .service-box-items {
    margin-top: 0 !important;
}


/* Mobile styles */
@media (max-width: 991px) {

    /* Mobile: top contact bar (~40px) + main navbar (~50px) = ~90px */
    html body,
    html body.body-bg {
        padding-top: 90px !important;
    }

    /* Ensure main content doesn't add extra padding on mobile */
    html body .main-content,
    html .main-content {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    /* Override hero section padding on mobile since body already has padding - use high specificity */
    html body .hero-section,
    html body .hero-3,
    html body section.hero-section,
    html body section.hero-3,
    html .hero-section.hero-3,
    section.hero-section.hero-3 {
        padding-top: 0 !important;
        min-height: calc(100vh - 90px) !important;
    }

    /* Center Contact Us button in mobile menu */
    .mobile-menu-container>div.mt-4 {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
    }

    .mobile-menu-container>div.mt-4 .theme-btn,
    .mobile-menu-container>div.mt-4 a.theme-btn {
        width: auto !important;
        min-width: 200px !important;
        max-width: 280px !important;
    }

    /* Hide hero-image-2 and hero-image-3 on mobile */
    .hero-image-2,
    .hero-image-3 {
        display: none !important;
    }

    /* Remove spacing between service boxes on mobile */
    .service-section .service-box-items {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    .service-section [class*="col-"] {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
}

/* Mobile Theme Toggle Button */
.theme-toggle-btn-mobile {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: #ffffff;
  border: none;
  color: #1a1a1a;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  margin-right: 10px;
}

.theme-toggle-btn-mobile:hover {
  background-color: #00A8FF;
  color: #ffffff;
}

.theme-toggle-btn-mobile i {
  font-size: 14px;
  color: inherit;
}
/* Theme Dropdown Styles */
.theme-dropdown-wrapper {
  position: relative;
  margin-right: 15px;
}

.theme-toggle-btn {
  background-color: #ffffff;
  border: none;
  color: #1a1a1a;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.theme-toggle-btn:hover {
  background-color: #00A8FF;
  color: #ffffff;
}

.theme-dropdown {
  background-color: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 0;
  min-width: 150px;
  margin-top: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 1050;
  position: absolute;
  top: 100%;
  left: 0;
  display: none;
  list-style: none;
}

.theme-dropdown.show {
  display: block;
}

.theme-dropdown li {
  margin: 0;
  padding: 0;
}

.theme-dropdown .theme-option {
  width: 100%;
  color: #ffffff;
  padding: 10px 16px;
  transition: all 0.2s ease;
  background-color: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.theme-dropdown .theme-option:hover {
  background-color: rgba(0, 168, 255, 0.1);
  color: #00A8FF;
}

.theme-dropdown .theme-option i {
  width: 18px;
  display: inline-block;
}

/* Light theme dropdown styles */
[data-theme="light"] .theme-toggle-btn {
  border-color: rgba(0, 0, 0, 0.2);
  color: #1a1a1a;
}

[data-theme="light"] .theme-toggle-btn:hover {
  background-color: rgba(0, 168, 255, 0.1);
  border-color: #00A8FF;
  color: #00A8FF;
}

[data-theme="light"] .theme-dropdown {
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .theme-dropdown .theme-option {
  color: #1a1a1a;
}

[data-theme="light"] .theme-dropdown .theme-option:hover {
  background-color: rgba(0, 168, 255, 0.1);
  color: #00A8FF;
}

/* Service Page Image Fixes - Apply to both light and dark modes */
.service-details-image {
  max-width: 100%;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.service-details-image img {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

.service-details-section {
  overflow: hidden;
}

.service-details-section .row {
  overflow: hidden;
}

.service-details-content {
  padding: 20px;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .service-details-image img {
    max-height: 400px;
  }
}

@media (max-width: 767px) {
  .service-details-image img {
    max-height: 300px;
  }
  
  .service-details-content {
    padding: 20px 0;
  }
}

/* Remove background color from news/blog cards content */
.news-box-items .news-content {
  background-color: transparent !important;
}

.news-box-items {
  background-color: transparent !important;
}

[data-theme="light"] .news-box-items .news-content {
  background-color: transparent !important;
}

[data-theme="light"] .news-box-items {
  background-color: transparent !important;
}

/* Remove outline and shadow from news/blog cards */
.news-box-items {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

[data-theme="light"] .news-box-items {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Remove background colors from about section elements */
.about-wrapper .about-image-items .support-content {
  background-color: transparent !important;
}

.about-wrapper .about-content .about-icon-items .icon {
  background-color: transparent !important;
}

[data-theme="light"] .about-wrapper .about-image-items .support-content {
  background-color: transparent !important;
}

[data-theme="light"] .about-wrapper .about-content .about-icon-items .icon {
  background-color: transparent !important;
}

/* Remove section background color to match page background */
.about-section.section-bg {
  background-color: transparent !important;
}

[data-theme="light"] .about-section.section-bg {
  background-color: transparent !important;
}

/* Remove hero section background color to match page background */
.hero-section {
  background-color: transparent !important;
}

[data-theme="light"] .hero-section {
  background-color: transparent !important;
}

/* Remove hover background color from service cards */
.service-box-items::before {
  background: transparent !important;
}

.service-box-items:hover::before {
  background: transparent !important;
}

[data-theme="light"] .service-box-items::before {
  background: transparent !important;
}

[data-theme="light"] .service-box-items:hover::before {
  background: transparent !important;
}

/* Ensure theme toggle and hamburger buttons are always visible and clickable */
.header-right {
  position: relative;
  z-index: 100;
}

.theme-toggle-btn,
.theme-toggle-btn-mobile {
  position: relative;
  z-index: 101;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.header__hamburger {
  position: relative;
  z-index: 101;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.sidebar__toggle {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

[data-theme="light"] .theme-toggle-btn,
[data-theme="light"] .theme-toggle-btn-mobile {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

[data-theme="light"] .header__hamburger {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

[data-theme="light"] .sidebar__toggle {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* Mobile Navbar Fixes for Light Mode - Prevent overflow */
@media (max-width: 991px) {
  [data-theme="light"] .header-main {
    padding: 10px 15px !important;
    max-width: 100vw;
    overflow: hidden;
  }

  [data-theme="light"] .mega-menu-wrapper {
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
  }

  [data-theme="light"] .container {
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
  }

  [data-theme="light"] .header-main .logo {
    max-width: 120px;
    flex-shrink: 0;
  }

  [data-theme="light"] .header-main .logo img {
    max-height: 35px !important;
    width: auto;
  }

  [data-theme="light"] .header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
  }

  [data-theme="light"] .theme-toggle-btn-mobile {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px;
    padding: 0;
    flex-shrink: 0;
  }

  [data-theme="light"] .header__hamburger {
    flex-shrink: 0;
  }

  [data-theme="light"] .sidebar__toggle {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px;
    padding: 0;
    flex-shrink: 0;
    font-size: 18px !important;
  }
}

@media (max-width: 575px) {
  [data-theme="light"] .header-main {
    padding: 8px 10px !important;
  }

  [data-theme="light"] .header-main .logo {
    max-width: 100px;
  }

  [data-theme="light"] .header-main .logo img {
    max-height: 30px !important;
  }

  [data-theme="light"] .theme-toggle-btn-mobile {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px;
  }

  [data-theme="light"] .sidebar__toggle {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px;
    font-size: 16px !important;
  }

  [data-theme="light"] .header-right {
    gap: 6px;
  }
}

/* ========== CRITICAL MOBILE NAVBAR FIX - LIGHT MODE ========== */
/* Ensure light mode navbar matches dark mode structure exactly */

@media (max-width: 991px) {
  /* Header Container - Match dark mode exactly */
  [data-theme="light"] .sticky-header-wrapper {
    background-color: #ffffff !important;
  }

  [data-theme="light"] .header-1 {
    background-color: #ffffff !important;
    padding: 0 !important;
  }

  [data-theme="light"] .header-main {
    padding: 10px 0 !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  [data-theme="light"] .mega-menu-wrapper {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Logo - Match dark mode size */
  [data-theme="light"] .header-main .logo {
    flex-shrink: 0 !important;
    margin-right: 10px !important;
    max-width: none !important;
  }

  [data-theme="light"] .header-main .logo img {
    max-height: 40px !important;
    width: auto !important;
    height: auto !important;
  }

  /* Hide desktop menu */
  [data-theme="light"] .mean__menu-wrapper {
    display: none !important;
  }

  /* Header Right - Match dark mode layout */
  [data-theme="light"] .header-right {
    gap: 8px !important;
    flex-shrink: 0 !important;
    align-items: center !important;
    display: flex !important;
    margin-left: auto !important;
  }

  [data-theme="light"] .header-button {
    display: none !important;
  }

  /* Theme Toggle Mobile - Match dark mode size */
  [data-theme="light"] .theme-toggle-btn-mobile {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    background-color: #1a1a1a !important;
    color: #ffffff !important;
    border: none !important;
  }

  /* Hamburger - Match dark mode size */
  [data-theme="light"] .header__hamburger {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  [data-theme="light"] .sidebar__toggle {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    font-size: 18px !important;
    cursor: pointer !important;
    border: none !important;
    background: transparent !important;
    color: #1a1a1a !important;
  }
}

@media (max-width: 575px) {
  [data-theme="light"] .header-main {
    padding: 8px 0 !important;
  }

  [data-theme="light"] .header-main .logo img {
    max-height: 35px !important;
  }

  [data-theme="light"] .theme-toggle-btn-mobile {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
  }

  [data-theme="light"] .sidebar__toggle {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    font-size: 16px !important;
  }
}
