/* :root {
  --primary-color: #f5ecd5;
  --secondary-color: #f0bb78;
  --dark-color: #2d3436;
  --light-color: #f9f9f9;
} */

:root {
  --text: #006970;
  --background: #ecfefe;
  --primary: #f3f0e8;
  --secondary: #9ac9d0;
  --accent: #48a6a8;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--background);
  color: var(--text);
}

.navbar-transparent {
  background-color: transparent !important;
  transition: background-color 0.3s ease;
}

.navbar-dark.bg-dark-scrolled {
  background-color: var(--secondary) !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.nav-link {
  position: relative;
  display: inline-block;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: color 0.5s ease;
}

.nav-link:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: width 0.5s ease;
}

.nav-link:hover {
  color: var(--background);
  transform: scale(1.1);
}

.nav-link:hover:after {
  width: 100%;
}

.navbar-nav .nav-item {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.navbar-nav .nav-item.aos-animate {
  transform: translateY(0);
  opacity: 1;
}

.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  height: 100vh;
  display: flex;
  align-items: center;
  color: white;
}

.project-card {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  transition: transform 0.3s;
}

.project-card:hover {
  transform: translateY(-10px);
}

.project-overlay {
  position: absolute;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  width: 100%;
  padding: 1rem;
  opacity: 0;
  transition: 0.3s ease;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.skill-card {
  background: var(--primary);
  color: var(--text);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.skill-card i {
  font-size: 3rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.btn-primary {
  background-color: var(--accent);
  border-color: var(--accent);
}

.btn-primary:hover {
  background-color: var(--text);
  border-color: var(--text);
}

.btn-accent {
  background-color: var(--accent);
  color: white;
  border: 2px solid var(--accent);
}

.btn-outline-accent {
  border: 2px solid var(--accent);
  color: var(--accent);
}

.btn-accent:hover,
.btn-outline-accent:hover {
  background-color: var(--text);
  border-color: var(--text);
  color: white;
}

.blog-content img {
  border-radius: 12px;
  margin: 2rem 0;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.blog-content h2,
.blog-content h3 {
  color: var(--accent);
  margin-top: 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary);
}

/* Contact Section */
#contact {
  background-color: var(--secondary) !important;
  color: var(--text) !important;
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

#contact:before {
  content: "";
  position: absolute;
  top: -50px;
  left: 0;
  width: 100%;
  height: 100px;
  background: var(--secondary);
  transform: skewY(-3deg);
}

.contact-info {
  padding: 2rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  backdrop-filter: blur(10px);
}

.contact-info p {
  margin: 1.5rem 0;
  font-size: 1.1rem;
}

.contact-info a {
  color: var(--text) !important;
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.contact-info a:hover {
  color: var(--accent) !important;
  transform: translateX(10px);
}

.contact-info i {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

form {
  background: rgba(255, 255, 255, 0.1);
  padding: 2rem;
  border-radius: 15px;
  backdrop-filter: blur(10px);
}

.form-control {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid var(--accent);
  color: var(--text);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--primary);
  transform: scale(1.02);
  box-shadow: 0 0 15px rgba(72, 166, 168, 0.3);
  color: var(--text);
}

form button[type="submit"] {
  width: 100%;
  padding: 0.8rem;
  font-weight: 600;
  background: var(--accent);
  border: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

form button[type="submit"]:hover {
  background: var(--text);
  transform: translateY(-2px);
}

form button[type="submit"]::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(45deg) translateX(-100%);
  transition: transform 0.6s ease;
}

form button[type="submit"]:hover::after {
  transform: rotate(45deg) translateX(100%);
}

.social-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.section {
  margin-top: 1rem;
  /* height: 100vh; */
  padding: 5rem 0;
}

/* Ganti seluruh bagian animasi card dengan ini */
.card {
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  transform: translateY(0);
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 10px 20px rgba(0, 105, 112, 0.1);
  border: none;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(154, 201, 208, 0.3),
    transparent
  );
  transition: all 0.6s;
  z-index: 1;
}

.card:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 15px 30px rgba(0, 105, 112, 0.2);
}

.card:hover::before {
  left: 100%;
}

.card-img-top {
  transition: transform 0.4s;
  position: relative;
  z-index: 2;
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center;
}

.card:hover .card-img-top {
  transform: scale(1.05);
}

.card-body {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.9);
}

/* Animasi teks hero */
.hero h1 {
  animation: textReveal 1.5s ease-out forwards;
  opacity: 0;
  transform: translateY(30px);
}

.hero h5 {
  animation: textReveal 1s ease-out 0.3s forwards;
  opacity: 0;
  transform: translateY(20px);
}

.hero-image {
  position: relative;
  animation: float 6s ease-in-out infinite;
  filter: drop-shadow(0 15px 25px rgba(0, 105, 112, 0.2));
}

.hero-image img {
  width: 80%;
  max-width: 400px;
  transition: transform 0.3s ease;
}

@keyframes textReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) scale(0.95);
  }
  50% {
    transform: translateY(-20px) scale(1);
  }
}

/* Animasi progress bar */
.progress {
  position: relative;
  overflow: hidden;
  height: 12px !important;
  border-radius: 6px;
  background: rgba(72, 166, 168, 0.1);
}

