/* common.css - untuk elemen umum di semua halaman */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif; /* Default font */
}

/* Header dengan animasi */
header {
    background-color: #C7D9E5;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    width: 100%;
    height: 70px;
    z-index: 1000;
    position: fixed; /* Membuat header fixed */
    top: 0; /* Posisi di bagian atas layar */
    left: 0;
    animation: headerSlideDown 0.6s ease-out;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

@keyframes headerSlideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Efek hover pada header */
header:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Blue bar dihapus atau disembunyikan */
.blue-bar {
    display: none; /* Menyembunyikan blue-bar */
}

header .container {
    max-width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    margin: 0;
    height: 100%;
    position: relative;
}

.container {
    width: 100%;
    padding: 0 20px;
    margin: 0 auto;
}

.logo {
    position: absolute;
    left: 50px;
    animation: logoFadeIn 0.8s ease-out 0.3s backwards;
}

@keyframes logoFadeIn {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.logo h1 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: #3c4e62;
    font-size: 28px;
    margin: 0;
    transition: all 0.3s ease;
    position: relative;
}

.logo h1:hover {
    text-shadow: 0 0 15px rgba(74, 144, 226, 0.5);
    color: #4a6b7d;
}

.logo h1:after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #3c4e62, #4a90e2);
    transition: width 0.3s ease;
}

.logo h1:hover:after {
    width: 100%;
}

nav {
    position: absolute;
    right: 50px;
    animation: navSlideIn 0.8s ease-out 0.5s backwards;
}

@keyframes navSlideIn {
    from {
        transform: translateX(20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

nav ul li {
    position: relative;
    padding: 0 12px; /* Jarak antar tombol dikurangi dari 18px menjadi 12px */
    margin: 0;
    transition: transform 0.3s ease;
}

nav ul li:hover {
    transform: translateY(-2px);
}

nav ul li::after {
    content: none;
    display: none;
}

nav ul li:not(:last-child)::after {
    content: "|";
    display: block;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #3c4e62;
    opacity: 0.5;
}

nav ul li a {
    text-decoration: none;
    color: #3c4e62;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
    padding: 8px 10px; /* Padding horizontal dikurangi dari 12px menjadi 10px */
}

nav ul li a:after {
    content: '';
    position: absolute;
    bottom: 0px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #4a90e2;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

nav ul li a:hover:after, 
nav ul li a.active:after {
    width: 100%;
}

nav ul li a:hover, 
nav ul li a.active {
    color: #4a90e2;
}

/* Animasi ketika halaman scroll */
.header-scrolled {
    height: 60px;
    background-color: rgba(199, 217, 229, 0.95);
    backdrop-filter: blur(5px);
}

/* Hamburger menu */
.hamburger {
    display: none;
    cursor: pointer;
    width: 30px;
    height: 21px;
    position: absolute;
    right: 30px;
    top: 50%; /* Posisikan di tengah secara vertikal */
    transform: translateY(-50%); /* Sejajarkan dengan tepat di tengah */
    flex-direction: column;
    justify-content: space-between;
    z-index: 1001;
    animation: hamburgerFadeIn 0.8s ease-out 0.7s backwards;
}

@keyframes hamburgerFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

/* Footer */
footer {
    background-color: #f0f0f0;
    color: #3c4e62;
    padding: 10px 0;
    text-align: center;
    font-size: 14px;
    width: 100%;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
}

/* Untuk mengatasi konten tertutup header */
body {
    padding-top: 70px; /* Hanya 70px untuk header, karena blue-bar dihapus */
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
}

.logo a {
    text-decoration: none;
    color: inherit;
}

.logo a:hover {
    color: inherit;
}

/* Media queries untuk responsif */
@media (max-width: 768px) {
    header {
        height: 70px;
        padding: 10px 0;
    }
    
    /* Tampilkan hamburger menu */
    .hamburger {
        display: flex;
    }
    
    /* Sembunyikan navigasi secara default */
    nav {
        position: fixed;
        top: 0;
        right: -280px; /* Mulai dari luar layar */
        width: 250px;
        height: 100vh;
        background-color: #C7D9E5;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        padding: 70px 20px 20px;
        transition: right 0.3s ease;
        z-index: 999; /* Pastikan z-index lebih rendah dari hamburger */
    }
    
    /* Styling untuk navigasi saat aktif */
    nav.active {
        right: 0;
    }
    
    /* Styling untuk hamburger menu saat aktif */
    .hamburger.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
    
    /* Ubah tampilan navigasi menjadi vertikal */
    nav ul {
        flex-direction: column;
        gap: 15px;
    }
    
    nav ul li {
        width: 100%;
        text-align: left;
        padding: 0;
    }
    
    nav ul li a {
        display: block;
        padding: 12px 15px; /* Diperbesar dari 10px 15px */
        font-size: 18px; /* Diperbesar dari 16px */
        border-radius: 5px;
        background-color: rgba(255, 255, 255, 0.3);
        color: #3c4e62; /* Pastikan warna teks default tetap ada */
    }
    
    /* !IMPORTANT untuk memaksa style ini diterapkan */
    nav ul li a.active {
        background-color: rgba(74, 144, 226, 0.6) !important;
        color: #fff !important; /* Warna putih untuk kontras lebih baik */
        font-weight: bold !important;
    }
    
    nav ul li a:hover {
        background-color: rgba(74, 144, 226, 0.3);
        color: #4a90e2;
    }
    
    /* Menyembunyikan pemisah di mobile */
    nav ul li:not(:last-child)::after {
        display: none;
    }
    
    /* Override animasi hover untuk mobile */
    nav ul li a:after {
        display: none;
    }
    
    nav ul li:hover {
        transform: none;
    }
    
    .logo {
        position: static;
        margin-left: 30px;
    }
    
    header .container {
        justify-content: flex-start;
    }
    
    body {
        padding-top: 70px; /* Kembali ke 70px karena height header tetap */
    }
    
    .header-scrolled {
        height: 60px;
    }
}

/* Animasi Footer yang Lebih Terlihat dengan Warna Asli */
footer {
    position: relative;
    overflow: hidden;
}

/* Efek gelombang bergerak */
footer::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at center, transparent 0%, transparent 65%, rgba(60, 78, 98, 0.1) 70%, transparent 75%);
    animation: footerWave 10s linear infinite;
    pointer-events: none;
    transform-origin: center center;
    opacity: 0.7;
}

@keyframes footerWave {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Garis berkilau yang lebih tebal */
footer::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(60, 78, 98, 0.8), transparent);
    animation: footerBorder 3s ease infinite;
    pointer-events: none;
}

@keyframes footerBorder {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Efek bouncing pada text */
footer p {
    position: relative;
    z-index: 2;
    animation: footerPulse 2s ease-in-out infinite;
}

@keyframes footerPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Tambahkan efek sparkles */
footer .sparkle {
    position: absolute;
    background-color: rgba(60, 78, 98, 0.4);
    border-radius: 50%;
    width: 4px;
    height: 4px;
    pointer-events: none;
}

footer .sparkle:nth-child(1) {
    top: 20%;
    left: 20%;
    animation: sparkle 4s linear infinite;
}

footer .sparkle:nth-child(2) {
    top: 60%;
    left: 40%;
    animation: sparkle 5s linear infinite;
}

footer .sparkle:nth-child(3) {
    top: 30%;
    left: 60%;
    animation: sparkle 7s linear infinite;
}

footer .sparkle:nth-child(4) {
    top: 70%;
    left: 80%;
    animation: sparkle 6s linear infinite;
}

@keyframes sparkle {
    0% { transform: scale(0); opacity: 0; }
    25% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0); opacity: 0; }
    75% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0); opacity: 0; }
}

