:root {
  --primary: #4ED4BD; /* Brand teal */
  --secondary: #fffdff; /* Brand white */
  --bg-color: #090909; /* Brand navy */
  --bg-alt: #121212; /* Alternating dark navy for sections */
  --surface: rgba(24, 24, 24, 0.8); /* Translucent brand navy */
  --text-main: #fffdff;
  --text-muted: #e7e5e7; /* Brand light gray */
  --glass-border: rgba(78, 212, 189, 0.2); /* Teal tint for premium glass */
  --accent: #ff477e; /* Complementary vibrant pink for premium look */
}

body.light-theme {
  --primary: #4ED4BD;
  --secondary: #090909;
  --bg-color: #ffffff; /* Pure white */
  --bg-alt: #f8f9fa; /* Clean modern off-white for alternating sections */
  --surface: rgba(255, 255, 255, 0.85); /* Clean pure white surface */
  --text-main: #090909; /* Brand navy */
  --text-muted: #666666; /* Standard clean gray */
  --glass-border: rgba(0, 0, 0, 0.04); /* Ultra-subtle border */
  --accent: #ff477e;
}

body.light-theme .page-header { background: linear-gradient(to bottom, rgba(0,102,204,0.05) 0%, var(--bg-color) 100%); }
body.light-theme .glass { box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.03); }

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100%;
}

h1, h2, h3, h4, h5, h6, .logo {
  font-family: 'Outfit', 'Segoe UI', sans-serif;
}

a {
  text-decoration: none;
  color: var(--text-main);
  transition: color 0.3s ease;
}

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

/* Glassmorphism Utilities */
.glass {
  background: var(--surface);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Navbar */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.5rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  background: linear-gradient(to bottom, rgba(9,9,9,0.9) 0%, rgba(9,9,9,0) 100%);
  border-bottom: none;
  transition: all 0.3s ease;
}

nav.scrolled {
  padding: 1rem 5%;
  background: var(--bg-color);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 25px;
  width: auto;
}

.logo-dark-version { display: block; }
.logo-light-version { display: none; }
body.light-theme .logo-dark-version { display: none; }
body.light-theme .logo-light-version { display: block; }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links li a {
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
  position: relative;
  transition: color 0.3s ease;
}
.nav-links li a:hover,
.nav-links li a.active {
  color: var(--primary);
}





/* Dropdown Styles */
.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-color);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  min-width: 250px;
  list-style: none;
  padding: 1rem 0;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  z-index: 1000;
}

body.light-theme .dropdown-menu {
  background: rgba(255,255,255,0.98);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.dropdown-menu li {
  display: block !important;
  width: 100% !important;
}

.dropdown-menu li a {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  padding: 0.8rem 1.5rem !important;
  font-size: 0.95rem;
  text-transform: none;
  font-weight: 500;
  box-sizing: border-box; /* ensure padding doesn't overflow */
}

.dropdown-menu li a:hover {
  background: rgba(78, 212, 189, 0.1);
  color: var(--primary);
}

.dropdown-menu li a::after {
  display: none;
}

/* Nested Dropdown Styles */
.dropdown-submenu {
  position: relative;
}

.dropdown-submenu .dropdown-menu {
  top: 0;
  left: 100%;
  margin-top: -10px;
}

@media (min-width: 769px) {
  .dropdown:hover > .dropdown-menu {
    display: block;
    animation: fadeUp 0.2s ease;
  }
  .dropdown-submenu:hover > .dropdown-menu {
    display: block;
    animation: fadeUp 0.2s ease;
  }
}

.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.menu-toggle span {
  height: 3px;
  width: 25px;
  background-color: var(--text-main);
  margin-bottom: 5px;
  border-radius: 2px;
  transition: 0.3s;
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  text-align: center;
  padding: 0 20px;
  /* Lock hero text to dark theme for readability against dark backgrounds */
  --text-main: #fffdff;
  --text-muted: #e7e5e7;
  --bg-color: #101527; /* Lock background for component hover inversions */
  color: var(--text-main);
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -3;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent 0%, transparent 40%, #090909 100%);
  z-index: -1;
}

/* Hero Slider */
.hero-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  overflow: hidden;
  
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  background-size: cover;
  background-position: center;
}

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

.hero-slider-dots {
  position: relative;
  margin-top: 2rem;
  left: 0;
  right: 0;
  display: flex;
  z-index: 5;
  padding: 0 20px;
}
.hero-slider-dots::-webkit-scrollbar {
  display: none;
}

.slider-dot {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--text-muted); opacity: 0.4;
  cursor: pointer;
  transition: background 0.3s ease;
}

.slider-dot.active {
  background: var(--primary);
}

.hero-content h1 {
  font-size: 4.5rem;
  font-weight: 900;
  margin-bottom: 1rem;
  line-height: 1.1;
  text-transform: uppercase;
  animation: fadeUp 1s ease forwards;
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-content h1 span {
    color: var(--primary);
    display: block; /* Forces spans to break into new lines */
}

.hero-content p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
  animation: fadeUp 1s ease 0.2s forwards;
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
}

.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  animation: fadeUp 1s ease 0.4s forwards;
  opacity: 0;
}

.btn-primary {
  background: var(--primary) !important;
  color: #101527 !important;
  border: 2px solid var(--primary) !important;
  box-shadow: 0 0 15px rgba(78, 212, 189, 0.4);
}

.btn-primary:hover {
  background: rgba(78, 212, 189, 0.1) !important;
  color: var(--primary) !important;
  border: 2px solid var(--primary) !important;
  box-shadow: 0 0 20px rgba(78, 212, 189, 0.3);
}

.btn-outline {
  background: transparent !important;
  color: var(--text-main) !important;
  border: 2px solid var(--text-main) !important;
  margin-left: 1rem;
}

.btn-outline:hover {
  background: var(--text-main) !important;
  color: var(--bg-color) !important;
  border: 2px solid var(--text-main) !important;
}

