
    
        html,
        body {
            margin: 0;
            padding: 0;
            overflow-x: visible !important;
            overflow-y: visible !important;
        }

       
        .stack-container {
            display: block;
            width: 100%;
        }

  
        .card-1-banner {
            height: 384px;
            width: 100%;
            position: relative;
            z-index: 1;
            background: url(../img/images/events-bg.jpg)center/cover no-repeat;
            display: flex;
            align-items: center;
            color: white;
        }
        .card-details-banner{
            height: 100vh;
            width: 100%;
            position: sticky;
            top: 0;
            z-index: 1;
                  background: url(../img/images/about-banner.svg)center/cover no-repeat;
            /* background: url("{{asset('public/img/images/about-banner.svg')}}") center/cover no-repeat; */
            display: flex;
            align-items: center;
            color: white;
        }

        .container-fluid {

            z-index: 10;

        }

        .card-1-banner::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(to bottom,
                    rgba(0, 0, 0, 0.8) 0%,
                    rgba(0, 0, 0, 0) 50%,
                    rgba(0, 0, 0, 0.8) 100%);

            z-index: 1;

        }

       
        .stack-card {
            position: relative;
            width: 100%;
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            box-sizing: border-box;
            z-index: 1 !important;
            margin-top: -45px;
        }

 
        #history-card {
            z-index: 2;
            margin-top: 0;
        }


        #travancore-card {
            z-index: 3;
           
        }


        .card-inner-content {
            background: #ffffff;
            width: 100%;
            margin: 0 auto;
            border-radius: 33px 33px 0 0;
            box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.2);
            position: relative;
            z-index: 12;
        }

      
        .section-titil {
            font-size: 48px;
            font-weight: 800;
            -webkit-text-stroke: 1px #fff;
            color: transparent;
            margin-top: 5rem;
            text-align: center;
        }

        .main-title {
            font-size: 3.5rem;
            font-weight: 800;
            color: #fff;
            position: relative;
            z-index: 10;
            text-align: center;
        }

        .main-title span {
            color: rgba(198, 40, 40, 1);
        }

        .mainhed {
            font-size: 2.5rem;
            font-weight: 700;
        }

        .mainhed span {
            color: #e31e24;
        }

        .img-left {
            float: left;
            margin: 0 30px 20px 0;
            border-radius: 20px;
            max-width: 40%;
        }





      
        .figma-dark-theme {
            /* background: #0d0d0d !important; */
/* height: 100vh; */
            color: #ffffff;
             background: #0d0d0d url("../img/images/gallary-bg.svg") center / cover no-repeat !important;

        }
        .gal-details{
            min-height: 100vh !important;
        }


        .motto-label {
            font-size: 28px;
            font-weight: 800;
            -webkit-text-stroke: 1px #fff;
            color: transparent;
        }

        .motto-text {
            /* font-family: 'YourCustomFont', serif; */
     
            font-size: 3.5rem;
            margin-bottom: 20px;
            text-transform: lowercase;
        }

        .motto-desc {

            /* font-family: 'Urbanist', sans-serif; */
            font-weight: 400;
            font-style: normal;
            font-size: 15px;
            line-height: 24px;
            letter-spacing: 0%;
            color: rgba(255, 255, 255, 1);

        
            max-width: 700px;
            margin: 0 auto 10px;
            text-align: center;
            display: flex;
            align-items: center;
            justify-content: center;
        }

       
        .bubble-gallery {
            display: flex;
            justify-content: center;
            align-items: center;
            flex-wrap: wrap;
            gap: 15px;
            margin-bottom: 20px;
        }

        .bubble {
            border-radius: 50%;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .bubble img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .b-lg {
            width: 150px;
            height: 150px;
        }

        .b-md {
            width: 110px;
            height: 110px;
        }

        .b-sm {
            width: 70px;
            height: 70px;
        }

        .icon-purple {
            background: #3f3d99;
            color: white;
            font-size: 24px;
        }

        .icon-red {
            background: #c32026;
            color: white;
            font-size: 24px;
        }

        .mission-vision-grid {
            max-width: 1000px;
            margin: 0 auto;
        }

        .dark-glass {
            background: linear-gradient(239.1deg, rgba(255, 255, 255, 0.12) 1.7%, rgba(255, 255, 255, 0.06) 81.79%);
            backdrop-filter: blur(21px);
            -webkit-backdrop-filter: blur(21px);

            max-width: 531px;
            width: 100%;
            height: auto;
            opacity: 1;

            display: flex;
            align-items: center;
            gap: 24px;
            padding: 42px;
            border-radius: 12px;
            border: 1px solid rgba(255, 255, 255, 0.1);

            box-sizing: border-box;
            margin: 0 auto;
        }

        @media (max-width: 600px) {
            .dark-glass {
                width: 100%;
                height: auto;
                padding: 20px;
            }
        }

        .box-icon {
            font-size: 40px;
            margin-right: 20px;
        }

        .yellow-text {
            color: #ffcc00;
        }

        .orange-text {
            color: #ff6600;
        }

        .box-text h3 {
            /* font-family: 'Urbanist', sans-serif; */
            font-weight: 600;
            font-style: normal;
            font-size: 24px;
            line-height: 24px;
            letter-spacing: 0%;
            color: rgba(255, 255, 255, 1);


            margin-bottom: 10px;
            vertical-align: middle;
            display: flex;
            align-items: center;


            margin-top: 0;
        }

        .box-text p {
            font-size: 0.85rem;
            line-height: 1.5;
            color: #bbb;
        }

        .motto-hindi-img {

            width: 897px;
            height: 86.6px;


            display: block;
            opacity: 1;
            object-fit: contain;


            max-width: 90%;
        }


        .figma-dark-theme .motto-hindi-img {
            filter: brightness(0) invert(1);
        }

        .mission-icon {

            width: 51.75px;
            height: 52.5px;


            max-width: 94.5px;
            max-height: 95.87px;


            opacity: 1;
            display: block;
            object-fit: contain;


            margin: 0;
            padding: 0;
            border: none;
        }

        .vission-icon {

            width: 61.75px;
            height: 62.5px;


            max-width: 94.5px;
            max-height: 95.87px;


            opacity: 1;
            display: block;
            object-fit: contain;


            margin: 0;
            padding: 0;
            border: none;
        }

        .figma-white-theme {
            background: #ffffff !important;
            color: #444444;
        }

        .people-centric-title {
    
            /* font-family: 'Urbanist', sans-serif; */
            font-weight: 700;
    
            font-style: normal;
            font-size: 38px;
            line-height: 60px;
            letter-spacing: 0%;
            text-transform: uppercase;
            vertical-align: middle;

         
            color: #2b2a6d;
            margin-bottom: 40px;

     
            margin-top: 0;
            display: block;
        }

        .people-centric-title span {
            color: rgba(198, 40, 40, 1)
        }

      
        .police-showcase-img img {
            width: 100%;
            height: auto;
            display: block;
        }

    
        .people-centric-text p {
            /* font-family: 'Urbanist', sans-serif; */
            font-weight: 400;
            font-size: 16px;
            line-height: 1.7;
            color: #555555;
            margin-bottom: 25px;
            text-align: left;
        }

   
        .people-centric-text p:first-of-type {
            margin-top: 0;
        }
        
        .main-p {
            text-align: center;
        }

        .custom-margin-top {
            margin-top: 8rem;
        }

        @media screen and (max-width: 768px) {
             .container-fluid {
                margin-bottom: 6rem;
            }
        }

        @media (max-width: 768px) {
            /* .custom-margin-top {
                margin-top: 1rem;
            } */
        }

       
        @media (max-width: 991px) {
            .figma-white-theme {
                padding: 40px 20px !important;
            }

            .people-centric-title {
                font-size: 28px;
            }
        }


        .structure-bg {

            
            background-image: radial-gradient(circle at 50% 50%, rgba(43, 42, 109, 0.2) 0%, transparent 70%);
            padding-top: 30px !important;
        }

        #structure-card {
            z-index: 4;
           
        }


       .structure-title {
    /* font-family: 'Urbanist', sans-serif; */
    font-weight: 500;
    font-size: 38px;
    line-height: 60px;
    letter-spacing: 0;
    text-transform: uppercase;
    color: #0d0d0d;
    vertical-align: middle;
    
    /* font-style is usually 'normal' or 'italic' */
    font-style: normal; 
}
       .structure-title-gallery {
    /* font-family: 'Urbanist', sans-serif; */
    font-weight: 500;
    font-size: 38px;
    line-height: 60px;
    letter-spacing: 0;
    text-transform: uppercase;
    color: #ffffff;
    vertical-align: middle;
    
    /* font-style is usually 'normal' or 'italic' */
    font-style: normal; 
}
        /* .structure-title span {
            color: rgba(198, 40, 40, 1);
        } */

   
        .structure-wrapper {
            display: flex;
            flex-direction: column;
            gap: 32px;
            max-width: 1200px;
            margin: 0 auto;
            padding-bottom: 60px;
        }

        
        .leadership-item {

            width: 928px;
            height: 150px;
            opacity: 1;

         
            background: linear-gradient(239.1deg, rgba(255, 255, 255, 0.12) 1.7%, rgba(255, 255, 255, 0.06) 81.79%);
            backdrop-filter: blur(21px);
            -webkit-backdrop-filter: blur(21px);


            display: flex;
            align-items: center;
            gap: 24px;
            padding: 42px;
            border-radius: 12px;
            border: 1px solid rgba(255, 255, 255, 0.1);

         
            box-sizing: border-box;
            position: relative;
        }

       
        .align-left {
            align-self: flex-end;
        }

        .align-center {
            align-self: flex-start;
        }

        .align-right {
            align-self: flex-end;
        }

      
        @media (max-width: 1024px) {
            .leadership-item {
                width: 100%;
             
                height: auto;
         
                padding: 24px;
            }
        }


        .lead-icon-box img {
            width: 80px;
            height: 80px;
            object-fit: contain;
        }

        .lead-content h3 {
            /* font-family: 'Urbanist', sans-serif; */
            font-weight: 600;
            font-size: 22px;
            color: #ffffff;
            margin-bottom: 8px;
        }

        .lead-content p {
            /* font-family: 'Urbanist', sans-serif; */
            font-weight: 400;
            font-size: 14px;
            line-height: 22px;
            color: rgba(255, 255, 255, 0.8);
            margin: 0;
        }

       
        @media (max-width: 991px) {
            .leadership-item {
                width: 100%;
                padding: 24px;
            }


        }

         .logoother {
    display: flex;
    flex-direction: row;
    /* gap: 22px; */
    align-items: center;
    /* height: 100px; */
    padding: 20px 0;
    justify-content: space-evenly;
    max-width: 90%;
    margin: auto;
    background: #383278;
    position: relative;
    border-radius: 12px;
    margin-top: -100px;
    margin-bottom: 40px;
}
        .main-p {
            /* font-family: 'Urbanist', sans-serif; */
            font-weight: 400;
            font-style: normal;
            font-size: 15px;
            line-height: 24px;
            letter-spacing: 0;
            color: rgba(255, 255, 255, 1);
            width: 100%;
            max-width: 476px;
            margin: 0 auto;

            display: flex;
            align-items: center;
            text-align: center;
        }

        
        .custom-medal-tabs {
            border-bottom: 4px solid #e0e0e0;
   
            display: flex;
            justify-content: space-between;
            margin-bottom: 50px;
            padding: 0;
            list-style: none;
        }

        .custom-medal-tabs .nav-item {
            margin-bottom: -2px;
          
        }

        .custom-medal-tabs .nav-link {

            /* font-family: 'Urbanist', sans-serif; */
            font-weight: 400;
            font-style: normal;
            font-size: 20px;
            line-height: 20px;
            letter-spacing: 0px;
            text-align: center;
            color: rgba(96, 96, 96, 1) !important;


            border: none !important;
            background: none !important;
            padding: 15px 20px;
            transition: color 0.3s ease;
            cursor: pointer;
            display: block;
            width: 100%;
        }

        .custom-medal-tabs .nav-link.active {

            /* font-family: 'Urbanist', sans-serif; */
            font-weight: 400;
            font-style: normal;
            font-size: 20px;
            line-height: 20px;
            letter-spacing: 0px;
            text-align: center;
            color: rgba(198, 40, 40, 1) !important;


            position: relative;
            background: none !important;
            border: none !important;
            padding-bottom: 15px;
        }


        .custom-medal-tabs .nav-link.active::after {
            content: "";
            position: absolute;
            bottom: -2px;
            left: 0;
            width: 100%;
            height: 4px;
            background-color: rgba(198, 40, 40, 1);
            z-index: 1;
        }



        .medal-winner-card {
            text-align: center;
            margin-bottom: 40px;
        }

        .medal-container {
            position: relative;
            width: 200px;
            height: 200px;
            margin: 0 auto;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .frame-img {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 2;
            pointer-events: none;
        }

        .avatar-wrapper {
            width: 105px;
            height: 105px;
            border-radius: 50%;
            overflow: hidden;
            z-index: 1;
        }

        @media (max-width: 768px) {
            .custom-medal-tabs {
                flex-wrap: nowrap;
                overflow-x: auto;
                justify-content: flex-start;
            }

            .custom-medal-tabs .nav-link {
                font-size: 16px;
                white-space: nowrap;
            }
        }

        .user-img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            filter: grayscale(100%);
     
        }

        .winner-name {
            margin-top: 15px;
            /* font-family: 'Urbanist', sans-serif; */
            font-weight: 600;
            font-size: 15px;
            color: #333;
        }

      
        @media (min-width: 992px) {
            .container-fluid.system-view {
                margin-top: 5rem !important;
            }
        }
  
