/* ------------------------------------------------ */
/* 1. MODERN VARIABLES & RESET                      */
/* ------------------------------------------------ */
:root {
    --primary-color: #133880;
    --primary-hover: #0045DA;
    --text-dark: #1a202c;
    --text-light: #718096;
    
    /* Modern Glass Effect Variables */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: 1px solid rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --backdrop-blur: blur(12px);
    
    /* Spacing & Radius */
    --radius-md: 12px;
    --radius-lg: 20px;
    --nav-height: 70px;
}

html, body {
    font-family: "Manrope", "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-weight: 400;
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    background-color: #f8f9fa; /* Slight off-white is easier on eyes than pure white */
}

/* Hide Default Framework Headers */
.navbar, .navbar.navbar-expand, .navbar-light, header.navbar, .top-bar {
    display: none !important;
}

/* ------------------------------------------------ */
/* 2. GLASSMORPHISM HEADER                          */
/* ------------------------------------------------ */
.home-header {
    width: 100%;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2100; /* higher so header/tools remain visible above mobile-nav */
    height: var(--nav-height);
    
    /* Modern Glass Style */
    background-color: #ffffff; /* Solid white like view_jobs */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 4px 20px rgba(0,0,0,0.03); /* Very subtle shadow */
    transition: all 0.3s ease;
}

.home-header .brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.home-header .brand {
    flex: 0 0 auto;
}

.home-header .btn-login {
    margin-left: 1rem;
    background: var(--primary-color);
    color: #fff;
    padding: 0.45rem 0.9rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.home-header .btn-login:hover {
    background: var(--primary-hover);
}

.jobs-section .about-us-header {
    text-align: center;
    width: 100%;
    margin: 0 auto 16px;
}

.jobs-section .jobs-text {
    text-align: center;
}

.jobs-section .view-jobs-btn {
    margin-left: auto;
    margin-right: auto;
}

.user-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.user-menu .btn-login.is-logged-in {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 160px;
    background: #ffffff;
    border: 1px solid rgba(15, 26, 42, 0.12);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(9, 16, 32, 0.18);
    padding: 8px;
    display: none;
    z-index: 3000;
}

.user-menu-dropdown.show {
    display: block;
}

.user-menu-item {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: #1b2b4a;
    text-decoration: none;
    font-weight: 600;
}

.user-menu-item:hover {
    background: #eef2f8;
}

.home-header .btn-announcement {
    margin-left: 0.6rem;
    background: #0f1a2a;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    display: none;
    align-items: center;
    gap: 0.4rem;
    justify-content: center;
}

.home-header .btn-announcement:hover {
    background: #162642;
}

.btn-announcement.is-visible {
    display: inline-flex;
}

.home-header .brand-logo {
    height: 45px; /* Slightly smaller for elegance */
    width: auto;
    transition: transform 0.3s ease;
}

.home-header .brand:hover .brand-logo {
    transform: scale(1.05);
}

/* Prevent clipping of header children and ensure padding included in width */
.home-header {
    box-sizing: border-box;
    overflow: visible;
}

.btn-login {
    white-space: nowrap; /* prevent wrapping */
    box-shadow: 0 4px 14px rgba(19,56,128,0.12);
}

.btn-announcement {
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(15,26,42,0.12);
}

@media (max-width: 1200px) {
    .home-nav ul {
        gap: 1rem;
    }
    .brand-logo {
        height: 42px;
    }
}

/* ------------------------------------------------ */
/* 3. DESKTOP NAVIGATION                            */
/* ------------------------------------------------ */
.home-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem; /* More breathing room */
    padding: 0;
    margin: 0;
    align-items: center;
}

.home-nav {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
}

.home-nav {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    min-width: 0; /* allow flex children to shrink instead of pushing siblings out */
}

.home-nav ul {
    flex-wrap: wrap; /* allow items to wrap instead of overflowing */
    justify-content: center;
    gap: 1.5rem; /* slightly tighter gap to save space */
}

/* Right-side header tools (menu toggle, login) */
.header-tools {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 0 0 auto;
    margin-left: 1rem;
    margin-right: 0.5rem; /* small gap from viewport edge so rounded button isn't clipped */
    white-space: nowrap; /* keep tools on one line */
}

