/**
 * Amount Group Limited — Corporate Design System
 */
:root {
    --agl-navy: #0A2540;
    --agl-navy-light: #123456;
    --agl-gold: #D4AF37;
    --agl-gold-hover: #c19b2e;
    --agl-white: #FFFFFF;
    --agl-bg: #F8F9FB;
    --agl-text: #2D3748;
    --agl-muted: #64748B;
    --agl-border: #E2E8F0;
    --agl-shadow: 0 4px 24px rgba(10, 37, 64, 0.08);
    --agl-shadow-lg: 0 12px 40px rgba(10, 37, 64, 0.12);
    --agl-radius: 12px;
    --agl-radius-lg: 20px;
    --agl-font: 'Inter', 'Poppins', system-ui, sans-serif;
    --agl-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body.agl-corporate {
    font-family: var(--agl-font);
    color: var(--agl-text);
    background: var(--agl-white);
    line-height: 1.65;
}

.agl-section {
    padding: clamp(3.5rem, 6vw, 5.5rem) 0;
}

.agl-section--alt {
    background: var(--agl-bg);
}

.agl-section__eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--agl-gold);
    margin-bottom: 0.75rem;
}

.agl-section__title {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 700;
    color: var(--agl-navy);
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.agl-section__lead {
    font-size: 1.05rem;
    color: var(--agl-muted);
    max-width: 640px;
}

.agl-section__lead--center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.agl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.6rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-decoration: none;
    border: 2px solid transparent;
    transition: var(--agl-transition);
    cursor: pointer;
}

.agl-btn--primary {
    background: var(--agl-navy);
    color: #fff;
    border-color: var(--agl-navy);
}

.agl-btn--primary:hover {
    background: var(--agl-navy-light);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--agl-shadow);
}

.agl-btn--gold {
    background: var(--agl-gold);
    color: var(--agl-navy);
    border-color: var(--agl-gold);
}

.agl-btn--gold:hover {
    background: var(--agl-gold-hover);
    color: var(--agl-navy);
    transform: translateY(-2px);
}

.agl-btn--outline {
    background: transparent;
    color: var(--agl-navy);
    border-color: var(--agl-navy);
}

.agl-btn--outline:hover {
    background: var(--agl-navy);
    color: #fff;
}

.agl-btn--outline-light {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.6);
}

.agl-btn--outline-light:hover {
    background: #fff;
    color: var(--agl-navy);
}

/* Hero */
.agl-hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: #fff;
}

.agl-hero__media {
    position: absolute;
    inset: 0;
}

.agl-hero__slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease;
}

.agl-hero__slide.is-active {
    opacity: 1;
}

.agl-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(10, 37, 64, 0.92) 0%, rgba(10, 37, 64, 0.75) 50%, rgba(10, 37, 64, 0.6) 100%);
}

.agl-hero__content {
    position: relative;
    z-index: 2;
    padding: 8rem 0 5rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.agl-hero__title {
    font-size: clamp(2rem, 5vw, 3.75rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
}

.agl-hero__subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2rem;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}

.agl-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
    justify-content: center;
}

.agl-hero__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    justify-content: center;
}

.agl-hero__stat {
    text-align: center;
}

.agl-hero__stat strong {
    display: block;
    font-size: 1.75rem;
    color: var(--agl-gold);
}

.agl-hero__stat span {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.75;
}

.agl-hero__scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.5rem;
    animation: aglBounce 2s infinite;
}

@keyframes aglBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* Cards */
.agl-card {
    background: #fff;
    border: 1px solid var(--agl-border);
    border-radius: var(--agl-radius);
    box-shadow: var(--agl-shadow);
    overflow: hidden;
    height: 100%;
    transition: var(--agl-transition);
}

.agl-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--agl-shadow-lg);
}

.agl-card__image {
    aspect-ratio: 16/10;
    object-fit: cover;
    width: 100%;
}

.agl-card__body {
    padding: 1.5rem;
}

.agl-card__icon {
    width: 3rem;
    height: 3rem;
    border-radius: 10px;
    background: rgba(212, 175, 55, 0.12);
    color: var(--agl-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 1rem;
}

.agl-card__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--agl-navy);
    margin-bottom: 0.5rem;
}

.agl-card__text {
    color: var(--agl-muted);
    font-size: 0.92rem;
    margin-bottom: 1rem;
}

.agl-card__link {
    color: var(--agl-navy);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
}

.agl-card__link:hover {
    color: var(--agl-gold);
}

/* Featured Projects & Latest News — 3 cards in one row on tablet/desktop */
@media (min-width: 768px) {
    .agl-featured-projects,
    .agl-latest-news {
        display: flex;
        flex-wrap: nowrap;
    }

    .agl-featured-projects > [class*="col-"],
    .agl-latest-news > [class*="col-"] {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

@media (max-width: 767.98px) {
    .agl-featured-projects,
    .agl-latest-news {
        flex-wrap: wrap;
    }
}

/* Why choose grid */
.agl-icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.25rem;
}

.agl-icon-item {
    text-align: center;
    padding: 1.5rem 1rem;
    background: #fff;
    border-radius: var(--agl-radius);
    border: 1px solid var(--agl-border);
    transition: var(--agl-transition);
}

.agl-icon-item:hover {
    border-color: var(--agl-gold);
    transform: translateY(-4px);
    box-shadow: var(--agl-shadow);
}

.agl-icon-item i {
    font-size: 1.75rem;
    color: var(--agl-gold);
    margin-bottom: 0.75rem;
    display: block;
}

.agl-icon-item span {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--agl-navy);
}

