/* ============================================================ */
/* 🚀 File Path: assets/css/custom-functions.css */
/* Purpose: Contains custom CSS overrides and additions for the Grenier's Towing website. */
/* This file strictly adheres to fixing ONLY reported errors (header distortion), */
/* preserving all other code and styles, and applying requested property corrections. */
/* ============================================================ */

/* ============================================================ */
/* 💡 Section Divider: Header Layout & Straddling Logo */
/* Purpose: Defines the positioning and appearance of the main header and the overlapping logo. */
/* All original straddle-logo styles preserved. NO CHANGES MADE HERE. */
/* ============================================================ */
.header-section {
    position: relative; /* Establishes a positioning context for the absolute logo. */
}

.straddle-logo {
    position: absolute;
    top: 160%; /* Positions the logo to hang below the header. */
    left: 50%; /* Color: #000000 (Black) - Used for centering comment. */
    transform: translate(-50%, -50%); /* Precisely centers the logo horizontally and vertically. */
    z-index: 20; /* High z-index to ensure it sits on top of the header and slider */
}

.straddle-logo img {
    height: 230px; /* Defines the height of the main logo. */
    width: auto;
    max-width: none;
}

.straddle-small-logo {
    display: none; /* The small logo is hidden by default. */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999 !important; /* Extremely high z-index to ensure visibility. */
}

/* Sticky header behavior */
.header-section.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: #ffffff; /* Color: #ffffff (White) - Background for sticky header. This is from the master structure. */
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); /* A subtle shadow for depth. */
    transition: transform 0.3s ease-in-out;
}

/* Hidden sticky header state */
.header-section.sticky-header.hide {
    transform: translateY(-100%); /* Hides the header by moving it off-screen. */
}

/* Sticky header small logo visibility */
.header-section.sticky-header .straddle-small-logo {
    display: block !important;
    position: fixed !important;
    top: 100% !important; /* Positions the small logo at the bottom of the sticky navbar. */
    transform: translate(-50%, -10%) !important; /* Slight upward adjustment for straddling effect */
}

.straddle-small-logo img {
    max-height: 160px !important;
    width: auto !important;
    transition: all 0.3s ease !important;
    vertical-align: top !important;
    margin-top: -80px !important; /* Pulls up half the height for straddling */
}

/* ============================================================ */
/* 💡 Section Divider: Top Header Bar Styles (Corrected) */
/* Purpose: Styles for the uppermost contact and social media bar. Fixes distortion by applying Flexbox to the wrapper and ensures white background and original height. */
/* ============================================================ */
.header__top {
    min-height: 0px !important; /* Preserved: This height was present in the code block needing fixing. */
    padding: 8px 0 !important; /* Preserved from user's original input. */
    background-color: #ffffff !important; /* Color: #ffffff (White) - RESTORED and SET as per explicit user command. */
    position: relative !important; /* Positioning context. */
    z-index: 99 !important; /* Ensures it sits above elements below it, but below the sticky header. */
    /* Removed display: flex and align-items from here as they were potentially altering unrelated styles. */
}

/* ============================================================ */
/* 🚀 FIX APPLIED: .header__top .header__wrapper Flexbox Alignment */
/* Purpose: Ensures correct horizontal layout of contact info and social icons. This directly addresses the reported distortion. */
/* ============================================================ */
.header__top .header__wrapper {
    min-height: 40px !important; /* Preserved. */
    display: flex !important; /* **FIX APPLIED:** Enables Flexbox for correct horizontal alignment. */
    align-items: center !important; /* Centers content vertically within the wrapper. */
    justify-content: space-between !important; /* Distributes space between info and social icons. */
    width: 100%; /* Ensures the wrapper takes full width within the container. */
    flex-wrap: wrap; /* Allows items to wrap on smaller screens for responsiveness. */
    /* Color: None - Alignment and spacing comment */
}
    
/* Contact info text styling (Preserved) */
.header__top .info li {
    color: #333333 !important; /* Color: #333333 (Dark Gray) - Text color. */
    margin-right: 25px !important; /* Adds spacing between contact info items. */
    font-size: 14px !important; /* Consistent font size. */
}

/* Contact info icon styling (Preserved) */
.header__top .info li i {
    color: #2e0c5e !important; /* Color: #2e0c5e (Purple) - Icon color. */
    margin-right: 8px !important; /* Spacing between icon and text. */
}

