/* Styles khusus untuk halaman Portfolio - dengan animasi yang lebih halus */
.portfolio-section {
    flex: 1;
    padding: 50px 0;
    background-color: #ecf2f7; /* Warna dasar sebagai fallback */
    background-image: linear-gradient(rgba(236, 242, 247, 0.92), rgba(236, 242, 247, 0.92)), url('../image/tes.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
    min-height: calc(100vh - 110px);
    font-family: 'Montserrat', sans-serif;
    animation: simpleFadeIn 0.8s ease-in-out; /* Animasi sederhana tanpa kedipan */
}

@keyframes simpleFadeIn {
    from { opacity: 0.95; }
    to { opacity: 1; }
}

/* Portfolio Title dengan animasi slide down yang halus */
.portfolio-title {
    text-align: center;
    margin-bottom: 30px;
    width: 100%;
    position: relative;
    padding-top: 20px;
    animation: simpleSlideDown 0.7s ease-out;
}

@keyframes simpleSlideDown {
    from { 
        transform: translateY(-20px);
        opacity: 0.8;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

.portfolio-title.visible {
    opacity: 1;
}

.portfolio-title h2 {
    display: inline-block;
    background-color: #55788a;
    color: white;
    padding: 15px 50px;
    border-radius: 15px;
    font-size: 32px;
    margin: 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

.portfolio-title h2:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.portfolio-title h2::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
}

.portfolio-title h2:hover::after {
    transform: translateX(100%);
    transition: transform 1.5s;
}

/* Navbar Search Container */
.navbar-search-container {
    position: absolute;
    left: 200px; /* Posisi setelah logo */
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

/* Search Box styling */
.search-box {
    background-color: #55788a;
    border-radius: 20px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.search-box:focus-within {
    width: 220px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    background-color: #476a7c;
}

.search-box i {
    color: white;
    margin-right: 5px;
    transition: transform 0.3s ease;
}

.search-box:focus-within i {
    transform: scale(1.1);
}

.search-box input {
    background: transparent;
    border: none;
    color: white;
    width: 100%;
    outline: none;
    text-align: center;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    transition: opacity 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

.search-box:focus-within input::placeholder {
    opacity: 0.5;
}

.portfolio-grid {
    width: 90%;
    max-width: 1200px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 60px 50px; 
    padding: 40px 0 5px;
    position: relative;
    animation: simpleFadeUp 0.8s ease-out;
}

@keyframes simpleFadeUp {
    from {
        opacity: 0.9;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* No results message */
.no-results-message {
    position: absolute;
    left: 0;
    right: 0;
    text-align: center;
    padding: 50px 0;
    color: #304258;
    font-weight: bold;
    width: 100%;
    grid-column: 1 / -1;
    font-family: 'Montserrat', sans-serif;
}

/* Portfolio Items - sudah ada secara default dan akan muncul langsung */
.portfolio-item {
    display: flex;
    flex-direction: column;
    border-radius: 15px;
    overflow: hidden;
    background-color: #f5f7fa;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    transition: all 0.4s ease;
    opacity: 1; /* Pastikan opacity 1 agar tidak berkedip */
    transform: translateY(0); /* Reset transform */
}

.portfolio-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.portfolio-image-container {
    background-color: #b2cee0;
    padding: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    aspect-ratio: 1/1;
    transition: background-color 0.3s ease;
}

.portfolio-item:hover .portfolio-image-container {
    background-color: #C7D9E5;
}

.portfolio-image-frame {
    background-color: #C7D9E5;
    border-radius: 10px;
    overflow: hidden;
    width: 95%;
    aspect-ratio: 1/1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    transition: all 0.4s ease;
    position: relative;
}

.portfolio-item:hover .portfolio-image-frame {
    width: 95%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    transform: rotate(2deg);
}

.portfolio-image-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
    z-index: 1;
}

.portfolio-item:hover .portfolio-image-frame::before {
    background: rgba(0, 0, 0, 0.05);
}

/* Aturan untuk menyamakan ukuran gambar tanpa menutupi latar belakang */
.portfolio-image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
    z-index: 0;
}

.portfolio-item:hover .portfolio-image-frame img {
    transform: scale(1.05);
}

.portfolio-info {
    padding: 15px;
    background-color: #e6eaef;
    text-align: center;
    transition: background-color 0.3s ease;
}

.portfolio-item:hover .portfolio-info {
    background-color: #d8e0e9;
}

.portfolio-info h3 {
    color: #304258;
    font-size: 18px;
    margin-bottom: 10px;
    line-height: 1.4;
    font-weight: normal;
    transition: color 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

.portfolio-item:hover .portfolio-info h3 {
    color: #1e2a39;
}

.portfolio-info h3 .bold {
    font-weight: bold;
    position: relative;
    display: inline-block;
}

.portfolio-info h3 .bold::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #2A5BDA;
    transition: width 0.4s ease;
}

.portfolio-item:hover .portfolio-info h3 .bold::after {
    width: 100%;
}

.portfolio-info h3 .smaller-text {
    font-size: 15px; /* Ukuran font lebih kecil, bisa disesuaikan */
    display: inline-block;
    font-weight: normal;
}

.see-more-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center; /* Menambahkan align-items center */
    padding: 8px 0 15px; /* Tambahkan padding atas */
    margin-top: -18px;
    background-color: #e6eaef;
    transition: background-color 0.3s ease;
}

.portfolio-item:hover .see-more-container {
    background-color: #d8e0e9;
}

.see-more {
    background-color: #55788a;
    color: white;
    padding: 8px 20px; 
    border-radius: 50px; 
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    margin: 0 auto; 
    display: inline-block; 
    text-align: center; 
    line-height: 1.2;
}

.see-more::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: #2A5BDA;
    transition: width 0.4s ease;
    z-index: -1;
    border-radius: 20px;
}

.see-more:hover {
    background-color: transparent;
    box-shadow: 0 5px 15px rgba(42, 91, 218, 0.2);
    transform: translateY(-3px);
}

.see-more:hover::before {
    width: 100%;
}

/* Hover-tilt effect yang halus */
.hover-tilt {
    transition: transform 0.4s ease;
}

.hover-tilt:hover {
    transform: perspective(500px) rotateX(5deg) rotateY(5deg) scale(1.05);
}

/* Hamburger menu styling */
#menu-toggle {
    display: none;
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 100;
    margin-right: 15px;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #333;
    transition: all 0.3s ease;
}

/* Responsive Design */
@media (max-width: 1100px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 800px;
        gap: 100px 40px;
    }
    
    .navbar-search-container {
        left: 160px;
    }
}

/* Menghapus background image pada mobile */
@media (max-width: 768px) {
    .portfolio-section {
        background-image: none; /* Hapus background image */
        background-color: #ecf2f7; /* Warna dasar tanpa transparansi */
    }
}

@media (max-width: 900px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        width: 85%;
    }
    
    .portfolio-item {
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }
    
    .portfolio-image-container {
        aspect-ratio: 1/1;
        padding: 10px;
        height: auto;
    }
    
    .portfolio-image-frame {
        width: 90%;
        aspect-ratio: 1/1;
        height: auto;
    }
    
    .portfolio-image-frame img {
        width: 100%;
        height: 100%;
    }
    
    .portfolio-info {
        min-height: 120px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    /* Pindahkan search box ke tengah di mobile */
    .navbar-search-container {
        position: absolute;
        left: 50%;
        transform: translate(-50%, -50%);
        top: 70px; /* Di bawah header */
        width: 80%;
        max-width: 280px;
        display: flex;
        justify-content: center;
        z-index: 5;
    }
    
    .search-box {
        width: 100%;
    }
    
    /* Sesuaikan padding top untuk section agar tidak tertutup search box */
    .portfolio-section {
        padding-top: 70px;
    }
    
    /* Mobile menu */
    .hamburger {
        display: flex;
    }
    
    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: white;
        transition: right 0.3s ease;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        z-index: 99;
    }
    
    nav ul {
        flex-direction: column;
        padding-top: 80px;
        text-align: center;
    }
    
    nav ul li {
        margin: 15px 0;
    }
    
    #menu-toggle:checked ~ nav {
        right: 0;
    }
    
    #menu-toggle:checked ~ .hamburger span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    
    #menu-toggle:checked ~ .hamburger span:nth-child(2) {
        opacity: 0;
    }
    
    #menu-toggle:checked ~ .hamburger span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}

