/* =====================================================
   ERRL — Main Master Stylesheet (Unified CSS)
   ===================================================== */

/* -----------------------------------------------------
   1. BASE RESET & GENERAL STYLES
   ----------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    padding-top: 80px !important;
}

@media (max-width: 639px) {
    body {
        padding-top: 64px !important;
    }
}

@media (min-width: 1024px) {
    body {
        padding-top: 114px !important;
    }
}

/* -----------------------------------------------------
   MOBILE NAVIGATION DRAWER OVERLAY (100% RELIABLE)
   ----------------------------------------------------- */
#mobileMenu {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: calc(100dvh - 64px);
    background-color: #FFFFFF !important;
    z-index: 999999 !important;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 25px 50px -12px rgba(11, 31, 58, 0.35);
    border-top: 1px solid #E2E8F0;
}

@media (min-width: 640px) {
    #mobileMenu {
        top: 80px;
        max-height: calc(100dvh - 80px);
    }
}

@media (min-width: 1024px) {
    #mobileMenu {
        display: none !important;
    }
}

#mobileMenu.active {
    display: flex !important;
}

/* Prevent auto-zoom on mobile safari/chrome when focusing inputs */
@media (max-width: 640px) {

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px !important;
    }
}

img,
video,
iframe {
    max-width: 100%;
}

details summary::-webkit-details-marker {
    display: none;
}

button,
a,
.standard-pill-btn {
    transition: all 0.3s ease !important;
}

select {
    transition: border-color 0.3s ease !important;
}

select:hover {
    border-color: #D9A441 !important;
}

/* -----------------------------------------------------
   2. CUSTOM PREMIUM SCROLLBAR
   ----------------------------------------------------- */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #C89B2A;
    border-radius: 5px;
    border: 2px solid #0f172a;
}

::-webkit-scrollbar-thumb:hover {
    background: #E5B23E;
}

/* -----------------------------------------------------
   3. HEADER & NAVIGATION STYLING
   ----------------------------------------------------- */
.glass-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

header.shadow-md {
    box-shadow: 0 8px 25px rgba(0, 0, 0, .08) !important;
    backdrop-filter: blur(12px) !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
}

header a.text-brand-gold {
    position: relative;
    font-weight: 700 !important;
}

header a.text-brand-gold::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #C89B2A;
    border-radius: 1px;
}

/* -----------------------------------------------------
   4. FOOTER STYLING
   ----------------------------------------------------- */
.footer-quick-link {
    display: inline-block;
    transition: all 0.3s ease !important;
}

.footer-quick-link:hover {
    color: #C89B2A !important;
    transform: translateX(5px);
}

/* -----------------------------------------------------
   5. HERO SECTION & SWIPER CAROUSEL
   ----------------------------------------------------- */
.hero-overlay {
    background: linear-gradient(90deg,
            rgba(5, 12, 28, 0.62) 0%,
            rgba(7, 18, 45, 0.52) 55%,
            rgba(11, 31, 58, 0.18) 100%);
}

.hero-slide-media {
    filter: saturate(1.02) contrast(1.04);
}

.hero-kicker {
    display: block !important;
    color: #C89B2A !important;
    font-weight: 700 !important;
    letter-spacing: .12em !important;
    text-transform: uppercase !important;
    margin-bottom: 1.25rem !important;
    font-size: .75rem !important;
}

.hero-stat {
    border-left: 1px solid rgba(255, 255, 255, .18);
    padding-left: 1rem;
}

.hero-brand-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(12px) saturate(160%) !important;
    padding: 0 0.75rem !important;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18) !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease !important;
    height: 84px;
    box-sizing: border-box;
}

.hero-brand-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28) !important;
}

.swiper-button-next,
.swiper-button-prev {
    color: #C89B2A;
    background: rgba(255, 255, 255, .12);
    padding: 30px 20px;
    border-radius: 8px;
    backdrop-filter: blur(4px);
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: rgba(255, 255, 255, .22);
}

.swiper-pagination-bullet {
    background: #fff;
    opacity: .5;
    width: 12px;
    height: 12px;
}

.swiper-pagination-bullet-active {
    background: #C89B2A;
    opacity: 1;
}

/* -----------------------------------------------------
   6. CARDS & GRID COMPONENTS
   ----------------------------------------------------- */
.capability-card {
    transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}

.capability-card:hover {
    transform: translateY(-5px);
    border-color: rgba(200, 155, 42, .75);
    box-shadow: 0 24px 44px -30px rgba(11, 31, 58, .45);
}

