/* ==========================================================================
   Global Variables
   ========================================================================== */
:root {
  /* Colors - High Trust Healthcare Theme (Client Updated) */
  --primary-color: #1e3a8a; /* Deep Blue */
  --primary-light: #3d5ab8;
  --primary-dark: #102663;

  --secondary-color: #14b8a6; /* Teal */
  --secondary-light: #4bd1c2;
  --secondary-dark: #0f8a7d;

  --accent-color: #e64a41; /* Vibrant Coral (CompCare Inspiration) */
  --accent-dark: #cc3129;

  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-light: #ffffff;

  --bg-light: #f8fafc;
  --bg-white: #ffffff;

  --border-color: #e5e7eb;
  --success: #2e7d32;
  --warning: #f57f17;
  --error: #c62828;

  /* Typography */
  --font-heading: "Outfit", sans-serif;
  --font-body: "Inter", sans-serif;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 4rem;
  --spacing-xxl: 8rem;

  /* Borders & Shadows */
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px; /* Heavy rounding for modern feel */

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;

  /* Fluid Typography (Modern approach) */
  --fs-h1: clamp(2.5rem, 5vw + 1rem, 4.5rem);
  --fs-h2: clamp(2rem, 4vw + 1rem, 3.5rem);
  --fs-h3: clamp(1.5rem, 3vw + 1rem, 2.5rem);
  --fs-body: clamp(1rem, 1vw + 0.5rem, 1.125rem);

  /* Decorative Shapes */
  --shape-primary: rgba(30, 58, 138, 0.05); /* Soft primary blue */
  --shape-secondary: rgba(20, 184, 166, 0.08); /* Soft teal */
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--bg-light);
  line-height: 1.6;
  overflow-x: hidden;
  font-size: var(--fs-body);
  width: 100%;
}

h1 {
  font-size: var(--fs-h1);
}
h2 {
  font-size: var(--fs-h2);
}
h3 {
  font-size: var(--fs-h3);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
  font-weight: 700;
}

p {
  margin-bottom: var(--spacing-md);
  color: var(--text-secondary);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:focus,
a:active {
  outline: none;
}

a:hover {
  color: var(--secondary-color);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
  /* border: solid red; */
}

.section {
  padding: var(--spacing-xxl) 0;
  position: relative;
  overflow: hidden;
}

/* Section Dividers */
.section-divider-curve {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  transform: rotate(180deg);
}

.section-divider-curve svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 70px;
}

.section-divider-curve .shape-fill {
  fill: var(--bg-light);
}

.section-divider-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  line-height: 0;
}

.section-divider-top svg {
  height: 70px;
}

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

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

.section-bg-primary {
  background-color: var(--primary-dark);
  color: var(--text-light);
}

.section-bg-primary h2,
.section-bg-primary h3,
.section-bg-primary p {
  color: var(--text-light);
}

.text-center {
  text-align: center;
}

/* Decorative Background Elements */
.bg-shape {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  background: var(--shape-secondary);
  border-radius: 50%;
  filter: blur(80px);
}

.shape-1 {
  width: 400px;
  height: 400px;
  top: -100px;
  right: -100px;
}

.shape-2 {
  width: 300px;
  height: 300px;
  bottom: -50px;
  left: -50px;
  background: var(--shape-primary);
}

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

/* Modern Card Designs */
.card-modern {
  background-color: var(--bg-white);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-lg);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
  transition: all var(--transition-normal);
  border: 1px solid rgba(229, 231, 235, 0.5);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card-modern:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
  border-color: var(--secondary-color);
}

/* Glow Effect */
.glow-effect {
  position: relative;
}

.glow-effect::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  background: radial-gradient(
    circle,
    rgba(230, 74, 65, 0.1) 0%,
    transparent 70%
  );
  z-index: -1;
  pointer-events: none;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 32px;
  font-family: var(--font-heading);
  font-weight: 700;
  border-radius: 50px; /* Pill-shaped buttons */
  cursor: pointer;
  transition: all var(--transition-normal);
  border: 2px solid transparent;
  text-align: center;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--text-light);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  color: var(--text-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--text-light);
}

