/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-bg: #000000;
    --color-text: #FFFFFF;
    --color-red: #FF0000;
    --color-blue: #007BFF;
    /* New Blue Accent */
    --color-gray: #333333;

    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

/* Gradient Text Utility */
.text-gradient {
    background: linear-gradient(90deg, var(--color-blue), var(--color-red));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    text-transform: uppercase;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    MAX-WIDTH: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.text-red {
    color: var(--color-red);
}

.text-center {
    text-align: center;
}

.btn-red {
    display: inline-block;
    background: linear-gradient(90deg, var(--color-red), #b00000);
    /* Detailed Red Gradient */
    color: white;
    padding: 10px 20px;
    border: none;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.btn-red:hover {
    background: linear-gradient(90deg, var(--color-blue), #0056b3);
    /* Blue on hover! */
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.4);
}

/* Header */
.header {
    padding: 20px 0;
    position: absolute;
    width: 100%;
    z-index: 100;
    top: 0;
    left: 0;
}

.header-container {
    display: flex;
    flex-direction: column;
    /* Stack vertically */
    justify-content: center;
    align-items: flex-start;
    /* Align to left */
    gap: 5px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.highlight {
    color: #fff;
    font-weight: 700;
    /* Match logo weight */
}

.logo:first-child {
    color: var(--color-red);
}

.location-tag {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: #ccc;
    margin-left: 2px;
    /* Slight offset to align with text */
}

/* Navigation */
.desktop-nav {
    display: flex;
    gap: 30px;
    margin-top: 15px;
    align-items: center;
}

.desktop-nav a {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 500;
    transition: color 0.3s;
    text-transform: uppercase;
}

.desktop-nav a:hover,
.desktop-nav a.active {
    color: var(--color-red);
}

.desktop-nav .btn-join {
    background: var(--color-red);
    padding: 8px 20px;
    border-radius: 4px;
    font-weight: bold;
}

.desktop-nav .btn-join:hover {
    background: var(--color-blue);
    color: white;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 30px;
    z-index: 1001;
}

.mobile-menu-btn span {
    width: 30px;
    height: 3px;
    background-color: white;
    transition: all 0.3s;
}

/* Mobile Menu Overlay */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    transform: translateY(-100%);
    transition: transform 0.4s ease-in-out;
}

.mobile-menu.active {
    transform: translateY(0);
}

.mobile-menu a {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: white;
}

.mobile-menu a:hover {
    color: var(--color-red);
}

/* Hero Section */
.hero {
    position: relative;
    height: 80vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: #111;
    /* Desktop Gradient Theme */
    background: radial-gradient(circle at top right, rgba(0, 123, 255, 0.1), transparent 50%),
        radial-gradient(circle at bottom left, rgba(255, 0, 0, 0.1), transparent 50%),
        #111;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    /* Only darken the left side for text readability */
    height: 100%;
    background: linear-gradient(90deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    width: 100%;
    padding-top: 60px;
}

.hero-title {
    font-size: 5rem;
    line-height: 0.9;
    font-weight: 700;
    max-width: 50%;
}

.hero-title span {
    background: -webkit-linear-gradient(90deg, #FF0000, #007BFF);
    background: linear-gradient(90deg, #FF0000, #007BFF);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    /* Fallback if clip fails, though transparent overrides it. */
    -webkit-text-fill-color: transparent;
    text-shadow: 0px 0px 0px rgba(255, 255, 255, 0);
    /* Remove shadow if any interfering */
    font-weight: 800;
    /* Make it thicker/stronger */
}

/* Background images (omitted for brevity, assume unchanged) */
.hero-images {
    position: absolute;
    top: 0;
    right: 0;
    width: 55%;
    height: 100%;
    z-index: 1;
    display: flex;
    clip-path: polygon(15% 0, 100% 0, 100% 100%, 0% 100%);
    z-index: 5;
    /* Boost visibility */
}

.hero-img-box {
    flex: 1;
    height: 100%;
    background-size: cover;
    background-position: center;
    border-left: 2px solid white;
}

/* Image Boxes with Fallback */
.img-1 {
    background-color: #222;
    background-image: url('hero-judo.jpg');
}

.img-2 {
    background-color: #333;
    background-image: url('hero-swim.jpg');
}

.img-3 {
    background-color: #444;
    background-image: url('hero-boxing.webp');
}


/* Values Section */
.values {
    padding: 80px 20px;
    background-color: black;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 20px;
    line-height: 1;
    color: white;
    /* Ensure white base */
}

/* Highlight specific words in titles cleanly if possible, or just keep white for values */

.section-desc {
    max-width: 800px;
    margin: 0 auto 40px;
    font-size: 1.1rem;
    color: #ddd;
}

.buttons-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}


/* What We Teach */
.what-we-teach {
    padding: 80px 0;
    background-color: #050505;
}

.teach-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
}

.large-title {
    font-size: 5rem;
    line-height: 0.85;
    color: white;
    /* Reset to white */
    margin-bottom: 20px;
}

.large-title span {
    background: -webkit-linear-gradient(135deg, #FF0000 30%, #007BFF 100%);
    background: linear-gradient(135deg, #FF0000 30%, #007BFF 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.teach-intro {
    font-size: 1.1rem;
    color: #ccc;
    max-width: 300px;
}

.teach-items {
    display: flex;
    flex-direction: column;
    gap: 40px;
    border-left: 1px solid #333;
    padding-left: 40px;
}

.teach-item {
    position: relative;
    padding: 10px;
    transition: transform 0.3s;
}

.teach-item:hover {
    transform: translateX(10px);
    /* Desktop hover effect */
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.02), transparent);
}

.item-title {
    font-size: 2rem;
    margin-bottom: 10px;
}

/* Alternating Desktop Colors */
/* Alternating Desktop Colors */
.teach-item:nth-child(1) .item-title {
    color: var(--color-blue);
    border-bottom: 2px solid var(--color-blue);
    display: inline-block;
}

.teach-item:nth-child(2) .item-title {
    color: var(--color-red);
    border-bottom: 2px solid var(--color-red);
    display: inline-block;
}

.teach-item:nth-child(3) .item-title {
    color: var(--color-blue);
    border-bottom: 2px solid var(--color-blue);
    display: inline-block;
}


/* Carousel Styles */
.gallery {
    padding: 60px 0;
    background: radial-gradient(circle, rgba(20, 20, 20, 1) 0%, rgba(0, 0, 0, 1) 100%);
    overflow: hidden;
    /* Hide overflow from slides */
}

.carousel-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    /* Constrain width for better focus */
    margin: 40px auto 0;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
    /* For 3D depth effect */
}

.carousel-slide {
    position: absolute;
    width: 300px;
    height: 400px;
    transition: all 0.5s ease-in-out;
    opacity: 0;
    transform: translateX(0) scale(0.8);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    overflow: hidden;
    z-index: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Ensure full image is visible */
    background-color: #000;
    /* Black background for letterboxing */
}

/* Dynamic Classes for JS logic */
.carousel-slide.active {
    opacity: 1;
    transform: translateX(0) scale(1.05);
    /* Reduced scale to prevent overlap */
    /* Center and big */
    z-index: 10;
    /* Red and Blue mixed shadow */
    box-shadow: -10px 10px 30px rgba(255, 0, 0, 0.4),
        10px 10px 30px rgba(0, 123, 255, 0.4);

    border: 2px solid transparent;
    background-image: linear-gradient(#000, #000), linear-gradient(90deg, var(--color-red), var(--color-blue));
    background-origin: border-box;
    background-clip: content-box, border-box;
}

.carousel-slide.prev {
    opacity: 0.6;
    transform: translateX(-350px) scale(0.9) rotateY(15deg);
    /* Move left */
    z-index: 5;
}

.carousel-slide.next {
    opacity: 0.6;
    transform: translateX(350px) scale(0.9) rotateY(-15deg);
    /* Move right */
    z-index: 5;
}

/* Nav Buttons */
.carousel-nav {
    position: absolute;
    bottom: -60px;
    /* Brought back up, but still clear of image */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 20;
    /* Ensure strictly above everything */
}

.nav-btn {
    background-color: transparent;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: transparent;
    color: var(--color-red);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    border: 2px solid var(--color-red);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    transition: all 0.3s;
    /* Ensure buttons are clickable and above other elements */
    z-index: 10;
}

#prevBtn {
    border: 2px solid var(--color-red);
    color: var(--color-red);
}

#prevBtn:hover {
    background-color: var(--color-red);
    color: white;
    box-shadow: 0 0 15px var(--color-red);
}

#nextBtn {
    border: 2px solid var(--color-blue);
    color: var(--color-blue);
}

#nextBtn:hover {
    background-color: var(--color-blue);
    color: white;
    box-shadow: 0 0 15px var(--color-blue);
}

