/*
================================================================================
  Companion Care Services - Custom Stylesheet
  Domain: https://www.companioncareservices.com.au/
  ABN: 27 647 803 905
  Description: Custom CSS utilities complementing Tailwind CSS for NDIS Website
================================================================================
*/

/* -----------------------------------------------------------------------------
   1. ROOT VARIABLES & COLOR DESIGN TOKENS
   Strictly derived from stuff/agent-data/design.md
----------------------------------------------------------------------------- */
:root {
  /* Primary Brand Color Tokens */
  --brand-navy: #011f40; /* Deep Navy Blue */
  --brand-navy-rgb: 1, 31, 64;
  --brand-blue: #0d8fd5; /* Vibrant NDIS Brand Blue */
  --brand-blue-rgb: 13, 143, 213;
  --brand-light-blue: #5fbfe3; /* Sky Accent Blue */
  --brand-light-blue-rgb: 95, 191, 227;
  --brand-soft-bg: #f3f8fb; /* Soft Clean Section Background */
  --brand-gray-text: #5f6b78; /* Secondary Body Text */
  --brand-muted: #8a98a6; /* Muted Gray */
  --brand-border: #d9e2ea; /* Soft Border Gray */
  --brand-amber: #f5a65b; /* Warm Accent Orange/Amber */
  --brand-amber-hover: #e89445;
  --brand-forest: #264337; /* Dark Forest Accent */
  --brand-white: #ffffff;

  /* Backward Compatibility Aliases */
  --color-primary: var(--brand-navy);
  --color-primary-rgb: var(--brand-navy-rgb);
  --color-brand-blue: var(--brand-blue);
  --color-brand-blue-rgb: var(--brand-blue-rgb);
  --color-light-blue: var(--brand-light-blue);
  --color-soft-bg: var(--brand-soft-bg);
  --color-text-dark: var(--brand-navy);
  --color-text-body: var(--brand-gray-text);
  --color-muted: var(--brand-muted);
  --color-border: var(--brand-border);
  --color-white: #ffffff;
}

/* -----------------------------------------------------------------------------
   2. GLOBAL RESET & BASE STYLES
----------------------------------------------------------------------------- */
html {
  scroll-behavior: smooth;
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  color: var(--color-text-body);
}

body {
  overflow-x: hidden;
  background-color: #ffffff;
}

/* Custom modern scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #0d8fd5;
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: #011f40;
}

/* -----------------------------------------------------------------------------
   3. ASYMMETRIC CARD RADII & ELEMENTOR SHAPES
   Recreates the exact visual style seen in Home.png & design.md
----------------------------------------------------------------------------- */
/* Standard Elementor card radius with soft curve */
.radius-card-sm {
  border-radius: 15px;
}

/* Asymmetric corner for floating hero & promise cards */
.radius-card-asymm {
  border-radius: 15px 15px 60px 15px;
}

/* Custom rounded corner for Who We Are block */
.radius-who-we-are {
  border-radius: 15px 15px 80px 15px;
}

/* Custom badge pill */
.radius-pill {
  border-radius: 40px;
}

/* -----------------------------------------------------------------------------
   3B. HERO & OVERLAPPING SECTION STYLES (MATCHING SITE-2 WITH PREMIUM FINISHING)
   Features rich gradient masking, geometric hex textures, and interactive cards
----------------------------------------------------------------------------- */

/* Rich cinematic gradient overlay for hero background image */
.hero-shade {
  background: linear-gradient(
    90deg,
    rgba(1, 31, 64, 0.94) 0%,
    rgba(1, 31, 64, 0.78) 42%,
    rgba(1, 31, 64, 0.45) 75%,
    rgba(1, 31, 64, 0.72) 100%
  );
}