.btn-secondary:hover {
  background-color: var(--secondary-dark);
  color: var(--text-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-accent {
  background-color: var(--accent-color);
  color: var(--text-light);
}

.btn-accent:hover {
  background-color: var(--accent-dark);
  color: var(--text-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: var(--text-light);
}

/* Floating Vertical Social Bar */
.social-float-bar {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 999;
}

@media (max-width: 768px) {
  .social-float-bar {
    display: none;
  }
}

.social-float-item {
  width: 45px;
  height: 45px;
  background: var(--bg-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  color: var(--primary-color);
  transition: all var(--transition-normal);
  font-size: 1.2rem;
}

.social-float-item:hover {
  background: var(--accent-color);
  color: var(--text-light);
  transform: translateX(-5px);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.top-bar {
  background-color: var(--primary-dark);
  color: var(--text-light);
  padding: var(--spacing-xs) 0;
  font-size: 0.9rem;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

.top-bar.hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar-links a {
  color: var(--text-light);
  margin-left: var(--spacing-md);
}

.top-bar-links a:hover {
  color: var(--secondary-light);
}

.header {
  background-color: var(--primary-color);
  backdrop-filter: blur(10px);
  position: fixed;
  width: 100%;
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.page-header {
  padding: clamp(120px, 15vw, 180px) 0 clamp(60px, 10vw, 100px);
  background:
    linear-gradient(
      135deg,
      rgba(15, 23, 42, 0.85) 0%,
      rgba(30, 58, 138, 0.75) 100%
    ),
    var(--hero-bg, var(--primary-dark));
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--text-light);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.header.scrolled {
  background-color: var(--primary-dark);
  padding: 0;
  box-shadow: var(--shadow-md);
}

.header.scrolled .logo img {
  height: 50px;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md) 0;
  transition: padding 0.3s ease;
}

.header.scrolled .nav-container {
  padding: var(--spacing-sm) 0;
}

.logo {
  display: flex;
  align-items: center;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-light);
}

.logo img {
  height: 60px;
  width: auto;
  transition: height var(--transition-normal);
  border-radius: 8px; /* Assuming the new logo might need slight rounding, optional */
}

.logo-text {
  display: flex;
  flex-direction: column;
  margin-left: 12px;
}

.logo-title {
  font-size: 1.25rem;
  font-weight: 900;
  background: linear-gradient(135deg, #ffffff 0%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  letter-spacing: -0.5px;
  text-transform: uppercase;
}

.logo-subtitle {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--secondary-light); /* Adjusted for better visibility */
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.header.scrolled .logo-title {
  font-size: 1.15rem;
}

.header.scrolled .logo-subtitle {
  font-size: 0.7rem;
}

.nav-links a.btn-contact {
  background: linear-gradient(135deg, var(--secondary-color), #0284c7);
  color: white;
  padding: 10px 24px;
  border-radius: 30px;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin-left: 10px;
  display: inline-block;
}

.nav-links a.btn-contact:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(14, 165, 233, 0.6);
  color: white;
}

.nav-links a.btn-contact::after {
  content: none; /* remove underline effect if there is one */
}

@media (max-width: 768px) {
  .logo img {
    height: 45px;
  }
  .header.scrolled .logo img {
    height: 35px;
  }
  .logo-title {
    font-size: 0.95rem;
  }
  .logo-subtitle {
    font-size: 0.6rem;
  }
  .header.scrolled .logo-title {
    font-size: 0.85rem;
  }
  .header.scrolled .logo-subtitle {
    font-size: 0.55rem;
  }
}

.logo i {
  color: var(--secondary-color);
  font-size: 2rem;
  margin-right: var(--spacing-sm);
}

.nav-links {
  display: flex;
  align-items: center;
}

.nav-links li {
  position: relative;
  margin: 0 var(--spacing-sm);
}

.nav-links a {
  color: var(--text-light);
  font-family: var(--font-heading);
  font-weight: 500;
  padding: var(--spacing-sm);
  display: block;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 80%;
  height: 3px;
  background: var(--secondary-color);
  border-radius: 3px;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.nav-links a:hover::after {
  transform: translateX(-50%) scaleX(1);
}

.nav-links a.active {
  color: var(--secondary-light);
}

.nav-links a.active::after {
  transform: translateX(-50%) scaleX(1);
  box-shadow: 0 0 8px rgba(13, 148, 136, 0.6);
}

/* Dropdown */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--bg-white);
  min-width: 220px;
  box-shadow: var(--shadow-md);
  border-radius: var(--border-radius-sm);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-normal);
  z-index: 10;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li {
  margin: 0;
}

.dropdown-menu a {
  padding: var(--spacing-sm) var(--spacing-md);
  border-bottom: 1px solid var(--border-color);
  color: var(
    --text-primary
  ) !important; /* Force dark text in light mode dropdown */
  font-size: 0.95rem;
}

.dropdown-menu a:hover {
  background-color: var(--bg-light);
  color: var(--primary-color) !important;
  padding-left: calc(var(--spacing-md) + 5px);
}

/* Mobile Menu Toggle */
.mobile-menu-btn {
  display: none;
  font-size: 1.5rem;
  color: var(--text-light);
  cursor: pointer;
  background: none;
  border: none;

  margin-right: 15px;
}

/* ==========================================================================
   Hero Slider
   ========================================================================== */
.hero-slider {
  position: relative;
  width: 100%;
  height: 80vh;
  min-height: 550px;
  overflow: hidden;
  background-color: var(--primary-dark);
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-light);
  z-index: 0;
}

.hero-slide.active {
  opacity: 1;
  z-index: 1;
}

.hero-slide h1,
.hero-slide p,
.page-header h1,
.page-header p,
.service-hero h1,
.service-hero p {
  color: #ffffff !important;
}

.hero-overlay-center {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.2) 0%,
    transparent 70%
  );
  z-index: 1;
}

.hero-slide p {
  font-size: 1.25rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--spacing-lg);
  opacity: 0.95;
  color: var(--text-light);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.hero-buttons .btn {
  margin: 0 var(--spacing-sm);
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid white;
  color: white;
  font-size: 1.5rem;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-btn:hover {
  background: var(--primary-color);
}

.prev-btn {
  left: 20px;
}
.next-btn {
  right: 20px;
}

.hero-badges-wrapper {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 10;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  padding-bottom: var(--spacing-lg);
  padding-top: var(--spacing-lg);
}

.hero-badges {
  display: flex;
  justify-content: center;
  gap: var(--spacing-lg);
}

.badge-item {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.15);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--border-radius-lg);
  backdrop-filter: blur(5px);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge-item i {
  color: var(--secondary-light);
  font-size: 1.5rem;
  margin-right: var(--spacing-sm);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background-color: var(--primary-dark);
  color: var(--text-light);
  padding: var(--spacing-xl) 0 0;
}

.testimonial-slider {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-xl);
}

.footer-top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.footer-widget h4 {
  color: var(--text-light);
  margin-bottom: var(--spacing-lg);
  font-size: 1.2rem;
  position: relative;
  padding-bottom: var(--spacing-sm);
}

.footer-widget h4::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 2px;
  background-color: var(--secondary-color);
}

