/* ===== APS Elastomers Custom Styles ===== */

/* Import MODERN Google Fonts - NO MORE GRANDMA FONTS! */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* CSS Variables for Brand Colors */
:root {
    --primary-color: #dc3545;
    --primary-dark: #b02a37;
    --primary-light: #e85563;
    --secondary-color: #6c757d;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --white: #ffffff;
    --text-dark: #2c3e50;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

/* MODERN TYPOGRAPHY - SHARP & CLEAN */
body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    font-weight: 400;
    letter-spacing: -0.01em;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Space Grotesk', 'Poppins', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

.display-1,
.display-2,
.display-3,
.display-4,
.display-5,
.display-6 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-transform: none;
}

/* TECH FONT FOR CODE/SPECS */
.tech-font,
.code-font {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-weight: 500;
}

/* ENHANCED TEXT STYLES */
.lead {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.btn {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-size: 0.875rem;
}

.navbar-nav .nav-link {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* MODERN CARD TITLES */
.card-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* MODERN BUTTON STYLES - SHARP & CLEAN */
.btn-primary {
    background: var(--gradient-primary);
    border: none;
    font-weight: 700;
    padding: 0.875rem 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    box-shadow: 0 4px 14px 0 rgba(220, 53, 69, 0.2);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.4);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 700;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.3);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1rem;
    border-radius: 10px;
}