.gallery-slider {
    overflow: visible !important; 
    clip-path: inset(-100vw 0 -100vw 0); /* Optional: prevents vertical scrollbars while allowing horizontal overflow */
}

/* Ensure the parent stack-card doesn't clip the 3D shadow or depth */
.stack-card {
    overflow: visible !important;
    z-index: 1 !important;
}

/* Maintain the dark theme structure without clipping */
.card-inner-content {
    overflow: hidden; /* Keep the rounded top corners of the section */
    height: 100vh;

}
.gallery-slider {
    /* padding: 80px 0; */
    overflow: visible !important; /* This allows images to hang off the sides */
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-slider .swiper-slide {
    /* width: 450px; Adjust based on your center image size */
    /* height: 320px; */
  
    filter: brightness(0.4); /* Dims background images like your UI */
        transform: scale(0.8); /* Side images are smaller */
   transition: filter 0.4s ease, transform 0.4s ease;
}




.gallery-slider .swiper-slide-active {
    filter: brightness(1);
    transform: scale(1); /* Center image is full size */
    z-index: 10;
    /* width:700px !important */
}

.page-num {
    background: #333;
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    min-width: 40px;
    text-align: center;
    margin: 0.2rem;
}

.page-num.active {
    background: #e31e24; /* Red highlight */
}


/* Ensure the center slide is bright and background ones are dark */
.gallery-slider .swiper-slide {
    width: 450px; /* Match your UI width */
    height: 420px;
    filter: brightness(0.4); 
    transition: filter 0.4s ease, transform 0.4s ease;
}

.gallery-slider .swiper-slide-active {
    filter: brightness(1) !important;
    z-index: 10;
    width: 550px; /* Match your UI width */
    height: 420px;
}

/* Pagination Styling */
.page-num {
    background: #444; 
    color: #fff;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: inline-block;
}

.page-num.active {
    background: #e31e24 !important; /* Forces the Red color from your UI */
    font-weight: bold;
}

.gallery-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 100%;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

.gallery-card img {
    width: 100%;
    max-width: 685px;
    height: 100%;
    object-fit: cover;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 14px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px); /* Frosted glass effect from image */
    -webkit-backdrop-filter: blur(15px);
    text-align: center;
    color: #fff;
    font-size: 14px;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}