/* Page Headers */
.page-header {
  padding: 150px 5% 50px;
  text-align: center;
  background: linear-gradient(to bottom, rgba(0,240,255,0.05) 0%, var(--bg-color) 100%);
  position: relative;
  z-index: 1;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(9, 9, 9, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: -1;
}

.page-header h1 {
  font-size: 3.5rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 1rem;
  color: #ffffff !important; /* Force white text over the dark overlay */
}

.page-header p {
  color: rgba(255, 255, 255, 0.8) !important; /* Force light text over the dark overlay */
  font-size: 1.2rem;
}

/* Sections */
section {
  padding: 5rem 5%;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 3rem;
  text-align: center;
  text-transform: uppercase;
}

.section-title span {
  color: var(--primary);
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

/* About Section */
.about-image { border-radius: 0; overflow: visible; box-shadow: none; display: flex; align-items: center; justify-content: center; }

.about-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

.about-image:hover img {
  transform: scale(1.05);
}

.about-text h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.features-list {
  list-style: none;
  margin-top: 2rem;
}

.features-list li {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

/* Removed old checkmark pseudo-element to avoid duplicate icons */

/* Portfolio Cards */
.portfolio-card {
  border-radius: 15px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  isolation: isolate;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-mask-image: -webkit-radial-gradient(white, black);
}

.portfolio-card img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
  border-radius: 15px;
}

/* Interactive Before/After Slider */
.ba-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    border-radius: 15px;
    overflow: hidden;
    --pos: 50%;
}
.ba-container img {
    display: block;
    width: 100%;
    height: 500px;
    object-fit: cover;
}
.ba-image-after {
    position: relative;
}
.ba-image-before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    clip-path: polygon(0 0, var(--pos) 0, var(--pos) 100%, 0 100%);
}
.ba-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: ew-resize;
    z-index: 5;
}
.ba-divider {
    position: absolute;
    top: 0;
    left: var(--pos);
    bottom: 0;
    width: 4px;
    background: var(--primary);
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 4;
}
.ba-button {
    position: absolute;
    top: 50%;
    left: var(--pos);
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: var(--bg-alt);
    border: 2px solid var(--primary);
    border-radius: 50%;
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    z-index: 4;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.ba-carousel-wrapper {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 4rem;
    height: 600px;
}
.ba-slide-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
.ba-slide-item.active {
    opacity: 1;
    visibility: visible;
}

/* Navigation Buttons (Carousel) */
.nav-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.nav-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
}

/* Light Theme Navigation Buttons */
body.light-theme .nav-btn {
    background: #ffffff;
    color: #333333;
    border-color: #e0e0e0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
body.light-theme .nav-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

/* Custom Cursor */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--primary);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.2s ease, height 0.2s ease, background-color 0.2s ease;
    mix-blend-mode: difference;
    opacity: 0;
}
.custom-cursor.active {
    opacity: 1;
}
.custom-cursor.hover {
    width: 60px;
    height: 60px;
    background-color: #fff;
}
body.has-custom-cursor, body.has-custom-cursor a, body.has-custom-cursor button {
    cursor: none !important;
}

/* Page Loader */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #111;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}
.page-loader.fade-out {
    opacity: 0;
    pointer-events: none;
}
.loader-logo {
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

.portfolio-card .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 2rem;
  background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.8) 40%, transparent 100%);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  text-align: left;
}

.portfolio-card:hover img {
  transform: scale(1.1);
}

.portfolio-card:hover .overlay {
  transform: translateY(0);
}

.portfolio-card h3 {
  font-size: 1.6rem;
  margin-bottom: 0.2rem;
  color: #fff;
  font-weight: 700;
  line-height: 1.2;
}

.portfolio-card p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  line-height: 1.4;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  width: 100%;
}

.portfolio-card .category-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  background: var(--primary);
  color: #000;
  padding: 4px 10px;
  border-radius: 5px;
  margin-bottom: 8px;
  display: inline-block;
}

.portfolio-card .view-project {
  font-weight: 600;
  font-size: 0.9rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
}

.portfolio-card .view-project i {
  transition: transform 0.3s ease;
}

.portfolio-card:hover .view-project {
  color: var(--primary);
}

.portfolio-card:hover .view-project i {
  transform: translateX(5px);
}

/* Admin Container */
.admin-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

/* Clients Grid */
.clients-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
  padding-top: 10px;
}

/* Clients Wrapper & Fade */
.clients-wrapper {
  position: relative;
  overflow: hidden;
  transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 2000px;
}

.clients-wrapper.collapsed {
  max-height: 250px; /* Adjust if you want more or less rows visible initially */
}

.clients-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 150px;
  background: linear-gradient(to bottom, rgba(9, 9, 9, 0) 0%, var(--bg-alt) 100%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.clients-wrapper.collapsed .clients-fade {
  opacity: 1;
}

body.light-theme .clients-fade {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, var(--bg-alt) 100%);
}
.client-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1 1 200px; /* Stretch to fill row */
  height: 100px;
  background: rgba(255,255,255,0.02); /* Subtle block background creates the masonry rectangle look */
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.client-logo:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
  transform: translateY(-5px);
}
.client-logo-mask {
  height: 100%;
  width: 100%;
  max-width: 160px; /* Don't let the logo itself get TOO huge, but the container stretches */
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  background-color: rgba(255, 255, 255, 0.85); /* Significantly lighter gray/white for dark background */
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}
.client-logo:hover .client-logo-mask {
  background-color: #4ED4BD;
}

body.light-theme .client-logo {
  background: rgba(0,0,0,0.02);
  border-color: rgba(0,0,0,0.05);
}
body.light-theme .client-logo:hover {
  background: rgba(0,0,0,0.05);
  border-color: rgba(0,0,0,0.1);
}
body.light-theme .client-logo-mask {
  background-color: #1f2937; /* Very dark slate gray for light background */
}
body.light-theme .client-logo:hover .client-logo-mask {
  background-color: #4ED4BD;
}

/* Contact */
.contact-container {
  max-width: 1000px;
  margin: 0 auto;
}

