/**
 * Custom Wellness Centre Styles
 * Only for unique patterns that cannot be achieved with Tailwind utilities
 */

:root {
  --secondary-color: #e61f93;
  --primary-color: #ffacec;
}

@layer components {
  /* ========================================
     MOBILE HAMBURGER MENU & SIDEBAR
     Slide-out navigation animations
     ======================================== */

  /* Hamburger Menu Button */
  .hamburger-button {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
  }

  .hamburger-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
  }

  .hamburger-button:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
    border-radius: 0.5rem;
  }

  /* Hamburger Icon Lines */
  .hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  /* Mobile Sidebar */
  .mobile-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 280px;
    height: 100vh;
    background-color: white;
    box-shadow: 0 20px 25px -5px rgb(255 172 236 / 0.3);
    z-index: 1100;
    transition: right 0.3s ease-out;
    overflow-y: auto;
  }

  /* Sidebar Open State */
  .mobile-sidebar.open {
    right: 0;
  }

  /* Hide sidebar on desktop */
  @media (min-width: 1024px) {
    .mobile-sidebar {
      display: none;
    }
  }

  /* Sidebar Content Container */
  .mobile-sidebar-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }

  /* Close Button */
  .sidebar-close-button {
    align-self: flex-end;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #111827;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
  }

  .sidebar-close-button:hover {
    background-color: #fce7f3;
    color: var(--primary-color);
  }

  .sidebar-close-button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
  }

  /* Sidebar Navigation List */
  .sidebar-nav-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
  }

  /* Sidebar Navigation Links */
  .sidebar-nav-link {
    display: block;
    padding: 0.875rem 1rem;
    min-height: 44px;
    font-size: 1rem;
    font-weight: 500;
    color: #111827;
    text-decoration: none;
    border-radius: 0.5rem;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
  }

  .sidebar-nav-link:hover {
    background-color: #fdf2f8;
    color: var(--primary-color);
    border-left-color: var(--primary-color);
  }

  .sidebar-nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
  }

  .sidebar-nav-link:active {
    background-color: #fce7f3;
  }

  /* Backdrop Overlay */
  .sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  /* Backdrop Open State */
  .sidebar-backdrop.open {
    opacity: 1;
    visibility: visible;
  }

  /* Hide backdrop on desktop */
  @media (min-width: 1024px) {
    .sidebar-backdrop {
      display: none;
    }
  }

  /* Prevent body scroll when sidebar is open */
  body.sidebar-open {
    overflow: hidden;
  }

  /* ========================================
     GLIDE.JS CAROUSEL CUSTOMIZATION
     ======================================== */

  /* Glide Carousel Container */
  .glide {
    position: relative;
  }

  /* Glide Track (slides container) */
  .glide__track {
    overflow: hidden;
  }

  /* Glide Slides List */
  .glide__slides {
    display: flex;
    padding: 0;
    margin: 0;
    list-style: none;
  }

  /* Navigation Arrows Container */
  .glide__arrows {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    padding: 0 1rem;
  }

  @media (min-width: 768px) {
    .glide__arrows {
      position: absolute;
      top: 50%;
      left: 0;
      right: 0;
      transform: translateY(-50%);
      justify-content: space-between;
      gap: 2rem;
      padding: 0 1rem;
      margin-top: 0;
      z-index: 10;
    }
  }

  /* Arrow Buttons */
  .glide__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0.5rem;
    background-color: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.25rem;
  }

  .glide__arrow:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: scale(1.1);
  }

  .glide__arrow:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
  }

  .glide__arrow:active {
    transform: scale(0.95);
  }

  .glide__arrow--left {
    order: -1;
  }

  @media (min-width: 768px) {
    .glide__arrow {
      background-color: rgba(255, 172, 236, 0.9);
    }

    .glide__arrow:hover {
      background-color: var(--secondary-color);
    }
  }

  /* Bullets (Dot Indicators) Container */
  .glide__bullets {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    list-style: none;
    padding: 0;
  }

  /* Individual Bullet */
  .glide__bullet {
    width: 10px;
    height: 10px;
    min-width: 10px;
    min-height: 10px;
    padding: 0;
    background-color: #d1d5db;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .glide__bullet:hover {
    background-color: #9ca3af;
    transform: scale(1.2);
  }

  .glide__bullet:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
  }

  /* Active Bullet */
  .glide__bullet.glide__bullet--active {
    background-color: var(--primary-color);
    width: 12px;
    height: 12px;
    min-width: 12px;
    min-height: 12px;
  }

  @media (min-width: 768px) {
    .glide__bullet {
      width: 12px;
      height: 12px;
      min-width: 12px;
      min-height: 12px;
    }

    .glide__bullet.glide__bullet--active {
      width: 14px;
      height: 14px;
      min-width: 14px;
      min-height: 14px;
    }
  }
}

@layer utilities {
  /* Skip to content link for accessibility */
  .skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #10b981;
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 100;
  }

  .skip-link:focus {
    top: 0;
  }

  /* Hero Jumbotron - background image utility */
  .hero-jumbotron {
    background-image: url("../assets/images/hero-wellness.jpg");
  }

  /* Wellness Formula Jumbotron - background image utility */
  .wellness-formula-jumbotron {
    background-image: url("../assets/images/wellness-formula-hero.jpg");
  }

  /* Circulation Boost Therapy Jumbotron - background image utility */
  .circulation-boost-therapy-jumbotron {
    background-image: url("../assets/images/modern-massage-therapy-hero.jpg");
  }
}