.menu-toggle {
    display: none;
    font-size: 1.6rem;
    background: rgba(19, 56, 128, 0.05);
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.6rem;
    border-radius: 10px;
    min-width: 44px;
    min-height: 44px;
    transition: background 0.2s;
    -webkit-tap-highlight-color: transparent; /* 1. Removes the blue flash */
    outline: none !important;                 /* 2. Removes the focus square */
    box-shadow: none !important;               /* 3. Ensures no shadow looks like a box */
}

.menu-toggle:focus, 
.menu-toggle:active {
    outline: none !important;
    background: rgba(19, 56, 128, 0.05); /* Keeps your subtle grey circle instead of a blue square */
}

.menu-toggle * {
    pointer-events: none;
}

.home-nav ul li {
    position: relative;
}

.home-nav ul li a {
    color: var(--primary-color);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
}

/* Animated Underline Effect */
.home-nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-hover);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.home-nav .icon,
.mobile-nav .icon {
    width: 0.9em;
    height: 0.9em;
    margin-left: 0.35rem;
    vertical-align: -0.15em;
}

.home-nav ul li a:hover {
    color: var(--primary-hover);
}

.home-nav ul li a:hover::after {
    width: 100%;
}

/* Modern Dropdown */
.home-nav ul li .dropdown-menu {
    position: absolute;
    top: 140%; /* Offset slightly more */
    left: -15px;
    
    /* Floating Card Style */
    background: #ffffff;
    min-width: 220px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    
    display: block;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    padding: 0;
    
    /* Snappy transition */
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform: translateY(10px);
}

.home-nav ul li.has-dropdown:hover > .dropdown-menu {
    max-height: 500px;
    opacity: 1;
    visibility: visible;
    padding: 0.5rem; /* Inner padding for floating items */
    transform: translateY(0);
    top: 100%;
}

.home-nav ul li .dropdown-menu li a {
    padding: 0.8rem 1rem;
    display: block;
    color: var(--primary-color);
    font-weight: 400;
    border-radius: 8px; /* Rounded items */
}

.home-nav ul li .dropdown-menu li a::after {
    display: none; /* Remove underline for dropdown items */
}

.home-nav ul li .dropdown-menu li a:hover {
    background: rgba(19, 56, 128, 0.04); /* Subtle tint instead of grey */
    color: var(--primary-hover);
    transform: translateX(5px); /* Micro-interaction */
}

/* ------------------------------------------------ */
/* 4. SECTIONS & SPACING                            */
/* ------------------------------------------------ */
.home-hero {
    /* Accounts for header height + spacing */
    padding-top: calc(var(--nav-height) + 60px) !important; 
}

.home-hero h1 {
    font-weight: 800;
    letter-spacing: -0.02em; /* Tighten large headings */
    color: var(--primary-color);
}

.home-hero p {
    font-weight: 400;
    color: var(--text-light);
    line-height: 1.6;
}

/* Full Width Utility Classes */
.intro-section, .standard-section, .contact_us-section, .innovation-banner {
    /* Use 100% instead of 100vw to avoid including scrollbar width
       which can cause horizontal overflow on some devices/browsers. */
    width: 100%;
    margin-left: 0;
    transform: none;
    left: 0;
    position: relative;
    overflow: hidden; /* Prevent horizontal scroll bars */
    box-sizing: border-box;
}

.intro-content, .standard-content, .contact_us-content, .innovation-banner-content {
    max-width: 1440px;
    margin: auto;
    padding: 0 2rem; /* Ensure content doesn't touch edges on small screens */
}

/* Prevent anchor targets from being hidden under the fixed header */
#products,
#about-us,
#jobs,
#contact-us,
#sustainability,
#iso-certified {
    scroll-margin-top: calc(var(--nav-height) + 20px);
}

/* ------------------------------------------------ */
/* 5. FULL DISPLAY MODERN MOBILE MENU               */
/* ------------------------------------------------ */

.menu-toggle {
    display: none;
    font-size: 1.6rem;
    background: rgba(19, 56, 128, 0.05);
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.6rem;
    border-radius: 10px;
    min-width: 44px;
    min-height: 44px;
    transition: background 0.2s;
    z-index: 1100;
}

.menu-toggle:hover {
    background: rgba(19, 56, 128, 0.12);
}

/* FULL SCREEN MOBILE NAV */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;

    display: flex;
    flex-direction: column;

    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(18px);

    padding: 5rem 1.5rem 2rem; /* space for header */
    box-shadow: 0 30px 60px rgba(0,0,0,0.15);

    transform: translateY(-100%);
    opacity: 0;

    overflow-y: auto;
    transition: transform 0.45s cubic-bezier(0.165, 0.84, 0.44, 1),
                opacity 0.35s ease;
    z-index: 2000;
}