/* Geometric Hexagonal Pattern Overlay for brand card */
.hex {
  background-image:
    linear-gradient(
      30deg,
      rgba(255, 255, 255, 0.09) 12%,
      transparent 12.5%,
      transparent 87%,
      rgba(255, 255, 255, 0.09) 87.5%,
      rgba(255, 255, 255, 0.09)
    ),
    linear-gradient(
      150deg,
      rgba(255, 255, 255, 0.09) 12%,
      transparent 12.5%,
      transparent 87%,
      rgba(255, 255, 255, 0.09) 87.5%,
      rgba(255, 255, 255, 0.09)
    );
  background-size: 36px 63px;
}

/* Premium Brand Blue Card with subtle border and shadow */
.hero-card-brand {
  background-color: #0d8fd5;
  border-radius: 18px;
  box-shadow: 0 20px 45px -10px rgba(13, 143, 213, 0.35);
  transition:
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-card-brand:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 55px -12px rgba(13, 143, 213, 0.45);
}

/* Card top-to-bottom brand gradient fading to transparent */
.hero-card-gradient-overlay {
  background: linear-gradient(
    180deg,
    rgba(13, 143, 213, 0.97) 0%,
    rgba(13, 143, 213, 0.9) 0%,
    rgba(13, 143, 213, 0.45) 24%,
    rgba(13, 143, 213, 0) 76%
  );
}

/* Hex pattern with vertical fade to transparent */
.hex-fade-bottom {
  mask-image: linear-gradient(to bottom, black 25%, transparent 70%);
  -webkit-mask-image: linear-gradient(to bottom, black 25%, transparent 70%);
}

/* -----------------------------------------------------------------------------
   3B-1. SYNCHRONIZED HERO & CARD SLIDESHOW STYLES
   - Hero background slides: smooth opacity crossfade + Ken Burns slow zoom
   - Overlapping card slides: synchronized crossfade strictly WITHOUT zoom
----------------------------------------------------------------------------- */

/* Hero background slideshow container */
.hero-slideshow {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

/* Individual hero slide */
.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 1.4s ease;
  will-change: transform, opacity;
  pointer-events: none;
}

/* Ken Burns slow zoom animation for active hero slide */
@keyframes heroZoom {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.08);
  }
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
  animation: heroZoom 7s ease-out forwards;
}

/* Overlapping card slideshow container */
.card-slideshow {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

/* Individual card slide - STRICTLY NO ZOOM */
.card-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 1.2s ease;
  transform: none !important; /* No zoom effect on card image */
  pointer-events: none;
}

.card-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
  transform: none !important; /* Preserves clean static framing */
}

/* Enhanced Professional Hero Feature Box */
.hero-feature-box {
  background: rgba(1, 31, 64, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 14px 35px -8px rgba(1, 31, 64, 0.55);
}

.hero-feature-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(95, 191, 227, 0.6), transparent);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.hero-feature-box:hover {
  transform: translateY(-5px);
  border-color: rgba(95, 191, 227, 0.5);
  box-shadow:
    0 22px 45px -10px rgba(1, 31, 64, 0.7),
    0 0 25px rgba(95, 191, 227, 0.18);
}

.hero-feature-box:hover::before {
  opacity: 1;
}

/* Subtle button shimmer sheen effect */
.btn-shimmer {
  position: relative;
  overflow: hidden;
}
.btn-shimmer::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.25) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(30deg);
  transition: all 0.75s ease;
  pointer-events: none;
}
.btn-shimmer:hover::after {
  left: 130%;
}

/* -----------------------------------------------------------------------------
   4. GLASSMORPHISM & STICKY HEADER SYSTEM
----------------------------------------------------------------------------- */
#mainHeader {
  transition: background-color 0.35s ease, padding 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

