:root {
    /* Brand Colours */
    --clr-navy: #00000F;
    --clr-navy-light: #00002A;
    --clr-accent: #2E4776;
    --clr-accent-hover: #3b5a94;
    --clr-bg: #FAFBFC;
    --clr-white: #FFFFFF;
    --clr-text-main: #1F2937;
    --clr-text-muted: #6B7280;
    --clr-border: #E5E7EB;
    --clr-brand-blue: #2e6fb9;

    /* Spacing & Borders */
    --container: 1280px;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 42, 0.2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--clr-brand-blue);
}

/* Custom Selection */
::selection {
    background-color: var(--clr-brand-blue);
    color: var(--clr-white);
}

/* Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--clr-text-main);
    background-color: var(--clr-bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Base Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

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

.animate-fade {
    animation: fadeIn 0.8s ease forwards;
}

.hero-content h1 {
    animation: fadeIn 0.8s ease-out 0.2s both;
}

.hero-content p {
    animation: fadeIn 0.8s ease-out 0.4s both;
}

.hero-actions {
    animation: fadeIn 0.8s ease-out 0.6s both;
}

.hero-stats {
    animation: fadeIn 0.8s ease-out 0.8s both;
    display: flex;
    gap: 1.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.hero-stats .stat {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 1),
        0 4px 6px -1px rgba(0, 0, 0, 0.05);
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    text-align: center;
    transition: transform 0.3s ease;
}

.hero-image {
    animation: slideInRight 1s ease-out 0.3s both;
}

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Layout */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 2rem;
}

.grid {
    display: grid;
    gap: 2rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, background-color 0.2s, color 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(180deg, #3d84d6 0%, var(--clr-brand-blue) 100%);
    color: var(--clr-white);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.4),
        /* Rim light */
        inset 0 -1px 1px rgba(0, 0, 0, 0.1),
        /* Bottom shadow inner */
        0 2px 4px rgba(46, 111, 185, 0.3);
    /* Drop shadow */
}

.btn-primary:hover {
    background: linear-gradient(180deg, #4992e6 0%, #357bc9 100%);
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.5),
        inset 0 -1px 1px rgba(0, 0, 0, 0.1),
        0 8px 20px rgba(46, 111, 185, 0.4);
}

.btn-secondary {
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
    color: var(--clr-navy);
    border: 1px solid var(--clr-border);
    box-shadow:
        inset 0 1px 1px #ffffff,
        0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    background: linear-gradient(180deg, #ffffff 0%, #f3f4f6 100%);
    border-color: #d1d5db;
    box-shadow:
        inset 0 1px 1px #ffffff,
        0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn-outline {
    background-color: transparent;
    color: var(--clr-white);
    border: 2px solid var(--clr-white);
}

.btn-outline:hover {
    background-color: var(--clr-white);
    color: var(--clr-navy);
}

/* Header */
.header {
    background-color: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-menu a:not(.btn) {
    font-weight: 500;
    color: var(--clr-text-main);
    position: relative;
}

.nav-menu a:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--clr-brand-blue);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-menu a.active,
.nav-menu a:hover:not(.btn) {
    color: var(--clr-brand-blue);
}

.nav-menu a.active::after,
.nav-menu a:hover:not(.btn):not(.header-socials a)::after {
    width: 100%;
}

.header-socials {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-left: 1rem;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    padding-left: 1.5rem;
}

.header-socials a {
    color: var(--clr-text-muted);
    transition: color 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
}

.header-socials a:hover {
    color: var(--clr-brand-blue) !important;
    transform: translateY(-2px);
}

/* Mega Menu */
.has-mega {
    position: static;
}

.arrow {
    font-size: 0.6rem;
    vertical-align: middle;
    margin-left: 4px;
    opacity: 0.6;
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--clr-white);
    border-top: 1px solid var(--clr-border);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 3rem 0;
    z-index: 999;
}

.has-mega:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
}

.secondary-mega {
    grid-template-columns: repeat(2, 1fr);
    max-width: 600px;
    margin-left: 15rem;
}

.mega-column h4 {
    font-family: var(--font-heading);
    color: var(--clr-navy);
    font-size: 1rem;
    margin-bottom: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--clr-accent);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.mega-column ul li {
    margin-bottom: 0.6rem;
}

.mega-column ul li a {
    font-size: 0.95rem;
    color: var(--clr-text-muted);
    font-weight: 400;
}

.mega-column ul li a:hover {
    color: var(--clr-accent);
    padding-left: 5px;
}

.mobile-toggle {
    display: none;
}

