.home-hero {
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    color: white;
    padding: 4rem 0 4rem;
    position: relative;
}

.home-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.08)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url("#grid#grid")"/></svg>');
    opacity: 1;
}

.home-hero .container {
    position: relative;
    z-index: 2;
}

.home-hero h1 {
    color: white !important;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 1.5rem;
}

.home-hero .lead {
    color: rgba(255, 255, 255, 0.95) !important;
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.calculator-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
    text-decoration: none;
    display: block;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.calculator-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    color: #333;
}

.calculator-card h4 {
    color: #333 !important;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.calculator-card p {
    color: #6c757d !important;
    margin-bottom: 0.5rem;
}

.calculator-card small {
    color: #28a745 !important;
    font-weight: 600;
}

/* Feature Section - Beautiful Styling */
.feature-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 5rem 0;
    position: relative;
    opacity: 1;
    transform: translateY(0);
}

.feature-section .card {
    border: none !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.feature-section .card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* Card Headers */
.feature-section .card-header {
    border: none !important;
    position: relative;
    overflow: hidden;
}

.feature-section .card-header.bg-primary {
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%) !important;
}

.feature-section .card-header.bg-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%) !important;
}

.feature-section .card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url("#grid#grid")"/></svg>');
    opacity: 0.3;
}

.feature-section .card-header * {
    position: relative;
    z-index: 2;
}

/* Feature Icons */
.feature-section .feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.feature-section .card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Scrolling Text Container */
.scrolling-text-container {
    height: 140px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 15px;
    border: 2px solid #e9ecef;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

.scrolling-text {
    display: flex;
    flex-direction: column;
    animation: infiniteScroll 25s linear infinite;
    animation-play-state: running;
    gap: 3px;
}

.scrolling-text span {
    display: block;
    padding: 8px 12px;
    background: white;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #495057;
    border: 1px solid #dee2e6;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    font-weight: 500;
}

.scrolling-text span:hover {
    background: #f8f9fa;
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

@keyframes infiniteScroll {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%);
    }
}

/* Info Block */
.info-block {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.info-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0066cc, #00a8ff);
}

.info-block h5 {
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* Target Audience Sections */
.feature-section .bg-light {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%) !important;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-section .bg-light::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #0066cc, #00a8ff);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-section .bg-light:hover::before {
    opacity: 1;
}

.feature-section .bg-light:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.1);
    border-color: #0066cc;
}

/* Badges */
.feature-section .badge {
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.feature-section .badge.bg-primary-subtle {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.1), rgba(0, 168, 255, 0.1)) !important;
    color: #0066cc !important;
    border-color: rgba(0, 102, 204, 0.2);
}

.feature-section .badge.bg-warning-subtle {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), rgba(255, 179, 0, 0.1)) !important;
    color: #ff8f00 !important;
    border-color: rgba(255, 193, 7, 0.2);
}

/* Buttons */
.feature-section .btn {
    padding: 1rem 2rem;
    border-radius: 15px;
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-section .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.feature-section .btn:hover::before {
    left: 100%;
}

.feature-section .btn-primary {
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

.feature-section .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 102, 204, 0.4);
}

.feature-section .btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%);
    color: #212529;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.feature-section .btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.4);
    color: #212529;
}