.contact-info {
  padding: 3rem;
  border-radius: 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.info-item {
  margin-bottom: 2rem;
}

.info-item h4 {
  font-size: 1.2rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.info-item p {
  color: var(--text-muted);
}

.contact-form {
  padding: 3rem;
  border-radius: 20px;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-control {
  width: 100%;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

body.light-theme .form-control::placeholder {
  color: rgba(0, 0, 0, 0.5);
}

input[type="file"].form-control {
  padding: 0.8rem 1.5rem;
}

input[type="file"].form-control::file-selector-button {
  background: var(--primary);
  color: #101527;
  border: none;
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  margin-right: 1rem;
  transition: all 0.3s ease;
  font-size: 0.8rem;
}

input[type="file"].form-control::file-selector-button:hover {
  background: #ffffff;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

select.form-control {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1em;
  padding-right: 2.5rem;
}

select.form-control option {
  background: #090909; /* Dark theme background */
  color: #ffffff;
  padding: 12px;
}

/* --- Custom Select Styles --- */
.custom-select-wrapper {
  position: relative;
  user-select: none;
  width: 100%;
}
.custom-select-trigger {
  width: 100%;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.custom-select-trigger:hover, .custom-select-wrapper.open .custom-select-trigger {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}
.custom-select-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 5px;
  background: #090909;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
  z-index: 999;
  max-height: 250px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}
.custom-select-wrapper.open .custom-select-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.custom-option {
  padding: 12px 1.5rem;
  color: var(--text-main);
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.2s;
}
.custom-option:last-child {
  border-bottom: none;
}
.custom-option:hover, .custom-option.selected {
  background: rgba(0, 240, 255, 0.1);
  color: var(--primary);
}
/* Scrollbar for custom dropdown */
.custom-select-options::-webkit-scrollbar {
  width: 6px;
}
.custom-select-options::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
  margin: 5px;
}
.custom-select-options::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}
.custom-select-options::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Light Theme Overrides for Custom Select */
body.light-theme .custom-select-options {
  background: #ffffff;
  border-color: rgba(0,0,0,0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}
body.light-theme .custom-option {
  border-bottom-color: rgba(0, 0, 0, 0.05);
}
body.light-theme .custom-option:hover, 
body.light-theme .custom-option.selected {
  background: rgba(0, 0, 0, 0.05);
}
body.light-theme .custom-select-options::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.02);
}
body.light-theme .custom-select-options::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

textarea.form-control {
  resize: vertical;
  min-height: 150px;
}

/* Footer */
footer {
  background: #090909;
  border-top: 1px solid rgba(78, 212, 189, 0.2);
  padding: 3rem 5% 1.5rem;
  text-align: center;
  /* Lock footer variables to dark theme */
  --text-main: #fffdff;
  --text-muted: #e7e5e7;
  --bg-color: #101527; /* Lock background for component hover inversions */
  color: var(--text-main);
}

footer .logo-dark-version { display: block !important; }
footer .logo-light-version { display: none !important; }

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 2rem;
}

.social-links {
  display: flex;
  gap: 1.5rem;
}

.social-links a {
  font-size: 1.5rem;
  color: var(--text-muted);
}

.social-links a:hover {
  color: var(--primary);
  transform: translateY(-3px);
}

.copyright {
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 2rem;
  margin-top: 2rem;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 992px) {
  .hero-content h1 {
    font-size: 3.5rem;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .logo {
    font-size: 1.5rem;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(15px);
    flex-direction: column;
    padding: 2rem 5%;
    gap: 1.5rem;
    transform: translateY(-150%);
    transition: transform 0.4s ease;
    border-bottom: 1px solid var(--glass-border);
    z-index: 999;
  }
  
  body.light-theme .nav-links {
    background: rgba(245, 245, 245, 0.98);
  }
  
  .nav-links.active {
    transform: translateY(0);
  }
  
  #theme-toggle {
    margin-left: 0 !important;
    width: fit-content;
  }
  
  .hero-content h1 {
    font-size: 2.5rem;
  }
  
  .hero-content p {
    font-size: 1rem;
  }
  
  .page-header {
    padding: 100px 5% 30px;
  }
  
  .page-header h1 {
    font-size: 2rem;
  }
  
  .hero {
    height: 70vh;
    min-height: 500px;
  }
  
  section {
    padding: 3rem 5%;
  }
  
  .section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
  }
  
  .section-title h2 {
    font-size: inherit;
    line-height: 1.1;
    margin: 0;
  }
  
  .contact-info, .contact-form {
    padding: 1.5rem;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  
  .admin-container {
    margin: 80px 15px 30px;
    padding: 1.5rem !important;
  }
  
  .btn {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .btn-outline {
    margin-left: 0;
    margin-top: 10px;
  }
  
  .hero-content > div:not(.hero-slider-dots) {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }
  
  .hero-slider-dots {
    flex-direction: row !important;
  }

  .dropdown-menu {
    position: static;
    display: none;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0.5rem 0 0 1rem;
    min-width: 100%;
  }
  .dropdown.active .dropdown-menu {
    display: block;
  }
}

@media (max-width: 480px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* Feature Cards */
.feature-card {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  position: relative;
  overflow: hidden;
  border-top: 4px solid transparent;
}
.feature-card:hover {
  transform: translateY(-10px);
  border-top: 4px solid var(--primary);
  box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}
.icon-feature {
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.feature-card:hover .icon-feature {
  transform: scale(1.1) rotate(5deg);
}


/* Promotion Button */
.btn-promo {
  background: #ffffff !important;
  color: #101527 !important;
  border: none !important;
  font-weight: 700;
  padding: 12px 25px !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  border-radius: 50px;
  transition: all 0.3s ease;
}
.btn-promo:hover {
  background: #f0f0f0 !important;
  color: #000000 !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* Promotion Banner Layout */
.promotion-banner {
  background: linear-gradient(135deg, var(--primary), #2c9a87);
  color: #fff;
  padding: 1.5rem 2rem;
  border-radius: 12px;
  margin: 2rem auto;
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 10px 30px rgba(78, 212, 189, 0.3);
  gap: 20px;
  flex-wrap: wrap;
}
.promotion-banner .promo-content {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1 1 300px;
}
.promotion-banner h3 {
  color: #fff;
  margin: 0 0 5px 0;
  font-size: 1.4rem;
}
.promotion-banner p {
  margin: 0;
  font-size: 1rem;
  color: rgba(255,255,255,0.9);
}
@media (max-width: 768px) {
  .promotion-banner {
    justify-content: center;
    text-align: center;
    padding: 1.5rem;
  }
  .promotion-banner .promo-content {
    flex-direction: column;
    text-align: center;
  }
  .promotion-banner .btn-promo {
    width: 100%;
    text-align: center;
    white-space: nowrap;
  }
}

/* Mobile Category Filters */
@media (max-width: 480px) {
  #filter-container {
    gap: 12px !important;
  }
  #filter-container .filter-btn {
    border-radius: 50px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    padding: 12px 24px !important;
    font-size: 0.8rem !important;
    letter-spacing: 1px !important;
    margin: 0 !important;
  }
  #filter-container .filter-btn.btn-primary {
    background: var(--primary) !important;
    color: #101527 !important;
    border: none !important;
    box-shadow: 0 0 25px rgba(78, 212, 189, 0.4) !important;
  }
  #filter-container .filter-btn.btn-outline {
    background: transparent !important;
    color: #fff !important;
    border: 2px solid #fff !important;
  }
}

/* Mobile Footer Redesign */
@media (max-width: 768px) {
  footer .footer-content {
    grid-template-columns: 1fr 1fr !important;
    gap: 2.5rem 1rem !important;
  }
  footer .footer-content > div:nth-child(1) {
    grid-column: 1 / -1;
    text-align: center !important;
  }
  footer .footer-content > div:nth-child(1) .logo {
    justify-content: center !important;
  }
  footer .footer-content > div:nth-child(1) .social-links {
    justify-content: center !important;
  }
  footer .footer-content > div:nth-child(1) > div[style*="margin-top: 2rem"] {
    justify-content: center !important;
  }
  #payment-methods-widget {
    text-align: center !important;
  }
  #payment-methods-widget > div {
    justify-content: center !important;
  }
  footer .footer-content > div:nth-child(2) {
    grid-column: 1 / 2;
    text-align: left !important;
    justify-self: center;
  }
  footer .footer-content > div:nth-child(3) {
    grid-column: 2 / 3;
    text-align: left !important;
    justify-self: center;
  }
  footer .footer-content > div:nth-child(2) h4,
  footer .footer-content > div:nth-child(3) h4 {
    font-size: 1.05rem !important;
  }
  footer .footer-content > div:nth-child(2) ul li,
  footer .footer-content > div:nth-child(3) ul li {
    font-size: 0.9rem !important;
  }
  footer .footer-content > div:nth-child(4) {
    grid-column: 1 / -1;
    text-align: center !important;
  }
  footer .footer-content > div:nth-child(4) ul li {
    justify-content: center !important;
  }
  footer .copyright {
    flex-direction: column;
    justify-content: center !important;
    text-align: center;
    gap: 15px !important;
  }
}