.footer-links li {
  margin-bottom: var(--spacing-sm);
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
}

.footer-links a:hover {
  color: var(--secondary-light);
  padding-left: 5px;
}

.footer-contact li {
  display: flex;
  margin-bottom: var(--spacing-md);
  color: rgba(255, 255, 255, 0.8);
}

.footer-contact i {
  margin-right: var(--spacing-sm);
  color: var(--secondary-color);
  margin-top: 5px;
}

.footer-bottom {
  background-color: #001955;
  padding: var(--spacing-md) 0;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer-bottom-links {
  margin-top: var(--spacing-sm);
}

.footer-bottom-links a {
  color: rgba(255, 255, 255, 0.6);
  margin: 0 var(--spacing-sm);
  font-size: 0.9rem;
}

.footer-bottom-links a:hover {
  color: var(--text-light);
}

/* ==========================================================================
   Accessibility, Themes & Settings Modal
   ========================================================================== */

/* Grayscale */
[data-grayscale="true"] {
  filter: grayscale(100%);
}

/* Large Text */
[data-text-size="large"] html {
  font-size: 18px;
}

/* Accessible readable font */
[data-font="readable"] {
  --font-heading: "Arial", Helvetica, sans-serif;
  --font-body: "Arial", Helvetica, sans-serif;
}

/* Color Themes */
[data-color-theme="nature"] {
  --primary-color: #2e7d32; /* Forest Green */
  --primary-light: #60ad5e;
  --primary-dark: #005005;
  --secondary-color: #8d6e63; /* Earth Brown */
  --secondary-light: #be9c91;
  --secondary-dark: #5f4339;
  --accent-color: #f9a825; /* Sun Yellow */
  --accent-dark: #c17900;
}

[data-color-theme="sunset"] {
  --primary-color: #c62828; /* Deep Red */
  --primary-light: #ff5f52;
  --primary-dark: #8e0000;
  --secondary-color: #ef6c00; /* Warm Orange */
  --secondary-light: #ff9d3f;
  --secondary-dark: #b53d00;
  --accent-color: #fbc02d; /* Bright Gold */
  --accent-dark: #c49000;
}

/* Alternating Service Sections (CompCare Style) */
.service-alt-row {
  display: flex;
  align-items: center;
  gap: var(--spacing-xxl);
  margin-bottom: var(--spacing-xxl);
}

.service-alt-row:nth-child(even) {
  flex-direction: row-reverse;
}

.service-alt-image {
  flex: 1;
  position: relative;
  border-radius: var(--border-radius-lg);
  padding: 10px;
}

.service-alt-image img {
  width: 100%;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
}

.border-teal {
  border: 2px solid var(--secondary-color);
}
.border-orange {
  border: 2px solid var(--accent-color);
}
.border-purple {
  border: 2px solid #8b5cf6;
}

.service-alt-content {
  flex: 1;
}

.service-alt-content h3 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: var(--spacing-md);
}