.metric-card {
    background: linear-gradient(180deg, #fff, #F8FAFC);
}

.service-card {
    position: relative;
    overflow: hidden;
    min-height: 290px !important;
    border-radius: 14px !important;
    border: 1px solid rgba(203, 213, 225, 0.9) !important;
    background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%) !important;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.03), 0 12px 30px -20px rgba(11, 31, 58, 0.25);
    padding: 0 0 2.6rem 0 !important;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease !important;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 20px 25px -5px rgba(11, 31, 58, 0.15), 0 8px 10px -6px rgba(200, 155, 42, 0.2) !important;
    border-color: #C89B2A !important;
}

.service-card p {
    flex-grow: 1;
    line-height: 1.5 !important;
    margin-bottom: 0.5rem !important;
    padding-left: 1.1rem !important;
    padding-right: 1.1rem !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.6em;
    font-size: 0.82rem !important;
    color: #475569;
}

.service-card h4 {
    font-weight: 800 !important;
    color: #0B1F3A !important;
    font-size: 0.92rem !important;
    line-height: 1.3 !important;
    margin-bottom: 0.35rem !important;
    padding-left: 1.1rem !important;
    padding-right: 1.1rem !important;
}

.service-card .flex.items-start {
    padding-left: 1.1rem !important;
    padding-right: 1.1rem !important;
    margin-top: 0.5rem !important;
}

.service-card::after {
    content: "View Details →";
    position: absolute;
    left: 1.1rem;
    right: 1.1rem;
    bottom: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 1.6rem;
    border-top: 1px solid rgba(226, 232, 240, 0.9);
    padding-top: 0.4rem;
    color: #0B1F3A;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: color 0.2s ease, transform 0.2s ease, letter-spacing 0.2s ease;
}

.service-card:hover::after {
    color: #C89B2A;
    letter-spacing: 0.08em;
}

/* Hide card inner icon box to give maximum space to images */
.service-card .flex.items-start,
.service-card .bg-brand-lightGold {
    display: none !important;
}