/* Home Services Section */
.home-service-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--glass-border);
  border-radius: 15px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}
.home-service-card:hover {
  transform: translateY(-5px);
  background: rgba(255,255,255,0.04);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  border-color: var(--primary);
}
.home-service-card .icon-wrapper {
  width: 60px;
  height: 60px;
  background: rgba(78, 212, 189, 0.1);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  transition: all 0.3s;
}
.home-service-card:hover .icon-wrapper {
  background: var(--primary);
  color: #101527;
}
.home-service-card .icon-wrapper img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}
.home-service-card h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
}
.home-service-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}
.home-service-card .btn-outline {
  margin: auto 0 0 0 !important;
  padding: 0.5rem 1.5rem;
  font-size: 0.85rem;
  border-radius: 50px;
}

/* Colorful Card Modifiers */
.colorful-card {
    border: none;
    color: #fff !important;
}
.colorful-card h3 {
    color: #fff !important;
}
.colorful-card p {
    color: rgba(255, 255, 255, 0.9) !important;
}
.colorful-card .icon-wrapper {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
}
.colorful-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
}
.colorful-card:hover .icon-wrapper {
    background: #fff !important;
    color: #000 !important;
}

/* Floating Action Buttons */
.fab-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 9999;
}
.fab-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: #fff !important;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  outline: none;
}
.fab-btn:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}
.fab-whatsapp {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}
.fab-scrolltop {
  background: var(--primary);
  color: #101527 !important;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}
.fab-scrolltop.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
@media (max-width: 768px) {
  .fab-container {
    bottom: 20px;
    right: 20px;
  }
  .fab-btn {
    width: 45px;
    height: 45px;
    font-size: 1.5rem;
  }
}

/* WhatsApp Tooltip Animation */
.whatsapp-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.wa-tooltip {
  position: absolute;
  right: 65px;
  background: #fff;
  color: #101527;
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  pointer-events: none;
}
.wa-tooltip::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -6px;
  transform: translateY(-50%);
  border-width: 6px 0 6px 6px;
  border-style: solid;
  border-color: transparent transparent transparent #fff;
}
.animate-pulse-text {
  animation: pulse-wa-text 2s infinite ease-in-out;
}
@keyframes pulse-wa-text {
  0% { transform: scale(1); box-shadow: 0 5px 15px rgba(0,0,0,0.2); }
  50% { transform: scale(1.05); box-shadow: 0 8px 20px rgba(0,0,0,0.3); }
  100% { transform: scale(1); box-shadow: 0 5px 15px rgba(0,0,0,0.2); }
}

/* Reviews Wrapper & Fade */
.reviews-wrapper {
  position: relative;
  overflow: hidden;
  transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 3000px;
}

.reviews-wrapper.collapsed {
  max-height: 500px; /* Adjust if you want more or less rows visible initially */
}

.reviews-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 200px;
  background: linear-gradient(to bottom, rgba(9, 9, 9, 0) 0%, var(--bg-color) 100%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.reviews-wrapper.collapsed .reviews-fade {
  opacity: 1;
}

body.light-theme .reviews-fade {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, var(--bg-color) 100%);
}

/* Reviews Masonry Layout */
.reviews-masonry {
  column-count: 3;
  column-gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .reviews-masonry {
    column-count: 2;
  }
}

.review-card {
  break-inside: avoid;
  margin-bottom: 1.5rem;
  padding: 1rem;
  border-radius: 15px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.review-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.review-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
}

.review-info h4 {
  color: var(--text-main);
  font-size: 0.9rem;
  margin-bottom: 0.1rem;
}

.review-info p {
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 500;
}

