/* 
   Custom Styles for Hero and Marketing Sections
   Built on Bootstrap 5 framework
*/

/* Remove default focus ring & blue glow on all buttons and interactive elements globally */
*:focus,
button:focus,
.btn:focus,
.navbar-toggler:focus,
.accordion-button:focus,
.form-control:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* Prevent fixed navbar from overlapping page content */
/* Prevent fixed navbar from overlapping page content */
html {
    /* prevent horizontal scrollbar caused by 100vw elements */
    overflow-x: hidden;
}

body {
    padding-top: 56px;
    margin: 0;
    padding-bottom: 0;
    /* hide native scrollbars visually while preserving scrolling */
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

/* Hide WebKit scrollbars */
body::-webkit-scrollbar {
    display: none;
}

/* Marketing Features Section - Center aligned text columns */
.text-center {
    text-align: center;
}

/* Feature description paragraphs should be left-aligned while headings and buttons remain centered */
.row.align-items-md-center .col-lg-4 p {
    text-align: left;
}

/* Spacing between hero and marketing sections */
.row.align-items-md-center {
    margin-top: 2rem;
}

/* Testimonial Carousel Section spacing and consistent slide height */
.testimonial-section {
    padding: 4rem 0;
}

.testimonial-item {
    min-height: 200px;
}

.testimonial-item p {
    margin-bottom: 1rem;
}

/* Footer styling and optional sticky footer behavior */
.footer-section .nav-link:hover,
.footer-section .nav-link:focus {
    color: #0d6efd;
}

.footer-section {
    margin: 0;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* Force extra space after the About Us section so the footer appears
   above mobile browser UI and is not cut off. */
#about-us {
    /* bottom spacing removed to avoid excessive blank area after footer */
}

.main-container {
    /* bottom spacing removed; keep other container styles intact */
}

@media (max-width: 767.98px) {
    body {
        padding-top: 52px;
    }
    #about-us {
        /* mobile-bottom spacing removed to prevent large blank area */
    }
    .main-container {
        /* keep left/right padding on small screens */
        padding-left: 30px;
        padding-right: 30px;
    }
    /* Align navbar contents with page padding on small screens */
    .navbar .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    /* Mobile hero typography adjustments only */
    .hero-section h1 {
        font-size: 1.75rem;
        line-height: 1.2;
    }

    .hero-section .lead {
        font-size: 1rem;
        line-height: 1.6;
    }

    .hero-section .btn {
        font-size: 0.9rem;
        padding: 0.6rem 1.2rem;
    }

    .hero-section {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .hero-section .row {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
        gap: 1rem;
        --bs-gutter-y: 0.5rem !important;
    }

    .hero-section img {
        width: 100%;
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 991.98px) {
    .row.align-items-md-center .col-lg-4 {
        margin-bottom: 3rem;
    }

    .row.align-items-md-center .col-lg-4:last-child {
        margin-bottom: 0;
    }
}

/* 
   Optional: Custom max-width override for container if needed
   Uncomment and adjust if you want a custom width beyond Bootstrap's defaults
*/
/* 
.container {
    max-width: 1200px;
}
*/

/* Hero Section - Full width blue background */
.hero-section {
    background-color: #0d6efd;
    width: 100%;
    margin-top: 0;
    padding: 2rem 0;
    padding-top: 0;
    color: white;
}

/* Hero section text styling */
.hero-section h1,
.hero-section p,
.hero-section .lead {
    color: white;
}

/* Hero section primary button styling */
.hero-section .btn-primary {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #000;
    border-radius: 50px;
}

.hero-section .btn-primary:hover {
    background-color: #e0a800;
    border-color: #e0a800;
}

/* Hero section secondary button styling */
.hero-section .btn-outline-secondary {
    color: white;
    border-color: white;
    border-radius: 50px;
}

.hero-section .btn-outline-secondary:hover {
    background-color: white;
    border-color: white;
    color: #0d6efd;
}

/* Services section button styling */
#services .btn-secondary {
    border-radius: 50px;
    background-color: #0d6efd;
    border-color: #0d6efd;
}

#services .btn-secondary:hover {
    background-color: #0b5ed7;
    border-color: #0b5ed7;
}