.gallery-overlay p{
     display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
}

.custom-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.page-num {
    background: #444;
    color: #fff;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.3s;
}

.page-num.active {
    background: #e31e24 !important; /* Red highlight */
    font-weight: bold;
}

.dots {
    color: #fff;
    font-weight: bold;
    padding: 0 5px;
}

.prev-btn, .next-btn {
    background: #444;
    border: none;
    color: #fff;
    padding: 6px 15px;
    border-radius: 4px;
    cursor: pointer;
}
.page-num, .prev-btn, .next-btn {
    background: #444; /* Dark grey background from UI */
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
    border: none;
}

.page-num.active {
    background: #e31e24; /* Red active state from UI */
}

.page-num:hover:not(.active) {
    background: #666;
}

.dots {
    color: #fff;
    padding: 0 5px;
}
.custom-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.page-num {
    background: #444; /* Dark grey for inactive */
    color: #fff;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.3s ease;
}

.page-num.active {
    background: #e31e24; /* Red for active slide */
    font-weight: bold;
}

.prev-btn, .next-btn {
    background: #444;
    border: none;
    color: #fff;
    padding: 6px 15px;
    border-radius: 4px;
    cursor: pointer;
}

.prev-btn:hover, .next-btn:hover {
    background: #555;
}
/* Ensure the center slide is bright and background ones are dark */