@media (max-width: 768px) {

    /* Global Mobile Adjustments */
    .container {
        padding: 15px;
    }

    .section-title {
        font-size: 2.2rem;
        margin-bottom: 30px;
    }

    /* Header Mobile */
    /* Header Mobile */
    .header-container {
        flex-direction: column;
        align-items: center;
        /* Center align for better mobile look */
        justify-content: center;
        gap: 8px;
        padding: 15px 10px;
        /* Add padding to prevent edge collision */
        width: 100%;
        margin: 0 auto;
    }

    .desktop-nav {
        display: none;
        /* Hide desktop nav on mobile */
    }

    .mobile-menu-btn {
        display: flex;
        /* Show hamburger */
    }

    .logo {
        font-size: 1.4rem;
        /* Slightly smaller to fit width */
        text-align: center;
        line-height: 1.2;
    }

    .location-tag {
        font-size: 0.8rem;
        width: 100%;
        justify-content: center;
        /* Center location tag */
        margin-left: 0;
    }

    /* Hero Mobile Refinement */
    .hero {
        height: auto;
        min-height: 100svh;
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 100px;
        /* Subtle Blue/Red glow for catchy effect */
        background: radial-gradient(circle at top right, rgba(0, 123, 255, 0.1), transparent 40%),
            radial-gradient(circle at bottom left, rgba(255, 0, 0, 0.15), transparent 40%);
        background-color: #000;
    }

    .hero-overlay {
        width: 100%;
        height: 60%;
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 80%, rgba(0, 0, 0, 0) 100%);
    }

    .hero-content {
        padding-top: 20px;
        width: 100%;
        text-align: center;
    }

    .hero-title {
        font-size: 3.8rem;
        max-width: 100%;
        margin-bottom: 25px;
        line-height: 1;
        text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    }

    /* Make Hero Title Catchy */
    .hero-title span {
        display: block;
        font-size: 4.5rem;
        background: -webkit-linear-gradient(45deg, var(--color-red), var(--color-blue));
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .hero-images {
        position: relative;
        width: 100%;
        height: 350px;
        margin-top: 20px;
        clip-path: none;
        display: flex;
        gap: 5px;
    }

    .hero-img-box {
        border-left: 1px solid white;
    }

    /* Values Mobile */
    .values {
        padding: 60px 15px;
    }

    .buttons-row {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    /* Catchy Buttons on Mobile */
    .btn-red {
        width: 100%;
        max-width: 320px;
        background: linear-gradient(45deg, var(--color-red), var(--color-blue));
        border-radius: 30px;
        /* More modern/catchy shape */
        padding: 15px 20px;
        font-size: 1.3rem;
        letter-spacing: 1px;
        box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
        text-align: center;
    }

    /* What We Teach Mobile */
    .teach-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .teach-items {
        border-left: none;
        padding-left: 0;
        border-top: none;
        padding-top: 20px;
    }

    .large-title {
        font-size: 3.5rem;
        text-align: center;
        color: white;
        margin-bottom: 10px;
        background: none;
        -webkit-text-fill-color: initial;
        -webkit-background-clip: border-box;
        background-clip: border-box;
    }

    .large-title span {
        background: -webkit-linear-gradient(45deg, var(--color-red), var(--color-blue));
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .teach-intro {
        margin: 0 auto;
        text-align: center;
        max-width: 100%;
    }

    .teach-item {
        background: rgba(255, 255, 255, 0.03);
        /* Card-like feel */
        padding: 24px;
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.05);
        margin-bottom: 20px;
    }

    .item-title {
        font-size: 2.2rem;
        margin-bottom: 12px;
    }

    /* Target specific items for blue/red alternation */
    .teach-item:nth-child(1) .item-title {
        color: var(--color-blue);
        border-bottom: 3px solid var(--color-blue);
        display: inline-block;
    }

    .teach-item:nth-child(2) .item-title {
        color: var(--color-red);
        border-bottom: 3px solid var(--color-red);
        display: inline-block;
    }

    .teach-item:nth-child(3) .item-title {
        color: var(--color-blue);
        border-bottom: 3px solid var(--color-blue);
        display: inline-block;
    }


    /* Carousel Mobile */
    .carousel-container {
        height: 400px;
        margin-top: 20px;
    }

    .carousel-slide {
        width: 200px;
        height: 280px;
    }

    .carousel-slide.prev {
        transform: translateX(-120px) scale(0.85);
        opacity: 0.4;
    }

    .carousel-slide.next {
        transform: translateX(120px) scale(0.85);
        opacity: 0.4;
    }


    /* Join/Footer Mobile Fixes */
    .join-footer {
        padding: 40px 0;
        text-align: center;
    }

    .join-grid {
        display: flex;
        /* Use flex column instead of grid for simpler stacking */
        flex-direction: column;
        gap: 40px;
        width: 100%;
    }

    .join-left,
    .join-right {
        width: 100%;
        margin: 0 auto;
        padding: 0 15px;
        /* Ensure content doesn't touch edges */
    }

    .join-title {
        font-size: 2.8rem;
        line-height: 1.1;
        margin-bottom: 20px;
        word-wrap: break-word;
        /* Prevent overflow */
    }

    .coach-profile {
        margin-top: 20px;
        text-align: left;
        /* Keep profile text left-aligned for readability */
        padding: 20px;
        background: rgba(255, 255, 255, 0.05);
        /* Distinct background for separation */
        border-radius: 12px;
    }

    .coach-cert-list {
        column-count: 1;
        width: 100%;
    }

    .coach-cert-list li {
        font-size: 0.9rem;
    }
}

/* Join / Footer */
.join-footer {
    padding: 60px 0;
    /* Professional Dark Gradient instead of Placeholder */
    background: radial-gradient(circle at top right, #1a0b0b, #000 60%);
    background-color: #111;
    position: relative;
    overflow: hidden;
}

.join-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.join-title {
    font-size: 4rem;
    line-height: 0.9;
    color: white;
    /* Reset to white */
    margin-bottom: 30px;
}

.join-title span {
    background: -webkit-linear-gradient(90deg, #FF0000, #007BFF);
    background: linear-gradient(90deg, #FF0000, #007BFF);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.info-label {
    font-size: 1.2rem;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.mt-4 {
    margin-top: 1.5rem;
}

.coach-name {
    font-size: 2.5rem;
    margin: 10px 0 5px;
    font-weight: 700;
}

.coach-main-role {
    font-size: 1.2rem;
    color: #ccc;
    font-style: italic;
    margin-bottom: 20px;
}

.group-label {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.text-blue {
    color: var(--color-blue);
}

.coach-group p {
    color: #ddd;
    font-size: 1rem;
}

.coach-cert-list {
    list-style: none;
    padding-left: 0;
    margin-top: 10px;
    column-count: 2;
    /* CSS Columns for dense packing */
    column-gap: 30px;
}

.coach-cert-list li {
    position: relative;
    padding-left: 15px;
    color: #ccc;
    font-size: 0.95rem;
    line-height: 1.4;
    break-inside: avoid-column;
    /* Prevent split bullets */
    margin-bottom: 10px;
    /* Space between items */
}

.coach-cert-list li::before {
    content: '>';
    color: var(--color-red);
    position: absolute;
    left: 0;
    top: 0;
    font-weight: bold;
    font-size: 0.8rem;
}

/* RESPONSIVE */

/* Floating Join Button */
.join-float-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--color-red);
    color: white;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.4);
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.3s, background 0.3s;
    animation: floatPulse 2s infinite;
}

.join-float-btn:hover {
    background-color: #cc0000;
    transform: scale(1.05);
}

@keyframes floatPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(255, 0, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0);
    }
}

/* Modal Styles */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #111;
    margin: 15% auto;
    padding: 40px;
    border: 1px solid #333;
    width: 90%;
    max-width: 500px;
    text-align: center;
    position: relative;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: modalPop 0.3s ease-out;
}

