/* ===== GALLERY LAYOUT STYLES ===== */
.pic-text-right {
    text-align: right !important;
    font-weight: bold;
    margin: 0;
    color: #ffffff;
}

.pic-gallery-container {
    display: flex;
    gap: 20px;
    margin: 30px auto;
    justify-content: center;
    align-items: stretch;
    max-width: 1400px;
    padding: 0 20px;
    box-sizing: border-box;
    min-height: 600px; /* Tambahkan min-height yang cukup */
}

.pic-main-image {
    flex: 0 0 35%;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    background: #f8f9fa;
    height: 100%;
    display: flex; /* Tambahkan flex */
    flex-direction: column;
}

.pic-side-gallery {
    flex: 0 0 60%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: 100%;
}

.pic-gallery-row {
    display: flex;
    gap: 15px;
    width: 100%;
    flex: 1;
    min-height: 0; /* Penting untuk flexbox calculation */
}

.pic-gallery-item {
    flex: 1;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background: #f8f9fa;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    min-height: 0; /* Penting untuk flexbox */
}

.pic-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* ===== IMAGE STYLES ===== */
.pic-main-image a,
.pic-gallery-item a {
    display: block;
    width: 100%;
    height: 100%;
    flex: 1;
    min-height: 0;
}

.pic-gallery-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

/* Hapus min-height dari img, gunakan dari container */
.pic-main-image img {
    height: 100%;
}

.pic-gallery-item img {
    height: 100%;
}

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

/* ===== OVERLAY STYLES ===== */
.pic-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
    padding: 20px;
    color: white;
    transition: all 0.3s ease;
}

.pic-gallery-item:hover .pic-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), transparent);
    padding-bottom: 25px;
}

.pic-main-overlay {
    padding: 30px;
}

/* ===== TYPOGRAPHY STYLES ===== */
.pic-overlay h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #ffffff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.3;
}

.pic-overlay p {
    font-size: 1rem;
    margin: 0;
    color: #e0e0e0;
    font-family: Arial, sans-serif;
    line-height: 1.4;
}

.pic-main-overlay h3 {
    font-size: 2.2rem;
    color: #ff9900;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: 800;
    margin-bottom: 15px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.pic-main-overlay p {
    font-size: 1.3rem;
    color: #ffffff;
    font-family: Georgia, serif;
    font-weight: 500;
}

/* ===== LINK STYLES ===== */
.pic-gallery-container a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.pic-gallery-container a:hover {
    text-decoration: none;
}

/* ===== FIXED HEIGHT APPROACH ===== */
/* Alternatif: Gunakan fixed height calculation */
@media (min-width: 969px) {
    .pic-gallery-container {
        height: 600px; /* Fixed height untuk desktop */
    }

    .pic-main-image,
    .pic-side-gallery {
        height: 100%;
    }

    .pic-gallery-row {
        height: calc(50% - 7.5px); /* 50% minus setengah gap */
    }
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet Devices (768px - 968px) */
@media (max-width: 968px) {
    .pic-gallery-container {
        flex-direction: column;
        gap: 25px;
        margin: 25px 15px;
        align-items: stretch;
        height: auto; /* Reset height untuk mobile */
        min-height: auto;
    }

    .pic-main-image,
    .pic-side-gallery {
        flex: 0 0 auto;
        width: 100%;
        height: auto;
    }

    .pic-main-image {
        min-height: 400px;
    }

    .pic-gallery-item {
        min-height: 200px;
        height: auto;
    }

    .pic-main-overlay h3 {
        font-size: 1.8rem;
    }

    .pic-main-overlay p {
        font-size: 1.1rem;
    }

    .pic-overlay h3 {
        font-size: 1.1rem;
    }
}

/* Mobile Devices (480px - 767px) */
@media (max-width: 767px) {
    .pic-gallery-container {
        margin: 20px 10px;
        gap: 20px;
    }

    .pic-main-image {
        min-height: 300px;
        border-radius: 12px;
    }

    .pic-gallery-row {
        flex-direction: column;
        gap: 12px;
    }

    .pic-gallery-item {
        min-height: 150px;
        border-radius: 10px;
    }

    .pic-overlay {
        padding: 15px;
    }

    .pic-main-overlay {
        padding: 20px;
    }

    .pic-main-overlay h3 {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    .pic-main-overlay p {
        font-size: 1rem;
    }

    .pic-overlay h3 {
        font-size: 1rem;
    }

    .pic-overlay p {
        font-size: 0.9rem;
    }
}

/* Small Mobile Devices (under 480px) */
@media (max-width: 480px) {
    .pic-gallery-container {
        margin: 15px 8px;
    }

    .pic-main-image {
        min-height: 250px;
    }

    .pic-gallery-item {
        min-height: 120px;
    }

    .pic-overlay {
        padding: 12px;
    }

    .pic-main-overlay {
        padding: 15px;
    }

    .pic-main-overlay h3 {
        font-size: 1.3rem;
    }

    .pic-main-overlay p {
        font-size: 0.9rem;
    }

    .pic-overlay h3 {
        font-size: 0.9rem;
        margin-bottom: 5px;
    }

    .pic-overlay p {
        font-size: 0.8rem;
    }
}
