/* Main Styles for Index Page */

/* Video Slider Section Styles */
.video-slider-section {
    background: #fff;
    padding: 0;
    margin: 0;
}

.video-header-bar {
    background: #ffc30c; /* Yellow header bar */
    padding: 1rem 1.5rem;
    border-bottom: 2px solid #fff;
}

.video-title-header {
    font-size: 1.5rem;
    font-weight: bold;
    color: #000;
    margin: 0;
    text-align: left;
}

.video-slider-container {
    position: relative;
    background: #f8f9fa;
    padding: 2rem 0;
    overflow: hidden;
}

.video-slider-wrapper {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 80px;
    transform: translateX(15%);
}

.video-slider-track {
    display: flex;
    gap: 20px;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.video-card {
    flex: 0 0 calc(60% - 4px);
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    opacity: 0.7;
    transform: scale(0.9);
}

.video-card.active {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}


.video-player {
    position: relative;
    width: 100%;
    height: 300px; /* Fixed height as requested */
    overflow: hidden;
    border-radius: 10px;
}

.video-player iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 300px; /* Fixed height as requested */
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Show full image without cropping */
    object-position: center;
    transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.video-play-overlay i {
    color: #fff;
    font-size: 20px;
    margin-left: 3px; /* Slight offset for play icon */
}

.video-card:hover .video-play-overlay {
    background: rgba(0, 0, 0, 0.8);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-info {
    padding: 1rem;
    background: #fff;
}

.video-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.6rem;
}

.video-date {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
}

.video-placeholder {
    width: 100%;
    height: 100%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-placeholder i {
    font-size: 3rem;
    color: #adb5bd;
}

.video-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    color: #fff;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-nav-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.video-prev {
    left: 0;
}

.video-next {
    right: 0;
}

.video-nav-btn i {
    font-size: 18px;
}

/* Responsive Video Slider */
@media (max-width: 992px) {
    .video-slider-wrapper {
        padding: 0 50px;
        transform: translateX(10%);
    }
    
    .video-card {
        flex: 0 0 calc(60% - 15px);
    }
    
    .video-thumbnail {
        height: 180px;
    }
    
    .video-slider-track {
        margin-left: 0;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .video-slider-wrapper {
        padding: 0 40px;
        transform: translateX(8%);
    }
    
    .video-card {
        flex: 0 0 calc(70% - 10px);
    }
    
    .video-thumbnail {
        height: 160px;
    }
    
    .video-slider-track {
        margin-left: 0;
        gap: 10px;
    }
    
    .video-nav-btn {
        width: 40px;
        height: 40px;
    }
    
    .video-nav-btn i {
        font-size: 16px;
    }
    
    .video-prev {
        left: 10px;
    }
    
    .video-next {
        right: 10px;
    }
}

@media (max-width: 576px) {
    .video-header-bar {
        padding: 0.75rem 1rem;
    }
    
    .video-title-header {
        font-size: 1.25rem;
    }
    
    .video-slider-container {
        padding: 1rem 0;
    }
    
    .video-slider-wrapper {
        padding: 0 30px;
        transform: translateX(5%);
    }
    
    .video-card {
        flex: 0 0 calc(75% - 8px);
    }
    
    .video-thumbnail {
        height: 140px;
    }
    
    .video-slider-track {
        margin-left: 0;
        gap: 8px;
    }
    
    .video-info {
        padding: 0.75rem;
    }
    
    .video-title {
        font-size: 0.9rem;
        min-height: 2.4rem;
    }
    
    .video-date {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .video-slider-wrapper {
        padding: 0 25px;
        transform: translateX(3%);
    }
    
    .video-card {
        flex: 0 0 calc(70% - 6px);
    }
    
    .video-thumbnail {
        height: 120px;
    }
    
    .video-slider-track {
        gap: 6px;
    }
    
    .video-nav-btn {
        width: 35px;
        height: 35px;
    }
    
    .video-nav-btn i {
        font-size: 14px;
    }
    
    .video-prev {
        left: 5px;
    }
    
    .video-next {
        right: 5px;
    }
}



/* ========== GALLERY INFRASTRUKTUR STYLES ========== */
/* Fix gallery size and border-radius */
.gallery-display-section .slide-img-wrap,
.gallery-display-section .galeri-section .slide-img-wrap {
    border-radius: 22px !important;
    aspect-ratio: 1 / 1 !important; /* Square aspect ratio untuk gallery */
    width: 100% !important;
    height: 350px !important; /* Fixed height */
    overflow: hidden !important;
}

/* Ensure gallery items have proper size */
.gallery-display-section .gallery-item {
    border-radius: 22px !important;
    height: 350px !important;
    width: 100% !important;
    overflow: hidden !important;
}

/* Override any aspect-ratio yang membuat gallery terlalu panjang */
.gallery-display-section .gallery-item img {
    border-radius: 22px !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
}

/* Force border-radius untuk gallery */
.gallery-grid,
.gallery-item,
.gallery-display-section .gallery-grid,
.gallery-display-section .gallery-item {
    border-radius: 22px !important;
    -webkit-border-radius: 22px !important;
    -moz-border-radius: 22px !important;
    -ms-border-radius: 22px !important;
    -o-border-radius: 22px !important;
}

/* Gallery page styles matching video layout */
.gallery-index-item.active {
    background: #f0f8ff !important;
}

.gallery-index-list {
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.gallery-index-list::-webkit-scrollbar {
    width: 4px;
}

.gallery-index-list::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.gallery-index-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

/* Gallery overlay hover effect */
.gallery-item:hover .gallery-overlay {
    opacity: 1 !important;
}

/* Ensure click works properly */
.gallery-item {
    cursor: pointer !important;
    position: relative !important;
    pointer-events: auto !important;
}

.gallery-item img {
    pointer-events: none !important;
}

.gallery-item .gallery-overlay {
    pointer-events: none !important;
}

/* Pagination styles */
.pagination .page-link {
    border-radius: 6px !important;
    margin: 0 2px !important;
    padding: 8px 12px !important;
    transition: all 0.3s ease !important;
}

.pagination .page-link:hover {
    background-color: #1e3a8a !important;
    color: white !important;
    transform: translateY(-2px) !important;
}

.pagination .page-item.active .page-link {
    background-color: #1e3a8a !important;
    border-color: #1e3a8a !important;
    color: white !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container-fluid {
        padding: 0 20px !important;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
    
    .gallery-item {
        height: 350px !important;
    }
    
    .gallery-overlay {
        padding: 15px !important;
    }
    
    .gallery-title {
        font-size: 0.9rem !important;
    }
    
    .gallery-meta {
        font-size: 0.75rem !important;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    
    .gallery-item {
        height: 280px !important;
    }
    
    .gallery-overlay {
        padding: 12px !important;
    }
}

.galeri-section .slide-img { 
    width: 100%; 
    height: 100%; 
    object-fit: contain; /* Show full image without cropping */ 
    object-position: center center; 
    transition: transform .35s ease; 
    display: block; 
    border-radius: 22px;
}

.galeri-section .slide-caption { 
    position: static; 
    left: auto; 
    right: auto; 
    bottom: auto; 
    padding: 0; 
    background: none; 
    color: #fff; 
    font-weight: 600; 
    font-size: 1rem; 
    text-align: center; 
    margin-top: 0; 
    min-height: 28px; 
}
.galeri-section .container-fluid {
    padding: 0 0 5rem 0;
    position: relative;
    z-index: 2;
}

.infrastructure-bg {
    background-image: url('./assets/img/bg-gallery.png');
}

.slider-wrapper {
    position: relative;
    width: 100%;
    max-width: 2000px;
    margin: 0 auto;
    padding: 0 140px;
    z-index: 3;
}

.slider-title {
    color: white;
    font-size: 3.2rem;
    font-weight: 300;
    letter-spacing: 1px;
    margin-bottom: 3rem;
    text-align: center;
}

.slider-title strong {
    font-weight: 700;
}

.slider-container {
    overflow: hidden;
    width: 100%;
}

.slider-track {
    display: flex;
    transition: transform 0.6s ease-in-out;
    gap: 25px;
    will-change: transform;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    width: 74px;
    height: 74px;
    font-size: 50px;
    color: #fff;
    cursor: pointer;
    font-weight: 900;
    z-index: 10;
    transition: all 0.3s ease;
}

.nav-arrow.prev-arrow {
    left: 20px;
}

.nav-arrow.next-arrow {
    right: 20px;
}

.nav-arrow:hover {
    transform: translateY(-50%) scale(1.1);
}

.no-transition {
    transition: none !important;
}

/* Mobile Slider Styles */
.mobile-slider {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    border-radius: 10px;
    z-index: 3;
}

.mobile-slider-track {
    display: flex;
    transition: transform 0.4s ease-in-out;
    width: 100%;
}

.mobile-slide {
    min-width: 100%;
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
}

.mobile-slide:hover {
    transform: scale(1.02);
}

.mobile-slide img {
    width: 100%;
    height: 240px;
    object-fit: contain; /* Show full image without cropping */
    border-radius: 10px;
}

.mobile-caption {
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 10px;
    color: #fff;
}

.mobile-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.4);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-nav.prev { left: 10px; }
.mobile-nav.next { right: 10px; }

.mobile-placeholder {
    width: 100%;
    height: 200px;
    background: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-placeholder i {
    font-size: 3rem;
    color: #999;
}

/* Logos Section Styles */
.logos {
    display: flex;
    overflow: hidden;
    padding: 60px 0;
    background: white;
    white-space: nowrap;
    position: relative;
    margin-top: 10px;
}

.logos:before,
.logos:after {
    position: absolute;
    width: 250px;
    height: 100%;
    content: "";
    z-index: 2;
}

.logos:before {
    left: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 0), white);
}

.logos:after {
    right: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), white);
}

.logos:hover .logos-slide {
    animation-play-state: paused;
}

.logos-slide {
    display: flex;
    animation: 35s slide infinite linear;
    width: fit-content;
    flex-direction: row;
}

.logos-slide img {
    height: 50px;
    margin: 0 40px;
}

@keyframes slide {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}
.apps-section-title {
    font-size: clamp(20px, 5vw, 2rem);
    text-align: center;
    white-space: nowrap;
    margin-bottom: 50px;
}
.apps-section {
   background-color: #fff;
}
/* Majalah Styles */
.majalah-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.majalah-slide.active {
    opacity: 1;
}

.majalah-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: background 0.3s ease;
}

.majalah-dot.active {
    background: rgba(255, 255, 255, 1);
}

.majalah-dot:hover {
    background: rgba(255, 255, 255, 0.9);
}

.kolom.majalah {
    background-color: #fff;
    border-radius: 5px;
    padding: 10px 13px;
    filter: drop-shadow(0px 2px 3px rgba(0, 0, 0, 0.15));
    margin-bottom: 15px;
    font-size: 9pt;
}

.majalah-slider-container img {
    object-fit: contain !important;
    background: #f8f9fa;
    max-height: 100%;
    max-width: 100%;
}

/* Berita Slider Styles - Moved to custom.css for consistency */

/* Utility Classes */
.no-transition { 
    transition: none !important; 
}

/* Responsive Styles */
@media (max-width: 768px) {
    .galeri-section .slider-title {
        font-size: 2rem !important;
        margin-bottom: 2rem !important;
    }
    
    .galeri-section .slider-wrapper {
        padding: 0 20px !important;
    }
    
    .galeri-section .slide-item {
        flex: 0 0 300px;
        border-radius: 15px;
    }
    
    .galeri-section .slide-caption {
        font-size: 0.9rem;
        margin-top: 10px;
    }
    
    .galeri-section .nav-arrow {
        width: 50px !important;
        height: 50px !important;
        font-size: 30px !important;
    }
    
    .galeri-section .nav-arrow.prev-arrow {
        left: 10px !important;
    }
    
    .galeri-section .nav-arrow.next-arrow {
        right: 10px !important;
    }
    
    .majalah-slider-container {
        height: 280px !important;
    }
}

@media only screen and (max-width: 480px) {
    .logos-slide img {
        height: 80px;
        margin: 0 5px;
    }
    .apps-section-title {
        font-size: clamp(30px, 5vw, 2rem);
    }
    .logos:before {
        left: 0;
        background: linear-gradient(to left, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.541));
    }
    
    .logos:after {
        right: 0;
        background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.541));
    }
}

