/* --- CSS Variables and Base Styles --- */
:root {
    --text-light: rgba(255, 255, 255, 0.9);
    --hover-bg: rgba(255, 255, 255, 0.1);
}

/* --- Featured Slider Container --- */
.featured-slider-container {
  grid-column: span 1 / span 1;
  background: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 180px;
  box-sizing: border-box;
}

/* --- Featured Slider Horizontal Slide --- */
.custom-slider-track {
  width: 100%;
  overflow: hidden;
  position: relative;
  min-height: 180px;
  height: 180px;
  background: none;
  margin: 0;
  padding: 0;
}

.slider-track-inner {
  display: flex;
  width: 100%;
  height: 220px;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  background: none;
}

.featured-slide {
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  height: 220px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: relative;
  box-sizing: border-box;
  background: none;
  margin: 0;
  padding: 0;
}

.slider-ellipsis-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-clamp: 2;
  line-height: 1.2em;
  min-height: 2.4em;
}

.slider-ellipsis-desc {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  min-height: 4.8em;
  line-clamp: 4;
  line-height: 1.2em;
  font-size: 0.95rem;
  opacity: 0.9;
}

.featured-link {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(to bottom right, var(--daikin-blue), var(--daikin-dark-navy));
  border-radius: 0.5rem;
  padding: 1rem;
  color: white;
  min-height: 180px;
  height: 180px;
  box-sizing: border-box;
  text-decoration: none;
  transition: box-shadow 0.2s ease-in-out;
}

.featured-link:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Responsive fix for mega-menu-grid to avoid slider breaking layout */
.mega-menu-grid {
  align-items: stretch;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background-color: white;
}

/* --- Navigation Bar --- */
.main-nav {
  background-color: white;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.nav-container {
  max-width: 1280px;
  /* max-w-7xl */
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  /* px-4 */
  padding-right: 1rem;
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 5rem;
  /* h-20 */
}

/* --- Logo --- */
.logo-container {
  display: flex;
  align-items: center;
}

.logo {
  height: 2.5rem;
  /* h-10 */
  width: auto;
}

/* --- Desktop Menu --- */
.desktop-menu {
  display: none;
  /* hidden by default */
  align-items: center;
  gap: 2rem;
  /* space-x-8 */
}

.nav-link, .menu-button {
  color: var(--daikin-dark-navy);
  font-weight: 600;
  /* font-semibold */
  transition: color 0.2s ease-in-out;
}

.nav-link:hover, .menu-button:hover {
  color: var(--daikin-blue);
}

.menu-button {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  /* space-x-1 */
}

.chevron-down {
  width: 1rem;
  /* h-4 w-4 */
  height: 1rem;
}

/* --- Mega Menu --- */
.mega-menu-container {
  position: relative;
}

.mega-menu-dropdown {
  display: none;
  /* Hidden by default */
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.5rem;
  /* mt-2 */
  width: 800px;
  border-radius: 0.5rem;
  /* rounded-lg */
  padding: 2rem 1.5rem;
  /* py-8 px-6 */
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  /* shadow-xl */

  /* Glassmorphism Effect */
  background-color: rgb(255 255 255 / 96%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 100;
}

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

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

.mega-menu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  /* gap-6 */
}

.mega-menu-title {
  font-size: 1.125rem;
  /* text-lg */
  font-weight: 700;
  /* font-bold */
  color: var(--daikin-blue);
  margin-bottom: 1rem;
  /* mb-4 */
  margin-top: 0;
}

.mega-menu-link-group {
  display: block;
  margin-bottom: 0.75rem;
  /* mb-3 */
}

.mega-menu-link-title {
  font-size: 0.875rem;
  /* text-sm */
  font-weight: 500;
  /* font-medium */
  color: var(--gray-800);
  transition: color 0.2s ease-in-out;
}

.mega-menu-link-group:hover .mega-menu-link-title {
  color: var(--daikin-blue);
}

.mega-menu-link-subtitle {
  font-size: 0.75rem;
  /* text-xs */
  color: var(--gray-500);
}

.btn-primary-small {
  display: inline-block;
  background-color: var(--daikin-blue);
  color: white !important;
  padding: 0.5rem 1rem;
  /* px-4 py-2 */
  border-radius: 0.25rem;
  /* rounded */
  font-size: 0.875rem;
  /* text-sm */
  font-weight: 500;
  /* font-medium */
  text-align: center;
  transition: background-color 0.2s ease-in-out;
}

.btn-primary-small:hover {
  background-color: var(--daikin-dark-navy);
}

/* --- Featured Link in Mega Menu --- */
.featured-link {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: linear-gradient(to bottom right, var(--daikin-blue), var(--daikin-dark-navy));
  border-radius: 0.5rem;
  padding: 1rem;
  color: white;
  min-height: 180px;
  height: 180px;
  box-sizing: border-box;
  text-decoration: none;
  transition: box-shadow 0.2s ease-in-out;
}

.featured-link:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.featured-badge {
  font-size: 0.75rem;
  /* text-xs */
  text-transform: uppercase;
  letter-spacing: 0.05em;
  /* tracking-wide */
  margin-bottom: 0.25rem;
  /* mb-1 */
}

.featured-title {
  font-size: 1.125rem;
  /* text-lg */
  font-weight: 700;
  /* font-bold */
  margin-bottom: 0.5rem;
  /* mb-2 */
}

.featured-description {
  font-size: 0.875rem;
  /* text-sm */
  opacity: 0.9;
}

/* --- Actions: Search & Locations --- */
.actions-container {
  display: none;
  /* hidden by default */
  align-items: center;
  gap: 1rem;
  /* space-x-4 */
}

.search-form {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  /* left-3 */
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  height: 1rem;
  /* h-4 w-4 */
  width: 1rem;
}

.search-input {
  /* padding-left: 2rem; */
  /* pl-10 */
  /* width: 12rem; */
  /* w-48 */
  /* height: 2.25rem; */
  /* h-9 */
  /* border: 1px solid #d1d5db; */
  /* border-radius: 0.375rem; */
  /* rounded-md */
  /* background-color: white; */
}

.search-input:focus {
  outline: none;
  border-color: var(--daikin-blue);
}

.btn-locations {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--daikin-blue);
  color: white;
  font-weight: 600;
  /* font-poppins is covered by body, font-semibold */
  padding: 0.5rem 0.75rem;
  /* px-3 py-2 */
  border-radius: 0.375rem;
  /* rounded-md */
  transition: background-color 0.2s ease-in-out;
}