@media (max-width: 600px) {
    .portfolio-title h2 {
        font-size: 22px;
        padding: 10px 25px;
    }
    
    .portfolio-item {
        max-width: 280px;
    }
    
    .portfolio-grid {
        width: 90%;
        gap: 25px;
    }
    
    .see-more {
        padding: 6px 15px;
        font-size: 12px;
    }
}

/* Styling untuk kotak pencarian di navbar */
.nav-search {
    display: none; /* Disembunyikan secara default */
    margin-left: 15px; /* Beri ruang di sebelah kiri */
    align-items: center;
    animation: fadeIn 0.8s ease-in-out 0.5s;
    animation-fill-mode: both;
}

/* Tampilkan search box hanya di halaman portofolio */
body.portofolio .nav-search {
    display: flex;
}

.nav-search .search-box {
    width: 170px;
    height: 35px;
    margin: 0;
    padding: 0 10px;
}

.nav-search .search-box input {
    font-size: 13px;
    font-family: 'Montserrat', sans-serif;
}

/* Menghilangkan garis pemisah setelah contact */
nav ul li:nth-last-child(2)::after {
    display: none;
}

/* Responsive styling */
@media (max-width: 900px) {
    /* Pindahkan search box ke posisi terpisah di mobile */
    .nav-search {
        width: 100%;
        justify-content: center;
        margin: 15px 0 5px;
        order: -1; /* Tampilkan di atas menu */
    }
    
    .nav-search .search-box {
        width: 80%;
        max-width: 250px;
    }
}

