/* =============================================
   GALLERY HERO SECTION
   ============================================= */
.gallery-hero {
    background: url('../images/page-banner3.jpg.jpeg') no-repeat center center/cover;
    height: 40vh;
    min-height: 250px;
    display: flex;
    align-items: center;
    text-align: center;
    position: relative;
    color: white;
}

.gallery-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1;
}

.gallery-hero .container {
    position: relative;
    z-index: 2;
}

.gallery-hero h1 {
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
}

.gallery-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* =============================================
   PHOTO GALLERY GRID
   ============================================= */
.gallery {
    padding: 5rem 0;
    background-color: #f7f9f6;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.8rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background-color: #000;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.gallery-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.12);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    min-height: 260px;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 1.2rem;
    font-size: 1rem;
    font-weight: 400;
    color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.25), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* =============================================
   LIGHTBOX STYLES
   ============================================= */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.lightbox--active {
    opacity: 1;
    visibility: visible;
}

.lightbox__content {
    max-width: 90%;
    max-height: 85vh;
    position: relative;
}

.lightbox__media {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 12px;
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
    position: absolute;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox__close {
    top: -50px;
    right: 0;
    font-size: 2.5rem;
    width: 44px;
    height: 44px;
}

.lightbox__prev,
.lightbox__next {
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    font-size: 2rem;
}

.lightbox__prev {
    left: -60px;
}

.lightbox__next {
    right: -60px;
}

/* =============================================
   VIDEO GALLERY (YouTube Embeds)
   ============================================= */
.video-gallery {
    padding: 2rem 0 3rem;
    background-color: var(--soft);
}

.video-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.video-item {
    background-color: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    transition: all 0.35s ease;
}

.video-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.12);
}

.video-item h3 {
    font-size: 1.15rem;
    color: var(--accent);
    padding: 1.1rem 1.5rem;
    text-align: center;
}

.video-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #000;
}

.video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.reels-section {
    padding: 6rem 0;
    background-color: #f0f8ff;
}

.reels-grid {
    display: grid;
    /* Mobile par 2 columns, Desktop par auto-fit */
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .reels-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

.reel-item {
    background-color: black;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    padding-top: 177.77%;
    /* 9:16 Aspect Ratio */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.reel-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.reel-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 2.5rem;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    transition: background 0.3s ease;
}

.reel-item:hover .play-icon {
    background: rgba(0, 0, 0, 0.6);
}

.reel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 0.75rem 0.75rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    font-size: 0.85rem;
}

/* ==============================
   GLOBAL HELPERS
================================ */
.containers {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 1.2rem;
}

.section-title {
    text-align: center;
    font-size: 2.4rem;
    margin-bottom: 1rem;
}

.services-hero {
    padding: 0.5rem 0 0.2rem;
    /* pehle bahut bada tha */
    text-align: center;
    background: #f6f8f6;
}

/* our instructors-section */
.services-hero h1 {
    font-size: 2.2rem;
    margin-bottom: 0.4rem;
    font-weight: 600;
}

.services-hero p {
    font-size: 1rem;
    color: #555;
}

/* =============================================
   INSTRUCTORS SECTION – CARD LAYOUT (FINAL)
   ============================================= */

.card-layout {
    padding: 2rem 0;
}

/* ---------- CARD ---------- */
.card-layout .program-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: center;

    margin-bottom: 4rem;
    padding: 2.5rem;

    background-color: #ffffff;
    border-radius: 18px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);

    transition: transform 0.35s ease, box-shadow 0.35s ease;
    overflow: hidden;
    /* content bahar nahi jaayega */
}

/* Alternate background */
.card-layout .program-detail:nth-child(even) {
    background-color: var(--soft);
}

/* Hover effect */
.card-layout .program-detail:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 45px rgba(0, 0, 0, 0.12);
}

/* ---------- TEXT CONTENT ---------- */
.card-layout .program-content {
    width: 100%;
}

.card-layout .program-content h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: var(--accent);
}

.card-layout .program-content h3 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1.1rem;
    color: #4b6b5f;
}

.card-layout .program-content p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #333;
    margin-bottom: 1rem;
}

.card-layout .program-content ul {
    padding-left: 1.2rem;
    margin-bottom: 1.2rem;
}

.card-layout .program-content ul li {
    font-size: 0.9rem;
    margin-bottom: 0.45rem;
    color: #222;
}

/* ---------- IMAGE ---------- */
.card-layout .program-image {
    width: 100%;
    max-width: 100%;
}

.card-layout .program-image img {
    width: 100%;
    height: 410px;
    object-fit: cover;
    border-radius: 14px;
    display: block;
}

/* ---------- BUTTON ---------- */
.card-layout .btn {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    font-size: 0.9rem;
    border-radius: 8px;
    margin-top: 0.8rem;
}

/* ---------- ANIMATION ---------- */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =============================================
   RESPONSIVE – ALL MEDIA QUERIES (ONE PLACE)
   ============================================= */

/* Tablet */
@media (max-width: 1024px) {
    .card-layout .program-detail {
        gap: 2rem;
        padding: 2rem;
    }

    .card-layout .program-image img {
        height: 300px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .card-layout .program-detail {
        grid-template-columns: 1fr;
        padding: 1.8rem;
    }

    .card-layout .program-image img {
        height: 260px;
    }

    .card-layout .program-image {
        order: 1;
    }

    .card-layout .program-content {
        order: 2;
        margin-top: 0.5rem;
    }

    .card-layout .program-content h2 {
        font-size: 1.6rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .card-layout .program-detail {
        padding: 1.5rem;
        margin-bottom: 3rem;
    }

    .card-layout .program-image img {
        height: 270px;
    }

    .card-layout .btn {
        padding: 0.55rem 1.2rem;
        font-size: 0.85rem;
    }
}


/* =============================================
   CTA SECTION
   ============================================= */
.gallery-cta {
    padding: 4rem 0;
    background-color: #409679;
    color: white;
    text-align: center;
}

.gallery-cta h2 {
    color: white;
    font-size: 2.5rem;
}

.gallery-cta .btn--large {
    font-size: 1rem;
    padding: 0.8rem 2.5rem;
    background-color: #226e55;
    color: white;
    border: none;
    transition: 0.3s;
}

.gallery-cta .btn--large:hover {
    background-color: #1a5340;
    transform: translateY(-2px);
}

/* =============================================
   RESPONSIVE QUERIES
   ============================================= */
@media (max-width: 768px) {
    .gallery-hero h1 {
        font-size: 2rem;
    }

    .gallery {
        padding: 4rem 0;
    }

    .gallery-overlay {
        opacity: 1;
        font-size: 0.95rem;
    }

    .gallery-item:hover,
    .gallery-item:hover img {
        transform: none;
    }

    .lightbox__prev,
    .lightbox__next {
        display: none;
    }

    .lightbox__close {
        top: -40px;
    }
}

@media (min-width: 768px) {

    .video-grid,
    .masters-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .reels-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .masters-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .reels-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}