.service-alt-content ul {
  margin-top: var(--spacing-md);
}

.service-alt-content li {
  margin-bottom: var(--spacing-sm);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
}

.service-alt-content li i {
  color: var(--secondary-color);
}

@media (max-width: 992px) {
  .service-alt-row,
  .service-alt-row:nth-child(even) {
    flex-direction: column;
    gap: var(--spacing-xl);
    text-align: center;
  }
  .service-alt-content li {
    justify-content: center;
  }
}

[data-color-theme="lavender"] {
  --primary-color: #6a1b9a; /* Deep Purple */
  --primary-light: #9c4dcc;
  --primary-dark: #38006b;
  --secondary-color: #ec407a; /* Soft Pink */
  --secondary-light: #ff77a9;
  --secondary-dark: #b4004e;
  --accent-color: #00acc1; /* Cyan Accent */
  --accent-dark: #007c91;
}

[data-color-theme="ocean"] {
  --primary-color: #006064; /* Deep Teal */
  --primary-light: #428e92;
  --primary-dark: #00363a;
  --secondary-color: #ff7043; /* Coral */
  --secondary-light: #ffa270;
  --secondary-dark: #c63f17;
  --accent-color: #26c6da; /* Bright Cyan */
  --accent-dark: #0095a8;
}

[data-color-theme="midnight"] {
  --primary-color: #1a237e; /* Midnight Indigo */
  --primary-light: #534bae;
  --primary-dark: #000051;
  --secondary-color: #ffd54f; /* Gold */
  --secondary-light: #ffff81;
  --secondary-dark: #c8a415;
  --accent-color: #b388ff; /* Soft Lavender */
  --accent-dark: #805acb;
}

[data-color-theme="rose"] {
  --primary-color: #ad1457; /* Rose Red */
  --primary-light: #e35183;
  --primary-dark: #78002e;
  --secondary-color: #66bb6a; /* Sage Green */
  --secondary-light: #98ee99;
  --secondary-dark: #338a3e;
  --accent-color: #f8bbd0; /* Soft Pink */
  --accent-dark: #c48b9f;
}

[data-color-theme="slate"] {
  --primary-color: #37474f; /* Charcoal Slate */
  --primary-light: #62727b;
  --primary-dark: #102027;
  --secondary-color: #29b6f6; /* Electric Blue */
  --secondary-light: #73e8ff;
  --secondary-dark: #0086c3;
  --accent-color: #ff8a65; /* Warm Peach */
  --accent-dark: #c75b39;
}