/* Pagination Styling */
.page-num {
    background: #444; 
    color: #fff;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    display: inline-block;
}

.page-num.active {
    background: #e31e24 !important; /* Forces the Red color from your UI */
    font-weight: bold;
}

/* --- Video Gallery Specific UI (Matching Photo UI) --- */
.video-slider {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
   
    overflow: hidden !important; 
    position: relative;
    padding: 40px 0 63px 0px;
}
#video-gallery-card .card-inner-content {

    overflow: hidden !important; 
      color: #0d0d0d;
             background: #ffffff!important;
    /* background: url(../img/images/gallery-bg.gif) center/cover no-repeat; */
    position: relative;
}
#video-gallery-card .card-detail-content  {

    overflow: hidden !important; 

    position: relative;
}
.video-slider .swiper-slide {

    width: 100%; 
    /* max-width: 450px;  */
    height: 450px;
    filter: brightness(0.4); 
    transition: filter 0.4s ease, transform 0.4s ease;
}

.video-slider .swiper-slide-active {
    filter: brightness(1) !important;
    transform: scale(1.05); /* Slight pop instead of massive overflow */
    z-index: 10;
     width: 650px !important; /* Match your UI width */
    height: 420px;
}
/* Video Card & Play Button Overlay */
.video-card { 
    position: relative; 
    cursor: pointer; 
    border-radius: 20px;
    overflow: hidden;
    height: 100%;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.6);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: all 0.3s ease;
    border: 2px solid #fff;
}