/* Social icon container styling (Preserved) */
.header__top .social__icon {
    display: flex !important; /* Flexbox for horizontal alignment of icons */
    align-items: center !important; /* Centers icons vertically */
    margin: 0 !important; /* Removes default margins */
    gap: 15px !important; /* Defines the space between social icons */
}

/* Social icon list item spacing (Preserved) */
.header__top .social__icon li {
    margin-right: 15px !important; /* Consistent spacing between social list items */
}

/* Individual social icon link styling (Preserved) */
.header__top .social__icon li a {
    width: 32px !important; /* Fixed width for social icon buttons */
    height: 32px !important; /* Fixed height for social icon buttons */
    display: flex !important; /* Flexbox for centering icon */
    align-items: center !important; /* Centers icon vertically */
    justify-content: center !important; /* Centers icon horizontally */
    background: #2e0c5e !important; /* Color: #2e0c5e (Purple) - Icon background */
    border-radius: 50% !important; /* Circular shape for icons */
    color: #ffffff !important; /* Color: #ffffff (White) - Icon color */
    transition: background-color 0.3s ease; /* Smooth transition for hover effect */
}

/* Social icon hover effects (Preserved) */
.header__top .social__icon a:hover {
    background-color: #facc15 !important; /* Color: #facc15 (Yellow) - Yellow background on hover */
}
.header__top .social__icon a:hover i {
    color: #ffffff !important; /* Color: #ffffff (White) - White icon color on hover */
}

/* ============================================================ */
/* 💡 Section Divider: Desktop Navigation Adjustments */
/* Purpose: Adjusts navigation menu for desktop screens (min-width: 992px) to accommodate the straddling logo. */
/* Preserved from original code. NO CHANGES MADE HERE. */
/* ============================================================ */
@media (min-width: 992px) {
    .header-wrapper .main__logo {
        display: none; /* Hides original logo to avoid overlap */
    }
    .header-wrapper .logo__menuadjust {
        flex-grow: 1; /* Allows this container to grow and fill available space. */
        justify-content: center; /* Centers the navigation menu horizontally. */
    }
    .header-wrapper .main-menu {
        justify-content: center; /* Centers the menu items */
        width: 100%; /* Makes the menu take full width for balanced spacing. */
        display: flex; /* Ensures Flexbox for layout */
    }
    .header-wrapper .main-menu > li:nth-child(3) {
        margin-right: 180px; /* Creates the gap on the right for the logo. */
    }
    .header-wrapper .main-menu > li:nth-child(4) {
        margin-left: 180px; /* Creates the gap on the left for the logo, balancing the menu around the logo. */
    }
}

/* ============================================================ */
/* 💡 Section Divider: Footer and Sidebar Logo Sizing */
/* Purpose: Ensures consistent logo sizing across different sections. */
/* Preserved from original code. NO CHANGES MADE HERE. */
/* ============================================================ */
.footer__widget .widget__head img {
    max-width: 30%;
    height: auto;
}

.side_bar .logo img {
    max-width: 80%;
    height: auto;
}

/* ============================================================ */
/* 💡 Section Divider: Service Details Layout */
/* Purpose: Styles for service details section, ensuring consistent layout and responsiveness. */
/* Preserved from original code. NO CHANGES MADE HERE. */
/* ============================================================ */
.details__section .container {
    max-width: 1800px !important;
}

.details__section .row {
    align-items: stretch;
    display: flex;
    flex-wrap: wrap;
}

.details__section .col-lg-3,
.details__section .col-lg-6 {
    display: flex;
    flex-direction: column;
}

.sidebar__widget {
    margin-bottom: 30px;
}

.details__thumb img,
.benefit__thumb img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    max-width: 100%;
}

.benefit .points li {
    display: flex;
    align-items: flex-start;
    font-size: 16px !important;
}

.benefit .points .fa-check {
    margin-right: 10px;
    color: var(--cmn-theme); /* Color: #2e0c5e (Primary Purple via variable) */
    margin-top: 5px;
}

.service__helping .thumb img {
    width: 100%;
    height: auto;
    object-fit: cover;
    max-width: 100%;
}

.service__helping .helping__content {
    padding: 25px;
}

.service__helping .helping__content h4 {
    font-size: 20px;
}