.btn-sm {
    padding: 0.5rem 1.5rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

/* BUTTON SPACING - GIVE BUTTONS BREATHING ROOM! */
.btn-group-spaced {
    margin: 2rem 0;
}

.btn-group-spaced .btn {
    margin: 0.5rem 0.75rem 0.5rem 0;
}

.btn-container {
    margin: 2.5rem 0;
    padding: 1.5rem 0;
}

.btn-section {
    margin-top: 3rem;
    margin-bottom: 2rem;
}

/* Specific spacing for different button contexts */
.hero-buttons {
    margin-top: 3rem;
    margin-bottom: 2rem;
}

.content-buttons {
    margin-top: 2.5rem;
    margin-bottom: 2rem;
}

.cta-buttons {
    margin: 2rem 0;
}

/* MODERN CARD DESIGN SYSTEM */
.product-card {
    border: none !important;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}

/* CARD IMAGE PLACEHOLDER AREAS */
.card-image-placeholder {
    height: 200px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.card-image-placeholder.tpe {
    background: linear-gradient(135deg, #dc3545 0%, #ff6b7a 100%);
}

.card-image-placeholder.tpu {
    background: linear-gradient(135deg, #0d6efd 0%, #4dabf7 100%);
}

.card-image-placeholder.tpv {
    background: linear-gradient(135deg, #198754 0%, #51cf66 100%);
}

.card-image-placeholder i {
    color: white;
    font-size: 3rem;
    opacity: 0.9;
}

/* CARD CONTENT AREAS */
.card-content {
    background: #2c3e50;
    color: white;
    padding: 2rem 1.5rem;
}

.card-content .card-title {
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.card-content .card-text {
    color: #bdc3c7;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.card-content .btn {
    background: white;
    color: #2c3e50;
    border: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.card-content .btn:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* NEWS CARDS - DARK MODE WITH PHOTO */
.news-card {
    border: none !important;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #2c3e50;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3) !important;
}

/* NEWS CARD IMAGE AREA */
.news-card-image {
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.news-card-image.tech {
    background: linear-gradient(135deg, #0d6efd 0%, #4dabf7 100%);
}

.news-card-image.innovation {
    background: linear-gradient(135deg, #dc3545 0%, #ff6b7a 100%);
}

.news-card-image.industry {
    background: linear-gradient(135deg, #198754 0%, #51cf66 100%);
}

.news-card-image i {
    color: white;
    font-size: 3rem;
    opacity: 0.9;
}

.news-card-image::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="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
}

/* NEWS CARD CONTENT */
.news-card .card-body {
    padding: 2rem;
    background: #2c3e50;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-card .card-title {
    color: white;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.news-card .card-text {
    color: #bdc3c7;
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.news-card .text-muted {
    color: #95a5a6 !important;
}

.news-card .btn-outline-primary {
    border: 2px solid white;
    color: white;
    background: transparent;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-top: auto;
}

.news-card .btn-outline-primary:hover {
    background: white;
    color: #2c3e50;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

/* FULL CONTAINER IMAGE BOXES */
.image-container {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.image-container:hover {
    transform: scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25) !important;
}

.image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.3) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-container:hover::before {
    opacity: 1;
}

/* HERO IMAGE PLACEHOLDER */
.hero-image-placeholder {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg,
            rgba(220, 53, 69, 0.1) 0%,
            rgba(13, 110, 253, 0.1) 50%,
            rgba(25, 135, 84, 0.1) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.hero-image-placeholder::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(%23grid)"/></svg>');
}

.hero-content {
    text-align: center;
    color: white;
    z-index: 2;
    position: relative;
}

.hero-content h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.1rem;
    opacity: 0.9;
}

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

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

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

/* Header Styles */
.header-main {
    position: relative;
    z-index: 1000;
}

.top-bar {
    font-size: 0.875rem;
}

.navbar-brand img {
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.navbar-nav .nav-link {
    font-weight: 600;
    color: var(--text-dark) !important;
    padding: 0.75rem 1.25rem !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 6px;
    margin: 0 0.25rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    background-color: rgba(220, 53, 69, 0.1);
    transform: translateY(-1px);
}

.dropdown-menu {
    border: none;
    box-shadow: 0 10px 30px var(--shadow-color);
    border-radius: 8px;
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}

/* Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/assets/images/hero-pattern.svg') no-repeat center center;
    background-size: cover;
    opacity: 0.1;
    z-index: 1;
}

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

.min-vh-75 {
    min-height: 75vh;
}

/* MODERN PRODUCT CARDS */
.product-card {
    border: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(220, 53, 69, 0.1);
}

.product-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.product-icon {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-icon {
    transform: scale(1.15) rotate(5deg);
    color: var(--primary-color);
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px var(--shadow-color);
}

/* Sections */
section {
    position: relative;
}

.bg-light {
    background-color: #f8f9fa !important;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
}

.footer .social-links a {
    transition: all 0.3s ease;
}

.footer .social-links a:hover {
    color: var(--primary-color) !important;
    transform: translateY(-2px);
}

.footer-section h5,
.footer-section h6 {
    color: var(--white) !important;
    font-weight: 600;
}

.footer-section a:hover {
    color: var(--primary-color) !important;
}

/* Back to Top Button */
#backToTop {
    width: 50px;
    height: 50px;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#backToTop:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(220, 53, 69, 0.4);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
    }

    .hero-section .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .display-4 {
        font-size: 2.5rem;
    }

    .navbar-nav {
        text-align: center;
        padding-top: 1rem;
    }

    .footer .text-md-end {
        text-align: center !important;
        margin-top: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 3rem 0;
    }

    .display-4 {
        font-size: 2rem;
    }

    .lead {
        font-size: 1.1rem;
    }

    .btn-lg {
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
    }
}

/* Utility Classes */
.shadow-sm {
    box-shadow: 0 2px 8px var(--shadow-color) !important;
}

.shadow {
    box-shadow: 0 4px 15px var(--shadow-color) !important;
}

.shadow-lg {
    box-shadow: 0 8px 25px var(--shadow-color) !important;
}

.border-radius-lg {
    border-radius: 12px !important;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Loading Animation */
.loading {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loading.loaded {
    opacity: 1;
}

/* ===== NAVIGATION UNDERLINE ANIMATION ===== */
/* Apply to ALL nav links - only show when active */
@media (min-width: 992px) {
    .navbar-nav .nav-link {
        position: relative;
    }

    /* Animated underline - only shows when active */
    .navbar-nav .nav-link::before {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 0;
        height: 2px;
        background: #6c757d;
        transform: translateX(-50%);
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Active state - red underline that stays */
    .navbar-nav .nav-link.active::before {
        width: 80%;
        background: var(--primary-color);
    }

    /* Hover state on active link - animates to red */
    .navbar-nav .nav-link.active:hover::before {
        background: var(--primary-color);
    }
}

/* ===== MEGA MENU STYLES ===== */

/* Desktop only - hover to show mega menu */
@media (min-width: 992px) {
    .mega-dropdown {
        position: static !important;
    }

    .mega-dropdown>.nav-link {
        position: relative;
    }

    /* Add invisible bridge to prevent hover gap */
    .mega-dropdown>.nav-link::after {
        content: '';
        position: absolute;
        bottom: -20px;
        left: 0;
        right: 0;
        height: 20px;
        background: transparent;
    }

    .mega-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        padding: 0;
        padding-top: 0;
        margin-top: 0;
        border: none;
        background: white;
        background-image: url('/assets/images/tpe_overview_bg.png');
        background-size: cover;
        background-position: center;
        background-attachment: fixed;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
        border-radius: 0;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        z-index: 1050;
        pointer-events: none;
    }

    /* White overlay at 90% opacity to fade the background image */
    .mega-menu::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: white;
        opacity: 0.9;
        z-index: 0;
        pointer-events: none;
    }

    .mega-dropdown:hover .mega-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }
}

.mega-menu-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 1;
}

.mega-menu-column {
    padding: 0;
    display: flex;
    flex-direction: column;
}

.mega-menu-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dark);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

/* Hide titles when mega-menu-card is present (card-based columns) */
.mega-menu-column:has(.mega-menu-card) .mega-menu-title {
    display: none;
}

.mega-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu-list li {
    margin-bottom: 0.75rem;
}

.mega-menu-list a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 2px solid transparent;
    position: relative;
}

.mega-menu-list a:hover {
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    background: rgba(220, 53, 69, 0.05);
    transform: translateX(4px);
}

.mega-menu-list a::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
    margin-right: 0.75rem;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mega-menu-list a:hover::before {
    opacity: 1;
}

/* Mega Menu Cards - Full Clickable Buttons */
.mega-menu-card {
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #c8ced4;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.mega-menu-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
    background: #ffffff;
}

.mega-menu-card:active {
    transform: translateY(-4px);
}

.mega-menu-image {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    font-size: 3.5rem;
}

.mega-menu-image.tpe {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
}

.mega-menu-image.tpu {
    background: linear-gradient(135deg, #0d6efd 0%, #4dabf7 100%);
}

.mega-menu-image.tpv {
    background: linear-gradient(135deg, #198754 0%, #51cf66 100%);
}

/* Product Logo Styling — unified white backgrounds for all brand logos
   so all cards look consistent in the mega menu */
.mega-menu-image.product-logo {
    background: #ffffff !important;
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

/* DIOFLEX logo has white "DIO" text — needs dark bg to stay readable */
.mega-menu-image.tpe.product-logo {
    background: #2d3748 !important;
    border-bottom: 1px solid #2d3748;
}

.product-brand-logo {
    max-width: 80%;
    max-height: 70%;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.08));
}

.product-brand-text {
    font-size: 2.5rem;
    font-weight: 900;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: -1px;
}

.mega-menu-image i {
    color: white;
    font-size: 3.5rem;
    opacity: 0.95;
    transition: transform 0.3s ease;
}

.mega-menu-card:hover .mega-menu-image i {
    transform: scale(1.1);
}

.mega-menu-card h5 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 1.25rem 1.5rem 0.75rem 1.5rem;
    letter-spacing: -0.01em;
    flex-grow: 1;
}

.mega-menu-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0 1.5rem 1.5rem 1.5rem;
    line-height: 1.6;
    flex-grow: 1;
}

.mega-menu-link {
    display: inline-flex;
    align-items: center;
    color: white;
    background: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    margin: 0 1.5rem 1.5rem 1.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    gap: 0.5rem;
}

.mega-menu-link:hover {
    color: white;
    background: var(--primary-dark);
    transform: translateX(4px);
}

.mega-menu-link i {
    transition: transform 0.3s ease;
}

.mega-menu-link:hover i {
    transform: translateX(4px);
}

/* Profile Mega Menu Specific Styles */
.profile-mega-menu {
    /* Inherits all mega-menu styles */
}

.profile-mega-content {
    /* Same grid as products mega menu */
}

.profile-card {
    /* Inherits mega-menu-card styles */
}

.mega-menu-image.company {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

.mega-menu-image.team {
    background: linear-gradient(135deg, #fd7e14 0%, #e8590c 100%);
}

.mega-menu-image.testimonials {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
}

.mega-menu-image.news {
    background: linear-gradient(135deg, #20c997 0%, #17a2b8 100%);
}

/* Data Sheets Mega Menu Specific Styles */
.datasheets-mega-menu {
    /* Inherits all mega-menu styles */
}

.datasheets-mega-content {
    grid-template-columns: 1fr 1fr 1fr 1fr;
}

.datasheet-card {
    /* Inherits mega-menu-card styles */
}

.mega-menu-image.resources {
    background: #f0f2f5;
}

.mega-menu-image.resources i {
    color: #495057;
}

/* Responsive Mega Menu */
@media (max-width: 1199px) and (min-width: 992px) {
    .mega-menu-content {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
    }
}

@media (max-width: 991px) {

    /* Hide desktop navigation on mobile */
    .navbar-nav.d-none.d-lg-flex {
        display: none !important;
    }

    /* On mobile, hide mega menus completely - we use the accordion instead */
    .mega-menu {
        display: none !important;
    }

    /* Mobile Navigation Accordion */
    .mobile-nav-accordion {
        width: 100%;
        border: none;
        background: transparent;
    }

    .mobile-nav-accordion .accordion-item {
        border: none;
        border-bottom: 1px solid #e9ecef;
        background: transparent;
    }

    .mobile-nav-accordion .accordion-item:first-child {
        border-top: 1px solid #e9ecef;
    }

    .mobile-nav-accordion .accordion-button {
        padding: 1rem 1.5rem;
        font-weight: 600;
        font-size: 1rem;
        color: var(--text-dark);
        background: transparent;
        border: none;
        box-shadow: none;
        transition: all 0.3s ease;
    }

    .mobile-nav-accordion .accordion-button:not(.collapsed) {
        background: rgba(220, 53, 69, 0.08);
        color: var(--primary-color);
    }

    .mobile-nav-accordion .accordion-button:focus {
        border-color: transparent;
        box-shadow: none;
    }

    .mobile-nav-accordion .accordion-button::after {
        color: var(--text-muted);
    }

    .mobile-nav-accordion .accordion-body {
        padding: 0.5rem 1.5rem 1rem 2rem;
        background: #f8f9fa;
    }

    /* Mobile Menu Links */
    .mobile-menu-link {
        display: block;
        padding: 0.75rem 0;
        color: var(--text-dark);
        text-decoration: none;
        font-size: 0.95rem;
        transition: all 0.2s ease;
        border-bottom: 1px solid #e9ecef;
    }

    .mobile-menu-link:last-child {
        border-bottom: none;
    }

    .mobile-menu-link:hover {
        color: var(--primary-color);
        padding-left: 0.5rem;
    }

    .mobile-menu-link i {
        color: var(--primary-color);
        width: 20px;
    }

    /* Regular nav links in mobile accordion (Services, FAQ, Contact) */
    .mobile-nav-link {
        display: block;
        padding: 1rem 1.5rem;
        font-weight: 600;
        font-size: 1rem;
        color: var(--text-dark);
        text-decoration: none;
        transition: all 0.2s ease;
    }

    .mobile-nav-link:hover {
        color: var(--primary-color);
        background: rgba(220, 53, 69, 0.05);
    }
}

/* ===== PREMIUM FOOTER ANIMATION ===== */
@keyframes footerSlowPan {
    0% {
        transform: scale(1) translate(0, 0);
    }

    33% {
        transform: scale(1.08) translate(-1%, 1%);
    }

    66% {
        transform: scale(1.12) translate(1%, -1%);
    }

    100% {
        transform: scale(1) translate(0, 0);
    }
}

.footer-bg-animate {
    animation: footerSlowPan 80s ease-in-out infinite;
    transform-origin: center center;
    background-attachment: scroll;
    /* Required for transforms to work smoothly */
    pointer-events: none;
}

/* ===================================================================
 *  HOMEPAGE – Component Styles (Video Hero Update v2.0)
 * =================================================================== */

/* ── Section Eyebrow — small uppercase label above headings ────── */
.section-eyebrow {
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* ── Trust Badge Stats Bar ─────────────────────────────────────── */
.trust-badge {
    padding: 1.5rem 1rem;
    transition: transform 0.3s ease;
}

.trust-badge:hover {
    transform: translateY(-4px);
}

.trust-badge__icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.08) 0%, rgba(220, 53, 69, 0.18) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.3rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.trust-badge:hover .trust-badge__icon {
    background: var(--gradient-primary);
    color: #fff;
    transform: scale(1.1) rotate(5deg);
}

.trust-badge__number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.trust-badge__label {
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* ── Advantage Cards (Why APS section) ─────────────────────────── */
.advantage-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.advantage-card:hover {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.advantage-card__icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.2) 0%, rgba(220, 53, 69, 0.4) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1.4rem;
    color: #ff6b7a;
    transition: all 0.4s ease;
}

.advantage-card:hover .advantage-card__icon {
    background: var(--gradient-primary);
    color: #fff;
    transform: scale(1.15) rotate(8deg);
    box-shadow: 0 8px 20px rgba(220, 53, 69, 0.35);
}

.advantage-card__title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.75rem;
}

.advantage-card__text {
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.7;
    margin-bottom: 0;
}

/* ── Product Card Modern — Image Area ──────────────────────────── */
.product-card-modern__image {
    height: 250px;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s ease;
}

.product-card-modern:hover .product-card-modern__image {
    transform: scale(1.05);
}

.product-card-modern {
    overflow: hidden;
}

/* ── CTA Section ───────────────────────────────────────────────── */
.cta-section {
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.cta-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 60px;
    background-repeat: repeat-x;
    background-size: 50% 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 60' preserveAspectRatio='none'%3E%3Cpath d='M0,30 C200,55 400,5 600,30 C800,55 1000,5 1200,30 L1200,60 L0,60 Z' fill='rgba(255,255,255,0.08)'/%3E%3Cpath d='M0,38 C150,52 350,18 600,38 C850,58 1050,12 1200,38 L1200,60 L0,60 Z' fill='rgba(255,255,255,0.05)'/%3E%3C/svg%3E");
    animation: ctaWaveDrift 25s linear infinite;
    pointer-events: none;
    z-index: 0;
}

/* Ensure CTA text content sits above the wave */
.cta-section .container,
.sample-cta-section .container {
    position: relative;
    z-index: 1;
}

/* Slow horizontal drift — shared by both CTA sections */
@keyframes ctaWaveDrift {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ── Sticky Navbar — remove sticky-top when transparent ────────── */
body.has-video-hero .navbar.sticky-top {
    position: static !important;
}

/* Re-apply sticky when scrolled */
body.has-video-hero .navbar.navbar-scrolled {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
}

/* ===== MOBILE MENU STYLES ===== */
/* Solid background for mobile navigation */
@media (max-width: 991.98px) {
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
        padding: 1rem;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        border-radius: 0 0 16px 16px;
    }

    /* Mobile Nav Accordion Styling */
    .mobile-nav-accordion {
        background: transparent;
    }

    .mobile-nav-accordion .accordion-item {
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 12px !important;
        margin-bottom: 8px !important;
        overflow: hidden;
    }

    .mobile-nav-accordion .accordion-button {
        background: transparent !important;
        color: #ffffff !important;
        font-weight: 600;
        font-size: 1.1rem;
        padding: 1rem 1.25rem;
        border: none !important;
        box-shadow: none !important;
    }

    .mobile-nav-accordion .accordion-button:not(.collapsed) {
        background: rgba(220, 53, 69, 0.2) !important;
        color: #ff6b7a !important;
    }

    .mobile-nav-accordion .accordion-button::after {
        filter: brightness(0) invert(1);
    }

    .mobile-nav-accordion .accordion-body {
        background: rgba(0, 0, 0, 0.3) !important;
        padding: 0.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Mobile Menu Links */
    .mobile-menu-link {
        display: block;
        padding: 0.875rem 1.25rem;
        color: #e0e0e0 !important;
        text-decoration: none;
        font-weight: 500;
        border-radius: 8px;
        transition: all 0.2s ease;
    }

    .mobile-menu-link:hover,
    .mobile-menu-link:focus {
        background: rgba(220, 53, 69, 0.15);
        color: #ffffff !important;
        transform: translateX(5px);
    }

    .mobile-menu-link i {
        color: #dc3545;
        width: 24px;
    }

    /* Mobile Nav Direct Links (Services, FAQ, Contact) */
    .mobile-nav-link {
        display: block;
        padding: 1rem 1.25rem;
        color: #ffffff !important;
        text-decoration: none;
        font-weight: 600;
        font-size: 1.1rem;
    }

    .mobile-nav-link:hover {
        color: #ff6b7a !important;
        background: rgba(220, 53, 69, 0.15);
    }

    /* Navbar toggler styling - ALL PAGES */
    .navbar-toggler {
        border: 2px solid rgba(220, 53, 69, 0.6) !important;
        background: rgba(255, 255, 255, 0.95) !important;
        padding: 0.5rem 0.75rem;
        border-radius: 8px;
    }

    .navbar-toggler:focus {
        box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.4) !important;
        outline: none;
    }

    /* Hamburger icon - dark lines for sub-pages (light button background) */
    .navbar-toggler-icon {
        width: 1.5em;
        height: 1.5em;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23333333' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    }

    /* Video Hero page (homepage) - BRIGHT WHITE hamburger for dark video background */
    body.has-video-hero .navbar-toggler,
    body.has-video-hero .navbar .navbar-toggler {
        border: 2px solid rgba(255, 255, 255, 0.8) !important;
        background: rgba(0, 0, 0, 0.7) !important;
    }

    body.has-video-hero .navbar-toggler .navbar-toggler-icon,
    body.has-video-hero .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-miterlimit='10' stroke-width='3' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    }

    /* Video Hero page - transparent navbar background */
    body.has-video-hero .navbar {
        background: transparent !important;
        box-shadow: none !important;
    }

    /* Keep logo as-is (red) - don't change brightness */
    /* body.has-video-hero .navbar-brand img - NO FILTER */

    body.has-video-hero .navbar.navbar-scrolled {
        background: rgba(26, 26, 46, 0.95) !important;
        backdrop-filter: blur(10px);
    }

    body.has-video-hero .navbar.navbar-scrolled .navbar-toggler {
        border-color: rgba(255, 255, 255, 0.4) !important;
        background: rgba(26, 26, 46, 0.8) !important;
    }
}