/* Header Berita Section */
.berita-header-section {
    background: #FFD700; /* Kuning terang */
    padding: 1rem 1.5rem;
    margin-bottom: 0;
    border-radius: 3px 3px 0 0; /* Reduced border radius */
}

.berita-header-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #000;
    margin: 0;
    text-align: left;
}

/* Berita Slider Section */
.berita-slider-section {
    background: #f8f9fa; /* Abu-abu terang */
    border-radius: 0 0 3px 3px; /* Reduced border radius */
    margin-top: 0;
}

/* Berita Card Clean Styles - Image Top, Text Bottom */
.berita-card-clean {
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 3px; /* Reduced border radius */
    transition: transform 0.3s ease;
    background: #fff; /* Ensure white background */
    overflow: hidden;
    width: 100%;
    max-width: 300px;
    margin: 0 0.5rem;
    min-height: 300px; /* Compact height to match photo proportions */
}

.berita-card-clean:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}


.berita-card-clean .berita-img-wrap {
    height: 180px; /* Compact height to match photo proportions */
    overflow: hidden;
    border-radius: 3px 3px 0 0; /* Reduced border radius */
    background: #f8f9fa;
    position: relative;
}

.berita-card-clean .berita-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover to eliminate white space */
    object-position: center;
}

.berita-card-clean .berita-content {
    padding: 1rem;
    background: white;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

.berita-card-clean .berita-judul {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.berita-card-clean .berita-judul a {
    color: #333;
    text-decoration: none;
}

.berita-card-clean .berita-judul a:hover {
    color: #007bff;
}

.berita-card-clean .berita-tanggal {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.berita-card-clean .berita-ringkasan {
    font-size: 0.95rem;
    color: #888;
    line-height: 1.4;
    margin-bottom: 0;
}

/* News Horizontal Slider Styles */
.news-slider-container {
    position: relative;
    overflow: hidden;
    padding: 1rem 25px 0.5rem 25px; /* Mengurangi padding untuk mengurangi gap */
}

.news-slider-wrapper {
    overflow: hidden;
    width: 100%;
}

.news-slider {
    display: flex;
    transition: transform 0.3s ease-in-out;
    gap: 7px; /* Ubah nilai ini untuk mengatur jarak antar card */
    width: 100%;
}

.news-slider .col-6 {
    flex: 0 0 auto;
    width: calc(20% - 2px); /* Sesuaikan dengan gap yang baru */
    min-width: 242px;
    height: 100%;
}

.news-slider .col-6 .card {
    height: 100%;
    max-height: 350px; /* Increased height to match infografis */
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 3px; /* Reduced border radius */
}

.news-slider .col-6 a:hover .card {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.news-slider .col-6 .card-img-container {
    height: 250px; /* Increased height to match infografis */
    overflow: hidden;
    border-radius: 3px 3px 0 0; /* Reduced border radius */
}

.news-slider .col-6 .card-img-top {
    transition: transform 0.3s ease;
    object-fit: cover; /* Cover to eliminate white space */
    object-position: center;
}

.news-slider .col-6:hover .card-img-top {
    transform: scale(1.05);
}


.news-slider .col-6 .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem !important; /* Increased padding for larger card */
}

.news-slider .col-6 .card-title {
    font-size: 1rem; /* Larger font for bigger card */
    font-weight: 600;
    margin-bottom: 0.5rem; /* Increased margin */
    line-height: 1.3; /* Better line height */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.6rem; /* Increased min height */
}

.news-slider .col-6 .card-text {
    font-size: 0.85rem; /* Larger font for bigger card */
    margin-bottom: 0.4rem; /* Increased margin */
}

.news-slider .col-6 .card-text:last-child {
    font-size: 0.8rem; /* Larger font for bigger card */
    color: #666;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Allow more lines for description */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.4rem; /* Increased min height for 3 lines */
}

.news-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.news-slider-btn.hidden {
    display: none !important;
}

.news-slider-btn:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-50%) scale(1.1);
}


.news-slider-prev {
    left: 5px;
}

.news-slider-next {
    right: 5px;
}

.news-slider-btn i {
    font-size: 14px;
    color: #333;
}

@media (max-width: 1200px) {
    .news-slider .col-6 {
        width: calc(25% - 8px);
    }
}

@media (max-width: 992px) {
    .news-slider .col-6 {
        width: calc(33.333% - 8px);
    }
}

@media (max-width: 768px) {
    .news-slider-container {
        padding: 0 30px;
    }
    
    .news-slider .col-6 {
        width: calc(50% - 8px);
    }
    
    .news-slider .col-6 .card-title {
        font-size: 0.85rem;
        min-height: 2.2rem;
    }
    
    .news-slider .col-6 .card-text {
        font-size: 0.75rem;
    }
    
    .news-slider .col-6 .card-text:last-child {
        font-size: 0.7rem;
        min-height: 1.4rem;
    }
    
    .news-slider-btn {
        width: 30px;
        height: 30px;
    }
    
    .news-slider-btn i {
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .news-slider .col-6 {
        width: calc(100% - 8px);
    }
    
    .news-slider-container {
        padding: 0 25px;
    }
    
    .news-slider .col-6 .card-title {
        font-size: 0.8rem;
        min-height: 2rem;
    }
    
    .news-slider .col-6 .card-text {
        font-size: 0.7rem;
    }
    
    .news-slider .col-6 .card-text:last-child {
        font-size: 0.65rem;
        min-height: 1.3rem;
    }
}