/* 
   Optional: Custom image hover effects
   Uncomment to add interactivity
*/
/*
.hero-section img {
    transition: transform 0.3s ease;
}

.hero-section img:hover {
    transform: scale(1.05);
}
*/

/* 
   Optional: Custom button styling enhancements
   Fine-tune button appearance beyond Bootstrap defaults
*/
/*
.btn-primary {
    /* Custom button styling */
}
*/

/* Container padding */
.timeline {
  padding-left: 0;
}

/* Timeline Item Container */
.timeline-item {
  position: relative;
  /* FIX #1: Increase left padding so text never touches or goes behind the icons */
  padding-left: 60px; 
  padding-bottom: 2.5rem;
}

/* Vertical Dashed Line connecting the steps */
.timeline-item::before {
  content: '';
  position: absolute;
  top: 22px;       /* Starts at the vertical center of the 44px icon */
  left: 21px;      /* Centers horizontally behind the 44px icon */
  bottom: -22px;   /* Extends to meet the next icon */
  border-left: 2px dashed #d0d5dd;
  z-index: 0;
}

/* Fix for the last item line extending to the CTA line */
.timeline-item:last-of-type::before {
  bottom: 0;
}

/* Circle Icon Position */
.timeline-icon {
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 44px;
  z-index: 2; /* Keeps icon layered clearly on top of the dashed line */
}

/* CTA Button Container & Connector Line */
.timeline-button {
  position: relative;
  /* FIX #2: Indent button so it sits neatly to the right of the dashed elbow line */
  padding-left: 50px;
}

/* Dashed Elbow Line connecting Step 3 to the CTA Button */
.timeline-button::before {
  content: '';
  position: absolute;
  left: 21px;       /* Aligns exactly under the main vertical line */
  top: -24px;       /* Connects directly to the last item line */
  
  /* Adjust height and alignment to hit the exact vertical midpoint of the button */
  height: calc(50% + 24px);     /* Extends down to the vertical center of the button */
  width: 28px;      /* Curves inward to point toward the button without overlapping it */
  border-left: 2px dashed #d0d5dd;
  border-bottom: 2px dashed #d0d5dd;
  border-bottom-left-radius: 12px;
  z-index: 0;
}

/* Add this to your CSS */
.custom-icon {
  width: 24px;   /* Adjust this size depending on how big you want the icon to look */
  height: 24px;  /* Keep it square */
  object-fit: contain; /* Ensures the icon doesn't distort */
}

/* Rotator wrapper container */
.text-fade-container {
  position: relative;
  height: 1.2em; /* Keeps structural height reserved */
  display: block;
}

/* Base item styling (Stacked absolutely) */
.fade-item {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  opacity: 0;
  animation: fadeInOut 9s infinite;
}

/* Stagger the animation timing for each word */
.fade-item:nth-child(1) {
  animation-delay: 0s;
}

.fade-item:nth-child(2) {
  animation-delay: 3s;
}

.fade-item:nth-child(3) {
  animation-delay: 6s;
}

/* Smooth Fade Keyframes */
@keyframes fadeInOut {
  0% {
    opacity: 0;
    transform: translateY(6px);
  }
  5% {
    opacity: 1;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(0);
  }
  35% {
    opacity: 0;
    transform: translateY(-6px);
  }
  100% {
    opacity: 0;
  }
}

/* Vertical translation keyframes based on exact 52px height */
@keyframes rollWords {
  0%, 25% {
    transform: translateY(0);
  }
  33%, 58% {
    transform: translateY(-52px);
  }
  66%, 91% {
    transform: translateY(-104px);
  }
  100% {
    transform: translateY(-156px);
  }
}

/* Responsive adjustment for larger screens */
@media (min-width: 992px) {
  .text-roller-container,
  .roller-item {
    height: 64px;
    line-height: 64px;
  }
  
  @keyframes rollWords {
    0%, 25% {
      transform: translateY(0);
    }
    33%, 58% {
      transform: translateY(-64px);
    }
    66%, 91% {
      transform: translateY(-128px);
    }
    100% {
      transform: translateY(-192px);
    }
  }
}