/* Statistics section with better contrast */
.stats-section {
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    color: white;
    padding: 4rem 0;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: white !important;
    line-height: 1;
    display: block;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.stat-label {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 0.95rem;
    margin-top: 0.5rem;
    font-weight: 400;
}

/* Features section */
.features-section {
    background: #f8f9fa;
    padding: 5rem 0;
}

.features-section h2 {
    color: #333 !important;
    font-weight: 700;
    margin-bottom: 1rem;
}

.features-section .lead {
    color: #6c757d !important;
}

.feature-card {
    transition: transform 0.3s ease;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.features-section .feature-icon {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, #0066cc, #004499);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1rem;
}

.feature-card h5 {
    color: #333 !important;
    font-weight: 600;
    margin-bottom: 1rem;
}

.feature-card .card-text {
    color: #6c757d !important;
    line-height: 1.6;
}

/* How it works section */
.how-it-works {
    background: white;
    padding: 5rem 0;
}

.how-it-works h2 {
    color: #333 !important;
    font-weight: 700;
    margin-bottom: 1rem;
}

.how-it-works .lead {
    color: #6c757d !important;
}

.step-number {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, #0066cc, #004499);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

.how-it-works h5 {
    color: #333 !important;
    font-weight: 600;
    margin-bottom: 1rem;
}

.how-it-works p {
    color: #6c757d !important;
    line-height: 1.6;
}

/* CTA section */
.cta-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 3rem 2rem;
    border-radius: 15px;
    border: 1px solid #dee2e6;
    margin-top: 3rem;
}

.cta-section h3 {
    color: #333 !important;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-section .lead {
    color: #6c757d !important;
}

/* FAQ section */
.faq-section {
    background: #f8f9fa;
    padding: 5rem 0;
}

.faq-section h2 {
    color: #333 !important;
    font-weight: 700;
    margin-bottom: 3rem;
}

.accordion-item {
    background: white;
    border-radius: 10px !important;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: none !important;
    margin-bottom: 1rem;
}

.accordion-button {
    background: white !important;
    border: none !important;
    font-weight: 600;
    padding: 1.25rem 1.5rem;
    font-size: 1.05rem;
    color: #333 !important;
}

.accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%) !important;
    color: white !important;
    box-shadow: none !important;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25) !important;
    border: none !important;
}

.accordion-body {
    padding: 1.5rem;
    background: #f8f9fa;
    color: #495057 !important;
    line-height: 1.6;
    border: none;
}

/* Button improvements */
.btn-light {
    background: white !important;
    color: #333 !important;
    border: 2px solid white;
    font-weight: 600;
}

.btn-light:hover {
    background: #f8f9fa !important;
    color: #333 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: white !important;
    font-weight: 600;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: white;
    color: white !important;
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, #0066cc, #004499) !important;
    border: none;
    font-weight: 600;
    padding: 0.875rem 2rem;
    border-radius: 10px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #004499, #0066cc) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.4);
}

/* Badge improvements */
.badge {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-weight: 600;
}

.bg-success.bg-opacity-10 {
    background-color: rgba(40, 167, 69, 0.1) !important;
    color: #155724 !important;
}

.bg-primary.bg-opacity-10 {
    background-color: rgba(0, 102, 204, 0.1) !important;
    color: #004085 !important;
}

.bg-warning.bg-opacity-10 {
    background-color: rgba(255, 193, 7, 0.1) !important;
    color: #856404 !important;
}

.bg-info.bg-opacity-10 {
    background-color: rgba(23, 162, 184, 0.1) !important;
    color: #0c5460 !important;
}

.bg-danger.bg-opacity-10 {
    background-color: rgba(220, 53, 69, 0.1) !important;
    color: #721c24 !important;
}