/* Hero */
.hero {
    padding: 6rem 0 4rem;
    background: radial-gradient(circle at 70% 30%, #f0f4ff 0%, var(--clr-bg) 70%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(46, 111, 185, 0.1) 0%, rgba(46, 111, 185, 0.05) 100%);
    color: var(--clr-brand-blue);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(46, 111, 185, 0.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
}

h1 {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    line-height: 1.2;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--clr-navy);
}

.text-accent {
    color: var(--clr-brand-blue);
    background: linear-gradient(120deg, var(--clr-brand-blue), #518cce, var(--clr-brand-blue));
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 4s linear infinite;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

.hero p {
    font-size: 1.25rem;
    color: var(--clr-text-muted);
    margin-bottom: 2.5rem;
    max-width: 540px;
}

.hero-actions {
    display: flex;
    gap: 1.2rem;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    gap: 3rem;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat strong {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--clr-navy);
    position: relative;
    display: inline-block;
    transition: transform 0.3s ease;
}

.stat:hover strong {
    transform: scale(1.05);
}

.stat strong::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 20px;
    height: 3px;
    background-color: var(--clr-accent);
    border-radius: 2px;
}

.stat span {
    font-size: 0.9rem;
    color: var(--clr-text-muted);
    text-transform: uppercase;
}

.image-box {
    display: none;
    /* Replaced by slider */
}

.slider-container {
    position: relative;
    border-radius: 24px;
    background-color: var(--clr-white);
    padding: 3rem 2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    min-height: 480px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
}

.slide.active {
    opacity: 1;
    pointer-events: auto;
}

.slide img {
    max-height: 300px;
    width: auto;
    object-fit: contain;
    margin-bottom: 2rem;
    transform: translateY(20px);
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide.active img {
    transform: translateY(0);
}

.slide-content h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--clr-navy);
    margin-bottom: 0.5rem;
}

.slide-content p {
    font-size: 0.95rem;
    color: var(--clr-accent);
    margin: 0 auto;
}

.slider-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.8rem;
    z-index: 10;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--clr-border);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background-color: var(--clr-brand-blue);
    width: 25px;
    border-radius: 5px;
}

.nsa-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    height: 50px;
    width: auto;
    opacity: 0.8;
}

/* Application Carousel */
.application-carousel {
    padding: 3rem 0 1rem;
    overflow: hidden;
}

.marquee-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 2rem 0;
}

.marquee-track {
    display: flex;
    gap: 2rem;
    width: max-content;
    animation: scroll-left 40s linear infinite;
}

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

.app-card {
    background: linear-gradient(145deg, #ffffff 0%, #f5f7fa 100%);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 1),
        /* Glass reflection */
        var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 250px;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
}

.app-card:hover {
    transform: translateY(-5px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 1),
        0 15px 30px rgba(0, 0, 0, 0.08);
    /* Softer, larger outer shadow */
    border-color: rgba(46, 111, 185, 0.3);
}

.app-card img {
    height: 150px;
    width: auto;
    object-fit: contain;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.app-card:hover img {
    transform: scale(1.05);
}

.app-card .card-heading {
    font-family: var(--font-heading);
    color: var(--clr-navy);
    font-size: 1.1rem;
    line-height: 1.3;
    margin: 0;
}

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

    100% {
        /* Translate precisely half of the track width (which is the original set of items) minus half the gap difference if any */
        transform: translateX(calc(-50% - 1rem));
    }
}

/* Categories */
.categories {
    padding: 4rem 0 8rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--clr-navy);
}

.categories-grid {
    grid-template-columns: repeat(4, 1fr);
}

.category-card {
    background: linear-gradient(145deg, #ffffff 0%, #f5f7fa 100%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--radius);
    padding: 2.5rem;
    position: relative;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 1),
        var(--shadow);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 1),
        0 15px 30px rgba(0, 0, 0, 0.08);
    border-color: var(--clr-brand-blue);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--clr-brand-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background-color: rgba(46, 111, 185, 0.05);
    transition: all 0.3s ease;
}

.category-card:hover .card-icon {
    background-color: rgba(46, 111, 185, 0.1);
}

.card-icon svg {
    stroke: var(--clr-brand-blue);
    transition: transform 0.3s ease;
}

.category-card:hover .card-icon svg {
    transform: scale(1.1);
}

.category-card h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    color: var(--clr-navy);
}

.category-card p {
    font-size: 0.95rem;
    color: var(--clr-text-muted);
    margin-bottom: 1.5rem;
}

.card-link {
    font-weight: 700;
    color: var(--clr-accent);
    font-size: 0.9rem;
}

/* Featured Banner */
.featured-banner {
    padding: 6rem 0;
    background: linear-gradient(rgba(0, 0, 15, 0.9), rgba(0, 0, 15, 0.9)), url('https://images.unsplash.com/photo-1542744173-8e7e53415bb0?q=80&w=2070&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    color: var(--clr-white);
}

.banner-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.banner-content h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.banner-content p {
    font-size: 1.1rem;
    color: var(--clr-white);
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.banner-content p:last-of-type {
    margin-bottom: 0;
}

/* Footer */
.footer {
    background-color: var(--clr-navy);
    color: var(--clr-white);
    padding: 6rem 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr;
    gap: 4rem;
    padding-bottom: 4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
    height: 50px;
    margin-bottom: 1.5rem;
    filter: brightness(0) invert(1);
}

.footer-brand p {
    font-size: 0.95rem;
    opacity: 0.7;
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--clr-white);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-links a:hover {
    background-color: var(--clr-brand-blue);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(46, 111, 185, 0.4);
}

.footer h4 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.footer-links ul li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    opacity: 0.7;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--clr-accent);
}

.footer-contact p {
    margin-bottom: 1.2rem;
    opacity: 0.8;
}

.footer-contact strong {
    color: var(--clr-white);
    font-weight: 600;
}

.footer-bottom {
    padding: 2rem 0;
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 1024px) {
    h1 {
        font-size: 3rem;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .hero {
        padding: 4rem 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .banner-inner {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
}

/* Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Add delays for grid items */
.categories-grid .category-card:nth-child(1) {
    transition-delay: 0.1s;
}

.categories-grid .category-card:nth-child(2) {
    transition-delay: 0.2s;
}

.categories-grid .category-card:nth-child(3) {
    transition-delay: 0.3s;
}

.categories-grid .category-card:nth-child(4) {
    transition-delay: 0.4s;
}