/* =========================================
   PORTOFOLIO MODERN & MINIMALIS (Gemini Style)
   ========================================= */

/* 1. Utilitas Dasar */
:root {
    --primary-color: #0d6efd;
    /* Bootstrap Primary */
    --soft-primary: rgba(13, 110, 253, 0.1);
    --dark-text: #1a1a1a;
    --muted-text: #6c757d;
    --transition-smooth: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    /* Kunci animasi halus */
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--dark-text);
    background-color: #fcfcfc;
}

/* Profile Image Styling */
.profile-img-container {
    width: 280px;
    height: 280px;
    position: relative;
    border-radius: 50%;
    overflow: hidden;
    border: 8px solid white;
}

@media (max-width: 991px) {
    .profile-img-container {
        width: 220px;
        height: 220px;
    }
}

.profile-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.profile-img-container:hover .profile-pic {
    transform: scale(1.05);
}

/* Padding Ekstra untuk Section */
.py-6 {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

/* Gradient Text Effect (Tipis ala Google) */
.h-gradient {
    background: linear-gradient(135deg, #1a1a1a 0%, #4a4a4a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Badge Lembut */
.bg-soft-primary {
    background-color: var(--soft-primary);
}

.tracking-wider {
    letter-spacing: 0.1rem;
}

/* Bayangan Minimalis (Sangat Halus) */
.shadow-minimal {
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.03);
}

/* 2. Creative Card Styling (Bento Grid Item) */
.creative-card {
    border: none;
    transition: var(--transition-smooth);
    position: relative;
    backface-visibility: hidden;
    /* Mencegah flicker saat animasi */
}

/* Container Gambar (Fokus Utama) */
.card-img-wrapper {
    position: relative;
    width: 100%;
    height: 250px;
    /* Jauh lebih besar */
    overflow: hidden;
}

.creative-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
    transform: scale(1.01);
    /* Mulai sedikit besar */
}

/* Gradient Overlay di Atas Gambar (Biar Teks Terbaca) */
.img-overlay-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: 1;
}

/* Body Card di bawah gambar */
.card-body-creative {
    margin-top: -20px;
    /* Menumpuk sedikit di atas gradient overlay */
}

.card-title-modern {
    font-size: 1.25rem;
    letter-spacing: -0.02rem;
}

.small-text {
    font-size: 0.9rem;
    line-height: 1.5;
}

/* =========================================
   3. ANIMASI MEMANJAKAN MATA (Hover Effects)
   ========================================= */

/* Efek saat Kursor di Atas Card */
.creative-card:hover {
    transform: translateY(-8px);
    /* Mengangkat pelan */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
    /* Bayangan menyebar halus */
}

/* Efek Gambar Membesar Pelan (Memanjakan Mata) */
.creative-card:hover .creative-img {
    transform: scale(1.1);
    /* Gambar zoom-in halus */
}

/* Opsional: Efek Border Cahaya Tipis saat Hover */
.creative-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 1rem;
    /* rounded-4 */
    box-shadow: 0 0 0 0px var(--primary-color);
    transition: var(--transition-smooth);
    opacity: 0;
    z-index: -1;
}

.creative-card:hover::after {
    box-shadow: 0 0 0 3px var(--soft-primary);
    opacity: 1;
}

/* 4. Tambahan Utilitas (Dipertahankan dari sebelumnya) */
/* Blur Global dihilangkan agar Modal tidak ikut ter-blur */
.modal-backdrop.show {
    backdrop-filter: blur(15px) grayscale(20%); /* Efek blur lebih dalam + sedikit grayscale agar premium */
    background-color: rgba(0, 0, 0, 0.2); 
    opacity: 1 !important;
}

.img-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.activity-card {
    transition: var(--transition-smooth);
    background: white;
    cursor: pointer;
}

.activity-card:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08) !important;
}

.activity-card img {
    transition: var(--transition-smooth);
}

.activity-card:hover img {
    filter: brightness(0.9);
}

/* --- Certificate Gallery Styling --- */
.cert-card {
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.cert-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important;
    border-color: var(--primary-color);
}

.cert-card img {
    transition: var(--transition-smooth);
}

.cert-card:hover img {
    filter: brightness(1.05);
}

/* Modal Blur Enhancement */
.modal.fade .modal-dialog {
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.show .modal-dialog {
    transform: scale(1.02);
}

/* --- Fluid Masonry System --- */
.masonry-wrapper {
    width: 100%;
    max-width: 1400px;
    /* Batasi lebar maksimal agar tidak terlalu melar di monitor ultra-wide */
    margin: 0 auto;
    /* Center container */
}

.masonry-grid {
    column-count: 3;
    column-gap: 1.2rem;
    width: 100%;
}

/* Penyesuaian jumlah kolom berdasarkan lebar layar */
@media (max-width: 1100px) {
    .masonry-grid {
        column-count: 2;
    }
}

@media (max-width: 768px) {
    .masonry-grid {
        column-count: 1;
    }
}

.masonry-item {
    display: block;
    width: 100%;
    margin-bottom: 1.2rem;
    break-inside: avoid;
    /* Mencegah kartu terbelah di tengah */
}

/* --- Paksa Iframe Jadi Responsif --- */
.embed-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Paksa kartu ambil tinggi penuh */
    background: white;
    border-radius: 16px;
    border: 1px solid #eee;
    margin-bottom: 20px;
}