/* SHOW STATE */
.mobile-nav.show {
    transform: translateY(0);
    opacity: 1;
}

/* MAIN LINKS */
.mobile-nav a,
.mobile-nav button {
    padding: 1rem 1.2rem;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 600;
    border-radius: 14px;
    margin-bottom: 0.4rem;
    transition: background 0.2s ease;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.mobile-nav a:hover,
.mobile-nav button:hover {
    background: rgba(19, 56, 128, 0.06);
}

/* MOBILE DROPDOWN */
.mobile-dropdown {
    display: flex;
    flex-direction: column;
    padding-left: 1rem;
    margin-left: 0.8rem;

    max-height: 0;
    opacity: 0;
    overflow: hidden;

    border-left: 2px solid rgba(19, 56, 128, 0.15);
    transition: max-height 0.35s ease, opacity 0.3s ease;
}

.mobile-dropdown.show {
    max-height: 999px;
    opacity: 1;
    margin-top: 0.3rem;
    margin-bottom: 0.5rem;
    overflow: visible;
}

/* DROPDOWN LINKS */
.mobile-dropdown a {
    font-size: 1rem;
    padding: 0.8rem 1rem;
    color: var(--primary-color);
}

.mobile-nav .material-symbols-outlined,
.mobile-nav .icon {
    width: 1.25rem;
    height: 1.25rem;
    font-size: 1.25rem;
    line-height: 1;
    color: var(--primary-color);
    flex: 0 0 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mobile-announcement,
.mobile-login {
    align-items: center;
}

/* Ensure mobile nav icons align with text */
.mobile-nav .icon {
    margin-left: 0;
    margin-right: 0.6rem;
    vertical-align: middle;
}


/* ------------------------------------------------ */
/* 6. RESPONSIVE ADJUSTMENTS                        */
/* ------------------------------------------------ */
@media (max-width: 992px) { /* Changed from 768 to 992 for better tablet handling */
    .home-nav {
        display: none !important;
    }
    .menu-toggle {
        display: block;
    }
    .home-header {
        padding: 0 1rem;
    }
    .home-hero {
        padding-top: 100px !important;
    }

    /* Hide announcement bell + login icon in mobile header */
    .home-header .btn-login,
    .home-header .btn-announcement {
        display: none !important;
        visibility: hidden;
        opacity: 0;
    }

    .header-tools {
        margin-right: 0;
    }
}

/* 7. MODERN BACK TO TOP (REFINED) */
#back-to-top {
    position: fixed;
    bottom: calc(var(--footer-h, 52px) + 12px);
    left: 20px;
    z-index: 10000;
    
    width: 50px;
    height: 50px;
    border-radius: 50%; /* Keeps it a circle */
    
    background-color: #ffffff;
    color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    
    font-size: 1.2rem;
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.9);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);

    /* --- MOBILE SQUARE FIXES --- */
    -webkit-tap-highlight-color: transparent; /* Removes the blue/grey square on tap */
    outline: none;                            /* Removes the focus square */
    user-select: none;                        /* Prevents text selection on long press */
    display: none;
}

.home-page #back-to-top {
    display: flex;
}

#back-to-top,
#chat-bubble {
    transition: opacity 0.2s ease;
}

/* Hide floating buttons when mobile menu is open */
.mobile-nav-open #back-to-top,
.mobile-nav-open #chat-bubble {
    opacity: 0 !important;
    pointer-events: none !important;
}
#back-to-top.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

/* Hover State */
#back-to-top:hover {
    transform: translateY(-5px);
    background-color: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 15px 30px rgba(19, 56, 128, 0.3);
}

/* --- THE CLICK FEEDBACK --- */
#back-to-top:active {
    transform: translateY(-2px) scale(0.92) !important; 
    background-color: var(--primary-hover) !important; 
    box-shadow: 0 5px 15px rgba(19, 56, 128, 0.4) !important;
    transition: all 0.1s ease; 
    border-radius: 50% !important; /* Force circle shape during the tap */
    outline: none !important;
}

/* ----------------------
   TESTIMONIAL SECTION
----------------------- */
.testimonial-section {
    padding: 60px 2rem;
    background: #f0f4f8;
    background-image: radial-gradient(#d1d9e6 1px, transparent 1px);
    background-size: 40px 40px;
    position: relative;
    overflow: hidden;
}

.testimonial-section::before,
.testimonial-section::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    z-index: 0;
    opacity: 0.5;
    pointer-events: none;
}