.progress-bar {
  transition: width 1s cubic-bezier(0.19, 1, 0.22, 1), transform 0.3s ease !important;
  transform-origin: left;
}

.skill-card:hover .progress-bar {
  transform: scaleX(1.03);
}

/* Komentar Section */
.komentar-list .card {
  border: 1px solid rgba(72, 166, 168, 0.2);
  border-radius: 10px;
  transition: transform 0.3s;
}

.komentar-list .card:hover {
  transform: translateX(5px);
  border-color: var(--accent);
}

.form-label {
  color: var(--accent);
  font-weight: 600;
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

/* Blog Card Styling */
#blog .card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* #blog .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
} */

#blog .card-body {
  display: flex;
  flex-direction: column;
  height: 100%;
}

#blog .card-content {
  flex: 1;
}

#blog .card-title {
  min-height: 60px; /* Untuk judul 2 baris */
  margin-bottom: 1rem;
}

#blog .card-text {
  flex-grow: 1;
  margin-bottom: 1.5rem;
  min-height: 80px; /* Untuk teks 3-4 baris */
}

/* #blog .btn {
  width: 100%;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  white-space: nowrap;
} */

#blog .btn {
  margin-top: auto; /* Ini yang akan membuat tombol tetap di bawah */
  width: fit-content;
  min-width: 160px;
  align-self: center; /* Untuk posisi tengah */
}

#galeri {
  background-color: var(--primary);
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
  position: relative;
  z-index: 10;
}

#galeri::before {
  content: "";
  position: absolute;
  top: -50px;
  left: 0;
  width: 100%;
  height: 100px;
  background: var(--primary);
  transform: skewY(-3deg);
}

.gallery-container {
  position: relative;
  z-index: 2;
}

.gallery-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.filter-btn {
  padding: 0.5rem 1.5rem;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid var(--accent);
  color: var(--text);
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(72, 166, 168, 0.4);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  height: 250px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.gallery-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(154, 201, 208, 0.3),
    transparent
  );
  transition: all 0.6s;
  z-index: 1;
}

.gallery-item:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 15px 30px rgba(0, 105, 112, 0.25);
}

.gallery-item:hover::before {
  left: 100%;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover .gallery-img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 1.5rem;
  transform: translateY(100%);
  transition: transform 0.4s ease;
  z-index: 2;
}

.gallery-item:hover .gallery-overlay {
  transform: translateY(0);
}

.gallery-title {
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--secondary);
}

.gallery-category {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1100;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90%;
  position: relative;
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  text-align: center;
  color: white;
  margin-top: 1rem;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.lightbox-close:hover {
  color: var(--accent);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  transition: color 0.3s ease;
  background: rgba(0, 0, 0, 0.3);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox-nav:hover {
  color: var(--accent);
  background: rgba(0, 0, 0, 0.5);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

footer {
  position: relative;
  z-index: 5; /* Lebih rendah dari galeri */
}

/* Media Queries */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem !important;
    -webkit-text-stroke: 0.5px #006970;
  }

  .navbar-brand {
    font-size: 1.2rem;
  }

  .section {
    height: auto;
    padding: 4rem 0;
  }

  .skill-card {
    margin-bottom: 1.5rem;
  }

  .hero-image img {
    width: 60%;
    max-width: 300px;
    margin-top: 2rem;
  }

  .card-img-top {
    height: 150px;
  }

  .about-content img {
    width: 50%;
    margin-bottom: 1.5rem;
  }

  .hero-image {
    animation: float-mobile 4s ease-in-out infinite;
  }

  #skills {
    height: auto !important;
    padding: 2rem 0;
  }

  .skill-card {
    margin-bottom: 1rem;
  }

  /* Penyesuaian untuk blog */
  #blog .card {
    margin-bottom: 1.5rem;
  }

  #blog .card-title {
    min-height: auto;
  }

  #blog .card-text {
    min-height: auto;
    margin-bottom: 1rem;
  }

  #blog .btn {
    font-size: 0.85rem;
    min-width: 140px;
    padding: 8px 16px;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }

  .gallery-item {
    height: 200px;
  }

  #galeri {
    padding: 3rem 0; /* Padding lebih kecil di mobile */
  }

  .filter-btn {
    padding: 0.4rem 1.2rem;
    font-size: 0.9rem;
  }

  @keyframes float-mobile {
    0%,
    100% {
      transform: translateY(0) scale(0.85);
    }
    50% {
      transform: translateY(-10px) scale(0.9);
    }
  }
}

@media (max-width: 576px) {
  .hero {
    height: auto;
    padding-top: 6rem;
  }

  .hero h1 {
    font-size: 2rem !important;
  }

  .nav-link {
    font-size: 16px;
  }

  .card {
    margin: 0.5rem;
  }

  .hero-image img {
    width: 70%;
    max-width: 250px;
  }

  .card-img-top {
    height: 120px;
  }

  .about-content img {
    width: 70%;
  }

  #skills {
    padding: 3rem 0;
  }

  #blog {
    padding-top: 2rem !important;
  }

  .section {
    padding: 3rem 0;
  }
}

/* Perbaikan Umum */
.img-fluid {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.navbar-toggler {
  border-color: var(--text);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 105, 112, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.about-content img {
  width: 70%;
  max-width: 300px;
  border: 3px solid var(--accent);
}