/* Settings Modal Elements */
.settings-btn {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.1rem;
  cursor: pointer;
  margin-left: var(--spacing-md);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-body);
}

.settings-btn:hover {
  color: var(--secondary-light);
}

.settings-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.settings-overlay.active {
  opacity: 1;
  visibility: visible;
}

.settings-modal {
  position: fixed;
  top: 0;
  right: -400px;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background-color: var(--bg-white);
  color: var(--text-primary);
  z-index: 2001;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
  transition: right var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.settings-modal.active {
  right: 0;
}

.settings-header {
  padding: var(--spacing-md) var(--spacing-lg);
  background-color: var(--primary-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.settings-header h3 {
  margin: 0;
  color: var(--text-light);
  font-size: 1.5rem;
}

.close-settings {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.5rem;
  cursor: pointer;
}

.settings-body {
  padding: var(--spacing-lg);
  overflow-y: auto;
  flex-grow: 1;
}

.settings-group {
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--border-color);
}

.settings-group:last-child {
  border-bottom: none;
}

.settings-group h4 {
  margin-bottom: var(--spacing-sm);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-color);
}

.settings-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.settings-option label {
  font-weight: 500;
}

.settings-select {
  padding: 8px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  background-color: var(--bg-light);
  color: var(--text-primary);
  font-family: var(--font-body);
  width: 50%;
}

.settings-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Global Accessibility Widget */
.accessibility-widget {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9999;
}

@media (max-width: 768px) {
  .accessibility-widget {
    bottom: 80px;
  }
}

.accessibility-toggle {
  background-color: var(--primary-color);
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.accessibility-toggle:hover {
  background-color: var(--primary-dark);
  transform: rotate(30deg) scale(1.1);
}

.accessibility-panel {
  position: absolute;
  bottom: 75px;
  right: 0;
  width: 250px;
  background: var(--bg-white);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--spacing-md);
  display: none;
  flex-direction: column;
  gap: 8px;
  border: 1px solid var(--border-color);
}

.accessibility-panel.active {
  display: flex;
}

.accessibility-panel h4 {
  margin-bottom: 5px;
  font-size: 1.1rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 5px;
  text-align: center;
}

.acc-btn {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  padding: 10px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.acc-btn:hover,
.acc-btn.active {
  background: var(--primary-color);
  color: var(--text-light);
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

/* Large screens / Laptops */
@media (max-width: 1200px) {
  .container {
    padding: 0 var(--spacing-md);
  }
}

/* Tablets / Desktop */
@media (max-width: 992px) {
  .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--bg-white);
    box-shadow: var(--shadow-md);
    padding: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(-10px);
    z-index: 1000;
  }

  .mobile-menu-btn {
    display: block;
  }

  /* Mobile Menu Active State */
  .nav-links.active {
    max-height: 100vh;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    padding: var(--spacing-md) 0;
  }

  .nav-links.active li {
    width: 100%;
    margin: 0;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s ease;
  }

  .nav-links.active.active li {
    opacity: 1;
    transform: translateX(0);
  }

  /* Staggered animation for links */
  .nav-links.active li:nth-child(1) {
    transition-delay: 0.1s;
  }
  .nav-links.active li:nth-child(2) {
    transition-delay: 0.15s;
  }
  .nav-links.active li:nth-child(3) {
    transition-delay: 0.2s;
  }
  .nav-links.active li:nth-child(4) {
    transition-delay: 0.25s;
  }
  .nav-links.active li:nth-child(5) {
    transition-delay: 0.3s;
  }
  .nav-links.active li:nth-child(6) {
    transition-delay: 0.35s;
  }
  .nav-links.active li:nth-child(7) {
    transition-delay: 0.4s;
  }

  .nav-links.active a {
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--bg-light);
    color: var(--text-primary);
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    transform: none;
    display: none;
    padding-left: var(--spacing-lg);
    background-color: var(--bg-light);
  }

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

  .dropdown-menu a {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 12px 20px;
    color: var(--text-primary) !important;
  }

  .section {
    padding: clamp(3rem, 8vw, 6rem) 0;
  }

  .footer-top {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
  }
}