.review-text {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

.review-quote-icon {
  color: rgba(78, 212, 189, 0.2);
  font-size: 1.2rem;
  align-self: flex-start;
}

/* FAQ Accordion */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item:hover {
  border-color: rgba(78, 212, 189, 0.3);
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 1.5rem;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.3s;
}

.faq-question:hover {
  color: var(--primary);
}

.faq-icon {
  font-size: 1.2rem;
  color: var(--primary);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-answer-inner {
  padding: 0 1.5rem 1.5rem 1.5rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.faq-item.active {
  border-color: var(--primary);
  box-shadow: 0 5px 15px rgba(78, 212, 189, 0.1);
}

.faq-item.active .faq-question {
  color: var(--primary);
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-item.active .faq-answer {
  max-height: 500px; /* High enough to fit content */
}

@media (max-width: 768px) {
  .wa-tooltip {
    right: 55px;
    font-size: 0.8rem;
    padding: 6px 12px;
  }
  .clients-grid {
    padding: 10px 5% 0 5%;
  }
  .reviews-masonry {
    column-count: 1;
  }
}

/* Filters Wrapper & Fade */
.filters-wrapper {
  position: relative;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 1500px; /* arbitrary large value for expanded state */
}
.filters-wrapper.collapsed {
  max-height: 65px; /* Shows 1 row and top of 2nd row */
}
.filters-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 35px;
  background: linear-gradient(to bottom, transparent, var(--bg-color));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.filters-wrapper.collapsed .filters-fade {
  opacity: 1;
}

/* Text-only expand button */
.expand-text-btn {
  background: none;
  border: none;
  color: var(--primary, #4ED4BD);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 20px;
  transition: color 0.3s ease;
}
.expand-text-btn:hover {
  color: var(--text-main);
}
.expand-text-btn i {
  transition: transform 0.3s;
}
.expand-text-btn.active i {
  transform: rotate(180deg);
}

body.light-theme .filters-fade {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, var(--bg-color) 100%);
}
@media (max-width: 768px) { .ba-container img { height: 300px; } .nav-btn { width: 35px; height: 35px; font-size: 1rem; } }
@media (max-width: 768px) { .ba-carousel-wrapper { height: 400px; padding: 0 2.5rem; } }


/* Custom Toast Notification */
.custom-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  font-weight: 600;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10000;
  pointer-events: none;
}
.custom-toast.show {
  transform: translateY(0);
  opacity: 1;
}
.custom-toast.error {
  border-left: 4px solid #ff4757;
}
.custom-toast.success {
  border-left: 4px solid var(--primary);
}

/* Custom Modal */
.custom-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(9, 9, 9, 0.8);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.custom-modal-overlay.show {
  opacity: 1;
  pointer-events: all;
}
.custom-modal {
  background: #1a2035;
  border: 1px solid var(--glass-border);
  border-radius: 15px;
  padding: 2rem;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.custom-modal-overlay.show .custom-modal {
  transform: scale(1);
}
.custom-modal-icon i {
  font-size: 3rem;
  color: #ff4757;
  margin-bottom: 1rem;
}
.custom-modal h3 {
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 2rem;
}
.custom-modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Light theme overrides for unscrolled (top) navbar */
body.light-theme nav:not(.scrolled) .nav-links > li > a { color: #ffffff; }




body.light-theme nav:not(.scrolled) .nav-btn { color: #ffffff; }

body.light-theme nav:not(.scrolled) #theme-toggle,
body.light-theme nav:not(.scrolled) #theme-toggle i,
body.light-theme nav:not(.scrolled) #theme-toggle span { color: #ffffff !important; }
body.light-theme nav:not(.scrolled) #theme-toggle { border-color: rgba(255,255,255,0.5) !important; }

body.light-theme .dropdown-menu li a { color: #090909 !important; }


/* Direct Message Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    background: var(--surface);
    width: 90%;
    max-width: 500px;
    border-radius: 15px;
    padding: 2rem;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
    border: 1px solid var(--glass-border);
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
}
.modal-overlay.show .modal-content {
    transform: translateY(0) scale(1);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.modal-header h3 {
    font-size: 1.5rem;
    color: var(--text-main);
}
.close-modal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}
.close-modal:hover { color: var(--accent); }
.form-group { margin-bottom: 1.2rem; }
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: rgba(0,0,0,0.2);
    color: var(--text-main);
    font-family: inherit;
}
body.light-theme .form-group input, body.light-theme .form-group textarea {
    background: rgba(0,0,0,0.03);
}
.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* Chat Widget */
.chat-widget {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    z-index: 2000;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(15px);
}
.chat-widget.show {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}
.chat-header {
    background: var(--bg-color);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
}
.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.chat-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.chat-header h4 { margin: 0; font-size: 1rem; color: var(--text-main); font-weight: 600; }
.chat-header span { font-size: 0.75rem; color: var(--text-muted); }
.close-chat {
    background: transparent; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.2rem; transition: color 0.2s;
}
.close-chat:hover { color: var(--accent); }
.chat-body {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 450px;
    overflow-y: auto;
}
.chat-message {
    background: rgba(255,255,255,0.05);
    padding: 12px 15px;
    border-radius: 15px;
    border-bottom-left-radius: 4px;
    font-size: 0.9rem;
    color: var(--text-main);
    align-self: flex-start;
    max-width: 90%;
    line-height: 1.4;
    border: 1px solid rgba(255,255,255,0.02);
}
body.light-theme .chat-message {
    background: rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
}
.chat-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 5px;
}
.chat-form input, .chat-form textarea {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: rgba(0,0,0,0.2);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.9rem;
}
body.light-theme .chat-form input, body.light-theme .chat-form textarea {
    background: rgba(0,0,0,0.03);
}
.chat-form input:focus, .chat-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}
.chat-form textarea { resize: none; }
.chat-form .btn { padding: 12px; display: flex; justify-content: center; gap: 8px; border-radius: 8px; font-weight: 600; }

@media (max-width: 480px) {
    .chat-widget {
        bottom: 0; right: 0; width: 100%; height: 100%; border-radius: 0;
    }
}

/* Theme Switcher */
.theme-switcher {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 3px;
    margin-left: 1rem;
    gap: 2px;
}
body.light-theme .theme-switcher {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}
.theme-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.1rem;
}
.theme-btn:hover {
    color: var(--text-main);
}
.theme-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
body.light-theme .theme-btn.active {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
@media (max-width: 768px) {
    .theme-switcher { margin-left: 0; margin-top: 10px; }
}

/* Fix Navbar Item Wrapping and Alignment */
.nav-links {
    align-items: center;
}
.nav-links li {
    display: flex;
    align-items: center;
}
.nav-links li a {
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px; /* for the dropdown carets */
}

/* Absolute Center Alignment Fix for Nav */
nav {
    align-items: center;
}
.nav-links {
    margin: 0 !important;
    padding: 0 !important;
    align-items: center;
}
.nav-links li {
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
}
.logo-container-fix {
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
}

.logo {
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
}
.logo-img {
    margin: 0 !important;
    padding: 0 !important;
}

/* Theme Toggle Colors Fix */
.theme-switcher {
    background: rgba(10, 10, 10, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
}
body.light-theme .theme-switcher {
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
}
.theme-btn {
    color: rgba(255, 255, 255, 0.5);
}
body.light-theme .theme-btn {
    color: rgba(0, 0, 0, 0.4);
}
.theme-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}
body.light-theme .theme-btn:hover {
    color: #000000;
    background: rgba(0, 0, 0, 0.05);
}
.theme-btn.active {
    background: #1E1E1E !important;
    color: var(--primary) !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3) !important;
}
body.light-theme .theme-btn.active {
    background: #ffffff !important;
    color: var(--primary) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
}

/* Fix Theme Switcher Visibility on Transparent Top Navbar in Light Mode */
body.light-theme nav:not(.scrolled) .theme-switcher {
    background: rgba(10, 10, 10, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}
body.light-theme nav:not(.scrolled) .theme-btn {
    color: rgba(255, 255, 255, 0.5) !important;
}
body.light-theme nav:not(.scrolled) .theme-btn:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1) !important;
}
body.light-theme nav:not(.scrolled) .theme-btn.active {
    background: #1E1E1E !important;
    color: var(--primary) !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3) !important;
}
/* Enhanced Mobile Menu Layout */
@media (max-width: 768px) {
  .nav-links {
    align-items: stretch !important;
    padding: 2rem 8% !important;
    gap: 0 !important;
  }
  .nav-links > li {
    width: 100% !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }
  body.light-theme .nav-links > li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }
  .nav-links > li:last-child, .nav-links > li:nth-last-child(2) {
    border-bottom: none;
  }
  .nav-links > li > a {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    padding: 1.2rem 0 !important;
    font-size: 1.1rem !important;
  }
  .nav-links > li > a.btn-primary {
    justify-content: center !important;
    padding: 1rem !important;
    margin: 1.5rem 0 1rem 0 !important;
    font-size: 1rem !important;
  }
  .nav-links > li > div.theme-switcher {
    justify-content: center !important;
    margin: 1rem auto 2rem auto !important;
    display: flex;
    width: fit-content;
  }
  .dropdown-menu {
    padding: 0 0 1rem 1.5rem !important;
  }
  .dropdown-menu li {
    border-bottom: none !important;
  }
  .dropdown-menu li a {
    padding: 0.8rem 0 !important;
    font-size: 0.95rem !important;
    justify-content: flex-start !important;
  }
}

/* Content Protection */
img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    -webkit-touch-callout: none;
}


