/* Reset and Base Styles */
:root {

    /* Colours */
    --primary-colour: #c6a75e;
    --secondary-colour: #1f5c4b;
    --dark-colour: #2e2e2e;
    --light-colour: #f6f6f4;
    --background-colour: #f9f9f9;
    --alt-background-colour: #d2d2d2;
    --text-color-light: #f6f6f4;
    --text-color-dark: #2e2e2e;
    --text-color-faint: #bdc3c7;

    /* Images */
    --hero-background: url(./Images/herobg.svg) no-repeat center center/cover;
    --chainLarge-background: url(./Images/chainLargebg.svg) no-repeat center center/cover;
    --chainLarge-background-dark: url(./Images/chainLargebg-dark.svg) no-repeat center center/cover;
}

html {
    /* scroll-behavior: smooth; */
    overscroll-behavior: contain
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color-dark);
    background-color: var(--background-colour);
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Buttons */
.button-main {
    background-color: var(--primary-colour);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.button-main:hover {
    background-color: var(--primary-colour);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.button-alt {
    background-color: transparent;
    color: var(--primary-colour);
    border: 2px solid var(--primary-colour);
    padding: 10px 28px;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.button-alt:hover {
    background-color: var(--primary-colour);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Navbar */
.navbar {
    background-color: var(--secondary-colour);
    position: fixed; /* Changed from relative */
    top: 0;
    width: 100%;    /* Ensure it spans full width */
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease; /* Smooth slide in/out */
}

.navbar--hidden {
    transform: translateY(-100%);
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-logo img {
    height: 60px; /* Adjusted for a sleeker fixed nav */
    display: block;
}

.navbar-logo {
    display: flex;
    align-items: center;
}

.navbar-logo a {
    height: 40px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    background: none;
    border: none;
    gap: 5px;
    padding: 0.5rem;
}

.hamburger span {
    background-color: var(--primary-colour) !important;
    width: 25px;
    height: 3px;
    background-color: #ecf0f1;
    border-radius: 3px;
    transition: 0.3s ease;
}

.hamburger:hover span {
    background-color: var(--light-colour) !important;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Navbar - Mobile changes */
@media (max-width: 768px) {
    .navbar-container {
        height: 9vh;
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 1rem 2rem;
    }

    .navbar-logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        font-size: 1.3rem;
    }

    .hamburger {
        display: flex;
        position: absolute;
        right: 2rem;
    }

    .nav-menu {
        position: absolute;
        left: -100%;
        top: 100%;
        flex-direction: column;
        background-color: var(--secondary-colour);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        gap: 0;
        margin-top: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        font-size: 1.1rem;
        padding: 1rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
}

.nav-link {
    color: var(--light-colour);
    text-decoration: none;
    transition: color 0.3s ease;
}

/* Active page styling */
.nav-link.active-page {
    color: var(--primary-colour);
    font-weight: bold;
    border-bottom: 2px solid var(--primary-colour);
}

/* Hover effect for desktop */
.navbar a:hover {
    color: var(--primary-colour);
}


/* Hero Section */
.hero {
    background: var(--hero-background);
    color: white;
    height: 80vh;
    text-align: center;
}

#hero {
    background: var(--hero-background);
    color: white;
    height: 100vh;
    text-align: center;
}

.hero-content {
    position: relative;
    top: 50%;
    transform: translateY(-50%);
    padding: 0 2rem;
    padding-top: 80px; /* Offset for the fixed navbar */
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
}

/* Hero Button Controls */
#cta-button {
    background-color: var(--primary-colour);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#cta-button:hover {
    background-color: var(--primary-colour);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Linked Down Arrow */
.down-arrow{
    position: absolute;
    bottom: 30px; /* Sits above the bottom edge */
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    cursor: pointer;
    text-decoration: none;
    animation: bounce 2s infinite;
}

@media (max-width: 768px) {
    #cta-button-secondary {
        display: none;
    }
}


/* Sections */
.section {
    padding: 60px 2rem;
    background-color: var(--background-colour);
}

/* Index Page Sections */
.index-section {
    padding: 60px 2rem;
    background-color: var(--background-colour);
    margin-bottom: 2rem;
}

.index-section h2{
    font-size: 3rem;
    color: var(--secondary-colour);
    text-align: center;

}

.section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--secondary-colour);
    text-align: center;
}

.section p {
    font-size: 1.1rem;
    color: var(--primary-colour);
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-divider {
    width: 100%;
    height: 80px; 
    background-color: var(--background-colour);
    
    /* The arrow shape */
    clip-path: polygon(0 0, 100% 0, 50% 80%);
    
    /* The Magic Move: Pull the next section UP to meet this one */
    margin-bottom: -79px; 
    
    position: relative;
    z-index: 100;
}

/* Index Page */
#aboutus {
    background: var(--chainLarge-background);
    padding: 2% 25%;
    color: var(--light-colour);
    text-align: justify;
}

#aboutus h2{
    color: var(--primary-colour);
}

#services {
    padding: 1rem;
    padding-bottom: 2rem;
    height: 100vh;
}

