/* 
 * Oville Associates - Main Stylesheet
 * Primary Color: #262a69
 * Accent Color: #07afdf
 */

:root {
  --primary-color: #262a69;
  --primary-dark: #1a1d4a;
  --accent-color: #07afdf;
  --accent-hover: #058bb3;
  --text-dark: #1a1a1a;
  --text-light: #f5f5f5;
  --text-grey: #666666;
  --bg-light: #ffffff;
  --bg-off-white: #f8f9fa;
  --bg-dark: #0f112e;
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --header-height: 80px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1280px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', 'Inter', sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

h1 {
  font-size: 3.5rem;
}

h2 {
  font-size: 2.5rem;
  position: relative;
}

h3 {
  font-size: 1.75rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-grey);
}

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

ul {
  list-style: none;
}

/* Utilities */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section-padding {
  padding: 100px 0;
}

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

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

.text-white {
  color: var(--text-light);
}

.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--primary-color);
  color: var(--text-light);
  border: 2px solid var(--primary-color);
}

.btn-primary:hover {
  background: transparent;
  color: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(38, 42, 105, 0.2);
}

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

.btn-accent:hover {
  background: var(--accent-hover);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(7, 175, 223, 0.3);
}

/* Animations */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Navigation */
.navbar {
  height: var(--header-height);
  background-color: var(--bg-light);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo span {
  color: var(--accent-color);
}

.navbar .logo img {
  height: 60px;
  width: auto;
  transition: var(--transition);
}

@media (max-width: 768px) {
  .navbar .logo img {
    height: 40px;
  }
}

.nav-menu {
  display: flex;
  gap: 30px;
}

.nav-link {
  font-weight: 500;
  color: var(--primary-color);
  position: relative;
  font-size: 0.95rem;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--accent-color);
  transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--primary-color);
  cursor: pointer;
}

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

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-light);
  box-shadow: var(--card-shadow);
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  border-top: 3px solid var(--accent-color);
  border-radius: 0 0 8px 8px;
  padding: 10px 0;
}

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

.dropdown-item {
  display: block;
  padding: 12px 20px;
  color: var(--text-dark);
  font-weight: 500;
  transition: var(--transition);
}

.dropdown-item:hover {
  background-color: var(--bg-off-white);
  color: var(--accent-color);
  padding-left: 25px;
}

/* Mobile Nav */
@media (max-width: 968px) {
  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: -100%;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background-color: var(--bg-light);
    flex-direction: column;
    padding: 30px;
    transition: var(--transition);
    align-items: center;
    box-shadow: inset 0 10px 10px -10px rgba(0, 0, 0, 0.1);
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-toggle {
    display: block;
  }

  .dropdown-menu {
    position: static;
    visibility: visible;
    opacity: 1;
    box-shadow: none;
    transform: none;
    border-top: none;
    display: none;
    padding-left: 20px;
  }

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

/* Footer */
footer {
  background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--text-light);
  padding: 60px 0 20px;
  margin-top: auto;
  position: relative;
}

/* Subtle Pattern Overlay */
footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 30px 30px;
  opacity: 0.3;
  pointer-events: none;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h4 {
  color: var(--text-light);
  margin-bottom: 20px;
  font-size: 1.2rem;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: #ccc;
  transition: var(--transition);
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 0.9rem;
  color: #aaa;
}

.footer-bottom a {
  color: var(--accent-color);
}

/* Services Section */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.service-card {
  background: white;
  padding: 40px 30px;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  border-bottom: 3px solid transparent;
}

.service-card:hover {
  transform: translateY(-10px);
  border-bottom-color: var(--accent-color);
}

.service-icon {
  font-size: 2.5rem;
  color: var(--accent-color);
  margin-bottom: 20px;
  display: inline-block;
}

.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.learn-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-color);
  font-weight: 600;
  margin-top: 15px;
}

.learn-more i {
  transition: transform 0.3s ease;
}

.learn-more:hover i {
  transform: translateX(5px);
}

