/* --- About Page Banner --- */
.page-banner {
    position: relative;
    height: 40vh;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('https://images.unsplash.com/photo-1571019614242-c5c5dee9f50b?q=80&w=2070&auto=format&fit=crop') no-repeat center center/cover;
    margin-top: 70px;
    /* Offset for fixed navbar */
}

.page-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 18, 18, 0.8);
}

.banner-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.banner-content h1 {
    font-size: 3.5rem;
    color: var(--text-light);
    letter-spacing: 2px;
}

/* --- Our Story Section --- */
.story-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.story-text h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.story-text h2 span {
    color: var(--accent-primary);
}

.story-text p {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

/* Designed image frame for Our Story */
.story-image-wrap {
    position: relative;
    padding: 20px;
}

.story-image-frame {
    position: relative;
    border: 4px solid var(--accent-primary);
    border-radius: 10px;
    padding-top: 100%;
    /* 1:1 Aspect Ratio */
}

.story-img-inner {
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 120%;
    /* Makes image pop out of the top frame */
    object-fit: cover;
    object-position: top;
    z-index: 2;
    transition: transform 0.5s ease;
}

.story-image-wrap:hover .story-img-inner {
    transform: scale(1.05) translateY(-5%);
}

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

    .story-image-wrap {
        order: -1;
        margin-bottom: 40px;
    }

    .story-img-inner {
        height: 110%;
    }
}

/* --- Dynamic Team / Trainers Section Gallery --- */
.team-gallery-container {
    position: relative;
    width: 100%;
    height: 600px;
    margin: 40px auto 0 auto;
    overflow: hidden;
    background: #000;
}

/* The continuous jagged accent line across the background of panels */
.unified-overlay-line {
    position: absolute;
    top: 60%;
    left: -10%;
    width: 120%;
    height: 15px;
    background-color: var(--accent-secondary);
    transform: rotate(-5deg);
    z-index: 1;
    opacity: 0.8;
}

.team-panels {
    display: flex;
    height: 100%;
    width: 100%;
}

.team-panel {
    flex: 1;
    height: 100%;
    position: relative;
    transition: flex 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: pointer;
    overflow: hidden;
    /* Creating the slanted, shattered glass effect */
    clip-path: polygon(15% 0, 100% 0, 85% 100%, 0 100%);
    margin-left: -5%;
    z-index: 2;
}

.team-panel:first-child {
    clip-path: polygon(0 0, 100% 0, 85% 100%, 0 100%);
    margin-left: 0;
}

.team-panel:last-child {
    clip-path: polygon(15% 0, 100% 0, 100% 100%, 0 100%);
}

.team-panel:hover {
    flex: 1.5;
    z-index: 3;
}

.panel-img {
    width: 150%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transform: translateX(-15%);
    /* Compensating for the overflow width */
    filter: grayscale(100%) contrast(1.1) brightness(0.8);
    transition: filter 0.6s ease, transform 6s linear;
}

.team-panel:hover .panel-img,
.team-panel.active .panel-img {
    filter: grayscale(0%) contrast(1) brightness(1);
}

/* Unified color overlay element per panel */
.panel-color-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(255, 87, 34, 0.9) 0%, rgba(255, 87, 34, 0) 100%);
    opacity: 0.6;
    transition: opacity 0.4s ease;
    mix-blend-mode: multiply;
}

.team-panel:hover .panel-color-overlay {
    opacity: 0.9;
}

/* Text Content Area */
.panel-content {
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: 80%;
    z-index: 3;
    opacity: 0.8;
    transition: all 0.4s ease;
}

.team-panel:hover .panel-content {
    opacity: 1;
    bottom: 22%;
}

.trainer-name {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
}

.trainer-spec {
    font-size: 0.9rem;
    color: #fff;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: var(--bg-dark);
    display: inline-block;
    padding: 3px 10px;
    border-radius: 3px;
    border: 1px solid var(--accent-primary);
}

.bg-text {
    position: absolute;
    top: 20px;
    right: 20px;
    font-family: 'Oswald', sans-serif;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.1);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    z-index: 2;
    pointer-events: none;
}

/* --- Mobile View Adjustments --- */
@media (max-width: 768px) {
    .team-gallery-container {
        height: auto;
        background: transparent;
    }

    .unified-overlay-line {
        display: none;
    }

    .team-panels {
        flex-direction: column;
        gap: 20px;
    }

    .team-panel {
        clip-path: none !important;
        margin-left: 0 !important;
        height: 400px;
        flex: none;
        border-radius: 10px;
    }

    .team-panel:hover {
        flex: none;
        /* Disable flex growth on mobile */
    }

    .panel-img {
        width: 100%;
        transform: none;
    }

    .panel-color-overlay {
        height: 100%;
        background: linear-gradient(to top, rgba(18, 18, 18, 1) 0%, rgba(18, 18, 18, 0) 50%);
        opacity: 0.8;
    }

    /* Reveal text permanently on mobile */
    .panel-content {
        bottom: 20px !important;
        opacity: 1;
        opacity: 1 !important;
    }

    .trainer-name {
        font-size: 1.8rem;
    }
}