/* DOKUMENTASI SECTION - 2 ROWS x 3 COLUMNS LAYOUT */
.dokumentasi {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.dokumentasi::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
            circle at 20% 20%,
            rgba(0, 98, 204, 0.05) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 80% 80%,
            rgba(0, 149, 255, 0.05) 0%,
            transparent 50%
        );
    pointer-events: none;
}

.dokumentasi .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.section-title::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 6px;
    background: linear-gradient(90deg, #0062cc, #0095ff, #00d4ff);
    border-radius: 3px;
    box-shadow: 0 2px 10px rgba(0, 98, 204, 0.3);
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #ff6b6b, #ffa726);
    border-radius: 2px;
}

/* MAIN GRID - 2 ROWS x 3 COLUMNS LAYOUT */
.dokumentasi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 2.5rem;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 1rem;
}

.dokumentasi-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1), 0 1px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(50px); /* dari bawah ke atas */
    transition: all 0.8s ease;
}

.dokumentasi-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.1),
        rgba(255, 255, 255, 0)
    );
    border-radius: 20px;
    pointer-events: none;
    z-index: 1;
}

.dokumentasi-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15),
        0 10px 25px rgba(0, 98, 204, 0.1);
    border-color: rgba(0, 98, 204, 0.2);
}

/* MODIFIED: Increased height and reduced padding for larger image area */
.dokumentasi-image-wrapper {
    width: 100%;
    height: 380px; /* Increased from 280px */
    padding: 1rem; /* Reduced from 1.5rem */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.dokumentasi-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    cursor: zoom-in;
    transition: all 0.4s ease;
}

/* ENHANCED ZOOM HOVER EFFECT */
.dokumentasi-image-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 98, 204, 0.1),
        rgba(0, 149, 255, 0.1)
    );
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 2;
    pointer-events: none;
}

.dokumentasi-image-container:hover::before {
    opacity: 1;
}

/* ZOOM ICON OVERLAY WITH PULSE EFFECT */
.dokumentasi-image-container::after {
    content: "🔍";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 2.8rem;
    color: #0062cc;
    background: rgba(255, 255, 255, 0.95);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(0, 98, 204, 0.3), 0 0 0 0 rgba(0, 98, 204, 0.4);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 3;
    pointer-events: none;
}

.dokumentasi-image-container:hover::after {
    transform: translate(-50%, -50%) scale(1);
    animation: pulseZoom 2s infinite;
}

/* MODIFIED: Adjusted image sizing to fill container better */
.dokumentasi-image {
    width: 100%; /* Changed from max-width to width */
    height: 100%; /* Changed from max-height to height */
    object-fit: contain; /* Keeps entire image visible without cropping */
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    z-index: 1;
    border-radius: 10px;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.1));
}

.dokumentasi-card:hover .dokumentasi-image {
    transform: scale(1.05); /* Reduced from 1.1 to prevent overflow */
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.15)) brightness(1.05)
        contrast(1.1);
}

/* AKTIFKAN SAAT MASUK */
.dokumentasi-card.show {
    opacity: 1;
    transform: translateY(0);
}

/* DELAY BERTAHAP UNTUK ANIMASI BERURUTAN */
.dokumentasi-card:nth-child(1) {
    transition-delay: 0.1s;
}
.dokumentasi-card:nth-child(2) {
    transition-delay: 0.2s;
}
.dokumentasi-card:nth-child(3) {
    transition-delay: 0.3s;
}
.dokumentasi-card:nth-child(4) {
    transition-delay: 0.4s;
}
.dokumentasi-card:nth-child(5) {
    transition-delay: 0.5s;
}
.dokumentasi-card:nth-child(6) {
    transition-delay: 0.6s;
}

/* ZOOM TOOLTIP WITH ANIMATION */
.zoom-tooltip {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.9));
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(-10px) scale(0.8);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
    z-index: 4;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dokumentasi-image-container:hover .zoom-tooltip {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* PULSE ZOOM KEYFRAMES */
@keyframes pulseZoom {
    0% {
        box-shadow: 0 8px 25px rgba(0, 98, 204, 0.3),
            0 0 0 0 rgba(0, 98, 204, 0.4);
    }
    50% {
        box-shadow: 0 8px 25px rgba(0, 98, 204, 0.3),
            0 0 0 15px rgba(0, 98, 204, 0);
    }
    100% {
        box-shadow: 0 8px 25px rgba(0, 98, 204, 0.3),
            0 0 0 0 rgba(0, 98, 204, 0);
    }
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
    .dokumentasi-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 1fr);
        gap: 2rem;
    }

    .dokumentasi-image-wrapper {
        height: 320px;
    }
}