/* Responsive fixes */
@media (max-width: 768px) {
    .home-hero {
        padding: 4rem 0 2rem;
    }

    .home-hero h1 {
        font-size: 2rem !important;
        line-height: 1.2;
    }

    .home-hero .lead {
        font-size: 1.1rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

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

    .features-section,
    .how-it-works,
    .faq-section,
    .feature-section {
        padding: 3rem 0;
    }

    .cta-section {
        padding: 2rem 1rem;
        margin-top: 2rem;
    }

    .feature-section .card {
        margin-bottom: 2rem;
    }

    .scrolling-text-container {
        height: 120px;
        padding: 10px;
    }

    .scrolling-text span {
        padding: 6px 10px;
        font-size: 0.85rem;
    }

    .info-block {
        padding: 1.5rem;
    }

    .feature-section .feature-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .home-hero h1 {
        font-size: 1.75rem !important;
    }

    .stat-number {
        font-size: 2rem;
    }

    .features-section .feature-icon {
        width: 3rem;
        height: 3rem;
        font-size: 1.5rem;
    }

    .step-number {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.25rem;
    }
}


/* DUPLICATE SECTION REMOVED - see lines 147-178 for the active styles */

/* Random Color Animation System - DISABLED to fix scrolling
.scrolling-text span::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg,
        rgba(0, 102, 204, 0.1),
        rgba(255, 193, 7, 0.1),
        rgba(220, 53, 69, 0.1),
        rgba(25, 135, 84, 0.1),
        rgba(102, 16, 242, 0.1),
        rgba(255, 95, 31, 0.1)
    );
    animation: randomColorWave 8s linear infinite;
    z-index: 1;
} */

.scrolling-text span:nth-child(1)::before { animation-delay: 0s; }
.scrolling-text span:nth-child(2)::before { animation-delay: 0.3s; }
.scrolling-text span:nth-child(3)::before { animation-delay: 0.6s; }
.scrolling-text span:nth-child(4)::before { animation-delay: 0.9s; }
.scrolling-text span:nth-child(5)::before { animation-delay: 1.2s; }
.scrolling-text span:nth-child(6)::before { animation-delay: 1.5s; }
.scrolling-text span:nth-child(7)::before { animation-delay: 1.8s; }
.scrolling-text span:nth-child(8)::before { animation-delay: 2.1s; }
.scrolling-text span:nth-child(9)::before { animation-delay: 2.4s; }
.scrolling-text span:nth-child(10)::before { animation-delay: 2.7s; }
.scrolling-text span:nth-child(11)::before { animation-delay: 3.0s; }
.scrolling-text span:nth-child(12)::before { animation-delay: 3.3s; }
.scrolling-text span:nth-child(13)::before { animation-delay: 3.6s; }
.scrolling-text span:nth-child(14)::before { animation-delay: 3.9s; }
.scrolling-text span:nth-child(15)::before { animation-delay: 4.2s; }
.scrolling-text span:nth-child(16)::before { animation-delay: 4.5s; }
.scrolling-text span:nth-child(17)::before { animation-delay: 4.8s; }
.scrolling-text span:nth-child(18)::before { animation-delay: 5.1s; }
.scrolling-text span:nth-child(19)::before { animation-delay: 5.4s; }
.scrolling-text span:nth-child(20)::before { animation-delay: 5.7s; }

/* Duplicate items (second set) get different delays */
.scrolling-text span:nth-child(n+21)::before {
    animation-delay: calc(var(--delay-offset, 0s) + 6s);
}

/* Individual color variations for different material types */
.scrolling-text span:nth-child(odd) {
    --accent-color: #0066cc;
}

.scrolling-text span:nth-child(even) {
    --accent-color: #ffc107;
}

.scrolling-text span:nth-child(3n) {
    --accent-color: #dc3545;
}

.scrolling-text span:nth-child(5n) {
    --accent-color: #198754;
}

.scrolling-text span:nth-child(7n) {
    --accent-color: #6610f2;
}

.scrolling-text span:nth-child(11n) {
    --accent-color: #fd7e14;
}

/* Text content positioning */
.scrolling-text span * {
    position: relative;
    z-index: 2;
}

/* DISABLED duplicate hover
.scrolling-text span:hover {
    background: #f8f9fa;
    transform: translateX(5px) scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-color, #0066cc);
} */

.scrolling-text span:hover::before {
    animation-play-state: paused;
    left: 0;
    background: linear-gradient(45deg,
        transparent,
        rgba(var(--accent-color-rgb, 0, 102, 204), 0.1),
        transparent
    );
}

/* Dynamic border color animation - DISABLED to allow scrolling to work */
/* .scrolling-text span {
    animation: borderColorCycle 12s ease-in-out infinite;
} */

/* Animation delays disabled to prevent conflicts */
/* .scrolling-text span:nth-child(2n) {
    animation-delay: 1s;
}

.scrolling-text span:nth-child(3n) {
    animation-delay: 2s;
}

.scrolling-text span:nth-child(4n) {
    animation-delay: 3s;
}

.scrolling-text span:nth-child(5n) {
    animation-delay: 4s;
} */

/* ========================================= */
/* KEYFRAME ANIMATIONS */
/* ========================================= */

@keyframes infiniteScroll {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%);
    }
}