.btn-locations:hover {
  background-color: var(--daikin-dark-navy);
}

.map-pin-icon {
  height: 1rem;
  width: 1rem;
  margin-right: 0.25rem;
  /* mr-1 */
}

/* --- Mobile Menu Button --- */
.mobile-menu-button-container {
  display: block;
  /* Shown by default */
}

.mobile-menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  border-radius: 0.5rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  transition: background 0.2s, box-shadow 0.2s, border-color 0.2s;
  cursor: pointer;
  position: relative;
}

.mobile-menu-button:hover, .mobile-menu-button:focus {
  background: var(--gray-50);
  border-color: var(--daikin-blue);
}

.mobile-menu-button .menu-icon {
  height: 1.7rem;
  width: 1.7rem;
  color: var(--daikin-dark-navy);
}

/* --- Dropdown Containers --- */
.dropdown-container {
  position: relative;
}

/* --- UPDATED: Standard Dropdown Menu --- */
.simple-dropdown {
  display: none;
  position: absolute;
  z-index: 50;
  top: 100%;
  left: 0;
  margin-top: 0.5rem;
  /* mt-2 */
  width: 16rem;
  /* w-64 */
  background-color: white;
  border-radius: 0.5rem;
  /* rounded-lg */
  border: 1px solid var(--border-color);
  /* border */
  /* shadow-xl */
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  padding-top: 0.5rem;
  /* py-2 */
  padding-bottom: 0.5rem;
  /* py-2 */
}

.simple-dropdown-link {
  display: block;
  padding: 0.5rem 1rem;
  /* px-4 py-2 */
  font-size: 0.875rem;
  /* text-sm */
  color: var(--gray-700);
  /* text-gray-700 */
  transition: background-color 0.2s ease, color 0.2s ease;
}

.simple-dropdown-link:hover {
  background-color: var(--gray-50);
  /* hover:bg-gray-50 */
  color: var(--daikin-blue);
  /* hover:text-daikin-blue */
}


/* --- Responsive Breakpoints --- */

/* Small screens (sm: 640px) */
@media (min-width: 640px) {
  .nav-container {
    padding-left: 1.5rem;
    /* sm:px-6 */
    padding-right: 1.5rem;
  }
}

/* Medium screens (md: 768px) */
@media (min-width: 768px) {
  .actions-container {
    display: flex;
    /* md:flex */
  }

  .search-form .search-input {
    width: 12rem;
  }
}