@keyframes modalPop {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.close-modal {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: white;
    text-decoration: none;
    cursor: pointer;
}

.modal h2 {
    margin-bottom: 20px;
    font-size: 2.5rem;
}

.modal p {
    color: #ccc;
    margin-bottom: 30px;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 20px;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.3s;
    cursor: pointer;
    border: none;
}

.btn-action:hover {
    transform: translateY(-2px);
}

.btn-action.phone {
    background-color: #333;
    color: white;
}

.btn-action.whatsapp {
    background-color: #25D366;
    color: black;
}

.modal-contact-details {
    margin-top: 30px;
    font-size: 0.9rem;
    color: #888;
    border-top: 1px solid #333;
    padding-top: 20px;
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    border: 2px solid white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    animation: zoomIn 0.3s;
}

@keyframes zoomIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.close-lightbox {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10000;
}

.close-lightbox:hover,
.close-lightbox:focus {
    color: var(--color-red);
    text-decoration: none;
    cursor: pointer;
}

/* Gallery Page Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 20px 0;
}

.gallery-item {
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid #222;
    background: #111;
}

.gallery-item img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
    cursor: pointer;
}

.gallery-item:hover img {
    transform: scale(1.06);
    border-color: var(--color-blue);
}

@media (max-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .gallery-item img {
        height: 240px;
    }
}

@media (max-width: 768px) {
    .join-float-btn {
        bottom: 20px;
        right: 20px;
        padding: 12px 25px;
        font-size: 1rem;
    }
}

/* =============================================
   MOBILE-ONLY OVERRIDES (must be last to win)
   ============================================= */
@media (max-width: 768px) {

    /* --- Fix: Footer stacking ---
       Desktop .join-grid uses display:grid which comes after the earlier
       mobile block in the file and overrides it. This block fixes it. */
    .join-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
    }

    .join-left {
        width: 100%;
        padding: 30px 20px 20px;
        text-align: center;
        border-bottom: 1px solid #222;
    }

    .join-right {
        width: 100%;
        padding: 30px 20px;
    }

    .join-title {
        font-size: 3rem;
        line-height: 1;
        margin-bottom: 20px;
    }

    .contact-info {
        text-align: center;
    }

    .coach-profile {
        background: rgba(255,255,255,0.04);
        border-radius: 12px;
        padding: 24px;
        text-align: left;
    }

    .coach-name {
        font-size: 2rem;
    }

    .coach-cert-list {
        column-count: 1;
    }

    /* --- Fix: Gallery carousel nav on mobile ---
       Stack the container vertically so nav sits BELOW the image.
       Use flex-wrap on the nav so VIEW FULL GALLERY takes its own
       full-width row, and the two buttons share the row below it. */
    .carousel-container {
        flex-direction: column !important;
        height: auto !important;
        overflow: visible !important;
        gap: 16px;
    }

    .carousel-track {
        width: 100%;
        height: 300px;
        flex-shrink: 0;
    }

    .carousel-nav {
        position: static !important;
        transform: none !important;
        display: flex !important;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 16px;
        width: 100%;
        bottom: auto;
        left: auto;
    }

    /* Force VIEW FULL GALLERY onto its own full-width row (top) */
    .carousel-nav .btn-red {
        order: -1;
        flex: 0 0 85%;
        max-width: 260px;
        text-align: center;
        font-size: 1rem;
        padding: 12px 20px;
        border-radius: 8px;
        margin: 0;
    }

    /* prev and next buttons sit together on the row below */
    #prevBtn, #nextBtn {
        order: 0;
    }
}