.service__helping .helping__content p {
    font-size: 15px !important;
    line-height: 1.5 !important;
}

@media (max-width: 991px) {
    .details__section .row {
        flex-direction: column;
    }
}

/* ============================================================ */
/* 💡 Section Divider: Service List Button Styling */
/* Purpose: Styles for service list buttons, including hover and active states. */
/* Preserved from original code. NO CHANGES MADE HERE. */
/* ============================================================ */
.service__list {
    padding: 0;
    list-style: none;
}

.service__list li {
    margin-bottom: 30px !important;
}

.service__list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background-color: #ffffff; /* Color: #FFFFFF (White) */
    border: 0.2px solid #e6bc11; /* Color: #E6BC11 (Gold) */
    border-radius: 10px;
    padding: 15px 20px;
    font-weight: 500;
    font-size: 16px;
    color: #121212; /* Color: #121212 (Near Black) */
    text-align: left;
    transition: all 0.3s ease;
}

.service__list li a:hover,
.service__list li a.current {
    background-color: #d7a1f7; /* Color: #D7A1F7 (Light Purple) */
    border-color: var(--cmn-theme); /* Color: #2e0c5e (Primary Purple via variable) */
    color: var(--cmn-theme); /* Color: #2e0c5e (Primary Purple via variable) */
}

.service__list li a.active {
    background-color: var(--cmn-theme); /* Color: #2e0c5e (Primary Purple via variable) */
    border-color: var(--cmn-theme); /* Color: #2e0c5e (Primary Purple via variable) */
}

.service__list li a.active span {
    color: #000000 !important; /* Color: #000000 (Black) */
    font-weight: bold;
}

.service__list li a.active .fa-chevron-right {
    color: #000000 !important; /* Color: #000000 (Black) */
}



/* ============================================================ */
/* 💡 Section Divider: General Typography & Animation Optimization */
/* Purpose: Sets consistent font sizes and limits animation impact. */
/* Preserved from original code. NO CHANGES MADE HERE. */
/* ============================================================ */
p {
    font-size: 16px !important; /* Consistent font size for paragraphs */
    line-height: 1.6 !important; /* Consistent line spacing */
    /* Color: #333333 (Dark Gray) - Matches index.html */
}

[data-wow-delay] {
    transition: opacity 0.5s ease, transform 0.5s ease !important; /* Optimized transitions for performance */
}

/* ============================================================ */
/* 🚀 Export Default Statement */
/* Purpose: Standard practice for module consistency. */
/* ============================================================ */





        .mega-menu.active {
            display: block;
            transform: perspective(1000px) rotateX(0deg);
            opacity: 1;
            animation: swoopIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
        }

        @keyframes swoopIn {
            0% {
                transform: perspective(1000px) rotateX(-90deg) translateY(20px);
                opacity: 0;
            }
            100% {
                transform: perspective(1000px) rotateX(0deg) translateY(0);
                opacity: 1;
            }
        }






/* ============================================================ */
/* 💡 Section Divider: Testimonials Carousel Styles             */
/* 📄 File: custom-functions.css                                */
/* 🧱 Purpose: Flexbox Layout, Animation, Spacing, and Effects  */
/* 🔧 Affects: testimonials.html carousels (top & bottom rows)  */
/* ============================================================ */

/* Core Flexbox Layout */
.testimonial-carousel {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: stretch;
  gap: 30px; /* Horizontal spacing between cards */
  padding: 20px;
  overflow: hidden;
  animation-duration: 25s;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}

/* Top Row scrolls left */
.testimonial-carousel.top-row {
  animation-name: scrollLeft;
}

/* Bottom Row scrolls right */
.testimonial-carousel.bottom-row {
  animation-name: scrollRight;
}

/* Testimonial Card Styling */
.testimonial-item {
  flex: 0 0 22%; /* Approximately 4 cards per row with spacing */
  background-color: #1f2937; /* Dark Gray background */
  color: #ffffff; /* White text */
  border-radius: 16px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.2);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s ease-in-out;
  animation: fadeIn 2s ease;
}

.testimonial-item:hover {
  transform: scale(1.03); /* Slight grow effect */
}

/* Inner Image Styling */
.testimonial-item img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); /* Shadow for image */
}