/* Large screens (lg: 1024px) */
@media (min-width: 1024px) {
  .desktop-menu {
    display: flex;
    /* lg:flex */
  }

  .mobile-menu-button-container {
    display: none;
    /* lg:hidden */
  }

  .nav-container {
    padding-left: 2rem;
    /* lg:px-8 */
    padding-right: 2rem;
  }
}

/* --- Mobile Menu Styles --- */
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.5);
  display: block;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.mobile-menu.active {
  pointer-events: auto;
  opacity: 1;
}

.mobile-menu-list {
  position: absolute;
  top: 0;
  right: 0;
  width: 85vw;
  max-width: 360px;
  height: 100vh;
  background: #fff;
  box-shadow: -2px 0 16px rgba(0, 0, 0, 0.08);
  padding: 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transform: translateX(100%);
  opacity: 1;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.active .mobile-menu-list {
  transform: translateX(0);
}

.mobile-menu-close {
  position: absolute;
  top: 0;
  left: 0;
  margin: 5px 10px;
  background: var(--daikin-blue);
  border: none;
  z-index: 10001;
  padding: 0.25rem;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: background 0.2s;
}

.mobile-menu-close:hover {
  background: var(--daikin-dark-navy);
}

.mobile-menu-close svg {
  display: block;
  color: var(--white);
}

.mobile-menu-item {
  width: 100%;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.search-form .search-icon {
  margin-right: 0.5rem;
  color: var(--gray-400);
}

.search-form .search-input {
  padding-left: 2.5rem;
  width: 100%;
  height: 2.5rem;
  border-radius: 0.375rem;
  border: 1px solid var(--gray-200);
  font-family: 'Poppins', sans-serif;
}

.menu-button.mobile-menu-button {
  width: 100%;
  text-align: left;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--daikin-dark-navy);
  background: none;
  border: none;
  padding: 0.75rem 0.5rem;
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.2s;
  gap: 0.5rem;
}

.menu-button.mobile-menu-button:active, .menu-button.mobile-menu-button:focus {
  background: var(--gray-50);
}

.menu-button.mobile-menu-button .chevron-down {
  margin-left: auto;
  width: 1.1em;
  height: 1.1em;
  color: var(--gray-400);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.menu-button.mobile-menu-button[aria-expanded="true"] .chevron-down {
  transform: rotate(180deg);
}

/* --- Mobile Menu Dropdown Slide Animation --- */
.mobile-menu-dropdown {
  display: block;
  background: #f9fafb;
  border-radius: 0.375rem;
  padding: 0 0.75rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transform: scaleY(0.8) translateY(-16px);
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s, max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-dropdown.active {
  transform: scaleY(1) translateY(0);
  opacity: 1;
  max-height: 8000px;
  pointer-events: auto;
  padding: 0.5rem 0.75rem 0.75rem 1rem;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-mega-section {
  margin-bottom: 1.25rem;
}

.mobile-mega-section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--daikin-blue);
  margin-bottom: 0.5rem;
}

.mobile-menu-dropdown a {
  display: block;
  color: var(--gray-950-opaque);
  font-size: 1rem;
  padding: 0.5rem 0;
  border-radius: 0.25rem;
  transition: background 0.2s, color 0.2s;
}

.mobile-menu-dropdown a:hover {
  background: var(--gray-50);
  color: var(--daikin-blue);
}

.mobile-menu-item .btn-primary-small {
  margin-top: 0.5rem;
  width: 100%;
  text-align: center;
}

.mobile-menu .featured-link {
  background: linear-gradient(to bottom right, var(--daikin-blue), var(--daikin-dark-navy));
  color: #fff;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-top: 0.5rem;
  display: block;
}

.mobile-menu .featured-badge {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.mobile-menu .featured-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.mobile-menu .featured-description {
  font-size: 0.95rem;
  opacity: 0.9;
}

.mobile-menu .btn-locations {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--daikin-blue);
  color: white !important;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 1rem;
  width: 100%;
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
  transition: background-color 0.2s ease-in-out;
}

.mobile-menu .btn-locations:hover {
  background-color: var(--daikin-dark-navy);
}

.mobile-menu .map-pin-icon {
  height: 1.1em;
  width: 1.1em;
  margin-right: 0.5em;
}

@media (min-width: 1024px) {
  .mobile-menu {
    display: none !important;
  }
}

/* --- Secondary Navigation --- */
.secondary-nav {
  background-color: var(--daikin-dark-navy);
  color: var(--daikin-light-blue);
}

.secondary-nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 2.5rem;
  /* h-10 */
}

.secondary-nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.secondary-nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--daikin-light-blue);
  font-size: 0.875rem;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  transition: color 0.3s ease;
}