@keyframes randomColorWave {
    0% {
        left: -100%;
        background: linear-gradient(45deg, transparent, rgba(0, 102, 204, 0.15), transparent);
    }
    25% {
        left: 0;
        background: linear-gradient(45deg, transparent, rgba(255, 193, 7, 0.15), transparent);
    }
    50% {
        left: 100%;
        background: linear-gradient(45deg, transparent, rgba(220, 53, 69, 0.15), transparent);
    }
    75% {
        left: 0;
        background: linear-gradient(45deg, transparent, rgba(25, 135, 84, 0.15), transparent);
    }
    100% {
        left: -100%;
        background: linear-gradient(45deg, transparent, rgba(102, 16, 242, 0.15), transparent);
    }
}

@keyframes borderColorCycle {
    0% { border-color: #dee2e6; }
    10% { border-color: rgba(0, 102, 204, 0.3); }
    25% { border-color: rgba(255, 193, 7, 0.3); }
    40% { border-color: rgba(220, 53, 69, 0.3); }
    55% { border-color: rgba(25, 135, 84, 0.3); }
    70% { border-color: rgba(102, 16, 242, 0.3); }
    85% { border-color: rgba(255, 95, 31, 0.3); }
    100% { border-color: #dee2e6; }
}

@keyframes textColorShift {
    0% { color: #495057; }
    20% { color: #0066cc; }
    40% { color: #dc3545; }
    60% { color: #198754; }
    80% { color: #6610f2; }
    100% { color: #495057; }
}

/* ========================================= */
/* ENHANCED HOVER EFFECTS */
/* ========================================= */

/* DISABLED to prevent animation conflicts
.scrolling-text span:hover {
    animation-play-state: paused;
    color: white;
    background: var(--accent-color, #0066cc);
    border-color: var(--accent-color, #0066cc);
    box-shadow: 0 6px 20px rgba(var(--accent-color-rgb, 0, 102, 204), 0.3);
    transform: translateX(8px) scale(1.05);
} */

/* ========================================= */
/* ACCESSIBILITY & PERFORMANCE */
/* ========================================= */

/* Pause animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .scrolling-text span::before,
    .scrolling-text span {
        animation: none;
    }

    .scrolling-text {
        animation: infiniteScroll 60s linear infinite;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .scrolling-text span {
        border-width: 2px;
        border-color: #000;
    }

    .scrolling-text span::before {
        display: none;
    }
}

/* ========================================= */
/* MOBILE OPTIMIZATIONS */
/* ========================================= */

@media (max-width: 767.98px) {
    .scrolling-text-container {
        height: 120px;
        padding: 12px;
    }

    .scrolling-text span {
        padding: 6px 10px;
        font-size: 0.85rem;
    }

    .scrolling-text span:hover {
        transform: scale(1.02);
    }
}

@media (max-width: 575.98px) {
    .scrolling-text-container {
        height: 100px;
        padding: 10px;
    }

    .scrolling-text span {
        padding: 5px 8px;
        font-size: 0.8rem;
    }
}

/* ========================================= */
/* PERFORMANCE OPTIMIZATIONS */
/* ========================================= */

.scrolling-text span {
    will-change: transform, background-color, border-color;
    transform: translateZ(0); /* GPU acceleration */
}

.scrolling-text span::before {
    will-change: left, background;
    transform: translateZ(0); /* GPU acceleration */
}

/* ========================================= */
/* THEME VARIATIONS */
/* ========================================= */

/* Blue theme for suppliers */
.feature-card.suppliers-theme .scrolling-text span:nth-child(odd) {
    --accent-color: #0066cc;
    --accent-color-rgb: 0, 102, 204;
}

/* Orange theme for construction */
.feature-card.construction-theme .scrolling-text span:nth-child(odd) {
    --accent-color: #ffc107;
    --accent-color-rgb: 255, 193, 7;
}