/* Client Logo Slider */
.clients-slider {
  margin-top: 50px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.clients-slider::before,
.clients-slider::after {
  content: "";
  position: absolute;
  height: 100%;
  width: 100px;
  top: 0;
  z-index: 2;
}

.clients-slider::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-light), transparent);
}

.clients-slider::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-light), transparent);
}

.clients-track {
  display: flex;
  width: calc(250px * 18);
  /* 9 logos * 2 sets */
  animation: scroll 40s linear infinite;
}

.client-slide {
  width: 250px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 30px;
}

.client-slide img {
  max-width: 100%;
  max-height: 80px;
  filter: grayscale(0%);
  opacity: 1;
  transition: var(--transition);
}

.client-slide img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(calc(-250px * 9));
  }
}

/* Philosophy Section */
.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.philosophy-item {
  background: white;
  padding: 40px 30px;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  border-bottom: 3px solid transparent;
}

.philosophy-item:hover {
  transform: translateY(-10px);
  border-bottom-color: var(--accent-color);
}

.philosophy-header {
  margin-bottom: 20px;
}

.philosophy-icon {
  font-size: 2.5rem;
  color: var(--accent-color);
  margin-bottom: 20px;
  display: inline-block;
}

.philosophy-header h3 {
  font-size: 1.5rem;
  margin-bottom: 0;
  color: var(--primary-color);
}

.philosophy-item p {
  color: var(--text-grey);
  line-height: 1.6;
}

/* Gallery Section */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.hidden-item {
  display: none;
}

.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  height: 250px;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.15);
  /* Increased scale */
  filter: brightness(1.1);
  /* Slight brightness boost */
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
  /* Ensure height wraps content */
  min-height: 80px;
  /* Minimum height for visibility */
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 10%, transparent);
  /* Stronger gradient for legibility */
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 20%, rgba(0, 0, 0, 0.6) 80%, transparent 100%);
  padding: 30px 20px 20px;
  /* More padding top */
  opacity: 1 !important;
  /* Force visibility */
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-align: left;
  transition: all 0.3s ease;
  z-index: 10;
  /* Ensure on top */
  pointer-events: none;
  /* Let clicks pass through to container */
}

.gallery-overlay h5,
.gallery-overlay p {
  color: white !important;
  margin-bottom: 5px;
  font-size: 1.1rem;
  font-weight: 700;
  transform: none;
  filter: none !important;
  /* REMOVED BLUR */
  opacity: 1 !important;
  transition: all 0.3s ease;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 1);
}

.gallery-overlay p {
  font-size: 0.95rem;
  /* Sligthly larger */
  font-weight: 500;
}

/* Lightbox Styles */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.lightbox.active .lightbox-content {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
}

.lightbox-close:hover {
  color: var(--accent-color);
}

.lightbox-caption {
  position: absolute;
  bottom: 20px;
  left: 0;
  width: 100%;
  text-align: center;
  color: white;
  z-index: 10000;
  padding: 0 20px;
}

.lightbox-caption h5 {
  font-size: 1.5rem;
  margin-bottom: 5px;
  color: var(--accent-color);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.lightbox-caption p {
  font-size: 1rem;
  color: #f0f0f0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* Modern Page Headers */
.page-header {
  position: relative;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-color);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  /* Parallax effect */
  color: white;
  text-align: center;
  overflow: hidden;
  margin-bottom: 0;
}

/* Gradient Overlay */
.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(26, 29, 74, 0.95) 0%, rgba(38, 42, 105, 0.8) 100%);
  z-index: 1;
}

/* Header Content */
.page-header .container {
  position: relative;
  z-index: 2;
  padding-top: 60px;
  /* Offset for fixed navbar */
}

.page-header h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 15px;
  color: #ffffff !important;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.8);
  letter-spacing: -1px;
}