/* Tambahkan kode ini ke common.css untuk styling navbar-search yang hanya muncul di halaman portofolio */

/* Sembunyikan navbar-search-container secara default */
.navbar-search-container {
    display: none;
}

/* Navbar Search Container khusus untuk halaman portofolio */
body[class*="portofolio"] .navbar-search-container,
body.portofolio .navbar-search-container {
    display: flex;
    align-items: center;
    position: absolute;
    right: 130px; /* Posisikan di sebelah kanan menu navigasi */
}

/* Styling untuk search box di navbar */
.search-box {
    height: 36px; /* Sesuaikan dengan tinggi tombol navigasi */
    padding: 8px 12px; /* Samakan dengan padding tombol nav */
    border-radius: 5px;
    border: 1px solid rgba(60, 78, 98, 0.3);
    background-color: rgba(255, 255, 255, 0.8);
    color: #3c4e62;
    font-size: 16px; /* Samakan dengan font-size tombol nav */
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s ease;
    width: 200px;
}

.search-box:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 5px rgba(74, 144, 226, 0.5);
}

/* Styling tambahan untuk search box di navbar pada tampilan mobile */
@media (max-width: 768px) {
    .navbar-search-container {
        left: auto;
        right: 80px;
        width: auto;
    }
    
    .search-box {
        width: 160px;
        height: 36px;
        font-size: 16px;
        padding: 8px 12px;
    }
    
    /* Saat menu mobile terbuka, sesuaikan posisi search agar tetap terlihat */
    #menu-toggle:checked ~ .navbar-search-container {
        z-index: 1000;
    }
}

/* Font family dasar untuk seluruh website */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

p, li, span, button, input, textarea {
    font-family: 'Montserrat', sans-serif;
}

/* Button text */
button, .btn, a.btn, .about-btn {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

/* 
 * PERBAIKAN SIMPLE UNTUK COMMON.CSS
 * Tambahkan di akhir file common.css
 */

/* Reset positioning yang mungkin bermasalah */
header .container {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 20px;
  }
  
  .logo {
    z-index: 1001; /* Pastikan logo tetap terlihat */
  }
  
  /* Hamburger menu style */
  .hamburger {
    display: none;
    width: 30px;
    height: 25px;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    z-index: 1001;
  }
  
  .hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #333;
    border-radius: 3px;
    transition: all 0.3s ease;
  }
  
  /* Media query untuk mobile */
  @media screen and (max-width: 768px) {
    /* Tampilkan hamburger */
    .hamburger {
      display: flex;
    }
    
    /* Sembunyikan menu navigation di luar layar */
    header nav {
      position: fixed;
      top: 0;
      right: -100%;
      width: 70%;
      height: 100vh;
      background-color: white;
      transition: right 0.3s ease;
      z-index: 1000;
      box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }
    
    /* Tampilkan menu saat active */
    header nav.active {
      right: 0;
    }
    
    /* Styling untuk navigation pada mobile */
    header nav ul {
      flex-direction: column;
      padding: 80px 0 30px;
      height: 100%;
    }
    
    header nav ul li {
      margin: 10px 0;
      width: 100%;
      text-align: center;
    }
  }
  
  /* Animasi hamburger jadi X */
  .hamburger.active span:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
  }
  
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  
  .hamburger.active span:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
  }