#contact {
    background: var(--chainLarge-background);
    color: var(--light-colour);
    text-align: justify;
}

/* View More Link */
.view-more {
    display: inline-block;
    margin-top: 1.5rem;
    color: var(--dark-colour);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.view-more:hover {
    color: var(--primary-colour);
}

/* Footer */
.footer {
    background-color: var(--secondary-colour);
    color: white;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.footer-elements {
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-elements a:hover{
    color: var(--primary-colour);
}

.footer-container {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-container p{
    text-align: center;
}

.divider {
    width: 1px;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.2);
    display: block;
}

.footer-container h3 {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.3s ease;
    text-align: center;
}

.footer-links a:hover {
    color: var(--primary-colour);
}

#footer-socials {
    text-align: center;
    font-size: 1.2rem;
    display: inline-block;
    gap: 1rem;
    justify-content: center;
}

#copyright {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #bdc3c7;
    text-align: center;
}

#copyright-divider {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

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

    .footer-elements {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }

    .divider {
        width: 80%;
        height: 1px;
        margin: 1.5rem auto;
    }

    #copyright-divider {
        display: block;
    }
}

@media (max-width: 480px) {
    .navbar-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .hero-content h1 {
        font-size: 1.5rem;
    }

    .section {
        padding: 40px 1rem;
    }
}

/* Services Grid */
.services-grid {
    column-count: 3; 
    column-gap: 2rem;
    display: block; /* Overrides any previous grid display */
    width: 100%;
}

.service-card {
    display: inline-block; 
    background-color: var(--light-colour);
    width: 100%;
    margin-bottom: 2rem;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.service-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-colour);
}

.service-card p{
    text-align: justify;
}

@media (max-width: 992px) { /* Triggering earlier for tablet */
    .services-grid {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: 300px;
        column-count: auto; /* Disables masonry */
        gap: 15px;
        
        overflow-x: auto;
        overscroll-behavior-x: contain;
        padding-bottom: 20px; /* Space for the scrollbar */
        
        /* Optional: Smooth snapping as you scroll */
        scroll-snap-type: x mandatory;
    }

    .service-card {
        width: 300px;
        margin-bottom: 0;
        scroll-snap-align: start;
    }

    #services {
        height: auto;
    }

}

/* Horizontal Scrolling Grid */
@media (max-width: 768px) {

    #aboutus {
        padding: 2rem 2.5rem;
    }
}

/*  SERVICES PROCESS AND PROGRESS BAR  */

.process-header {
    text-align: center;
    font-size: 4rem;
    font-weight: bold; /* Bold text makes the shine more visible */
    
    /* Create a gradient background with a "shine" in the middle */
    background: linear-gradient(
        to right, 
        var(--primary-colour) 20%, 
        #ffffff 50%, 
        var(--primary-colour) 80%
    );
    
    /* Scale the background up so the shine starts off-screen */
    background-size: 200% auto;
    
    /* Clip the background to the text and make the text transparent */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    
    /* Run the animation */
    animation: shine 3s linear infinite;
}