.service-card-thumb {
    height: 185px !important;
    width: 100% !important;
    margin: 0 0 0.75rem 0 !important;
    overflow: hidden;
    background: #0B1F3A !important;
    border-top-left-radius: 13px !important;
    border-top-right-radius: 13px !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.service-card-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: top center !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.service-card:hover .service-card-thumb img {
    transform: scale(1.08) !important;
}

.group div.aspect-video img {
    object-fit: contain !important;
    background-color: #F8FAFC !important;
    transform: none !important;
}

/* -----------------------------------------------------
   7. INFINITE MARQUEE
   ----------------------------------------------------- */
.marquee-container {
    overflow: hidden;
    width: 100%;
    position: relative;
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 35s linear infinite;
    gap: 2.5rem;
    align-items: center;
}

.marquee-track img {
    height: 56px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

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

.marquee-track:hover {
    animation-play-state: paused;
}

/* -----------------------------------------------------
   8. SEARCH & UI CONTROLS
   ----------------------------------------------------- */
.relative>.ph-magnifying-glass {
    position: absolute;
    left: 0.75rem;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

#clearSearchBtn {
    position: absolute;
    right: 0.75rem;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

/* -----------------------------------------------------
   9. RESPONSIVE / MOBILE MEDIA QUERIES
   ----------------------------------------------------- */

header .max-w-7xl {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

@media (max-width: 767px) {
    .hero-overlay {
        background: linear-gradient(180deg, rgba(10, 25, 50, 0.92) 0%, rgba(10, 25, 50, 0.80) 100%) !important;
    }

    section.relative.min-h-\[700px\] {
        min-height: 540px !important;
    }

    .hero-stat {
        border-left: 0 !important;
        padding-left: 0 !important;
    }

    .swiper-button-next,
    .swiper-button-prev {
        display: none !important;
    }

    .marquee-track {
        gap: 1.5rem;
        animation-duration: 28s;
    }

    .marquee-track img {
        height: 40px;
    }

    section {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }

    .max-w-7xl.mx-auto.px-6 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .grid.grid-cols-1.md\:grid-cols-2,
    .grid.grid-cols-1.md\:grid-cols-3,
    .grid.grid-cols-1.md\:grid-cols-4 {
        grid-template-columns: 1fr !important;
    }

    .grid.grid-cols-1.md\:grid-cols-5,
    .grid.grid-cols-2.md\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .grid.sm\:grid-cols-2.lg\:grid-cols-3,
    .grid.grid-cols-1.sm\:grid-cols-2.lg\:grid-cols-3.xl\:grid-cols-4,
    .grid.sm\:grid-cols-2 {
        grid-template-columns: 1fr !important;
    }

    .md\:divide-x>* {
        border-left: 0 !important;
        border-right: 0 !important;
    }

    .p-12,
    .lg\:p-16 {
        padding: 1.25rem !important;
    }

    .p-10 {
        padding: 1.25rem !important;
    }

    .p-8 {
        padding: 1rem !important;
    }

    .relative.z-30.-mt-16 {
        margin-top: -2rem !important;
        margin-left: 0.75rem !important;
        margin-right: 0.75rem !important;
    }

    footer .grid.grid-cols-1.md\:grid-cols-3 {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    footer {
        padding-top: 2.5rem !important;
        margin-top: 2rem !important;
    }

    footer .flex.flex-col.md\:flex-row {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center;
    }

    .bg-brand-blue.py-16,
    .bg-brand-blue.py-20,
    .bg-brand-blue.py-24 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    #serviceSearch {
        font-size: 0.875rem !important;
        padding: 0.75rem 1rem !important;
    }

    .service-section-title {
        font-size: 1.25rem !important;
    }
}

@media (max-width: 500px) {
    .hero-brand-card {
        padding: 0.4rem 0.5rem;
    }

    .hero-brand-card img {
        height: 28px !important;
    }

    h1 {
        font-size: 1.875rem !important;
        line-height: 1.2 !important;
    }

    h2 {
        font-size: 1.5rem !important;
        line-height: 1.25 !important;
    }

    h3 {
        font-size: 1.25rem !important;
    }
}

@media (max-width: 480px) {
    #globalSearchLink {
        bottom: 16px !important;
        left: 16px !important;
        width: 44px !important;
        height: 44px !important;
    }

    #scrollToTopBtn {
        bottom: 16px !important;
        right: 16px !important;
        width: 44px !important;
        height: 44px !important;
    }

    .accred-logo-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 1023px) {
    .flex.flex-col.lg\:flex-row {
        flex-direction: column !important;
    }

    .lg\:w-1\/2 {
        width: 100% !important;
    }

    .min-h-\[400px\] {
        min-height: 220px !important;
    }

    aside {
        display: none;
    }

    .sticky.top-28 {
        position: static !important;
    }
}

/* -----------------------------------------------------
   10. ANIMATIONS & INTERACTIVE STATES (FADE-UP / SCROLL-FADE)
   ----------------------------------------------------- */
.fade-up,
.scroll-fade {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.fade-up.visible,
.scroll-fade.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.fade-up.delay-1 {
    transition-delay: 0.1s;
}

.fade-up.delay-2 {
    transition-delay: 0.18s;
}

.fade-up.delay-3 {
    transition-delay: 0.26s;
}

.fade-up.delay-4 {
    transition-delay: 0.34s;
}

.fade-up.delay-5 {
    transition-delay: 0.42s;
}

.fade-up.delay-6 {
    transition-delay: 0.50s;
}

.fade-up.delay-7 {
    transition-delay: 0.58s;
}

.fade-up.delay-8 {
    transition-delay: 0.66s;
}

/* -----------------------------------------------------
   11. INDUSTRY CARDS & FILTERS (industries.php)
   ----------------------------------------------------- */
.ind-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    cursor: pointer;
    background: #fff;
    border: 1px solid rgba(203, 213, 225, 0.7);
    box-shadow: 0 4px 24px -12px rgba(11, 31, 58, 0.18);
    transition: transform 0.35s cubic-bezier(.22, .68, 0, 1.2), box-shadow 0.35s ease, border-color 0.3s ease;
}

.ind-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 32px 56px -24px rgba(11, 31, 58, 0.38);
    border-color: rgba(200, 155, 42, 0.55);
}

.ind-card-img {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #0B1F3A;
}

.ind-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s ease, filter 0.55s ease;
    filter: saturate(0.85) brightness(0.88);
}

.ind-card:hover .ind-card-img img {
    transform: scale(1.08);
    filter: saturate(1.05) brightness(0.78);
}

.ind-card-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(11, 31, 58, 0.82) 100%);
    transition: opacity 0.4s ease;
}

.ind-card-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 2;
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(200, 155, 42, 0.92);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(200, 155, 42, 0.4);
    transition: transform 0.3s ease;
}

.ind-card:hover .ind-card-badge {
    transform: rotate(-8deg) scale(1.1);
}

.ind-card-img-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 1.25rem 1.25rem 1rem;
}

.ind-card-body {
    padding: 1.25rem;
}

.ind-card-tests {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1.1rem;
}