/* State 1: Header at top of page (Transparent over Dark Hero) */
#mainHeader.header-transparent {
  background-color: transparent !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
  padding-top: 1.25rem !important;
  padding-bottom: 1.25rem !important;
}
#mainHeader.header-transparent .nav-link,
#mainHeader.header-transparent .dropdown-trigger {
  color: rgba(255, 255, 255, 0.95) !important;
}
#mainHeader.header-transparent .nav-link:hover,
#mainHeader.header-transparent .dropdown-trigger:hover {
  color: var(--brand-light-blue) !important;
}
#mainHeader.header-transparent .phone-title {
  color: rgba(255, 255, 255, 0.7) !important;
}
#mainHeader.header-transparent .phone-number {
  color: #ffffff !important;
}
#mainHeader.header-transparent #mobileMenuBtn {
  color: #ffffff !important;
}
#mainHeader.header-transparent #mobileMenuBtn:hover {
  color: var(--brand-light-blue) !important;
}

/* State 2: Header when Scrolled (Clean Light Glassmorphism with Dark Navy Text) */
#mainHeader.header-scrolled {
  background-color: rgba(255, 255, 255, 0.97) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border-bottom: 1px solid var(--brand-border) !important;
  box-shadow: 0 4px 20px -2px rgba(1, 31, 64, 0.1) !important;
  padding-top: 0.75rem !important;
  padding-bottom: 0.75rem !important;
}
#mainHeader.header-scrolled .nav-link,
#mainHeader.header-scrolled .dropdown-trigger {
  color: var(--brand-navy) !important;
}
#mainHeader.header-scrolled .nav-link:hover,
#mainHeader.header-scrolled .dropdown-trigger:hover {
  color: var(--brand-blue) !important;
}
#mainHeader.header-scrolled .phone-title {
  color: var(--brand-gray-text) !important;
}
#mainHeader.header-scrolled .phone-number {
  color: var(--brand-navy) !important;
}
#mainHeader.header-scrolled #mobileMenuBtn {
  color: var(--brand-navy) !important;
}
#mainHeader.header-scrolled #mobileMenuBtn:hover {
  color: var(--brand-blue) !important;
}

.card-shadow-soft {
  box-shadow: 0 15px 35px -5px rgba(1, 31, 64, 0.08);
}

.card-shadow-hover {
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-shadow-hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 50px -12px rgba(13, 143, 213, 0.22);
}

/* -----------------------------------------------------------------------------
   5. KEYFRAME ANIMATIONS & MICRO-INTERACTIONS
----------------------------------------------------------------------------- */
@keyframes floatSlow {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes pulseGlow {
  0%,
  100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

@keyframes marqueeInfinite {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-50%);
  }
}

.animate-float {
  animation: floatSlow 4s ease-in-out infinite;
}

.animate-pulse-glow {
  animation: pulseGlow 3s ease-in-out infinite;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marqueeInfinite 25s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

/* -----------------------------------------------------------------------------
   6. CUSTOM CAROUSEL & SLIDER HELPERS
----------------------------------------------------------------------------- */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Smooth snap scrolling for services slider */
.snap-slider-x {
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.snap-slide-item {
  scroll-snap-align: start;
}

/* -----------------------------------------------------------------------------
   7. PROGRESS BAR STYLES (Who We Are Section)
----------------------------------------------------------------------------- */
.progress-bar-track {
  background: rgba(255, 255, 255, 0.25);
  height: 8px;
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar-fill {
  background: #ffffff;
  height: 100%;
  border-radius: 9999px;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* -----------------------------------------------------------------------------
   8. FORM STYLING & ACCESSIBILITY
----------------------------------------------------------------------------- */
.form-input-custom {
  background-color: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 0.95rem;
  color: #011f40;
  transition: all 0.25s ease;
  width: 100%;
}

.form-input-custom:focus {
  outline: none;
  background-color: #ffffff;
  border-color: #0d8fd5;
  box-shadow: 0 0 0 3px rgba(13, 143, 213, 0.15);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .radius-card-asymm {
    border-radius: 15px 15px 35px 15px;
  }
  .radius-who-we-are {
    border-radius: 15px 15px 45px 15px;
  }
}