/* Stats band */
.agl-stats-band {
    background: var(--agl-navy);
    color: #fff;
    padding: 4rem 0;
}

.agl-stat-counter {
    text-align: center;
}

.agl-stat-counter__value {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--agl-gold);
    line-height: 1;
}

.agl-stat-counter__label {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.8;
}

/* Testimonials */
.agl-testimonial {
    background: #fff;
    border-radius: var(--agl-radius-lg);
    padding: 2rem;
    border: 1px solid var(--agl-border);
    height: 100%;
}

.agl-testimonial__stars {
    color: var(--agl-gold);
    margin-bottom: 1rem;
}

.agl-testimonial__text {
    font-style: italic;
    color: var(--agl-muted);
    margin-bottom: 1.25rem;
}

.agl-testimonial__author strong {
    color: var(--agl-navy);
    display: block;
}

.agl-testimonial__author span {
    font-size: 0.85rem;
    color: var(--agl-muted);
}

/* Partners marquee slider — single row, scroll left */
.agl-section--partners {
    overflow: hidden;
}

.agl-partners-wrap {
    width: 100%;
    overflow: hidden;
    padding: 0.5rem 0 1rem;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
}

.agl-partners-track {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 1.5rem;
    width: max-content;
    min-width: 100%;
    animation: aglPartnerScrollLeft 40s linear infinite;
    will-change: transform;
}

.agl-partners-wrap:hover .agl-partners-track {
    animation-play-state: paused;
}

@keyframes aglPartnerScrollLeft {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
    .agl-partners-wrap {
        -webkit-mask-image: none;
        mask-image: none;
        overflow-x: auto;
    }

    .agl-partners-track {
        animation: none;
        justify-content: flex-start;
        padding: 0 1rem;
    }
}

.agl-partner-logo {
    width: 180px;
    height: 100px;
    background: #fff;
    border: 1px solid var(--agl-border);
    border-radius: var(--agl-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem;
    flex-shrink: 0;
    box-sizing: border-box;
    overflow: hidden;
}

.agl-partner-logo img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.agl-partner-logo a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    transition: opacity var(--agl-transition);
}

.agl-partner-logo a:hover {
    opacity: 0.85;
}

.agl-partner-logo span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--agl-navy);
    text-align: center;
    line-height: 1.2;
    padding: 0 0.25rem;
}

/* CSR */
.agl-csr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

.agl-csr-item {
    padding: 1.75rem;
    background: #fff;
    border-radius: var(--agl-radius);
    border-left: 4px solid var(--agl-gold);
    box-shadow: var(--agl-shadow);
}

.agl-csr-item h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--agl-navy);
    margin-bottom: 0.5rem;
}

/* CTA banner */
.agl-cta-banner {
    background: linear-gradient(135deg, var(--agl-navy) 0%, var(--agl-navy-light) 100%);
    color: #fff;
    border-radius: var(--agl-radius-lg);
    padding: clamp(2.5rem, 5vw, 4rem);
    text-align: center;
}

/* Reveal animation */
.agl-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.agl-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Back to top */
.agl-back-top {
    position: fixed;
    bottom: 5.5rem;
    right: 1.25rem;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: var(--agl-navy);
    color: #fff;
    border: none;
    box-shadow: var(--agl-shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--agl-transition);
    z-index: 1030;
    cursor: pointer;
}

.agl-back-top.is-visible {
    opacity: 1;
    visibility: visible;
}

.agl-back-top:hover {
    background: var(--agl-gold);
    color: var(--agl-navy);
}

/* Sticky header enhancement */
.site-header.is-sticky {
    position: sticky;
    top: 0;
    z-index: 1040;
    box-shadow: 0 2px 20px rgba(10, 37, 64, 0.1);
}

/* Page hero for inner pages */
.agl-page-hero {
    background: var(--agl-navy);
    color: #fff;
    padding: clamp(4rem, 8vw, 6rem) 0 clamp(2.5rem, 5vw, 4rem);
}

.agl-page-hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.agl-breadcrumb {
    font-size: 0.85rem;
    opacity: 0.75;
}

.agl-breadcrumb a {
    color: var(--agl-gold);
    text-decoration: none;
}

@media (max-width: 767.98px) {
    .agl-hero__content {
        padding-top: 6rem;
    }

    .agl-hero__stats {
        gap: 1.25rem;
    }

    .agl-hero__actions {
        flex-direction: column;
        align-items: center;
    }

    .agl-hero__actions .agl-btn {
        width: min(100%, 320px);
    }
}