.video-play-overlay i { 
    color: #fff; 
    font-size: 28px; 
    margin-left: 5px; /* Centers the triangle properly */
}

.video-card:hover .video-play-overlay { 
    background: #e31e24; /* Red color matching your theme */
    transform: translate(-50%, -50%) scale(1.1); 
    border-color: #e31e24; 
}

/* --- Video Modal UI --- */
.video-popup-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    backdrop-filter: blur(5px);
}

.video-modal-content {
    position: relative;
    top: 50%;
    transform: translateY(-50%);
    margin: auto;
    width: 90%;
    max-width: 950px;
}

.video-responsive-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    box-shadow: 0 0 50px rgba(0,0,0,1);
}

.video-responsive-container iframe {
    position: absolute;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    border-radius: 8px;
}

.close-video-btn {
    position: absolute;
    top: -50px;
    right: 0;
    color: white;
    font-size: 45px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.close-video-btn:hover {
    color: #e31e24;
}

/* --- Shared Pagination for Video (v-classes) --- */
#video-dynamic-numbers .page-num.active {
    background: #e31e24 !important;
}

.v-prev-btn, .v-next-btn {
    background: #444;
    border: none;
    color: #fff;
    padding: 6px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.3s;
}

.v-prev-btn:hover, .v-next-btn:hover {
    background: #e31e24;
}

/* Ensure the stack container allows visibility */
.stack-container {
    position: relative;
    width: 100%;
}

.stack-card {
    position: sticky;
    top: 0;
    width: 100%;
    min-height: 100vh;
}

/* Force visibility for the Swiper container */
.video-slider {
    width: 100%;
    height: auto;
    overflow: hidden; /* Important for Swiper */
}

.video-slider .swiper-slide {
    width: 500px; 
    /* opacity: 0.4; */
    transition: opacity 0.3s;
}

@media (max-width: 767.98px) {
    .video-slider:not(.grid-mode) .swiper-slide {
        width: 100%;
        max-width: 300px;
    }
}

/* .video-slider .swiper-slide-active {
    opacity: 1;
     width: 550px;
    height: 320px;
} */

/* Assign a higher z-index to the video gallery so it stacks on top of the photo gallery */
#video-gallery-card {
    z-index: 5; 
    position: sticky;
    top: 0;
    margin-top: 0; /* Ensure it starts right after the previous card */
}

@media (max-width: 767.98px) {
    #video-gallery-card {
        margin-top: -40px;
        z-index: 20;
        position: relative;
    }
}

/* Fix visibility: Sometimes 'overflow: hidden' on the inner content cuts off the slider */
#video-gallery-card .card-inner-content {
    overflow: visible !important; 
      background: url(../img/images/gallery-bg.gif)center/cover no-repeat;
}

/* Ensure the slider has a defined height to be visible */
.video-slider {
    min-height: 400px;
    display: block !important;
}
.gallery-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px; 
}



.gallery-collage-container {
    padding: 10px; /* Reduced padding for mobile */
    max-width: 1200px;
    margin: 0 auto;
}


.collage-grid {
    display: grid;
    grid-template-columns: 1fr; 
    grid-auto-rows: 250px; 
    gap: 15px;
}


@media (min-width: 768px) {
    .collage-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 200px;
    }
}


@media (min-width: 992px) {
    .collage-grid {
        grid-template-columns: repeat(4, 1fr);
        grid-auto-rows: 180px;
        align-items: center;
    }


    .item-1 { grid-column: 1; grid-row: 2 / 4; } 
    .item-2 { grid-column: 2; grid-row: 1 / 3; } 
    .item-3 { grid-column: 2; grid-row: 3 / 5; } 
    .item-4 { grid-column: 3; grid-row: 1 / 4; } 
    .item-5 { grid-column: 3; grid-row: 4 / 5; } 
    .item-6 { grid-column: 4; grid-row: 2 / 4; } 
}


.collage-item {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    /* border-radius: 8px; */
}

.collage-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 576px) {
    .custom-pagination {
        gap: 5px;
    }
    
    .v-prev-btn, .v-next-btn, .page-num {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .dots {
        display: none; 
    }
}


  @media screen and (max-width: 768px) {
            .section-titil {

                font-size: 18px;
                line-height: 18.97px;
                letter-spacing: 0.04em;
            }

            .main-title {
                font-size: 2rem;
            }

            /* .figma-dark-theme {
                padding: 27px 40px !important;
            } */

          
          
        }

.video-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
}

.video-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* Optional: Dim non-active videos slightly */
    transition: filter 0.3s ease;
}

/* Hide controls by default on all slides */
.video-slider .swiper-slide .video-controls-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s ease;
}