/* Process Section */
.process-wrapper {
    background-color: #1e1e1e; 
    padding-top: 120px; /* Space for the arrow above */
    position: relative;
    z-index: 1;
}

/* The sticky window that holds the process items and progress bar */
.process-sticky-window {
    position: sticky; /* Sticks to the viewport as you scroll through the wrapper */
    top: 0;
    height: 100vh;
    display: grid;
    place-items: center;
    overflow: hidden;
}

/* The vertical progress bar on the left side of the sticky window */
.progress-container {
    position: absolute;
    left: 10%;
    top: 25%;
    height: 50%; 
    width: 4px;
    background: var(--dark-colour);
    border-radius: 10px;
    z-index: 10;
}

.progress-bar-fill {
    position: absolute; /* Positioned at the bottom of the container and grows upwards */
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: var(--primary-colour);
    border-radius: 10px;
    transition: height 0.1s linear; /* Smoothly grows as you scroll */
}

.progress-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background: #fff;
    border: 2px solid var(--primary-colour);
    border-radius: 50%;
    z-index: 11;
}


/* Each process item is stacked on top of each other in the same grid area, but only the active one is visible */
.process-item {
    grid-area: 1 / 1;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    text-align: center;
    max-width: 600px;
    color: white;
    pointer-events: none; /* Prevents hidden items from blocking clicks */
}

.process-item h3{
    font-size: 3rem;
    color: var(--primary-colour);
}

.process-item.active {
    opacity: 1;
    transform: translateY(0);
    z-index: 2;
    pointer-events: all;
}

.content p{
    font-size: -20%;
    text-align: justify;
    color: var(--light-colour);
    font-style: italic;
}

.content ul{
    padding-top: 50px;
    text-align: left;
    list-style-type: none;
}

/* --- Desktop Logic --- */
@media (min-width: 769px) {
    .process-wrapper {
        height: 700vh;
        position: relative;
    }

    .process-sticky-window {
        position: sticky;
        top: 0;
        height: 100vh;
        display: grid;
        place-items: center;
        overflow: hidden;
    }

    .process-item {
        grid-area: 1 / 1;
        opacity: 0;
        transform: translateY(30px);
    }
}

/* --- Mobile Logic --- */
@media (max-width: 768px) {
    .process-header {
        padding: 1rem 0 0;
        font-size: 30px;
    }

    .process-wrapper {
        height: auto; /* Remove the extra scroll height */
        padding: 50px 20px;
    }

    .process-sticky-window {
        position: relative; /* Unstick it */
        height: auto;
        display: block; /* Stack items vertically */
    }

    .process-item {
        opacity: 1; /* Make everything visible */
        transform: none;
        margin-bottom: 60px; /* Space between steps */
        text-align: left;
    }

    .progress-container {
        display: none; /* Hide the progress bar on mobile to save space */
    }

    .process-item .content ul {
        display: block; /* Align lists normally */
    }

    .step-num {
        align-self: center;
    }
    
    .process-item h3 {
        font-size: 2rem;
    }

    .content p {
        font-size: 1rem;
    }

    .content ul {
        padding-top: 20px;
    }

    /* Scroll Hint for Desktop */
    .scroll-hint {
        margin-top: 30px;
        opacity: 0.6;
        font-size: 0.8rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    /* Simple mouse icon with a scrolling dot animation */
    .mouse {
        width: 20px;
        height: 30px;
        border: 2px solid white;
        border-radius: 10px;
        position: relative;
        margin-bottom: 10px;
    }

    /* The dot inside the mouse that animates to indicate scrolling */
    .mouse::before {
        content: "";
        width: 4px;
        height: 4px;
        background: white;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        top: 6px;
        border-radius: 50%;
        animation: scroll-dot 2s infinite;
    }

    /* Animation for the scrolling dot */
    @keyframes scroll-dot {
        0% { opacity: 0; top: 6px; }
        50% { opacity: 1; }
        100% { opacity: 0; top: 15px; }
    }
}

#problem {
    background: var(--chainLarge-background);
    padding: 2rem 0;
}