/* Composite Hero Slider Updates */
.hero {
  text-align: left;
  justify-content: flex-start;
}
.hero-content {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 0 5%;
}
.hero-content p {
  margin: 0 0 2rem 0;
}
.hero-content > div:not(.hero-slider-dots) {
  display: flex;
  gap: 15px;
}

/* Background and Foreground Slide Layers */
.hero-slide {
  background-image: none !important; /* overriding old background image logic */
}
.hero-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}
.hero-fg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover; /* Align perfectly with BG */
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 1s ease-in-out, transform 1s cubic-bezier(0.4, 0, 0.2, 1);
  transition-delay: 0.1s;
}
.hero-slide.active .hero-bg {
  opacity: 1;
}
.hero-slide.active .hero-fg {
  opacity: 1;
  transform: translateX(0);
}

/* About Image Hover Float */
.about-image img {
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.about-image:hover img {
  transform: translateY(-6px) !important;
}



/* Hero Services Widget */
.hero-services-widget {
    margin-top: 1rem;
    width: 100%;
    max-width: 600px;
    overflow: hidden;
    position: relative;
    padding: 10px 0;
}
/* Gradient fade on edges */
.hero-services-widget::before, .hero-services-widget::after {
    content: "";
    position: absolute;
    top: 0;
    width: 40px;
    height: 100%;
    z-index: 2;
}
.hero-services-widget::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-color), transparent);
}
.hero-services-widget::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-color), transparent);
}

.ticker-wrap {
    padding-right: 30px; /* Fix for 50% translateX loop calculation */
    display: flex;
    gap: 30px;
    white-space: nowrap;
    animation: horizontalTicker 45s linear infinite;
    width: max-content;
}
.ticker-wrap:hover {
    animation-play-state: paused;
}
.hero-service-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 16px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--primary);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}
.hero-service-row:hover {
    background: rgba(77, 238, 234, 0.1);
    border-color: var(--primary);
    transform: translateY(-2px);
}
.hero-service-row i {
    font-size: 1.2rem;
}

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


/* Connect Image Hover Float */
.connect-image img {
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.connect-image:hover img {
    transform: translateY(-6px) !important;
}


/* Modern Tech Overlay applied to hero */
.hero-overlay {
    background: radial-gradient(circle at center, rgba(18, 18, 18, 0.4) 0%, rgba(18, 18, 18, 0.98) 100%),
                url('data:image/svg+xml;utf8,<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><circle cx="2" cy="2" r="1.5" fill="rgba(3,218,198,0.15)"/></svg>') !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    z-index: 2 !important;
}

#hero-slider-bg {
    z-index: 0 !important;
    filter: brightness(0.3) !important;
    -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
}

#hero-slider-fg {
    z-index: 10 !important;
    pointer-events: none !important;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.hero-bg, .hero-fg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Ensure the text is perfectly readable but foreground image is above it */
.hero-content {
    z-index: 5 !important;
}

.hero-content h1 {
    max-width: 600px;
    line-height: 1.15;
}

/* --- TAURI-STYLE ANIMATED HERO BACKGROUND --- */
.hero {
    position: relative;
    overflow: hidden;
    background-color: var(--bg-color) !important;
}

.hero-content h1, .hero-content p {
    color: var(--text-main) !important;
}

.hero-animated-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Above background image */
    overflow: hidden;
}

/* Glowing Orbs (Behind Grid) */
.hero-orb-1, .hero-orb-2 {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: 1;
    pointer-events: none;
    animation: floatTauriOrb 6s ease-in-out infinite alternate;
}

.hero-orb-1 {
    width: 80vw;
    height: 80vw;
    max-width: 900px;
    max-height: 900px;
    background: radial-gradient(circle, rgba(77, 238, 234, 0.12) 0%, transparent 65%);
    top: -25%;
    left: -20%;
}

.hero-orb-2 {
    width: 90vw;
    height: 90vw;
    max-width: 1000px;
    max-height: 1000px;
    background: radial-gradient(circle, rgba(77, 238, 234, 0.08) 0%, transparent 65%);
    bottom: -30%;
    right: -25%;
    animation-delay: -3s;
    animation-duration: 8s;
}

/* Fine Grid (On top of orbs) */
.hero-animated-bg::after {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: calc(100% + 100px);
    height: calc(100% + 100px);
    z-index: 2;
    -webkit-mask-image: linear-gradient(to bottom, black 20%, transparent 90%);
    mask-image: linear-gradient(to bottom, black 20%, transparent 90%);
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: center center;
    animation: panTauriGrid 60s linear infinite;
    pointer-events: none;
}

@keyframes panTauriGrid {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

@keyframes floatTauriOrb {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(10%, 15%) scale(1.3); }
}


body.light-theme .hero-animated-bg::after {
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.15) 1px, transparent 1px);
}
body.light-theme .hero-orb-1 {
    background: radial-gradient(circle, rgba(77, 238, 234, 0.4) 0%, transparent 65%);
}
body.light-theme .hero-orb-2 {
    background: radial-gradient(circle, rgba(77, 238, 234, 0.3) 0%, transparent 65%);
}


body.light-theme #hero-slider-bg {
    display: none !important;
}

/* --- FINAL SEAMLESS TAURI FIX --- */
/* Completely hide uploaded images to allow the hero background to perfectly match the continuous body color */
#hero-slider-bg {
    display: none !important;
}

/* Ensure the hero section itself has no custom background color, letting the body color shine through seamlessly */
.hero {
    background-color: transparent !important;
    background: transparent !important;
}

.hero-service-row.active {
    background: var(--primary) !important;
    color: #000 !important;
    box-shadow: 0 0 20px rgba(78, 212, 189, 0.4) !important;
}
.hero-service-row.active i {
    color: #000 !important;
}
.hero-service-row { cursor: pointer; }

/* --- UI FIXES BATCH 1 --- */
/* 1. Remove unnecessary side gradients on slider navigation */
.hero-services-widget::before,
.hero-services-widget::after {
    display: none !important;
}