/* Rahasia agar iframe tidak terpotong di mobile */
.embed-responsive-container {
    flex-grow: 1;
    /* Biarkan iframe mengambil sisa ruang */
    width: 100% !important;
    overflow: hidden;
}

.embed-responsive-container iframe {
    width: 100% !important;
    /* Paksa lebar 100% */
    height: auto;
    min-height: 450px;
    /* Beri tinggi minimal agar tidak gepeng */
    border: none !important;
}

/* --- Limit Deskripsi (Instagram Style) --- */
.post-description {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* Maksimal 2 baris saja */
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.85rem;
    color: #666;
}

/* Container untuk judul/deskripsi yang bisa di-expand */
.expandable-text {
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Default: Hanya tampilkan 2 baris */
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    line-height: 1.4;
    color: #333;
}

/* Class saat teks dibuka sepenuhnya */
.expandable-text.expanded {
    -webkit-line-clamp: unset; /* Hilangkan batasan baris */
    line-clamp: unset;
    display: block;
}

/* Tombol Biru Lihat Lainnya */
.read-more-btn {
    color: #0095f6; /* Biru khas Instagram */
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    display: inline-block;
    margin-top: 5px;
}

.read-more-btn:hover {
    color: #00376b;
}

/* Bagian Footer Kartu (Tempat Ikon & Tombol) */
.card-footer-custom {
    padding: 15px;
    background: #fff;
    border-top: 1px solid #f8f9fa;
    z-index: 5;
    /* Pastikan di atas */
}

/* --- Efek Blur / Fade Out Setelah 5 Item --- */
.activity-wrapper {
    position: relative;
    overflow: hidden;
    transition: max-height 0.8s ease;
}

/* Desktop: 3 kolom, tinggi terbatas aman */
@media (min-width: 992px) {
    .activity-wrapper.is-limited {
        max-height: 1200px;
    }
}

/* Mobile/Tablet: Postingan menumpuk, jadi tinggi harus ditambah agar 3-4 post tetap kelihatan */
@media (max-width: 991px) {
    .activity-wrapper.is-limited {
        max-height: 2000px;
        /* Lebih tinggi agar post ke-3 tidak hilang total */
    }

    .fade-overlay {
        height: 200px;
        /* Kabut lebih tipis di mobile agar tidak menutupi tombol */
    }
}

/* Overlay Transparan & Blur di bagian bawah */
.fade-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 300px;
    /* Area blur */
    background: linear-gradient(to top, rgba(255, 255, 255, 1) 20%, rgba(255, 255, 255, 0) 100%);
    backdrop-filter: blur(2px);
    /* Memberikan efek kaca tipis */
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 50px;
    z-index: 10;
}

/* Iframe Responsif */
.masonry-item iframe {
    width: 100% !important;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* Carousel Gambar yang Tajam & Teratur */
.carousel-item img {
    max-height: 75vh;
    object-fit: contain;
    background: #f8f9fa;
    border-radius: 12px;
}

/* Modal Content harus tetap tajam */
.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
}

.modal-content {
    border-radius: 20px;
    z-index: 9999; /* Pastikan di atas segalanya */
}

/* Kartu Sertifikat */
.cert-card {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.cert-card:hover {
    transform: translateY(-5px) scale(1.03);
}

.cert-card img {
    border: 3px solid transparent;
    transition: border-color 0.3s ease;
}

.cert-card:hover img {
    border-color: var(--primary-color);
}

/* Container Judul Sertifikat agar seragam */
.cert-info-wrapper {
    min-height: 80px; /* Kunci tinggi agar semua kartu sejajar */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.cert-title-expandable {
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Batasi maksimal 2 baris */
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #333;
    transition: all 0.3s ease;
}

.cert-title-expandable.expanded {
    -webkit-line-clamp: unset;
    line-clamp: unset;
    display: block;
}

/* Tombol Lihat Lainnya versi kecil untuk Sertifikat */
.cert-read-more {
    font-size: 0.75rem;
    color: #0095f6;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    margin-top: 4px;
    display: inline-block;
}

/* ===== FOOTER SITEMAP GRID ===== */
/* Grid: 3 link ke bawah, lalu lanjut ke kolom berikutnya */
.footer-sitemap-grid {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    max-height: calc(3 * (1.6rem + 12px)); /* 3 baris × (tinggi font + row gap) */
    gap: 10px 40px; /* jarak vertikal 10px, jarak antar kolom 40px */
    align-content: flex-start;
}

.footer-sitemap-item {
    font-size: 0.9rem;
    line-height: 1.6;
    transition: opacity 0.2s ease, color 0.2s ease;
    white-space: nowrap; /* Jangan pecah nama link */
}

.footer-sitemap-item:hover {
    opacity: 0.75;
    color: #60c6ff !important;
}

/* Di mobile: kembali ke flex biasa agar wrapping tidak terlalu pendek */
@media (max-width: 576px) {
    .footer-sitemap-grid {
        flex-direction: row;
        max-height: none;
        gap: 10px 20px;
    }
}