@media (max-width: 768px) {
    .dokumentasi-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(6, 1fr);
        gap: 1.5rem;
    }

    .dokumentasi-image-wrapper {
        height: 280px;
        padding: 0.8rem;
    }

    .section-title {
        font-size: 2.2rem;
        margin-bottom: 3rem;
    }
}

/* ZOOM MODAL STYLES */
.zoom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.zoom-modal.active {
    opacity: 1;
    visibility: visible;
}

.zoom-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.zoom-modal-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: modalZoomIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.zoom-modal.active .zoom-modal-content {
    animation: modalZoomIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalZoomIn {
    0% {
        transform: scale(0.5) rotate(-5deg);
        opacity: 0;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.zoom-modal-close {
    position: absolute;
    top: -20px;
    right: -10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 24px;
    font-weight: 300;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 10001;
}

.zoom-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.zoom-modal-image-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 80vh;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.zoom-modal-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: grab;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 10px;
    user-select: none;
    -webkit-user-drag: none;
}

.zoom-modal-image:active {
    cursor: grabbing;
}

/* ZOOM CONTROLS */
.zoom-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 8px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.zoom-modal-content:hover .zoom-controls {
    opacity: 1;
    transform: translateY(0);
}

.zoom-btn {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.zoom-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.zoom-btn:active {
    transform: scale(0.95);
}

.zoom-in {
    font-size: 24px;
    line-height: 1;
}

.zoom-out {
    font-size: 28px;
    line-height: 1;
}

.zoom-reset {
    font-size: 20px;
}

/* MODAL TITLE */
.zoom-modal-title {
    color: white;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    margin-top: 20px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 200px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* LOADING ANIMATION */
.zoom-modal-image-container::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1;
}

.zoom-modal-image:not([src=""]) + .zoom-modal-image-container::before,
.zoom-modal-image[src=""] ~ .zoom-modal-image-container::before {
    display: none;
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* MOBILE OPTIMIZATIONS */
@media (max-width: 768px) {
    .zoom-modal-close {
        top: -20px;
        right: 0;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .zoom-controls {
        bottom: 15px;
        right: 15px;
        gap: 6px;
    }

    .zoom-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .zoom-in {
        font-size: 20px;
    }

    .zoom-out {
        font-size: 24px;
    }

    .zoom-reset {
        font-size: 18px;
    }

    .zoom-modal-title {
        font-size: 16px;
        margin-top: 15px;
        padding: 10px 20px;
        min-width: 150px;
    }

    .zoom-modal-image-container {
        max-width: 95vw;
        max-height: 75vh;
    }
}

@media (max-width: 480px) {
    .zoom-modal-close {
        top: -35px;
        width: 35px;
        height: 35px;
        font-size: 18px;
    }

    .zoom-controls {
        bottom: 10px;
        right: 10px;
    }

    .zoom-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .zoom-modal-title {
        font-size: 14px;
        padding: 8px 16px;
    }

    .zoom-modal-image-container {
        max-width: 98vw;
        max-height: 70vh;
    }
}

/* KEYBOARD SHORTCUTS INFO */
.zoom-modal-shortcuts {
    position: absolute;
    top: 20px;
    left: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 12px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.zoom-modal:hover .zoom-modal-shortcuts {
    opacity: 1;
}

/* ENHANCED ZOOM CURSOR */
.zoom-modal-image[style*="scale(1)"] {
    cursor: zoom-in;
}

.zoom-modal-image:not([style*="scale(1)"]) {
    cursor: grab;
}

.zoom-modal-image:not([style*="scale(1)"]):active {
    cursor: grabbing;
}

/* PULSE ANIMATION FOR ZOOM ICON */
@keyframes pulseZoom {
    0% {
        box-shadow: 0 8px 25px rgba(0, 98, 204, 0.3),
            0 0 0 0 rgba(0, 98, 204, 0.4);
    }
    50% {
        box-shadow: 0 8px 30px rgba(0, 98, 204, 0.4),
            0 0 0 10px rgba(0, 98, 204, 0);
    }
    100% {
        box-shadow: 0 8px 25px rgba(0, 98, 204, 0.3),
            0 0 0 0 rgba(0, 98, 204, 0);
    }
}

/* FLOATING ANIMATION FOR CARDS */
@keyframes floatCard {
    0%,
    100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
}

.dokumentasi-card:nth-child(odd) {
    animation: floatCard 6s ease-in-out infinite;
}

.dokumentasi-card:nth-child(even) {
    animation: floatCard 6s ease-in-out infinite reverse;
    animation-delay: -3s;
}

.dokumentasi-card:hover {
    animation-play-state: paused;
}

/* RESPONSIVE DESIGN */

/* Large Desktop */
@media (min-width: 1400px) {
    .dokumentasi-grid {
        gap: 3rem;
        max-width: 1400px;
    }

    .dokumentasi-image-wrapper {
        height: 320px;
    }
}

/* Desktop */
@media (min-width: 1200px) and (max-width: 1399px) {
    .dokumentasi-grid {
        gap: 2.5rem;
        max-width: 1300px;
    }

    .dokumentasi-image-wrapper {
        height: 280px;
    }
}

/* Medium Desktop */
@media (min-width: 992px) and (max-width: 1199px) {
    .dokumentasi-grid {
        gap: 2rem;
        max-width: 1100px;
    }

    .dokumentasi-image {
        width: 420px;
    }

    .dokumentasi-image-wrapper {
        height: 250px;
    }

    .dokumentasi-image-container::after {
        font-size: 2.5rem;
        width: 70px;
        height: 70px;
    }
}

/* Tablet - 2 columns, 3 rows */
@media (min-width: 768px) and (max-width: 991px) {
    .dokumentasi-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 1fr);
        gap: 2rem;
        max-width: 800px;
    }

    .dokumentasi-image-wrapper {
        height: 230px;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .dokumentasi-image-container::after {
        font-size: 2.2rem;
        width: 65px;
        height: 65px;
    }
}

/* Small Tablet */
@media (min-width: 576px) and (max-width: 767px) {
    .dokumentasi-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 1fr);
        gap: 1.5rem;
        max-width: 700px;
    }

    .dokumentasi-image-wrapper {
        height: 200px;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .dokumentasi-image-container::after {
        font-size: 2rem;
        width: 60px;
        height: 60px;
    }
}

/* Mobile - 1 column, 6 rows */
@media (max-width: 575px) {
    .dokumentasi {
        padding: 3rem 0;
    }

    .dokumentasi-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(6, 1fr);
        gap: 1.5rem;
        max-width: 380px;
    }

    .dokumentasi-image-wrapper {
        height: 200px;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .dokumentasi-image-container::after {
        font-size: 1.8rem;
        width: 50px;
        height: 50px;
    }

    /* Disable floating animation on mobile for better performance */
    .dokumentasi-card:nth-child(odd),
    .dokumentasi-card:nth-child(even) {
        animation: none;
    }

    .zoom-tooltip {
        opacity: 0.7;
        transform: translateY(0) scale(1);
    }
}

/* Extra Small Mobile */
@media (max-width: 400px) {
    .dokumentasi .container {
        padding: 0 1rem;
    }

    .dokumentasi-grid {
        max-width: 320px;
        gap: 1rem;
    }

    .dokumentasi-image-wrapper {
        height: 180px;
        padding: 1rem;
    }

    .section-title {
        font-size: 1.8rem;
        letter-spacing: 1px;
    }

    .dokumentasi-image-container::after {
        font-size: 1.5rem;
        width: 45px;
        height: 45px;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .dokumentasi-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(2, 1fr);
    }

    .dokumentasi-image-wrapper {
        height: 150px;
    }
}

/* Performance optimizations for mobile */
@media (max-width: 768px) {
    .dokumentasi-card {
        will-change: transform;
    }

    .dokumentasi-image {
        will-change: transform, filter;
    }
}