.secondary-nav-link:hover {
  color: white;
  text-decoration: underline;
}

.secondary-nav-text {
  display: none;
  /* Hide text on small screens */
}


/* --- Icons --- */
.nav-icon-sm {
  height: 1rem;
  width: 1rem;
}

.nav-icon-lg {
  height: 1.5rem;
  width: 1.5rem;
}

.secondary-nav-link .nav-icon-sm, .secondary-nav-link svg {
  color: white;
  height: 1rem;
  width: 1rem;
}

.mobile-menu-item .btn-primary-small:hover {
  background: var(--daikin-dark-navy);
}

/* --- Responsive Breakpoints --- */
@media (min-width: 640px) {
  .nav-container {
    padding: 0 1.5rem;
  }
}

@media (min-width: 768px) {

  .secondary-nav-text {
    display: inline;
  }
}

.featured-slider-indicators {
  display: flex;
  gap: 5px;
  padding: .5rem;
  justify-content: center;
  align-items: center;
}

.slider-indicator {
  display: flex;
  width: 10px;
  height: 10px;
  background: var(--daikin-light-blue);
  border-radius: 1rem;
}

.slider-indicator.active {
  background: var(--daikin-dark-navy);
}

@media screen and (max-width: 780px) {
  .featured-slider-container {
    height: 220px;
  }

  .custom-slider-track {
    min-height: 190px;
    height: 190px;
  }
}

/* --- Floating Menu Container --- */
.floating-menu-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 50;
}

/* --- Toggle Button --- */
.floating-menu-toggle {
    background-color: var(--daikin-blue);
    color: white;
    display: flex;
    align-items: center;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    overflow: hidden;
    border-radius: 9999px;
    height: 3rem; /* 48px */
    border: none;
    cursor: pointer;
    transition: all ease-in-out;
}

.floating-menu-toggle:hover {
    background-color: var(--daikin-dark-navy);
}

/* State: Collapsed (Icon Only) */
.floating-menu-toggle.is-collapsed {
    width: 3rem; /* 48px */
    justify-content: center;
    transition-duration: 300ms;
}

/* State: Expanded (Icon + Text) */
.floating-menu-toggle.is-expanded {
    padding: 0 1.5rem;
    min-width: 160px;
    justify-content: flex-start;
    transition-duration: 900ms;
}

.floating-menu-toggle .icon {
    flex-shrink: 0;
}

.floating-menu-toggle .text {
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    margin-left: 0.75rem;
    transition: opacity 900ms ease-in-out;
}

.floating-menu-toggle .close-icon {
    flex-shrink: 0;
    margin-left: 0.5rem;
    transition: opacity 300ms ease-in-out;
}

/* Hiding text when collapsed */
.is-collapsed .text,
.is-collapsed .close-icon {
    opacity: 0;
    transition-duration: 200ms;
}

/* Showing text when expanded */
.is-expanded .text,
.is-expanded .close-icon {
    opacity: 1;
}


/* --- Menu Panel --- */
.floating-menu-panel {
    position: absolute;
    bottom: 4rem; /* 64px */
    right: 0;
    background-color: var(--daikin-deep-blue);
    border-radius: 0.5rem;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    transition: all 300ms;
    transform-origin: bottom right;
    border: 1px solid rgba(0, 45, 93, 0.3);
    width: 320px;
    max-height: 34rem;
    overflow-y: auto;
}

/* State: Hidden */
.floating-menu-panel.is-closed {
    transform: scale(0.95);
    opacity: 0;
    pointer-events: none;
}

/* State: Visible */
.floating-menu-panel.is-open {
    transform: scale(1);
    opacity: 1;
    pointer-events: auto;
}

/* --- Menu Content --- */
.floating-menu-content {
    padding: 1.5rem;
}

.menu-header {
    margin-bottom: 1.5rem;
}

.menu-header-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
}

.menu-header-title .icon {
    margin-right: 0.5rem;
    color: var(--daikin-light-blue);
}

.menu-sections-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.menu-section h4 {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--daikin-light-blue);
    margin: 0 0 0.75rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.menu-section ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.menu-section a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    color: var(--text-light);
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 200ms;
}

.menu-section a:hover {
    background-color: var(--hover-bg);
    color: white;
}

.menu-section .external-link-icon {
    opacity: 0;
    transition: opacity 200ms;
    color: var(--daikin-light-blue);
}

.menu-section a:hover .external-link-icon {
    opacity: 1;
}