.page-header p {
  font-size: 1.25rem;
  color: #f0f0f0 !important;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
  margin-bottom: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* Bottom Curve (Optional, makes it modern) */
.header-curve {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  z-index: 2;
}

.header-curve svg {
  position: relative;
  display: block;
  width: calc(150% + 1.3px);
  height: 60px;
}

.header-curve .shape-fill {
  fill: var(--bg-light);
  /* Matches body background */
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .page-header {
    height: 300px;
    /* Reduced height for mobile pages */
  }

  .page-header h1 {
    font-size: 2.5rem;
  }

  /* Hero Section Mobile Fixes */
  .hero {
    height: auto;
    min-height: 100vh;
    /* Full screen height to ensure space */
    padding-top: 200px;
    /* MORE padding to clear navbar - significantly increased */
    padding-bottom: 80px;
    background-position: center;
    /* Center image */
    background-size: cover;
    display: flex;
    align-items: center;
    text-align: center;
    /* Ensure all hero content is centered */
  }

  .hero-content {
    padding-top: 20px;
    width: 100%;
    /* Ensure full width for centering */
  }

  .hero-content h4 {
    font-size: 1rem !important;
    letter-spacing: 2px;
    margin-bottom: 10px;
    display: block;
    /* Ensure it takes space */
    color: var(--accent-color);
    /* Ensure visibility */
  }

  .hero-content h1 {
    font-size: 2.2rem !important;
    /* Slightly smaller to fit lines */
    line-height: 1.3;
    margin-bottom: 1.5rem;
    color: white !important;
    /* Force white */
  }

  .hero-content p {
    font-size: 1rem !important;
    margin-bottom: 2rem;
  }

  .hero-content .btn {
    display: block;
    width: 100%;
    margin: 15px auto !important;
    /* Force center with auto margins */
    max-width: 300px;
    /* Prevent overly wide buttons */
    text-align: center;
  }

  /* Reset flex alignment for icons */
  .service-card,
  .philosophy-item,
  .info-item {
    display: block !important;
    /* Stack content vertically */
    text-align: center !important;
  }

  .service-icon,
  .philosophy-icon,
  .info-icon {
    float: none;
    display: inline-flex !important;
    /* or inline-block */
    margin: 0 auto 15px auto !important;
    justify-content: center;
    align-items: center;
  }

  /* Specific fix for contact info icons which might be flex wrappers */
  .info-icon {
    margin-bottom: 15px;
  }

  /* Accreditations Mobile Scroll */
  .accreditations {
    padding: 2px 0;
    overflow: hidden;
    /* Mask overflow */
    box-sizing: border-box;
  }

  .accreditations .container {
    width: 100%;
    overflow: hidden;
    padding: 0;
  }

  .logo-scroller {
    display: flex;
    /* Ensure horizontal */
    width: max-content;
    /* Allow content to stretch */
    animation: scroll-logos 20s linear infinite;
    /* Marquee */
    gap: 30px;
    flex-direction: row !important;
    /* Force row on mobile */
  }

  .logo-item {
    font-size: 0.9rem !important;
    white-space: nowrap;
    /* Prevent wrapping */
  }

  .logo-item i {
    font-size: 1.2rem !important;
  }
}

@keyframes scroll-logos {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-33.33%);
  }

  /* Scroll one-third (since we triplicated contents) */
}