/* Mobile Devices */
@media (max-width: 768px) {
  /* Responsive spacing using fluid logic */
  :root {
    --spacing-xl: clamp(2rem, 5vw, 4rem);
    --spacing-xxl: clamp(3rem, 10vw, 8rem);
  }

  /* Top Bar Stacking */
  .top-bar .container {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  .top-bar-links {
    margin-top: 0;
    display: flex;
    justify-content: center;
    gap: 15px;
  }

  .top-bar-links a {
    margin: 0;
  }

  /* Section Padding Reduction */
  .section {
    padding: calc(var(--spacing-xl) * 0.8) 0;
  }

  /* Typography Scaling */
  h1 {
    font-size: 2.2rem;
  }
  h2 {
    font-size: 1.8rem;
  }
  h3 {
    font-size: 1.4rem;
  }

  /* Button adjustments for better tap targets */
  .btn {
    width: 100%;
    margin-bottom: 10px;
  }

  .hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .hero-buttons .btn {
    margin: 0;
  }

  /* Footer adjustments for mobile */
  .footer-top {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-widget h4::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-contact li {
    justify-content: center;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 5px;
  }

  .footer-contact i {
    margin-right: 0;
  }

  .footer-bottom .container {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .footer-bottom-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .footer-bottom-links a {
    margin: 0;
  }

  /* About Section Mobile */
  .about-section .container {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  .about-content h2 {
    font-size: 2rem;
  }

  /* Service Row Responsive (from services.html) */
  .service-row {
    grid-template-columns: 1fr !important;
  }
  .service-row:nth-child(even) .service-content,
  .service-row:nth-child(even) .service-img,
  .service-content,
  .service-img {
    order: initial !important;
  }
  .service-img {
    height: 300px !important;
  }

  /* Timeline Responsive (from about.html) */
  .timeline::after {
    left: 31px !important;
  }
  .timeline-item {
    width: 100% !important;
    padding-left: 70px !important;
    padding-right: 25px !important;
    text-align: left !important;
  }
  .timeline-item.left::after,
  .timeline-item.right::after {
    left: 21px !important;
  }
  .timeline-item.right {
    left: 0 !important;
  }

  .hero-slide h1 {
    font-size: 2rem;
  }
  .hero-badges {
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
  }
  .hero-badges-wrapper {
    position: relative;
    background: var(--primary-dark);
    padding-top: var(--spacing-md);
  }
  .hero-slider {
    height: auto;
    min-height: auto;
    display: flex;
    flex-direction: column;
  }
  .hero-slide {
    position: relative;
    height: auto;
    padding: var(--spacing-xxl) 0;
    min-height: 450px;
  }
  .hero-slide:not(.active) {
    display: none;
  }
  .slider-btn {
    display: none;
  } /* hide on mobile */
  .hero-slide .container {
    text-align: center;
  }
}

/* Very Small Mobile */
@media (max-width: 480px) {
  h1 {
    font-size: 1.8rem;
  }
  h2 {
    font-size: 1.5rem;
  }

  .logo {
    font-size: 1.25rem;
  }

  .logo i {
    font-size: 1.5rem;
  }

  .section {
    padding: var(--spacing-lg) 0;
  }

  .hero-slide h1 {
    font-size: 1.8rem;
  }
  .hero-slide p {
    font-size: 1rem;
  }
}

/* ==========================================================================
   Accessibility & High Contrast Styles
   ========================================================================== */

/* Global Font Options */
[data-font="Arial"] {
  --font-body: Arial, sans-serif;
  --font-heading: Arial, sans-serif;
}
[data-font="Open Sans"] {
  --font-body: "Open Sans", sans-serif;
  --font-heading: "Open Sans", sans-serif;
}
[data-font="Roboto"] {
  --font-body: "Roboto", sans-serif;
  --font-heading: "Roboto", sans-serif;
}
[data-font="Lato"] {
  --font-body: "Lato", sans-serif;
  --font-heading: "Lato", sans-serif;
}
[data-font="Georgia"] {
  --font-body: Georgia, serif;
  --font-heading: Georgia, serif;
}

/* Grayscale Mode */
[data-grayscale="true"] {
  filter: grayscale(100%);
}

/* Accessibility Widget Styles */
.accessibility-widget {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9999;
}

.accessibility-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

@media (max-width: 480px) {
  .accessibility-toggle {
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
  }
  .accessibility-widget {
    bottom: 15px;
    left: 15px;
  }
}

.accessibility-toggle:hover {
  transform: scale(1.1);
}

.accessibility-panel {
  position: absolute;
  bottom: 70px;
  left: 0;
  width: 250px;
  background: white;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
  padding: 20px;
  display: none;
  flex-direction: column;
  gap: 10px;
}

.accessibility-panel.active {
  display: flex;
}

.accessibility-panel h4 {
  margin-top: 0;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 10px;
}

.acc-btn {
  padding: 10px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-light);
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.acc-btn:hover,
.acc-btn.active {
  background: var(--primary-color);
  color: white;
}

.acc-select {
  width: 100%;
  padding: 10px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  margin-top: 5px;
}

/* Accessibility: Ensure background/text consistency across screen sizes */
/* Removed risky inherit rules to prevent color flickering on mobile */
@media (max-width: 768px) {
  body {
    background-color: var(--bg-light);
    color: var(--text-primary);
  }
  .section-bg-white {
    background-color: var(--bg-white) !important;
  }
  .section-bg-light {
    background-color: var(--bg-light) !important;
  }
}

/* Added star color globally */
.stars {
  color: #ffd700;
  margin-bottom: var(--spacing-sm);
}

/* Horizontal Scroll Container */
.scroll-container {
  display: flex !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  gap: 25px !important;
  padding: 20px 5px !important;
  scroll-snap-type: x mandatory !important;
  scrollbar-width: thin !important;
  scrollbar-color: var(--primary-color) transparent !important;
}

.scroll-container::-webkit-scrollbar {
  height: 8px !important;
}

.scroll-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05) !important;
  border-radius: 10px !important;
}

.scroll-container::-webkit-scrollbar-thumb {
  background: var(--primary-color) !important;
  border-radius: 10px !important;
}

.scroll-container .service-card-v3 {
  flex: 0 0 350px !important;
  scroll-snap-align: start !important;
}

/* Floating Social Links on Right Side */
.footer-social {
  position: fixed;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1000;
  margin-top: 0;
  background: rgba(30, 58, 138, 0.8); /* Primary dark with transparency */
  backdrop-filter: blur(10px);
  padding: 15px 8px;
  border-radius: 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
}

.footer-social:hover {
  background: rgba(30, 58, 138, 0.95);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  padding-right: 12px;
}

.social-link {
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.2rem;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-link:hover {
  background: var(--secondary-color);
  color: white;
  transform: translateX(-5px) scale(1.15);
  box-shadow: 0 0 20px var(--secondary-color);
  border-color: transparent;
}

.social-link i {
  transition: transform 0.4s ease;
}

.social-link:hover i {
  transform: rotate(360deg) scale(1.1);
}

/* Hide on mobile if preferred or adjust */
@media (max-width: 768px) {
  .footer-social {
    right: 10px;
    padding: 10px 6px;
  }
  .social-link {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
}

/* Legal Pages Redesign Styles */
.legal-hero {
  padding: clamp(140px, 15vw, 200px) 0 clamp(80px, 10vw, 120px);
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
  color: white;
  position: relative;
  overflow: hidden;
}

.legal-hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: center;
}

.legal-tag {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.legal-hero-text h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 20px;
  color: white;
}

.legal-hero-text p {
  font-size: 1.15rem;
  opacity: 0.9;
  line-height: 1.6;
  max-width: 600px;
}

.legal-hero-image {
  position: relative;
  display: flex;
  justify-content: center;
}

.floating-image {
  width: 100%;
  max-width: 450px;
  border-radius: 30px;
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.5);
  animation: floating 6s ease-in-out infinite;
}

@keyframes floating {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

@media (max-width: 992px) {
  .legal-hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }
  .legal-hero-text p {
    margin: 0 auto;
  }
  .floating-image {
    max-width: 350px;
  }
}

.top-bar {
  display: none !important;
}
.header {
  top: 0 !important;
}