/* ONLY show icons on the ACTIVE (Centered) slide */
.video-slider .swiper-slide-active .video-controls-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Big Red Play/Pause Button */
.video-controls-overlay {
    position: absolute;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    cursor: pointer;
}

.play-pause-icon i {
    font-size: 75px;
    color: #e31e24;
    filter: drop-shadow(0px 4px 10px rgba(0,0,0,0.3));
    transition: transform 0.2s ease;
}

.play-pause-icon i:hover {
    transform: scale(1.1);
}

/* Switcher Styling */
.view-switcher {
    background: #222;
    padding: 5px;
    border-radius: 30px;
    display: inline-flex;
    margin-top: 15px;
    border: 1px solid #444;
}
.btn-view {
    border: none;
    background: transparent;
    color: #fff;
    padding: 8px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 14px;
}
.btn-view.active {
    background: #ff0000; /* Kerala Police Red */
    color: white;
}

/*/* GRID MODE OVERRIDES */
.grid-mode {
    display: block !important;
    max-height: 350px; /* Limits to ~2 rows */
    overflow-y: auto !important; /* Enables vertical scroll */
    overflow-x: hidden !important;
    padding: 15px;

    scrollbar-width: thin;
    scrollbar-color: #ff0000 #222;
}

/* Custom Scrollbar for Chrome/Edge */
.grid-mode::-webkit-scrollbar { width: 6px; }
.grid-mode::-webkit-scrollbar-track { background: #1a1a1a; }
.grid-mode::-webkit-scrollbar-thumb { background: #ff0000; border-radius: 10px; }

.grid-mode .swiper-wrapper {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
    gap: 20px !important;
    transform: none !important; /* Disables Swiper's sliding transform */
    width: 100% !important;
    height: auto !important;
}

.grid-mode .swiper-slide {
    width: 100% !important; /* Overrides the 450px slider width */
    height: 300px !important; /* Fixed height for grid items */
    margin: 0 !important;
    filter: brightness(1) !important; /* REMOVES the 0.4 brightness filter */
    opacity: 1 !important;
    position: relative !important;
    display: block !important;
}

.grid-mode .swiper-slide img,
.grid-mode .swiper-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Hide pagination during grid mode */
.grid-mode ~ .custom-pagination {
    display: none !important;
}

/* Keep your existing slider brightness if you want it only for slider mode */
.gallery-slider:not(.grid-mode) .swiper-slide {
    width: 450px;
    height: 320px;
    filter: brightness(0.4);
    transition: 0.3s;
}
.gallery-slider:not(.grid-mode) .swiper-slide-active {
    filter: brightness(1);
}

/* Ensure the video container is visible in Grid Mode */
.grid-mode .video-card {
    height: 100% !important;
    width: 100% !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.grid-mode .main-video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 8px;
}

/* Fix for videos being 'stuck' or invisible after destroying Swiper */
.grid-mode .swiper-slide-duplicate {
    display: none !important; /* Hide the clones created by Swiper Loop */
}

/* Force the grid container to allow scrolling */
/* #video-gallery-card .grid-mode {
    display: grid !important;
    max-height: 580px; 
    overflow-y: auto !important;
    gap: 20px;
    padding: 10px;
} */

/* Grid Mode Layout */
.grid-mode .swiper-wrapper {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    transform: none !important;
    width: 100% !important;
    height: auto !important;
}

.grid-mode .swiper-slide {
    width: 100% !important;
    margin: 0 !important;
    height: auto !important;
    pointer-events: auto !important; /* This allows video clicks in grid */
}

/* Ensure the overlay doesn't block clicks in grid */
.video-controls-overlay {
    cursor: pointer;
    z-index: 10;
}

/* Hide pagination buttons in grid mode if desired */
.grid-mode + .custom-pagination,
.grid-mode ~ .custom-pagination {
    display: none !important;
}
/* Fix: Ensure overlay is clickable and visible in Grid Mode */
.grid-mode .video-controls-overlay {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    
}

/* Ensure the play icon is always centered in the grid card */
.grid-mode .video-card {
    display: flex !important;
    justify-content: center;
    align-items: center;
}
/* Remove box shadow only in Grid Mode */
.grid-mode .gallery-card, 
.grid-mode .video-card {
    box-shadow: none !important;
    border: none !important; /* Optional: removes borders if any */
}

/* If the shadow is coming from the swiper-slide or another container */
.grid-mode .swiper-slide {
    box-shadow: none !important;
}




/* Example CSS to handle the grid layout when Swiper is destroyed */
.gallery-slider.grid-mode, 
/* .video-slider.grid-mode {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    height: auto !important;
} */

.gallery-slider.grid-mode .swiper-wrapper,
.video-slider.grid-mode .swiper-wrapper {
    display: contents; /* Allows slides to become direct children of the grid */
}

.gallery-slider.grid-mode .swiper-slide,
.video-slider.grid-mode .swiper-slide {
    width: 100% !important;
    margin: 0 !important;
    transform: none !important; /* Removes coverflow 3D effects */
}


	.back-gallery-wrapper {
		margin-top: 25px;
		display: inline-block;
	}
	.btn-back-gallery {
		display: inline-flex;
		align-items: center;
		gap: 10px;
		padding: 10px 22px;
		background-color: rgba(255, 255, 255, 0.08);
		color: #ffffff;
		border: 1px solid rgba(255, 255, 255, 0.25);
		border-radius: 30px;
		text-decoration: none;
		font-size: 14px;
		font-weight: 500;
		letter-spacing: 0.5px;
		transition: all 0.3s ease;
	}
	.btn-back-gallery:hover {
		background-color: #ffffff;
		color: #111111;
		border-color: #ffffff;
		box-shadow: 0 4px 15px rgba(255, 255, 255, 0.15);
		text-decoration: none;
	}
	.btn-back-gallery svg {
		transition: transform 0.3s ease;
	}
	.btn-back-gallery:hover svg {
		transform: translateX(-4px);
	}
	
	
	 .back-gallery-wrapper {
            margin-top: 25px;
            display: inline-block;
        }
        .btn-back-gallery {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            padding: 10px 22px;
            background-color: rgba(255, 255, 255, 0.08);
            color: #ffffff;
            border: 1px solid rgba(255, 255, 255, 0.25);
            border-radius: 30px;
            text-decoration: none;
            font-size: 14px;
            font-weight: 500;
            letter-spacing: 0.5px;
            transition: all 0.3s ease;
        }
        .btn-back-gallery:hover {
            background-color: #ffffff;
            color: #111111;
            border-color: #ffffff;
            box-shadow: 0 4px 15px rgba(255, 255, 255, 0.15);
            text-decoration: none;
        }
        .btn-back-gallery svg {
            transition: transform 0.3s ease;
        }
        .btn-back-gallery:hover svg {
            transform: translateX(-4px);
        }
        
        /* Lightbox Styles */
        .lightbox {
            display: none;
            position: fixed;
            z-index: 99999;
            padding-top: 50px;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            overflow: hidden;
            background-color: rgba(0,0,0,0.9);
            backdrop-filter: blur(5px);
        }

        .lightbox-content-wrapper {
            position: relative;
            margin: auto;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            height: 85%;
            max-width: 90%;
            padding-bottom: 120px; /* Ensure space for thumbnails */
            box-sizing: border-box;
        }

        .lightbox-content {
            max-height: 100%;
            max-width: 100%;
            object-fit: contain;
            animation-name: zoom;
            animation-duration: 0.4s;
            border-radius: 8px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.5);
        }

        #lightbox-caption {
            margin-top: 15px;
            text-align: center;
            color: #fff;
            font-size: 18px;
            font-weight: 500;
            animation-name: zoom;
            animation-duration: 0.4s;
            /* margin-bottom removed because padding-bottom on wrapper handles it */
        }

        @keyframes zoom {
            from {transform:scale(0.95); opacity: 0;} 
            to {transform:scale(1); opacity: 1;}
        }

        .lightbox-close {
            position: absolute;
            top: 20px;
            right: 35px;
            color: #f1f1f1;
            font-size: 40px;
            font-weight: bold;
            transition: 0.3s;
            cursor: pointer;
            z-index: 100000;
        }

        .lightbox-close:hover,
        .lightbox-close:focus {
            color: #bbb;
            text-decoration: none;
            cursor: pointer;
        }

        .lightbox-prev, .lightbox-next {
            cursor: pointer;
            position: absolute;
            top: 50%;
            width: 50px;
            height: 50px;
            display: flex;
            align-items: center;
            justify-content: center;
            transform: translateY(-50%);
            color: white;
            font-weight: bold;
            font-size: 24px;
            transition: 0.3s ease;
            user-select: none;
            background-color: rgba(255,255,255,0.1);
            border: 1px solid rgba(255,255,255,0.2);
            border-radius: 50%;
            z-index: 100000;
        }

        .lightbox-next {
            right: 30px;
        }
        .lightbox-prev {
            left: 30px;
        }

        .lightbox-prev:hover, .lightbox-next:hover {
            background-color: rgba(255,255,255,0.3);
        }

        /* Thumbnail Strip */
        .lightbox-thumbnails-container {
            position: absolute;
            bottom: 30px;
            left: 0;
            width: 100%;
            display: flex;
            justify-content: center;
            gap: 10px;
            padding: 10px 20px;
            box-sizing: border-box;
            overflow-x: auto;
            z-index: 100000;
        }

        .lightbox-thumbnail {
            width: 60px;
            height: 60px;
            object-fit: cover;
            border: 2px solid transparent;
            border-radius: 4px;
            cursor: pointer;
            opacity: 0.5;
            transition: 0.3s;
            flex-shrink: 0;
        }

        .lightbox-thumbnail:hover {
            opacity: 0.8;
        }

        .lightbox-thumbnail.active {
            border-color: #fff;
            opacity: 1;
        }
        
        .collage-item {
            cursor: pointer;
        }
        /* Scroll Animations (Framer Motion style) */
        .reveal-on-scroll {
            opacity: 0;
            transform: translateY(40px) scale(0.96);
            transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
            will-change: opacity, transform;
        }

        .reveal-on-scroll.is-visible {
            opacity: 1;
            transform: translateY(0) scale(1);
        }