.testimonial-section::before {
    width: 520px;
    height: 520px;
    right: -180px;
    top: -220px;
    background: radial-gradient(circle, rgba(19, 56, 128, 0.18), rgba(19, 56, 128, 0));
}

.testimonial-section::after {
    width: 620px;
    height: 620px;
    left: -240px;
    bottom: -260px;
    background: radial-gradient(circle, rgba(33, 150, 243, 0.16), rgba(33, 150, 243, 0));
}

.testimonial-content {
    max-width: 1080px;
    margin: 0 auto;
}

.testimonial-card {
    background: #ffffff;
    border-radius: 22px;
    padding: 24px 0 16px;
    box-shadow: 0 18px 40px rgba(10, 32, 52, 0.12);
    position: relative;
    overflow: hidden;
    max-width: 980px;
    margin: 0 auto;
}

.testimonial-carousel {
    position: relative;
    padding: 20px 0 10px;
}

.testimonial-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: min(70vw, 520px);
    gap: 28px;
    align-items: center;
    padding: 0 10vw 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.testimonial-track::-webkit-scrollbar {
    display: none;
}

.testimonial-item {
    scroll-snap-align: center;
    display: grid;
    justify-items: center;
    gap: 14px;
    opacity: 0.6;
    transform: scale(0.9);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.testimonial-item.is-active {
    opacity: 1;
    transform: scale(1);
}

.testimonial-frame {
    width: 100%;
    border-radius: 24px;
    background: #f1f5f9;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.2);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial-frame img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    background: #ffffff;
}


.testimonial-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    height: auto;
    border: none;
    background: transparent;
    color: #1f2937;
    font-size: 42px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: none;
    padding: 6px;
    transition: transform 0.2s ease, background 0.2s ease;
    z-index: 2;
    pointer-events: auto;
}

.testimonial-nav:hover {
    transform: translateY(-50%) scale(1.06);
    color: #0f172a;
}

.testimonial-prev {
    left: 16px;
}

.testimonial-next {
    right: 16px;
}

.testimonial-card.is-single .testimonial-nav {
    display: none;
}

.testimonial-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 12px 0 6px;
}

.testimonial-indicator {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    border: none;
    background: rgba(17, 24, 39, 0.25);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.testimonial-indicator.is-active {
    background: #111827;
    transform: scale(1.1);
}

.testimonial-modal {
    position: fixed;
    inset: 0;
    background: rgba(9, 16, 32, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 9999;
}

.testimonial-modal.show {
    display: flex;
}

.testimonial-modal-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 16px;
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
}

.testimonial-modal-card img {
    display: block;
    max-width: 80vw;
    max-height: 80vh;
    object-fit: contain;
}

.testimonial-modal-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: none;
    background: rgba(15, 26, 42, 0.85);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

.testimonial-modal-close:hover {
    background: rgba(15, 26, 42, 1);
}

.testimonial-quote.is-fade-in {
    animation: testimonialFadeIn 0.4s ease;
}

.testimonial-quote.is-fade-in-prev {
    animation: testimonialFadeInLeft 0.4s ease;
}

@keyframes testimonialFadeIn {
    from { opacity: 0; transform: translateX(12px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes testimonialFadeInLeft {
    from { opacity: 0; transform: translateX(-12px); }
    to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 768px) {
    .testimonial-card {
        padding: 18px 0 8px;
    }

    .testimonial-track {
        grid-auto-columns: min(80vw, 360px);
        padding: 0 8vw 12px;
        gap: 18px;
    }

    .testimonial-frame {
        border-radius: 20px;
    }


    .testimonial-nav {
        font-size: 32px;
    }

    .testimonial-indicator {
        width: 10px;
        height: 10px;
    }
}



/* Close button inside mobile menu */
.mobile-close {
    margin-top: 1rem;
    margin-bottom: 0;
    align-self: center;
    padding: 0.85rem 1.1rem;
    border-radius: 12px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(19,56,128,0.18);
}

.mobile-close:hover {
    background: var(--primary-hover);
}

.mobile-announcement {
    display: none !important;
}

.mobile-announcement.is-visible {
    display: flex !important;
}

.mobile-announcement .icon {
    margin-right: 8px;
}