/* Override styling untuk menu navigation */
nav ul li.nav-search::after {
    display: none; /* Hapus pemisah setelah search box */
}

nav ul li.nav-search:hover {
    transform: none; /* Tidak perlu efek hover pada search box */
}

/* Menyesuaikan ukuran agar sama dengan tombol navbar */
.nav-search .search-box {
    height: auto;
    padding: 4px 10px;
    margin: 0;
    border-radius: 15px; /* Sedikit lebih bundar */
}

.nav-search .search-box i {
    font-size: 10px;
    margin-right: 4px;
}

.nav-search .search-box input {
    font-size: 10px; /* Ukuran font sama dengan menu */
    font-family: 'Montserrat', sans-serif; /* Agar sesuai dengan font menu */
}

/* Responsive styling */
@media (max-width: 900px) {
    /* Pindahkan search box ke posisi terpisah di mobile */
    .nav-search {
        width: 100%;
        justify-content: center;
        margin: 15px 0 5px;
        order: -1; /* Tampilkan di atas menu */
    }
    
    .nav-search .search-box {
        width: 80%;
        max-width: 250px;
        padding: 8px 15px; /* Lebih besar di mobile untuk kemudahan penggunaan */
    }
    
    .nav-search .search-box i {
        font-size: 14px;
    }
}

/* Animasi fade-in sederhana */
@keyframes simpleFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Animasi untuk hero content saja */
.loaded .hero-content {
    opacity: 0;
    animation: simpleFadeIn 2s ease-out forwards;
}

/* Animasi sederhana untuk header */
.loaded header {
    opacity: 0;
    animation: simpleFadeIn 0.8s ease-out forwards;
}

/* Tambahkan kode CSS ini di bagian bawah file portofolio.css */

/* Header controls untuk mobile */
.header-controls {
    display: none;
    gap: 15px; /* Tambahan spacing antar elemen */
}

  /* Mobile search styling */
.mobile-search {
    display: none;
}

  /* Untuk tampilan mobile */
