:root {
  --primary-navy: #0d1b2a;
  --navy-light: #1b2a3f;
  --brand-orange: #f08024;
  --brand-orange-hover: #d96d1f;
  --white: #ffffff;
  --bg-light: #f8f9fa;
  --transition: all 0.3s ease;
}

body {
  font-family: "Outfit", sans-serif;
  color: var(--primary-navy);
  overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
}

.text-navy {
  color: var(--primary-navy) !important;
}

.text-orange {
  color: var(--brand-orange) !important;
}

.text-orange-gradient {
  background: linear-gradient(45deg, var(--brand-orange), #ff9f43);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bg-navy {
  background-color: var(--primary-navy) !important;
}

.bg-navy-light {
  background-color: rgba(13, 27, 42, 0.05) !important;
}

.bg-orange {
  background-color: var(--brand-orange) !important;
}

.bg-orange-light {
  background-color: rgba(240, 128, 36, 0.1) !important;
}

/* Buttons */
.btn {
  font-weight: 600;
  transition: var(--transition);
}

.btn-primary {
  background-color: var(--brand-orange);
  border-color: var(--brand-orange);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--brand-orange-hover);
  border-color: var(--brand-orange-hover);
}

.btn-navy {
  background-color: var(--primary-navy);
  border-color: var(--primary-navy);
  color: var(--white);
}

.btn-navy:hover {
  background-color: var(--navy-light);
  border-color: var(--navy-light);
}

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

.btn-outline-navy:hover {
  background-color: var(--primary-navy);
  color: var(--white);
}

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

/* Top Bar */
.top-bar {
  padding: 10px 0;
  font-size: 0.85rem;
  transition: var(--transition);
  position: relative;
  z-index: 1001;
}

.top-bar-solid {
  background-color: var(--primary-navy);
  color: var(--white);
}

.top-bar-transparent {
  position: absolute;
  width: 100%;
  top: 0;
  left: 0;
  background-color: rgba(13, 27, 42, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--white);
}

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

.top-bar a:hover {
  color: var(--brand-orange);
}

/* Navbar */
.navbar {
  transition: var(--transition);
  padding: 1rem 0;
}

