/*!
 * Interactive Styles for Marshall Fairbrother Website
 * Supporting CSS for custom JavaScript interactions
 */

/* ===================================
   TESTIMONIAL SLIDER STYLES
   =================================== */

.testimonial-slider.w-slider {
    position: relative;
    overflow: hidden;
}

.w-slider-mask {
    display: flex;
    transition: transform 500ms ease;
    width: 100%;
}

.testimonial-slide-wrapper.w-slide {
    flex-shrink: 0;
    width: 100%;
}

/* Navigation Arrows */
.w-slider-arrow-left,
.w-slider-arrow-right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 300ms ease;
}

.w-slider-arrow-left:hover,
.w-slider-arrow-right:hover {
    opacity: 1;
}

.w-slider-arrow-left {
    left: 20px;
}

.w-slider-arrow-right {
    right: 20px;
}

/* Navigation Dots */
.w-slider-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.w-slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: background-color 300ms ease, transform 200ms ease;
}

.w-slider-dot:hover {
    background-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

.w-slider-dot.w-active {
    background-color: rgba(255, 255, 255, 1);
}

/* Touch/Mobile optimizations */
@media (max-width: 768px) {
    .w-slider-arrow-left,
    .w-slider-arrow-right {
        display: none; /* Hide arrows on mobile, use swipe instead */
    }
    
    .w-slider-mask {
        touch-action: pan-y; /* Enable vertical scrolling but control horizontal */
    }
}

/* ===================================
   FAQ ACCORDION STYLES
   =================================== */

.brix---accordion-item-wrapper-v7 {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
    transition: box-shadow 300ms ease;
}

.brix---accordion-item-wrapper-v7:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.brix---accordion-header {
    cursor: pointer;
    transition: background-color 300ms ease;
    user-select: none;
}

.brix---accordion-header:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.brix---accordion-header:active {
    background-color: rgba(0, 0, 0, 0.05);
}

.brix---acordion-body {
    overflow: hidden;
    transition: height 400ms ease, opacity 400ms ease, transform 400ms ease;
}

.brix---accordion-arrow-icon {
    transition: transform 400ms ease;
    transform-origin: center;
}

/* Fade-in animation for accordion container */
.brix---inner-container-900px-center {
    opacity: 0;
    transform: translate3d(0, 10%, 0) scale3d(1, 1, 1);
    transition: opacity 600ms ease, transform 600ms ease;
}

/* Individual FAQ items slide-in animation */
.brix---accordion-item-wrapper-v7 {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
    animation: slideInUp 600ms ease forwards;
}

.brix---accordion-item-wrapper-v7:nth-child(1) { animation-delay: 0ms; }
.brix---accordion-item-wrapper-v7:nth-child(2) { animation-delay: 100ms; }
.brix---accordion-item-wrapper-v7:nth-child(3) { animation-delay: 200ms; }
.brix---accordion-item-wrapper-v7:nth-child(4) { animation-delay: 300ms; }
.brix---accordion-item-wrapper-v7:nth-child(5) { animation-delay: 400ms; }
.brix---accordion-item-wrapper-v7:nth-child(6) { animation-delay: 500ms; }

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* ===================================
   DROPDOWN NAVIGATION STYLES
   =================================== */

.w-nav {
    position: relative;
}

/* Desktop navigation - always visible */
.w-nav-menu {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 400ms ease, transform 400ms ease;
}

/* Menu button animation - hidden on desktop */
.w-nav-button {
    cursor: pointer;
    transition: all 300ms ease;
}

.w-nav-button:hover {
    opacity: 0.8;
}

.w-icon-nav-menu {
    transition: transform 300ms ease;
}

/* Hide hamburger menu on desktop */
@media (min-width: 992px) {
    .w-nav-button {
        display: none !important;
    }
}

/* Mobile navigation styles */
@media (max-width: 991px) {
    .w-nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: white;
        z-index: 1000;
        display: none;
        padding-top: 80px;
        overflow-y: auto;
        opacity: 0;
        transform: translateY(-10px);
    }
    
    .w-nav.w--open .w-nav-menu {
        display: block;
        opacity: 1;
        transform: translateY(0);
    }
    
    .nav-menu-two {
        flex-direction: column;
        align-items: center;
        gap: 32px;
    }
    
    .nav-link {
        font-size: 24px;
        padding: 16px 0;
        transition: color 300ms ease;
    }
    
    .nav-link:hover {
        color: #666;
    }
}

/* ===================================
   SCROLL ANIMATIONS
   =================================== */

/* Elements with scroll-triggered animations */
[data-w-id] {
    transition: opacity 600ms ease, transform 600ms ease;
}

/* Smooth scrolling for the entire page */
html {
    scroll-behavior: smooth;
}

/* ===================================
   GENERAL INTERACTION IMPROVEMENTS
   =================================== */

/* Focus states for accessibility */
button:focus,
.w-nav-button:focus,
.brix---accordion-header:focus,
.w-slider-arrow-left:focus,
.w-slider-arrow-right:focus,
.w-slider-dot:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .brix---accordion-item-wrapper-v7 {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* Loading state */
.interactive-loading {
    opacity: 0.5;
    pointer-events: none;
}

/* ===================================
   RESPONSIVE DESIGN IMPROVEMENTS
   =================================== */

@media (max-width: 479px) {
    .w-slider-nav {
        gap: 6px;
    }
    
    .w-slider-dot {
        width: 10px;
        height: 10px;
    }
    
    .brix---accordion-header {
        padding: 16px;
    }
}

/* ===================================
   PRINT STYLES
   =================================== */

@media print {
    .w-slider-arrow-left,
    .w-slider-arrow-right,
    .w-slider-nav,
    .w-nav-button {
        display: none !important;
    }
    
    .brix---acordion-body {
        height: auto !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    .w-nav-menu {
        position: static !important;
        display: block !important;
        opacity: 1 !important;
        transform: none !important;
    }
}