/* Login / register pages — space below sticky header */
.agl-auth-page {
    padding-top: clamp(3rem, 8vh, 5rem);
    padding-bottom: 3rem;
    min-height: calc(100vh - 12rem);
}

/* News article gallery — CSS grid (fixes mobile stretch bug) */
.agl-news-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.4rem;
    width: 100%;
}

@media (min-width: 768px) {
    .agl-news-gallery-grid {
        gap: 1rem;
    }
}

.agl-news-gallery__hint {
    margin-top: -0.25rem;
}

.agl-news-related {
    border-top: 1px solid var(--agl-border, #E2E8F0);
}

.agl-news-related__link {
    display: block;
    padding: 1rem 1.15rem;
    border: 1px solid var(--agl-border, #E2E8F0);
    border-radius: var(--agl-radius, 12px);
    color: var(--agl-navy, #0A2540);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    min-height: 100%;
    transition: border-color var(--agl-transition, 0.25s ease), box-shadow var(--agl-transition, 0.25s ease);
}

.agl-news-related__link:hover {
    border-color: var(--agl-gold, #D4AF37);
    box-shadow: var(--agl-shadow, 0 4px 24px rgba(10, 37, 64, 0.08));
    color: var(--agl-navy, #0A2540);
}

.agl-news-article {
    font-size: 1.05rem;
    line-height: 1.75;
    color: #334155;
}

.agl-news-gallery__item {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    cursor: zoom-in;
    -webkit-tap-highlight-color: transparent;
    text-align: left;
}

.agl-news-gallery__item:hover .agl-news-gallery__frame,
.agl-news-gallery__item:focus-visible .agl-news-gallery__frame {
    box-shadow: var(--agl-shadow-lg, 0 12px 40px rgba(10, 37, 64, 0.12));
    outline: 2px solid var(--agl-gold, #D4AF37);
    outline-offset: 1px;
}

.agl-news-gallery__frame {
    display: block;
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #f1f5f9;
}

@media (min-width: 768px) {
    .agl-news-gallery__frame {
        padding-bottom: 75%;
        border-radius: var(--agl-radius, 12px);
    }
}

.agl-news-gallery__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    background: #f1f5f9;
}

@media (min-width: 768px) {
    .agl-news-gallery__img {
        object-fit: cover;
    }
}

@media (max-width: 767.98px) {
    .agl-news-show {
        padding-top: 1.5rem;
        padding-bottom: 2.5rem;
    }

    .agl-news-show .container {
        padding-left: 0.65rem;
        padding-right: 0.65rem;
    }

    .agl-news-gallery__zoom {
        width: 1.35rem;
        height: 1.35rem;
        font-size: 0.68rem;
        right: 0.25rem;
        bottom: 0.25rem;
    }

    .agl-page-hero {
        padding: 4.75rem 0 1.25rem;
    }

    .agl-page-hero h1 {
        font-size: 1.2rem;
        line-height: 1.35;
        margin-bottom: 0.5rem;
    }

    .agl-page-hero .agl-breadcrumb {
        font-size: 0.72rem;
        margin-bottom: 0.5rem !important;
        line-height: 1.4;
    }

    .agl-page-hero p {
        font-size: 0.82rem;
    }

    .agl-news-article {
        font-size: 0.98rem;
        line-height: 1.65;
    }

    .agl-lightbox {
        padding: 0.75rem;
    }

    .agl-lightbox__close {
        top: 0.5rem;
        right: 0.5rem;
    }

    .agl-lightbox__prev {
        left: 0.25rem;
    }

    .agl-lightbox__next {
        right: 0.25rem;
    }

    .agl-lightbox__img {
        max-height: calc(100vh - 4rem);
    }
}

.agl-news-gallery__zoom {
    position: absolute;
    right: 0.65rem;
    bottom: 0.65rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: rgba(10, 37, 64, 0.72);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    pointer-events: none;
}

/* Full-screen image lightbox */
body.agl-lightbox-open {
    overflow: hidden;
}

.agl-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(10, 37, 64, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.agl-lightbox[hidden] {
    display: none !important;
}

.agl-lightbox__figure {
    margin: 0;
    max-width: min(1200px, 96vw);
    max-height: 90vh;
    text-align: center;
}

.agl-lightbox__img {
    max-width: 100%;
    max-height: calc(90vh - 2rem);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.agl-lightbox__caption {
    color: rgba(255, 255, 255, 0.85);
    margin-top: 0.75rem;
    font-size: 0.9rem;
}

.agl-lightbox__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.75rem;
    height: 2.75rem;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
}

.agl-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.28);
}

.agl-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2.75rem;
    height: 2.75rem;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.35rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.agl-lightbox__nav:hover {
    background: rgba(255, 255, 255, 0.28);
}

.agl-lightbox__prev {
    left: 1rem;
}

.agl-lightbox__next {
    right: 1rem;
}

@media (max-width: 767.98px) {
    .agl-lightbox__prev {
        left: 0.35rem;
    }

    .agl-lightbox__next {
        right: 0.35rem;
    }
}