.navbar-transparent {
  background: transparent;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

@media (min-width: 992px) {
  .navbar-transparent {
    top: 42px; /* Adjust for Top Bar */
  }
}

/* Sticky Header Styles */
.navbar-transparent.scrolled {
  position: fixed;
  top: 0 !important;
  background-color: var(--white) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  padding: 1.5rem 0; /* Maximize padding */
  min-height: 100px; /* Ensure generous height */
  display: flex;
  align-items: center;
  animation: slideDown 0.3s ease forwards;
}

/* Increase logo size in sticky header */
.navbar-transparent.scrolled .logo-color {
  height: 60px; /* Larger logo when scrolled */
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

/* Logo Handling */
.logo-white,
.logo-color {
  height: 60px; /* Increased base size for transparent header */
  width: auto;
  transition: var(--transition);
}

/* Default state for Transparent Header (Home Top) */
.navbar-transparent .logo-color {
  display: none;
}
.navbar-transparent .logo-white {
  display: block;
}

/* Active Link in Transparent Header (Initial State) */
.navbar-transparent .nav-link.active {
  color: var(--white) !important;
  font-weight: 700;
}

/* Scrolled State - Switch Logos */
.navbar-transparent.scrolled .logo-white {
  display: none !important;
}
.navbar-transparent.scrolled .logo-color {
  display: block !important;
}

/* Scrolled State - Text Colors */
.navbar-transparent.scrolled .nav-link {
  color: var(--primary-navy) !important;
}
.navbar-transparent.scrolled .nav-link:hover,
.navbar-transparent.scrolled .nav-link.active {
  color: var(--brand-orange) !important;
}

/* Custom Toggler Icon Colors */
.custom-toggler-icon {
    color: var(--primary-navy);
    transition: var(--transition);
    font-size: 2.8rem; /* Even larger icon */
    line-height: 1; 
}

.navbar-transparent .custom-toggler-icon {
    color: var(--white);
}

.navbar-transparent.scrolled .custom-toggler-icon {
    color: var(--primary-navy) !important;
}

.navbar.menu-open .custom-toggler-icon {
    color: var(--white) !important;
}

.navbar-transparent.scrolled .navbar-toggler span {
  color: var(--primary-navy) !important;
}

/* Scrolled State - Buttons */
.navbar-transparent.scrolled .btn-outline-light {
  color: var(--primary-navy);
  border-color: var(--primary-navy);
}
.navbar-transparent.scrolled .btn-outline-light:hover {
  background-color: var(--primary-navy);
  color: var(--white);
}

.navbar-brand img {
  height: 60px; /* Match the logo size */
}

.navbar-transparent .nav-link {
  color: var(--white);
}

.navbar-transparent .nav-link:hover {
  color: var(--brand-orange);
}

.navbar.menu-open {
  background-color: var(--brand-orange) !important;
}
.navbar.menu-open .nav-link {
  color: var(--white) !important;
}
.navbar.menu-open .btn-outline-light {
  color: var(--white) !important;
  border-color: var(--white) !important;
}
.navbar.menu-open .logo-white {
  display: block !important;
}
.navbar.menu-open .logo-color {
  display: none !important;
}

.navbar-light .nav-link {
  color: var(--primary-navy);
}

.navbar-light .nav-link:hover {
  color: var(--brand-orange);
}

/* Hero Section */
.hero-slider {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
}

.hero-carousel-item {
  height: 100vh;
  min-height: 600px;
}

.hero-bg-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-img {
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(13, 27, 42, 0.9),
    rgba(13, 27, 42, 0.4)
  );
}

.carousel-nav-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.carousel-nav-btn:hover {
  background: var(--brand-orange);
  color: var(--white);
}

/* Sections */
.section-padding {
  padding: 5rem 0;
}

/* Utilities */
.hover-lift {
  transition: transform 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
}

.shadow-lg {
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

.letter-spacing-1 {
  letter-spacing: 1px;
}

.mw-800 {
  max-width: 800px;
}

/* Patterns */
.bg-pattern-1 {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(
    rgba(13, 27, 42, 0.05) 1px,
    transparent 1px
  );
  background-size: 30px 30px;
  z-index: 1;
}

.bg-pattern-dots-white {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(#ffffff 2px, transparent 2px);
  background-size: 30px 30px;
  opacity: 0.4;
  z-index: 0;
  pointer-events: none;
}

/* Cards */
.glass-panel {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.bg-navy .glass-panel {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.benefit-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.card {
  border: none;
}

/* Accordion */
.accordion-item {
  border: 1px solid rgba(0, 0, 0, 0.05);
  margin-bottom: 1rem;
  border-radius: 0.5rem !important;
  overflow: hidden;
}

.accordion-button {
  background-color: var(--white);
  color: var(--primary-navy);
}

.accordion-button:not(.collapsed) {
  background-color: rgba(240, 128, 36, 0.05);
  color: var(--primary-navy);
}

.accordion-button:focus {
  box-shadow: none;
  border-color: rgba(240, 128, 36, 0.5);
}

.bg-navy .accordion-item {
  border-color: rgba(255, 255, 255, 0.12);
}
.bg-navy .accordion-button {
  background-color: transparent;
  color: var(--white);
}
.bg-navy .accordion-button:not(.collapsed) {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--white);
}
.bg-navy .accordion-button::after {
  filter: invert(1) brightness(1.5);
}

.accordion-button::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230d1b2a'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.accordion-button:not(.collapsed)::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23f08024'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

/* Footer */
footer {
  background-color: var(--primary-navy);
  color: var(--white);
}

/* Process Section */
.process-container {
  position: relative;
}
.process-line { display: none !important; }
.step-icon {
  width: 80px;
  height: 80px;
  min-width: 80px;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  font-size: 2rem;
  transition: all 0.3s ease;
}
.process-step:hover .step-icon {
  transform: translateY(-5px);
}

.process-step-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.3s ease;
  position: relative;
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 260px;
  counter-increment: step;
}
.process-step-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 35px rgba(0, 0, 0, 0.25);
  border-color: rgba(240, 128, 36, 0.5);
}
.process-step-card .step-icon {
  box-shadow: 0 10px 25px rgba(240, 128, 36, 0.35);
}
.step-icon {
  background-color: var(--brand-orange);
  color: var(--white);
  position: relative;
}
.process-step-card:hover .step-icon {
  background-color: var(--brand-orange-hover);
  color: var(--white);
}
.process-flow {
  position: relative;
  padding-top: 20px;
  counter-reset: step;
}
.process-flow::before,
.process-step-card::after { display: none !important; content: none; }
/* Number chip */
.process-step-card::before {
  content: counter(step);
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  color: var(--primary-navy);
  border: 2px solid var(--brand-orange);
  border-radius: 999px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  z-index: 2;
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}
/* Icon ring on hover */
.step-icon::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px dashed rgba(255,255,255,0.25);
  opacity: 0;
  transition: all 0.3s ease;
}
.process-step-card:hover .step-icon::after {
  opacity: 1;
  border-color: rgba(240,128,36,0.6);
}
/* Equal heights across columns */
.process-flow [class*="col-"] {
  display: flex;
}
.process-flow .process-step-card {
  width: 100%;
  height: 100%;
}
@media (max-width: 991px) {
  .process-flow::before,
  .process-step-card::after,
  .process-line {
    display: none;
  }
  .process-step-card {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(13, 27, 42, 0.1);
  }
  .process-step-card::before {
    top: -12px;
  }
}

/* Dark/Light variants */
.process-section--dark .process-step-card {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}
.process-section--dark .process-step-card:hover {
  background: rgba(255, 255, 255, 0.12);
}
.process-section--light .process-step-card {
  background: #fff;
  border-color: rgba(13, 27, 42, 0.1);
}
.process-section--light .process-step-card:hover {
  border-color: var(--brand-orange);
  box-shadow: 0 12px 24px rgba(240, 128, 36, 0.15);
}

/* Testimonials */
.testimonial-card-modern {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.testimonial-card-modern:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}

/* Stats Overlap */
.stats-overlap {
  margin-top: -80px;
  position: relative;
  z-index: 10;
}

/* Scroll Down */
.scroll-down-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.mouse-icon {
  width: 30px;
  height: 50px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 15px;
  margin: 0 auto;
  position: relative;
}

.wheel {
  width: 4px;
  height: 8px;
  background: var(--white);
  border-radius: 2px;
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll 1.5s infinite;
}

@keyframes scroll {
  0% {
    top: 10px;
    opacity: 1;
  }
  100% {
    top: 30px;
    opacity: 0;
  }
}

/* Hover Cards */
.hover-card-modern {
  transition: var(--transition);
}
.hover-card-modern:hover {
  transform: translateY(-10px);
}
.card-bg-hover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--brand-orange);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.4s ease;
  z-index: 1;
}
.product-card:hover .card-bg-hover {
  transform: scaleY(1);
}
.group:hover .group-hover-white {
  color: var(--white) !important;
}
.group:hover .group-hover-white-50 {
  color: rgba(255, 255, 255, 0.7) !important;
}
.group:hover .group-hover-white-text {
  color: var(--white) !important;
  background-color: rgba(255, 255, 255, 0.2) !important;
}
.icon-box-md {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: var(--transition);
}
.btn-link-custom {
  text-decoration: none;
  font-weight: 600;
  color: var(--brand-orange);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-link-custom:hover {
  color: var(--brand-orange-hover);
  transform: translateX(5px);
}
.group:hover .btn-link-custom {
  color: var(--white);
}

/* Grayscale Hover */
.grayscale-hover > div {
  transition: var(--transition);
  filter: grayscale(1);
}
.grayscale-hover > div:hover {
  filter: grayscale(0) !important;
  opacity: 1 !important;
  transform: scale(1.1);
}

/* About Section Images */
.image-stack {
  position: relative;
  margin-right: 2rem;
}

.experience-badge {
  position: absolute;
  bottom: -30px;
  right: -30px;
  width: 160px;
  height: 160px;
  border: 5px solid var(--white);
  z-index: 3;
}

@media (max-width: 991px) {
  .image-stack {
    margin-right: 0;
    margin-bottom: 3rem;
  }
  .experience-badge {
    width: 140px;
    height: 140px;
    right: 10px;
    bottom: -40px;
    transform: none;
  }
}

.icon-box-sm {
  width: 45px;
  height: 45px;
  min-width: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

/* Partner Slider */
.partner-slider {
    overflow: hidden;
    position: relative;
    width: 100%;
    padding: 20px 0;
}

.partner-track {
    display: flex;
    width: fit-content;
    animation: scroll 30s linear infinite;
}

.partner-slide {
    width: 200px;
    flex-shrink: 0;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.partner-slide img {
    max-width: 100%;
    max-height: 80px;
    transition: all 0.3s ease;
    object-fit: contain;
}

.partner-slide:hover img {
    transform: scale(1.1);
}

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

/* Pause on hover */
.partner-track:hover {
    animation-play-state: paused;
}

/* Products Slider & Modern Cards */
.products-container::-webkit-scrollbar {
    display: none;
}
.products-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
}

@media (max-width: 991px) {
    .product-col {
        scroll-snap-align: center;
    }
}

/* Modern Card Design */
.modern-card {
    background: #ffffff;
    border: 1px solid rgba(13, 27, 42, 0.08);
    border-radius: 24px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.modern-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(13, 27, 42, 0.08);
    border-color: rgba(240, 128, 36, 0.3);
}

/* Icon Circle */
.icon-circle {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(13, 27, 42, 0.04);
}

.group-hover-bg-orange {
    transition: all 0.3s ease;
}

.modern-card:hover .group-hover-bg-orange {
    background-color: var(--brand-orange) !important;
}

.group-hover-text-white {
    transition: all 0.3s ease;
}

.modern-card:hover .group-hover-text-white,
.modern-card:hover .group-hover-text-white i {
    color: #ffffff !important;
}

/* Hover Translate */
.group-hover-translate-x {
    transition: transform 0.3s ease;
}

.modern-card:hover .group-hover-translate-x {
    transform: translateX(5px);
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bg-navy-soft {
    background-color: rgba(13, 27, 42, 0.04);
}

/* Offcanvas Menu */
@media (max-width: 991px) {
    .offcanvas-lg {
        background-color: var(--white);
        width: 100% !important; /* Force full width */
        height: 100vh !important; /* Force full viewport height */
        min-height: 100vh !important;
        --bs-offcanvas-width: 100%; /* Override Bootstrap variable */
        max-width: 100%;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .offcanvas-header {
        padding: 1.5rem 1.5rem; /* Increase header padding */
        flex-shrink: 0; /* Prevent header shrinking */
    }

    .offcanvas-body {
        display: flex;
        flex-direction: column;
        justify-content: flex-start; /* Ensure items start from top */
        padding: 2rem !important; /* Larger padding for body */
        flex: 1 !important; /* Take remaining height */
        background-color: #ffffff !important; /* Force white background */
        height: auto !important; /* Allow growing */
        overflow-y: auto; /* Enable scrolling if needed */
    }

    .offcanvas-body .navbar-nav {
        width: 100%;
        margin-bottom: 30px; /* More space below links */
        display: flex;
        flex-direction: column;
        gap: 15px; /* Increased gap */
    }

    .offcanvas-body .nav-link {
        color: var(--primary-navy) !important;
        font-size: 1.5rem; /* Maximized font size */
        padding: 15px 0; /* Balanced padding */
        border-bottom: 1px solid rgba(0,0,0,0.05);
        display: block; 
        text-align: center;
        width: 100%;
    }
    .offcanvas-body .nav-link.active {
        color: var(--brand-orange) !important;
        font-weight: 700;
    }
    .offcanvas-body .btn {
        width: auto; /* Allow buttons to size naturally */
        min-width: 120px; /* Minimum width for touch targets */
        margin-bottom: 10px;
        justify-content: center;
        /* Mobile specific adjustments */
        padding-top: 8px;
        padding-bottom: 8px;
        font-size: 0.95rem;
    }
    
    /* Center align buttons in mobile menu */
    .offcanvas-body .d-flex.flex-column {
        align-items: center !important;
    }

    /* Fix for Login button visibility in mobile menu */
    .offcanvas-body .btn-outline-navy {
        color: var(--primary-navy);
        border-color: var(--primary-navy);
    }
    .offcanvas-body .btn-outline-navy:hover {
        background-color: var(--primary-navy);
        color: var(--white);
    }
    
    /* Ensure Products Slider works on mobile */
    .products-container {
        display: flex;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        padding-bottom: 20px;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        gap: 1.5rem; /* Increased gap */
        margin-right: -12px; /* Pull to edge */
        padding-right: 12px;
    }
    
    .product-col {
        min-width: 280px;
        max-width: 280px;
        flex: 0 0 auto !important; /* Force no shrinking/growing */
        width: 280px !important; /* Force width */
        scroll-snap-align: center;
    }
}

/* Mobile adjustments for CTA and Hero buttons */
@media (max-width: 768px) {
    /* Target buttons in CTA section and Hero section to reduce size */
    .cta-section .btn,
    .hero-section .btn,
    .products-page-section .btn,
    .about-preview-section .btn,
    .about-intro-section .btn,
    .products-preview-section .btn,
    .calculator-teaser-section .btn,
    .process-section--dark .btn,
    .process-section--light .btn {
        padding: 0.6rem 1.5rem !important; /* Reduce padding significantly */
        font-size: 0.95rem !important; /* Smaller font */
        width: auto !important; /* Prevent full width if set */
    }
    
    /* Ensure the gap is reasonable */
    .cta-section .d-flex,
    .hero-section .d-flex,
    .products-page-section .d-flex,
    .about-intro-section .d-flex {
        gap: 0.75rem !important; /* Reduce gap between buttons */
        flex-wrap: wrap; /* Allow wrapping on very small screens */
        justify-content: center;
    }
}