/* 2. Soft bottom fade for glowing orbs */
.hero-orb-1, .hero-orb-2 {
    -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
}

/* 3. Increase brightness of background glows */
.hero-orb-1 { background: radial-gradient(circle, rgba(77, 238, 234, 0.25) 0%, transparent 65%) !important; }
.hero-orb-2 { background: radial-gradient(circle, rgba(77, 238, 234, 0.20) 0%, transparent 65%) !important; }

body.light-theme .hero-orb-1 { background: radial-gradient(circle, rgba(77, 238, 234, 0.5) 0%, transparent 65%) !important; }
body.light-theme .hero-orb-2 { background: radial-gradient(circle, rgba(77, 238, 234, 0.4) 0%, transparent 65%) !important; }

/* 4. Fix light theme 'samples' button text color */
body.light-theme .hero-service-row {
    color: #090909 !important;
    background: rgba(255,255,255,0.8) !important;
}
body.light-theme .hero-service-row.active {
    background: var(--primary) !important;
    color: #000 !important;
}

/* 5. Fix light theme 'theme-toggle' dirty grey background */
body.light-theme .theme-switcher {
    background: rgba(0, 0, 0, 0.04) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
}
body.light-theme nav:not(.scrolled) .theme-switcher {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}



/* --- UI FIXES BATCH 2 --- */
/* Fix foreground image scaling and anchor it to the 1500px container bounds! */
.hero-fg {
    position: absolute !important;
    top: 55% !important;
    left: auto !important;
    /* This formula perfectly matches the left margin of the text container on large screens! */
    right: 5% !important; /* Align car exactly with the 5% padding of the grids below */
    width: 55% !important;
    max-width: 850px !important;
    height: auto !important;
    max-height: 80vh !important;
    object-fit: contain !important;
    transform: translateY(-50%) translateX(50px) !important;
    pointer-events: none;
    z-index: 2 !important; /* Ensure it stays behind text if it overlaps */
}
.hero-slide.active .hero-fg {
    transform: translateY(-50%) translateX(0) !important;
}

/* Prevent text from overlapping the car on all desktop/tablet screens */
@media (min-width: 769px) {
    .hero-content h1, .hero-content p {
        max-width: min(600px, 40vw) !important; /* Strictly forces text to stay on the left half */
    }
}

/* On mobile, center the car at the bottom */
@media (max-width: 768px) {
    .hero-fg {
        top: auto !important;
        bottom: 2% !important; /* FIXED: No longer negative, car won't be cut off */
        left: 50% !important;
        right: auto !important;
        width: 100% !important; /* Give it a bit more width so it looks good */
        max-height: 40vh !important;
        transform: translateX(-50%) translateY(50px) !important;
    }
    .hero-slide.active .hero-fg {
        transform: translateX(-50%) translateY(0) !important;
    }
    /* Move text up slightly so it doesn't collide with the car */
    .hero-content {
        margin-top: -15vh !important; 
    }
}

/* --- UI FIXES BATCH 4 (REVISED) --- */
/* Fix the orb clipping by masking the entire animated background container instead of individual orbs */
.hero-animated-bg {
    -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%) !important;
    mask-image: linear-gradient(to bottom, black 85%, transparent 100%) !important;
}

/* Remove the old individual orb masks that were failing */
.hero-orb-1, .hero-orb-2 {
    -webkit-mask-image: none !important;
    mask-image: none !important;
}

/* --- UI FIXES BATCH 5 --- */
/* FORCING light theme text colors to be black to fix invisibility issue */
body.light-theme .hero-content h1,
body.light-theme .hero-content p {
    color: #090909 !important;
}
body.light-theme .hero-content h1 span {
    color: var(--primary);
    display: block; /* Forces spans to break into new lines */
}


/* --- UI FIXES BATCH 6 --- */
/* Reduce the massive empty gap below the hero on large desktop screens */
@media (min-width: 993px) {
    .hero {
        max-height: 850px !important;
    }
}

/* --- UI FIXES BATCH 7 --- */
/* Increase logo size in the navbar for better visibility */
.logo-img {
    height: 35px !important;
}
@media (max-width: 768px) {
    .logo-img {
        height: 28px !important; /* Slightly smaller on mobile to fit the menu toggle */
    }
}

/* --- UI FIXES BATCH 9 --- */
/* Match light theme unscrolled navbar to Image 2 (white gradient, dark text, dark logo) */
body.light-theme nav:not(.scrolled) {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 100%) !important;
}
body.light-theme nav:not(.scrolled) .nav-links > li > a {
    color: var(--text-main) !important;
}
body.light-theme nav:not(.scrolled) .nav-links > li > a:hover {
    color: var(--primary) !important;
}



body.light-theme nav:not(.scrolled) .nav-btn,
body.light-theme nav:not(.scrolled) .menu-toggle span { 
    color: var(--text-main) !important; 
    background-color: var(--text-main) !important; /* for hamburger menu spans */
}
body.light-theme nav:not(.scrolled) .menu-toggle {
    color: var(--text-main) !important; 
}

/* Theme toggle fixes for unscrolled light theme to match Image 2 */
body.light-theme nav:not(.scrolled) .theme-switcher {
    background: rgba(0, 0, 0, 0.04) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
}
body.light-theme nav:not(.scrolled) .theme-btn {
    color: var(--text-muted) !important;
}
body.light-theme nav:not(.scrolled) .theme-btn:hover {
    color: var(--text-main) !important;
    background: rgba(255, 255, 255, 0.8) !important;
}
body.light-theme nav:not(.scrolled) .theme-btn.active {
    background: var(--surface) !important;
    color: var(--primary) !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
}
/* Ensure caret icons in dropdowns match dark text */
body.light-theme nav:not(.scrolled) .nav-links > li > a i {
    color: var(--text-main) !important;
}

/* --- UI FIXES BATCH 11 --- */
/* Fix logo colors for Light Theme unscrolled navbar */
body.light-theme nav:not(.scrolled) .logo-dark-version { display: none !important; }
body.light-theme nav:not(.scrolled) .logo-light-version { display: block !important; }