/* Text Layout */
.testimonial-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.testimonial-content p {
  text-align: left;
  flex-grow: 1;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.testimonial-content h5 {
  text-align: center;
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0.25rem;
}

.testimonial-content span {
  text-align: center;
  font-size: 0.9rem;
  color: #d1d5db; /* Light Gray */
}

/* Animations */
@keyframes scrollLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Responsive Behavior */
@media (max-width: 1024px) {
  .testimonial-item {
    flex: 0 0 45%;
  }
}

@media (max-width: 768px) {
  .testimonial-item {
    flex: 0 0 100%;
  }
}




/* ============================================================ */
/* 💡 FINAL, CORRECTED CSS */
/* ============================================================ */

/* --- Keyframes --- */
@keyframes drive-left-to-right { from { left: -25%; } to { left: 110%; } }
@keyframes drive-right-to-left { from { left: 110%; } to { left: -25%; } }
@keyframes truck-bob { 0%, 50% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
/* THIS IS THE CORRECTED ANIMATION FOR THE BACKGROUND SCENE */
@keyframes scroll-background { from { background-position: 0 bottom; } to { background-position: -2000px bottom; } }

/* --- 1. MAIN WRAPPER --- */
.footer-wrapper { width: 100%; background-color: #150925; color: #ffffff; }

/* --- 2. ANIMATION SCENE --- */
.animation-scene {
    /* --- YOUR SETTINGS --- */
    --truck-speed-fast: 12s; --truck-speed-slow: 18s;
    --pickup-width: 380px; --semi-width: 380px;


    --foreground-truck-bottom: -15px; --background-truck-bottom: 26px;
    /* --- END --- */
    position: relative; height: 250px; width: 100%;
    perspective: 500px; overflow: hidden; border-bottom: 2px solid #4a148c;
}


/* --- 2d. Trucks --- */
.animation-scene .truck-layer { position: absolute; width: 100%; height: 100%; z-index: 10; }
.animation-scene .truck { position: absolute; animation-timing-function: linear; animation-iteration-count: infinite; }
.animation-scene .truck img { width: 100%; height: auto; object-fit: contain; animation: truck-bob 1s ease-in-out infinite; image-rendering: crisp-edges; }
.animation-scene #semi-truck { bottom: var(--background-truck-bottom); width: var(--semi-width); animation-name: drive-left-to-right; animation-duration: var(--truck-speed-slow); opacity: 0.9; }
.animation-scene #pickup-truck { bottom: var(--foreground-truck-bottom); width: var(--pickup-width); animation-name: drive-right-to-left; animation-duration: var(--truck-speed-fast); }

/* --- PERFORMANCE OPTIMIZATIONS --- */
.roadside-wrapper, .truck { will-change: transform, left, background-position; transform: translateZ(0); }

/* --- 3. FOOTER INFO BLOCK --- */
.footer-info { padding: 40px 0; }
.footer-info .container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 15px; }
.footer-top-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; padding-bottom: 30px; }

/* --- ALIGNMENT FIX --- */
.footer-widget { position: relative; text-align: center; }
.footer-logo { position: absolute; top: 0; left: 0; height: 100px; width: auto; }
.widget-title { color: #ffd60a !important; font-size: 1.25rem; font-weight: bold; margin-bottom: 15px; }
.footer-widget:first-child .widget-title { margin-top: 115px; }

.contact-list, .quick-links, .follow-us-contact { list-style: none; padding: 0; text-align: center; }
.follow-us-contact li { margin-bottom: 10px; }
.contact-list li, .quick-links li { margin-bottom: 10px; }
.contact-list i { color: #ffd60a; margin-right: 10px; }
.social-icons { display: flex; gap: 15px; justify-content: center; margin-top: 15px; }
.social-icons a { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; font-size: 1.2rem; color: #1a0b2e; background-color: #ffd60a; border-radius: 50%; transition: all 0.3s; }
.social-icons a:hover { transform: scale(1.1) rotate(10deg); background-color: #ffffff; }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid #48118a; }

/* --- FONT COLOR FIX --- */
.footer-info, .footer-widget p, .contact-list a, .quick-links a, .contact-list span, .footer-bottom p, .follow-us-contact li {
    color: #ffffff !important;
    text-decoration: none;
}
.contact-list a:hover, .quick-links a:hover { color: #ffd60a !important; }