@media (max-width: 768px) {
    /* Ubah layout header di mobile */
    header .container {
        position: relative;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 15px;
        height: 60px;
        box-sizing: border-box; /* Pastikan padding tidak mempengaruhi ukuran total */
    }
    
    /* Logo tetap di kiri */
    /* Logo tetap di kiri */
    .logo {
        flex: 0 1 auto; 
        margin-right: auto;
        padding-left: 0;
    }
    
    /* Container untuk search dan hamburger menu */
    .header-controls {
        display: flex;
        align-items: center;
        justify-content: flex-end; /* Membuat item di sebelah kanan */
        gap: 30px; /* Jarak yang lebih baik antara tombol search dan hamburger */
        height: 35px; /* Tinggi tetap */
        padding-right: 5px; /* Sedikit jarak dari batas kanan */
    }
    
    /* Mobile search styling */
    .mobile-search {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 35px;
        margin-right: 50px; /* Menggeser tombol search ke kiri */
    }
    
    .mobile-search .search-box {
        width: 35px;
        height: 35px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        margin: 0;
        position: relative;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    /* Styling untuk keadaan hover dan focus */
    .mobile-search .search-box:hover,
    .mobile-search .search-box:focus-within {
        width: 150px;
        border-radius: 20px;
        padding: 0 10px;
    }

    .mobile-search .search-box i {
        margin-right: 0;
        font-size: 16px;
        transition: margin-right 0.3s ease;
    }
    
    .mobile-search .search-box:hover i,
    .mobile-search .search-box:focus-within i {
        margin-right: 8px;
    }

    .mobile-search .search-box.expanded i {
    margin-right: 8px;
    }
    
    .mobile-search .search-box input {
        width: 0;
        padding: 0;
        background: transparent;
        border: none;
        color: white;
        outline: none;
        opacity: 0;
        transition: all 0.3s ease;
    }

    /* Input field saat expanded */
    .mobile-search .search-box:hover input,
    .mobile-search .search-box:focus-within input {
        width: calc(100% - 30px);
        opacity: 1;
    }
    
    .mobile-search .search-box input::placeholder {
    color: rgba(255, 255, 255, 0.7);
    }
    
    .mobile-search .search-box.expanded input {
    width: 100%;
    }
    
    /* Sembunyikan search di nav untuk tampilan mobile */
    nav ul li.nav-search {
    display: none;
    }
    
    /* Hamburger menu */
     /* Hamburger menu */
    .hamburger {
        width: 25px; /* Ukuran lebih konsisten */
        height: 21px;
        cursor: pointer;
        z-index: 1000;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        margin: 0;
        padding: 0;
        /* Memastikan hamburger menu sejajar vertikal dengan search button */
        align-self: center;
    }
    
    .hamburger span {
        display: block;
        height: 3px;
        width: 100%;
        background-color: #304258;
        border-radius: 3px;
        transition: all 0.3s ease;
        margin: 0;
    }
    
    /* Animasi hamburger menu menjadi X saat active */
    .hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
    background-color: #2A5BDA;
    }
    
    .hamburger.active span:nth-child(2) {
    opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
    background-color: #2A5BDA;
    }
    
    /* Navigation menu styling */
    nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background-color: white;
    transition: right 0.3s ease;
    z-index: 99;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }
    
    nav.active {
    right: 0;
    }
    
    nav ul {
    flex-direction: column;
    padding-top: 80px;
    height: 100%;
    }
    
    nav ul li {
    margin: 10px 0;
    width: 100%;
    text-align: center;
    }
}

/* Tambahkan CSS ini ke file CSS kamu */

/* Menyembunyikan search bar yang berada di atas menu Home */
.navbar-search-container, 
header .search-box:not(.mobile-search .search-box):not(.nav-search .search-box) {
    display: none !important;
}

/* Menyembunyikan search bar yang berada di atas menu Home dengan lebih spesifik */
.navbar-search-container {
    display: none !important;
}

/* Pastikan search box di mobile tetap terlihat */
.mobile-search {
    display: flex !important;
}

/* Pastikan search box di dalam nav pada desktop tetap terlihat */
.nav-search {
    display: flex !important;
}

/* Hapus styling yang mungkin tidak diinginkan untuk elemen search box lainnya */
header .search-box:not(.mobile-search .search-box):not(.nav-search .search-box) {
    display: none !important;
}