/* ==========================================
   GLOBAL CONTAINER
========================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Reset inside media page */
.media-page * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ==========================================
   MEDIA PAGE BACKGROUND
========================================== */
.media-page {
    background: linear-gradient(135deg, #eb4873 0%, #6240a2 100%);
    min-height: 100vh;
    padding: 40px 20px 60px 20px;
}

/* ==========================================
   MAIN PAGE TITLE
========================================== */
.media-page-title {
    text-align: center;
    margin-bottom: 40px;
    padding-top: 20px;
}

.media-page-title-h1 {
    color: white;
    font-size: 42px;
    font-weight: bold;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* ==========================================
   GALLERY CONTAINER
========================================== */
.media-gallery-container {
    max-width: 1200px;
    margin: 0 auto;
}

.media-section-title {
    color: white;
    font-size: 36px;
    border-left: solid 5px #fff;
    border-radius: 6px;
    font-weight: bold;
    letter-spacing: 3px;
    text-transform: uppercase;
    padding-left: 10px;
    margin-bottom: 30px;
    margin-top: 30px;
}

.media-section {
    margin-bottom: 40px;
}

.media-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.media-section-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.media-nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.media-nav-btn:hover {
    background: #fff;
    color: #eb4873;
    border-color: #fff;
    transform: translateY(-2px);
}

.media-nav-btn.swiper-button-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.media-swiper {
    padding: 10px 5px 40px;
    overflow: visible;
}

.media-swiper .swiper-wrapper {
    align-items: stretch;
}

.media-swiper .swiper-slide {
    display: flex;
    height: auto;
}

.media-swiper .media-gallery-item {
    flex: 1 0 auto;
}

/* Base desktop grid */
.media-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    justify-content: center;
}

/* Same rectangle shape for ALL items */
.media-gallery-item {
    width: 100%;
    height: 320px;
    /* <<< RECTANGLE HEIGHT (change if needed) */
    background: #f6f6f6;
    /* white background */
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 0 auto;
}

/* Images fit inside rectangle WITHOUT CROPPING */
.media-gallery-item img,
.media-gallery-item-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* show full image */
    background: #ffffff;
    /* white padding area */
    display: block;
}

/* Remove tall special cases */
.media-gallery-item-tall {
    grid-row: span 1 !important;
}


.media-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.media-gallery-item:hover .media-gallery-item-img {
    transform: scale(1.05);
}

.media-gallery-item-tall {
    grid-row: span 2;
}

/* ==========================================
   VIDEO SECTION
========================================== */
.media-video-section {
    max-width: 1200px;
    margin: 80px auto 0;
    text-align: center;
}

.media-video-section-title {
    color: white;
    font-size: 48px;
    font-weight: bold;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 60px;
}

/* ==========================================
   VIDEO CARDS
========================================== */
.media-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 30px;
    text-align: left;
    align-items: stretch;
}

.media-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.media-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);
}

.media-card-image-link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.media-card-image {
    position: relative;
    aspect-ratio: 16/9;
    width: 100%;
    overflow: hidden;
}

.media-card-image-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.media-card:hover .media-card-image-img {
    transform: scale(1.05);
}

.media-card-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    color: #eb4873;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    pointer-events: none;
}

.media-card-duration {
    position: absolute;
    bottom: 14px;
    right: 14px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

.media-card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.media-card-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    min-height: 2.4em;
}

.media-card-description {
    font-size: 16px;
    color: #666;
    line-height: 1.5;
    min-height: 4.2em;
}

/* ==========================================
   MAKE VIDEO CARDS FULLY CLICKABLE
========================================== */
.media-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.media-card-link:hover .media-card {
    transform: translateY(-5px);
    transition: 0.3s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* ==========================================
   WATCH BUTTON (UPDATED STYLE)
========================================== */
.media-watch-btn {
    background: linear-gradient(135deg, #eb4873, #6240a2);
    color: #fff;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: bold;
    display: inline-block;
    margin-top: 8px;
    text-align: center;
    text-decoration: none;
}

/* Hover effect */
.media-watch-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(98, 64, 162, 0.4);
}

/* ==========================================
   RESPONSIVE — TABLET (768px–1199px)
========================================== */
@media (max-width: 1199px) and (min-width: 768px) {
    .media-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 350px;
    }

    .media-video-section-title {
        font-size: 36px;
    }
}

/* ==========================================
   RESPONSIVE — MOBILE (max 768px)
========================================== */
@media (max-width: 768px) {

    .media-gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        gap: 20px;
    }

    .media-gallery-item {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }

    .media-gallery-item-img {
        object-fit: contain;
        height: auto;
    }

    .media-page-title-h1 {
        font-size: 28px;
        letter-spacing: 2px;
    }

    .media-video-section-title {
        font-size: 28px;
    }

    .media-cards-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .media-card-content {
        padding: 18px;
    }

    .media-card-title {
        font-size: 18px;
    }

    .media-card-description {
        font-size: 14px;
    }

    .media-watch-btn {
        padding: 10px 25px;
        font-size: 12px;
    }

    .media-card-play {
        width: 54px;
        height: 54px;
        font-size: 20px;
    }

    .media-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .media-section-nav {
        width: 100%;
        justify-content: flex-start;
    }
}

/* ==========================================
   EXTRA SMALL MOBILE
========================================== */
@media (max-width: 480px) {

    .media-card-content {
        padding: 12px;
    }

    .media-card-title {
        font-size: 15px;
    }

    .media-card-description {
        font-size: 12px;
    }

    .media-watch-btn {
        padding: 9px 20px;
        font-size: 11px;
    }

    .media-card-play {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }
}

/* Mobile - still rectangle but full width */
@media (max-width: 768px) {
    .media-gallery-grid {
        grid-template-columns: 1fr;
    }

    .media-gallery-item {
        height: 260px;
        /* mobile rectangle height */
    }
}

.media-gallery-item {
    position: relative;
    width: 100%;
    height: 320px;
    /* your rectangle height */
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 0 auto;
}

.media-gallery-item-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}

/* Caption box */
.media-img-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 12px 18px;
    background: linear-gradient(135deg, rgba(73, 6, 32, 0.82) 0%, rgba(29, 8, 48, 0.94) 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 12px 30px rgba(0, 0, 0, 0.35);
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);

    transform: translateY(100%);
    opacity: 0;
    transition: 0.3s ease;
    text-align: center;
}

/* Show caption on hover */
.media-gallery-item:hover .media-img-caption {
    transform: translateY(0%);
    opacity: 1;
    background: linear-gradient(135deg, rgba(73, 6, 32, 0.92) 0%, rgba(29, 8, 48, 0.98) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 18px 40px rgba(0, 0, 0, 0.45);
}

/* Always show captions on tablets and phones */
@media (max-width: 1024px) {
    .media-img-caption {
        transform: translateY(0%);
        opacity: 1;
    }

    .media-gallery-item:hover .media-img-caption {
        transform: translateY(0%);
        opacity: 1;
    }
}

/* Mobile height */
@media (max-width: 768px) {
    .media-gallery-item {
        height: 300px;
    }
}