/* Hide the "Who We Are" image on mobile as requested */
@media (max-width: 768px) {
  .who-we-are-image {
    display: none;
  }

  /* Center Align Content on Mobile */
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  p,
  .text-center-mobile {
    text-align: center;
  }

  ul {
    text-align: center;
    list-style-position: inside;
    /* Keeps bullets with centered text */
  }

  /* Ensure buttons are centered */
  .btn {
    display: block;
    margin: 20px auto;
    width: fit-content;
  }

  /* Reset specific alignments if needed */
  .footer-col,
  .footer-col h4,
  .footer-col ul {
    text-align: center;
    /* Ensure footer stays centered */
  }

  /* Ensure icons are centered on mobile */
  .philosophy-icon,
  .service-icon,
  .info-icon {
    display: inline-block;
    /* Support text-align center from parent */
    margin: 0 auto 20px auto;
    /* Force centering if block */
  }
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Keep overlay visible on hover */
.gallery-item:hover .gallery-overlay {
  opacity: 1 !important;
}

/* Unified Contact Card Design */
.contact-container {
  display: flex;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
  /* Deeper shadow for float effect */
  overflow: hidden;
  min-height: 650px;
  margin-top: -60px;
  /* Overlap header slightly for premium feel */
  position: relative;
  z-index: 10;
}

.contact-info-side {
  background: var(--primary-color);
  color: white;
  padding: 60px 40px;
  width: 40%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

/* Decorative circle pattern on info side */
.contact-info-side::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}

.contact-info-side h3 {
  color: white;
  font-size: 2rem;
  margin-bottom: 20px;
}

.contact-info-side p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.05rem;
  margin-bottom: 40px;
  line-height: 1.6;
}

.info-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 30px;
}

.info-icon {
  width: 50px;
  height: 50px;
  background: rgba(7, 175, 223, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-color);
  font-size: 1.2rem;
  margin-right: 20px;
  flex-shrink: 0;
}

.info-content h5 {
  color: white;
  margin-bottom: 5px;
  font-size: 1.1rem;
}

.info-content p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  margin-bottom: 0;
}

.contact-form-side {
  width: 60%;
  background: white;
  position: relative;
}

@media (max-width: 900px) {
  .contact-container {
    flex-direction: column;
    margin-top: 0;
  }

  .contact-info-side,
  .contact-form-side {
    width: 100%;
  }

  .contact-info-side {
    padding: 40px 30px;
  }
}

/* Enhanced Footer Background - Vibrant & Premium */
footer {
  background:
    radial-gradient(circle at 0% 0%, rgba(7, 175, 223, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(38, 42, 105, 0.3) 0%, transparent 50%),
    linear-gradient(135deg, #0b0d26 0%, #1a1d4a 100%) !important;
  position: relative;
  overflow: hidden;
  color: white;
}

footer::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.03) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.03) 50%, rgba(255, 255, 255, 0.03) 75%, transparent 75%, transparent);
  background-size: 20px 20px;
  pointer-events: none;
  opacity: 0.5;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-color), var(--primary-color), var(--accent-color));
  z-index: 5;
}


/* CTA Section - Lighter Background */
.contact-cta {
  padding: 80px 0;
  background: #f8f9fa !important;
  color: var(--text-dark) !important;
  text-align: center;
}

.contact-cta h2 {
  color: var(--primary-color) !important;
  margin-bottom: 20px;
}