/* --- UI FIXES BATCH 12 --- */
/* Simply apply the fade mask directly to the slider widget without any margin/transform hacks to keep perfect alignment with the text above */
.hero-services-widget {
    -webkit-mask-image: linear-gradient(to right, transparent 0px, black 40px, black calc(100% - 40px), transparent 100%) !important;
    mask-image: linear-gradient(to right, transparent 0px, black 40px, black calc(100% - 40px), transparent 100%) !important;
    transform: none !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
    width: 100% !important;
    max-width: 600px !important;
}
.hero-services-widget .ticker-wrap {
    padding-right: 30px; /* Fix for 50% translateX loop calculation */
    margin-left: 0 !important;
    padding-left: 0 !important;
    animation-name: horizontalTicker !important; /* Restore original animation */
}/* --- UI FIXES BATCH 14 (FINAL) --- */
/* Lock the Hero section and 'What We Do' grid to exactly 1500px so they perfectly align with each other */
.hero {
    padding: 0 5% !important;
}
.hero-content {
    max-width: 1500px !important;
    margin: 0 auto !important;
    padding: 0 !important;
}
#homeServicesGrid {
    max-width: 1500px !important;
    margin: 0 auto !important;
    padding: 0 !important;
}
.hero-fg {
    right: max(5%, calc(50% - 750px)) !important;
}
/* --- UI FIXES BATCH 15 (REVERT TO BATCH 12 & REMOVE GLOW) --- */
/* The user requested to revert back to the exact alignment and remove the glow entirely. */
/* This will perfectly align the widget, apply a 40px fade on both sides, and remove the glow. */
.hero-services-widget {
    position: relative !important;
    left: 0 !important;
    margin-left: 0 !important;
    width: 100% !important;
    overflow: hidden !important; 
    -webkit-mask-image: linear-gradient(to right, transparent 0px, black 40px, black calc(100% - 40px), transparent 100%) !important;
    mask-image: linear-gradient(to right, transparent 0px, black 40px, black calc(100% - 40px), transparent 100%) !important;
    transform: none !important;
}

.hero-services-widget .ticker-wrap {
    padding-right: 30px; /* Fix for 50% translateX loop calculation */
    position: relative !important;
    left: 0 !important;
    margin-left: 0 !important;
    transform: none; 
    animation: horizontalTicker 45s linear infinite !important;
}

.hero-services-widget .ticker-wrap:hover {
    animation-play-state: paused !important;
}

/* Remove the glow completely as requested */
.hero-service-row.active {
    box-shadow: none !important;
}
/* --- UI FIXES BATCH 16 (MOBILE RESPONSIVENESS) --- */
@media (max-width: 768px) {
    /* Fix top gap being too big by pinning content to top instead of center */
    .hero {
        align-items: flex-start !important;
        padding-top: 130px !important; /* Navbar is ~80px, so 130px gives a nice top margin */
    }
    
    .hero-content {
        margin-top: 0 !important; /* Remove the old negative margin hack */
        position: relative !important;
        z-index: 20 !important; /* Ensure text stays above car */
    }

    .hero-services-widget {
        position: relative !important;
        z-index: 20 !important; /* Ensure buttons stay clickable and visible above car */
    }

    .hero-fg {
        /* Keep car at the bottom, but ensure it goes BEHIND the buttons and text */
        z-index: 10 !important;
        bottom: 0% !important;
        max-height: 45vh !important; /* Slightly larger, but safely behind buttons */
    }
}

/* --- UI FIXES BATCH 17 (MOBILE HERO LAYOUT REWRITE) --- */
@media (max-width: 768px) {
    /* Make the hero section flow normally to prevent gaps/overlaps regardless of text length */
    .hero {
        height: auto !important;
        min-height: auto !important;
        display: block !important;
        padding-bottom: 2rem !important;
    }
    
    .hero-content {
        margin-bottom: 1rem !important; /* Exact gap between buttons and car */
    }

    /* Change the slider container from absolute screen-covering to a relative block that sits under the text */
    #hero-slider-fg {
        position: relative !important;
        height: 40vh !important;
        min-height: 250px !important;
        width: 100% !important;
    }

    /* Make the car fill the relative container perfectly */
    .hero-fg {
        position: absolute !important;
        top: 0 !important;
        bottom: 0 !important;
        height: 100% !important;
        max-height: none !important;
        transform: translateX(-50%) translateY(20px) !important; /* Reset old translate */
    }
    .hero-slide.active .hero-fg {
        transform: translateX(-50%) translateY(0) !important;
    }
}

/* --- UI FIXES BATCH 18 (MOBILE CAR PNG GAP FIX) --- */
@media (max-width: 768px) {
    /* Instead of a fixed 40vh height which causes gaps if the car is wide, use aspect-ratio to perfectly wrap it */
    #hero-slider-fg {
        height: auto !important; 
        aspect-ratio: 16 / 9 !important; /* Perfect fit for a wide car PNG */
        margin-top: 1rem !important; /* Small gap from buttons */
    }

    .hero-fg {
        position: absolute !important;
        top: 0 !important;
        left: -10% !important; /* Make car wider than screen for dramatic effect */
        width: 120% !important; /* 120% width to make it pop out nicely */
        height: 100% !important;
        object-fit: contain !important;
        object-position: center !important; /* Center it perfectly in the 16:9 box */
        transform: none !important; /* Remove translateX to prevent drifting */
    }

    .hero-slide.active .hero-fg {
        transform: none !important;
    }
}

/* --- UI FIXES BATCH 19 (SUBPAGE NAVBAR LIGHT THEME FIX) --- */
/* The user wants subpages to have a dark unscrolled navbar even in Light Theme, because the page headers are dark */
body.sub-page.light-theme nav:not(.scrolled) {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%) !important;
}

body.sub-page.light-theme nav:not(.scrolled) .nav-links > li > a {
    color: #ffffff !important;
}
body.sub-page.light-theme nav:not(.scrolled) .nav-links > li > a:hover {
    color: var(--primary) !important;
}

body.sub-page.light-theme nav:not(.scrolled) .nav-btn,
body.sub-page.light-theme nav:not(.scrolled) .menu-toggle span { 
    color: #ffffff !important; 
    background-color: #ffffff !important;
}

body.sub-page.light-theme nav:not(.scrolled) .menu-toggle {
    color: #ffffff !important; 
}

/* Subpage unscrolled logo (Must be white) */
body.sub-page.light-theme nav:not(.scrolled) .logo-dark-version { display: block !important; }
body.sub-page.light-theme nav:not(.scrolled) .logo-light-version { display: none !important; }

/* Subpage unscrolled theme switcher */
body.sub-page.light-theme nav:not(.scrolled) .theme-switcher {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}
body.sub-page.light-theme nav:not(.scrolled) .theme-btn {
    color: rgba(255, 255, 255, 0.6) !important;
}
body.sub-page.light-theme nav:not(.scrolled) .theme-btn:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.2) !important;
}
body.sub-page.light-theme nav:not(.scrolled) .theme-btn.active {
    background: #ffffff !important;
    color: #000 !important;
}
body.sub-page.light-theme nav:not(.scrolled) .nav-links > li > a i {
    color: #ffffff !important;
}

/* Animations for elements that should load instantly on page load with a staggered effect */
.animate-on-load {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.animate-on-load.visible {
    opacity: 1;
    transform: translateY(0);
}