#problem .container {
    display: inline-flex;
    align-items: center;
    justify-content: space-evenly;
}

#problem h2 {
    font-size: 2.5rem;
    color: var(--primary-colour);
    text-align: right;
    width: 35%;
}

#problem p {
    color: var(--text-color-light);
    font-size: 1.1rem;
    text-align: left;
    width: 55%;
}

@media (max-width: 768px){
    #problem .container {
        flex-direction: column;
        align-items: center;
        padding: 0 1rem;
    }

    #problem h2 {
        width: 100%;
        font-size: 1.8rem;
        text-align: center;
    }

    #problem p {
        width: 100%;
        font-size: 1rem;
    }
}
#stat-block {
    background: var(--secondary-colour);
    color: var(--text-color-light);
    padding: 2rem 0;
}

.stats-grid {
    display: flex;
    column-count: 4;
    column-gap: 0;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.stats-card {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    width: 25%;
}

.statistic {
    font-size: 2.5rem;
    color: var(--primary-colour);
    font-weight: bold;
}

@media (max-width: 768px) {
    .stats-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stats-card {
        width: 100%;
    }
}


/* Form */

#contact {
    margin-bottom: 0;
}

#contact h2 {
    color: var(--primary-colour);
    text-align: center;
}

#contact p {
    text-align: center;
    color: var(--light-colour);
    padding-bottom: 20px;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 1rem;
}

#form-information{
    display: flex;
    align-content: center;
    flex-direction: row;
    gap: 1rem;
}

.form-element {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.5rem 0;
}

input, textarea{
    font: inherit;
    padding: 0.75rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
}

textarea {
    resize: vertical;
}

input::placeholder, textarea::placeholder {
    color: var(--text-color-faint);
    font-family: 'Montserrat', Verdana, sans-serif;
}

.form-element label {
    color: var(--light-colour);
    font-size: 1rem;
    display: inline-block;
}

@media (max-width: 768px) {
    #form-information {
        flex-direction: column;
    }
}

.required {
    color: var(--primary-colour);
    margin-left: 2px;
    display: inline-block;
}

/* Contact Page */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.info-item {
    background-color: var(--dark-colour);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.info-item h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-colour);
}

.info-item p {
    font-size: 1rem;
    color: var(--light-colour);
}

#contact-page-form {
    padding: 2rem;
}

#contact-page-form h2 {
    color: var(--primary-colour);
    text-align: center;
    margin-bottom: 1rem;
}

#contact-page-form p {
    text-align: center;
    color: var(--text-color-faint);
    font-size: 0.9rem;
}

/* About Page */
#mission {
    background: var(--chainLarge-background-dark);
    color: var(--light-colour);
    display: block;
    flex-direction: row;
    align-items: space-between;
    padding: 2rem 10%;
}

#mission .container {
    display: flex;
    gap: 2rem;
    align-items: center;
}

#mission h2 {
    font-size: 60px;
    width: 35%;
    color: var(--primary-colour);
    text-align: right;
}

#mission p {
    width: 55%;
    color: var(--light-colour);
    text-align: left;
}

@media (max-width: 768px) {
    #mission .container {
        flex-direction: column;
        align-items: center;
    }

    #mission p {
        width: 100%;
        font-size: 1rem;
    }

    #mission h2 {
        width: 100%;
        font-size: 2.5rem;
        text-align: center;
        margin-bottom: 0;
    
    /* Create a gradient background with a "shine" in the middle */
    background: linear-gradient(
        to right, 
        var(--primary-colour) 20%, 
        #ffffff 50%, 
        var(--primary-colour) 80%
    );
    
    /* Scale the background up so the shine starts off-screen */
    background-size: 200% auto;
    
    /* Clip the background to the text and make the text transparent */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    
    /* Run the animation */
    animation: shine 3s linear infinite;
}
}