.contact-cta p {
  color: #666;
  margin-bottom: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Desktop Specifics: Hide Duplicates & Align Buttons & Header */
@media (min-width: 769px) {
  .mobile-only-scroll {
    display: none !important;
  }

  .hero-stats {
    justify-content: center !important;
  }

  .hero-buttons {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 40px;
  }

  .hero {
    height: 100vh;
    min-height: 700px;
    padding-top: 80px;
    display: flex;
    align-items: center;
    text-align: left;
  }

  .hero-content {
    max-width: 800px;
  }

  .logo-scroller {
    justify-content: center !important;
  }

  /* Fix Header Alignment & Restore visibility on desktop */
  .navbar {
    display: flex !important;
  }

  .nav-container {
    justify-content: space-between;
  }

  .nav-menu {
    margin-left: auto;
    margin-right: 30px;
    align-items: center;
  }
}


/* Gallery Fixes requiring override */
.lightbox-content img {
  max-height: 80vh !important;
  max-width: 100% !important;
  object-fit: contain !important;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  color: white;
  font-size: 3rem;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
  z-index: 10002 !important;
  background: rgba(0, 0, 0, 0.5);
  width: 50px;
  height: 50px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

@media (max-width: 968px) {
  .navbar {
    display: none !important;
  }
}


/* Hero Stats - Horizontal Alignment (Universal/Mobile-First) */
.hero-stats {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  /* items top aligned */
  width: 100%;
  margin-top: 40px;
  gap: 10px;
  flex-direction: row;
  /* Explicitly horizontal */
}

.stat-item {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-item h3 {
  color: var(--accent-color);
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 5px;
}

.stat-item p {
  color: white;
  font-size: 0.9rem;
  line-height: 1.2;
  margin: 0;
}

/* Ensure font sizes scale down on very small screens */
@media (max-width: 400px) {
  .stat-item h3 {
    font-size: 1.5rem;
  }

  .stat-item p {
    font-size: 0.8rem;
  }
}


/* REAL DEVICE FIXES - Force Overrides */

/* 1. Ensure Header Text is NOT cut off */
@media (max-width: 768px) {
  .navbar {
    display: flex !important;
    /* RESTORED: User needs hamburger icon */
  }

  .hero {
    padding-top: 100px !important;
    /* REDUCED per user feedback (was 150px) */
    align-items: flex-start !important;
  }

  /* 2. FORCE Horizontal Stats */
  .hero-stats {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    gap: 5px !important;
    width: 100% !important;
    margin-top: 20px !important;
  }

  .stat-item {
    flex: 1 1 0px !important;
    min-width: 0 !important;
    padding: 0 2px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  .stat-item h3 {
    font-size: 1.2rem !important;
    margin-bottom: 0 !important;
  }

  .stat-item p {
    font-size: 0.7rem !important;
    line-height: 1.1 !important;
    white-space: normal !important;
  }
}

/* Fix Oversized Service Images on Desktop */
/* Fix Oversized Service Images (Global) */
#engineering .fade-in-up>img,
#forensic .fade-in-up>img,
#pm .fade-in-up>img {
  height: 280px;
  width: 100%;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: var(--card-shadow);
}

@media (min-width: 769px) {

  /* Ensure navbar is visible on desktop too */
  .navbar {
    display: flex !important;
  }
}

/* PREMIUM SERVICES REDESIGN */

/* Feature Grid Layout */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-top: 30px;
}

.feature-item {
  background: white;
  padding: 20px 15px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.feature-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border-color: var(--accent-color);
}

.feature-item i {
  font-size: 1.8rem;
  color: var(--accent-color);
  margin-bottom: 12px;
  display: block;
  transition: transform 0.3s ease;
}

.feature-item:hover i {
  transform: scale(1.1);
}

.feature-item span {
  font-size: 0.9rem;
  font-weight: 600;
  color: #444;
  line-height: 1.3;
  display: block;
}

/* Gradient Headings for Services */
.service-content h2 {
  font-size: 2.2rem;
  margin-bottom: 20px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  /* Required for gradient text sometimes */
}

/* Mobile Responsive for Feature Grid */
@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
    /* Stack on mobile */
    gap: 10px;
  }

  .feature-item {
    flex-direction: row;
    /* Horizontal on mobile for space */
    justify-content: flex-start;
    padding: 15px;
    text-align: left;
  }

  .feature-item i {
    margin-bottom: 0;
    margin-right: 15px;
    font-size: 1.4rem;
  }
}


/* Fixed Responsive Grid */
.responsive-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  align-items: center;
}

@media (min-width: 769px) {
  .responsive-grid-2 {
    grid-template-columns: 0.6fr 1.4fr;
    gap: 40px;
  }

  /* Reverse columns for the middle section (Text First, Image Second) */
  #forensic .responsive-grid-2 {
    grid-template-columns: 1.4fr 0.6fr;
  }
}

/* Fix Mobile Scroller */
@media (max-width: 968px) {
  .logo-scroller {
    flex-wrap: nowrap !important;
  }
}

/* Fix Desktop Order for Forensic Engineering (Alternating Layout) */
@media (min-width: 769px) {
  #forensic .responsive-grid-2 .fade-in-up:first-child {
    order: 2;
  }

  #forensic .responsive-grid-2 .service-content {
    order: 1;
  }
}