/* Details Page Grid to match Figma */
@media (min-width: 992px) {
    .collage-grid.details-page-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        grid-auto-rows: min-content !important;
        gap: 24px !important;
        align-items: start !important;
    }
    
    .collage-grid.details-page-grid .collage-item {
        grid-column: auto !important;
        grid-row: auto !important;
        aspect-ratio: 4 / 3;
        border-radius: 12px;
        overflow: hidden;
    }
}

@media (max-width: 991.98px) {
    .collage-grid.details-page-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
    .collage-grid.details-page-grid .collage-item {
        border-radius: 12px;
        aspect-ratio: 4 / 3;
    }
}

@media (max-width: 575.98px) {
    .collage-grid.details-page-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Dark Theme Pagination */
.figma-dark-theme .custom-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
}

.figma-dark-theme .custom-pagination .page-num,
.figma-dark-theme .custom-pagination .prev-btn,
.figma-dark-theme .custom-pagination .next-btn {
    background-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 13px;
    text-decoration: none;
    transition: 0.3s;
}

.figma-dark-theme .custom-pagination .page-num:hover,
.figma-dark-theme .custom-pagination .prev-btn:hover,
.figma-dark-theme .custom-pagination .next-btn:hover {
    background-color: rgba(255, 255, 255, 0.4) !important;
}