.ind-card-test-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.72rem;
    color: #475569;
    line-height: 1.4;
}

.ind-card-test-item i {
    color: #C89B2A;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.ind-card-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(226, 232, 240, 0.8);
    margin-top: auto;
}

.ind-card-cta span {
    font-size: 0.72rem;
    font-weight: 700;
    color: #C89B2A;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.2s;
}

.ind-card:hover .ind-card-cta span {
    color: #0B1F3A;
}

.ind-card-cta i {
    font-size: 1rem;
    color: #C89B2A;
    transition: transform 0.3s ease;
}

.ind-card:hover .ind-card-cta i {
    transform: translateX(5px);
}

.ind-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #C89B2A, #E0B94F);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.4s cubic-bezier(.22, .68, 0, 1.2);
    border-radius: 16px 0 0 16px;
    z-index: 3;
}

.ind-card:hover::before {
    transform: scaleY(1);
}

.stat-item {
    position: relative;
    text-align: center;
    padding: 1.75rem 1.5rem;
}

.stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 25%;
    height: 50%;
    width: 1px;
    background: rgba(200, 155, 42, 0.3);
}

.filter-tab {
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    border: 1.5px solid transparent;
    background: #fff;
    color: #64748b;
    border-color: rgba(203, 213, 225, 0.8);
    transition: all 0.22s ease;
    white-space: nowrap;
}

.filter-tab:hover {
    border-color: #C89B2A;
    color: #C89B2A;
}

.filter-tab.active {
    background: #0B1F3A;
    color: #fff;
    border-color: #0B1F3A;
}

.ind-card-wrap {
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.ind-card-wrap.hidden-card {
    display: none !important;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
}

.banner-bg {
    background: linear-gradient(135deg, #0B1F3A 0%, #1A3A63 60%, #0B2E4A 100%);
    position: relative;
    overflow: hidden;
}

/* -----------------------------------------------------
   12. INSIGHTS & BLOG STYLES (insights.php)
   ----------------------------------------------------- */
.blog-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(11, 31, 58, 0.12);
}

.category-pill {
    transition: all 0.2s;
    cursor: pointer;
}

.category-pill.active,
.category-pill:hover {
    background: #0B1F3A;
    color: white;
    border-color: #0B1F3A;
}

.featured-img {
    transition: transform 0.5s ease;
}

.featured-card:hover .featured-img {
    transform: scale(1.04);
}

.tag-chip {
    background: rgba(11, 31, 58, 0.07);
    color: #0B1F3A;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.read-more-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #C89B2A;
    font-size: 0.85rem;
}

.read-more-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #C89B2A;
    transition: width 0.3s;
}

.read-more-btn:hover::after {
    width: 100%;
}

.newsletter-box {
    background: linear-gradient(135deg, #0B1F3A 0%, #1A3A63 100%);
}

/* Hide floating search button (bottom-left) */
#globalSearchLink {
    display: none !important;
}

/* -----------------------------------------------------
   13. INFINITE LOGO MARQUEE TICKER (100% FULL WIDTH EDGE-TO-EDGE)
   ----------------------------------------------------- */
.marquee-container {
    width: 100vw !important;
    max-width: 100vw !important;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    overflow: hidden;
    white-space: nowrap;
    background: #FFFFFF !important;
    padding: 1.5rem 0 !important;
    border-top: 1px solid #E2E8F0;
    border-bottom: 1px solid #E2E8F0;
}

.marquee-container::before,
.marquee-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 150px;
    z-index: 10;
    pointer-events: none;
}

.marquee-container::before {
    left: 0;
    background: linear-gradient(to right, #FFFFFF 0%, transparent 100%);
}

.marquee-container::after {
    right: 0;
    background: linear-gradient(to left, #FFFFFF 0%, transparent 100%);
}

.marquee-track {
    display: flex;
    align-items: center;
    gap: 3.5rem;
    width: max-content;
    animation: marquee-scroll 75s linear infinite;
    will-change: transform;
}

.marquee-track:hover {
    animation-play-state: paused;
}

.marquee-track img {
    height: 56px !important;
    max-height: 62px !important;
    width: auto !important;
    max-width: 180px !important;
    flex-shrink: 0 !important;
    object-fit: contain !important;
    filter: none !important;
    opacity: 0.95 !important;
    transition: opacity 0.3s ease, transform 0.3s ease !important;
    cursor: pointer;
}

.marquee-track img:hover {
    filter: none !important;
    opacity: 1 !important;
    transform: scale(1.12);
}

@keyframes marquee-scroll {
    0% {
        transform: translateX(0);
    }

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