/* ============================================
   TEAM GRID COMPONENT
   ============================================ */

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 2.5rem auto 0;
    padding: 0 2rem;
}

/* --- Team Card --- */
.team-member {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 16 / 9;
    background-color: var(--dark-colour);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);

    /* Hover expand transition */
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.35s ease,
                z-index 0s;
    z-index: 1;
}

.team-member:hover {
    transform: scale(1.06);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

/* --- Static Photo (shown by default) --- */
.team-member .team-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease;
}

/* --- GIF layer (revealed on hover) --- */
.team-member .team-gif {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.team-member:hover .team-photo {
    opacity: 0;
}

.team-member:hover .team-gif {
    opacity: 1;
}

/* --- Gradient overlay so text is always readable --- */
.team-member .team-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.72) 0%,
        rgba(0, 0, 0, 0.15) 50%,
        transparent 100%
    );
    z-index: 2;
}

/* --- Text positioned bottom-left --- */
.team-member .team-info {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 1rem 1.1rem;
    z-index: 3;
    transform: translateY(4px);
    transition: transform 0.35s ease;
}

.team-member:hover .team-info {
    transform: translateY(0);
}

.team-member .team-info h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.2rem;
    line-height: 1.2;
    letter-spacing: 0.03em;
}

.team-member .team-info p {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--primary-colour);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-align: left;
}

/* --- Hover hint icon --- */
.team-member .team-expand-hint {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(198, 167, 94, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 3;
    font-size: 0.7rem;
    color: #fff;
}

.team-member:hover .team-expand-hint {
    opacity: 1;
}


/* ============================================
   TEAM MODAL / POPUP
   ============================================ */

.team-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(30, 30, 30, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.team-modal-backdrop.active {
    opacity: 1;
    pointer-events: all;
}

.team-modal {
    background: #ffffff;
    border-radius: 16px;
    max-width: 680px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.3);
    transform: translateY(24px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.team-modal-backdrop.active .team-modal {
    transform: translateY(0) scale(1);
}

/* Banner image at top of modal (16:9) */
.team-modal-banner {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

/* Modal body */
.team-modal-body {
    padding: 1.75rem 2rem 2rem;
    overflow-y: auto;
}

/* Close button */
.team-modal-close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    z-index: 10;
    transition: background 0.2s ease, transform 0.2s ease;
}

.team-modal-close:hover {
    background: var(--primary-colour);
    transform: rotate(90deg);
}

/* Modal header */
.team-modal-header {
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--alt-background-colour);
    padding-bottom: 1rem;
}

.team-modal-header h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--secondary-colour);
    margin: 0 0 0.25rem;
}

.team-modal-role {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary-colour);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Bio */
.team-modal-bio {
    font-size: 0.97rem;
    color: var(--text-color-dark);
    line-height: 1.75;
    margin-bottom: 1.5rem;
}

/* Recent successes */
.team-modal-successes h4 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--secondary-colour);
    margin-bottom: 0.75rem;
}

.team-modal-successes ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.team-modal-successes ul li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.92rem;
    color: var(--text-color-dark);
    line-height: 1.5;
}

.team-modal-successes ul li::before {
    content: '';
    display: block;
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-colour);
    margin-top: 0.45rem;
}


/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .team-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .team-grid {
        grid-template-columns: 1fr;
    }

    .team-modal-body {
        padding: 1.25rem 1.25rem 1.5rem;
    }

    .team-modal-header h3 {
        font-size: 1.3rem;
    }
}


/* Special Elements */

/* Define the movement of the background */
@keyframes shine {
    to {
        background-position: 200% center;
    }
}