.figma-dark-theme .custom-pagination .page-num.active {
    background-color: #d32f2f !important;
}

.figma-dark-theme .custom-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-height: 740px) {
    .structure-bg {
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }
    .gallery-slider:not(.grid-mode) .swiper-slide,
    .video-slider:not(.grid-mode) .swiper-slide {
        height: 320px !important;
    }
    .gallery-slider:not(.grid-mode) .swiper-slide-active,
    .video-slider:not(.grid-mode) .swiper-slide-active {
        height: 320px !important;
    }
    .mb-5, .my-5 {
        margin-bottom: 1.5rem !important;
    }
    .custom-pagination {
        margin-top: 15px !important;
    }
}

@media (max-width: 1280px) {
    .video-slider.mb-md-5 {
        margin-bottom: 0 !important;
    }
}

/* =========================================================
   MOBILE RESPONSIVENESS (Ultra-small screens down to 320px)
   ========================================================= */
@media (max-width: 480px) {
    /* 1. Fix user-forced heights that cause overflow on small screens */
    .gal-details,
    .card-inner-content {
        height: auto !important;
        min-height: 100vh; /* Allow it to grow based on content */
        padding-bottom: 40px !important;
    }

    /* 2. Fix Grid and Spacing for Gallery & Details */
    .collage-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    
    .container-fluid {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    /* 3. Adjust Title Font Sizes */
    .structure-title-gallery {
        font-size: 18px !important; /* Smaller title */
        letter-spacing: 0 !important;
    }

    .section-titil {
        font-size: 14px !important;
    }

    .main-title {
        font-size: 24px !important;
    }

    /* 4. Fix Lightbox UI */
    .lightbox-content-wrapper {
        padding-bottom: 90px !important; /* Less bottom padding needed */
        width: 100% !important;
        max-width: 100% !important;
    }

    #lightbox-caption {
        font-size: 14px !important;
        margin-top: 10px !important;
    }

    .lightbox-thumbnails-container {
        padding: 8px 10px !important;
        gap: 8px !important;
        bottom: 10px !important;
    }

    .lightbox-thumbnail {
        width: 45px !important;
        height: 45px !important;
    }

    .lightbox-close {
        top: 10px !important;
        right: 15px !important;
        font-size: 30px !important;
    }

    /* 5. Fix Pagination spacing on tiny screens */
    .custom-pagination {
        flex-wrap: wrap !important;
        gap: 5px !important;
    }
    
    .page-num, .prev-btn, .next-btn {
        padding: 5px 10px !important;
        font-size: 12px !important;
    }
}