:root {
  --primary-blue: #7cb4e3;
  --primary-orange: #f6b042;
  --gradient-start: #603111;
  --gradient-mid: #000000;
  --gradient-end: #7098c0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  overflow-x: hidden;
}

.btn-login {
  text-decoration: none;
  background-color: #b55527 !important;
  color: white;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.5s ease;
}

.btn-login:hover {
  transform: scale(1.05);
  text-decoration: none;
  background-color: #d16736 !important;
  color: white;
  border-radius: 6px;
  font-weight: 600;
}

.dropdown-item:hover {
  color: #b55527;
}

/* Animasi */
@keyframes spin-slower {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInFromTop {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInFromBottom {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fade-in-scale {
  animation: fadeInScale 0.5s ease-out forwards;
}

.animate-slide-in-top {
  animation: slideInFromTop 0.5s ease-out forwards;
}

.animate-slide-in-bottom {
  animation: slideInFromBottom 0.5s ease-out forwards;
}

.animate-pulse-slow {
  animation: pulse 2s infinite;
}

/* Hero Section */
.portfolio-hero {
  position: relative;
  color: white;
  padding: 0 1rem !important;
  padding-top: 10rem !important;
  background: linear-gradient(
    to right,
    var(--gradient-start),
    var(--gradient-mid),
    var(--gradient-end)
  );
  overflow: hidden;
  min-height: 80vh;
  display: flex;
  align-items: center;
}

@media (min-width: 768px) {
  .portfolio-hero {
    padding: 6rem 2rem;
  }
}

.hero-top-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.15),
    transparent
  );
  pointer-events: none;
  z-index: 10;
}

.hero-bg-circle {
  position: absolute;
  width: 400px;
  height: 400px;
  background: #092433;
  border-radius: 50%;
  top: -100px;
  left: -100px;
  opacity: 0.3;
  filter: blur(60px);
}

.spinning-icon {
  position: absolute;
  opacity: 0.1;
  pointer-events: none;
  z-index: 0;
  transition: transform 0.1s linear;
  /* Hapus animation: spin 20s linear infinite; */
}

/* Tambahkan class untuk parallax effect */
.spinning-icon.parallax-spin {
  will-change: transform; /* Optimasi performa */
}

.spinning-icon-1 {
  bottom: 0;
  right: -50px;
  width: 300px;
  height: 300px;
  opacity: 0.1;
}

.spinning-icon-2 {
  top: 40px;
  left: 20px;
  width: 200px;
  height: 200px;
  opacity: 0.1;
  z-index: 90;
}

.spinning-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: blur(4px);
}

.spinning-img.reversed {
  transform: scaleX(-1) scaleY(-1);
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 4rem;
  }
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: 4.5rem;
  }
}

.hero-text-blue {
  color: var(--primary-blue);
}

.hero-text-orange {
  color: var(--primary-orange);
}

.hero-description {
  margin-top: 1.5rem;
  color: #ffffff;
  font-size: 1.125rem;
  max-width: 500px;
  line-height: 1.6;
}

.hero-image {
  width: 100%;
  max-width: 320px;
}

/* Portfolio Section */
.portfolio-section {
  padding-left: 0 !important;
  padding-right: 0 !important;
  position: relative;
  padding: 5rem 1rem !important;
  background: linear-gradient(
    to right,
    var(--gradient-start),
    var(--gradient-mid),
    var(--gradient-end)
  );
  overflow: hidden;
  min-height: 100vh;
}

.portfolio-spinner-1 {
  top: 100px;
  left: 50px;
  width: 150px;
  height: 150px;
  opacity: 0.1;
}

.portfolio-spinner-2 {
  bottom: 100px;
  right: 50px;
  width: 200px;
  height: 200px;
  opacity: 0.1;
}

.portfolio-title {
  color: white;
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 4rem;
  text-align: center;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 640px) {
  .portfolio-title {
    font-size: 3rem;
  }
}

@media (min-width: 768px) {
  .portfolio-title {
    font-size: 3.5rem;
  }
}

.text-orange {
  color: #f97316 !important;
}

/* Owl Carousel Custom Styles */
.portfolio-carousel {
  position: relative;
  padding: 2rem 0 rem;
  width: 100%;
}

.portfolio-carousel .owl-stage {
  display: flex;
  align-items: center;
}

.portfolio-carousel .owl-item {
  transition: all 0.5s ease-in-out;
  transform: scale(0.85);
  filter: grayscale(100%) blur(10px);
  opacity: 0.3;
}

.portfolio-carousel .owl-item.center {
  transform: scale(1);
  filter: grayscale(0%) blur(0);
  opacity: 1;
  z-index: 10;
}

.portfolio-carousel .owl-item.active:not(.center) {
  transform: scale(0.95);
  filter: grayscale(50%) blur(5px);
  opacity: 0.7;
  z-index: 5;
}

.project-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-10px);
  border-color: rgba(255, 255, 255, 0.4);
}

.project-image {
  width: 100%;
  height: 230px;
  object-fit: cover;
}

.project-title {
  text-align: center;
  margin-top: 0.75rem;
  font-weight: 500;
  font-size: 0.875rem;
  color: white;
  padding: 1rem 0.5rem;
}

/* Owl Navigation */
.owl-nav {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  pointer-events: none;
}

.owl-prev,
.owl-next {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(10px);
  border-radius: 50% !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: white !important;
  font-size: 1.5rem !important;
  pointer-events: all;
  transition: all 0.3s ease;
}

.owl-prev:hover,
.owl-next:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  transform: scale(1.1);
}

.owl-prev {
  margin-left: 1rem;
}

.owl-next {
  margin-right: 1rem;
}

/* PERBAIKAN MODAL STYLES - Dengan animasi yang diperbaiki */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: #1a1a1a;
  width: 100%;
  max-width: 90%;
  max-height: 90vh;
  padding: 2rem;
  border-radius: 1rem;
  overflow-y: auto;
  position: relative;
  border: 1px solid #333;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
  z-index: 10000;
  /* Animasi untuk modal content */
  animation: fadeInScale 0.5s ease-out forwards;
}

@media (min-width: 640px) {
  .modal-content {
    max-width: 600px;
    padding: 2.5rem;
  }
}

@media (min-width: 768px) {
  .modal-content {
    max-width: 700px;
  }
}

@media (min-width: 1024px) {
  .modal-content {
    max-width: 800px;
  }
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  color: white;
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 30;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  animation: fadeInScale 0.4s ease-out 0.3s forwards;
}

.modal-close:hover {
  color: #f87171;
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.modal-title {
  color: white;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-align: center;
  line-height: 1.3;
  animation: slideInFromTop 0.5s ease-out 0.2s forwards;
}

@media (min-width: 640px) {
  .modal-title {
    font-size: 1.75rem;
  }
}

@media (min-width: 768px) {
  .modal-title {
    font-size: 2rem;
  }
}

/* PERBAIKAN: Video container tanpa animasi opacity yang mengganggu */
.video-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 0.5rem;
  overflow: hidden;
  margin-bottom: 1.5rem;
  border: 1px solid #374151;
  background: #000;
  animation: fadeInUp 0.6s ease-out 0.4s forwards;
}

.modal-image {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  border-radius: 0.5rem;
  border: 1px solid #374151;
  margin: 0 auto 1.5rem auto;
  display: block;
  background: #2d3748;
  animation: fadeInUp 0.6s ease-out 0.4s forwards;
}

/* PERBAIKAN DESKRIPSI MODAL - Dengan animasi */
.modal-description-container {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-height: none;
  overflow-y: visible;
  animation: fadeInUp 0.6s ease-out 0.5s forwards;
}

.modal-description {
  color: #e5e7eb;
  font-size: 1rem;
  line-height: 1.7;
  text-align: left;
  white-space: pre-line;
  margin: 0;
  padding: 0;
  font-weight: 400;
}

.modal-navigation {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  animation: slideInFromBottom 0.5s ease-out 0.6s forwards;
}

.nav-button {
  color: #d1d5db;
  font-size: 1rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid #374151;
  cursor: pointer;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.nav-button:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  border-color: #6b7280;
  animation: pulse-slow 2s infinite;
}

.bottom-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 8rem;
  background: linear-gradient(to bottom, transparent, #000);
  pointer-events: none;
  z-index: 10;
}

/* Animation Classes */
.fade-in-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: all 0.6s ease;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.6s ease;
}

.fade-in-scale.visible {
  opacity: 1;
  transform: scale(1);
}

.fade-in-up {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.6s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Placeholder untuk gambar yang tidak ada */
.placeholder-image {
  background: #2d3748;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-weight: 500;
  font-size: 1.1rem;
  min-height: 200px;
  border-radius: 0.5rem;
}

/* Modal background animation */
.modal-overlay::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at center,
    rgba(124, 180, 227, 0.1) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.5s ease;
}

.modal-overlay.active::before {
  opacity: 1;
}

@media (max-width: 768px) {
  .mobile-login-btn {
    display: block;
    margin-top: 25px;
    padding: 12px 0;
    width: 50%;
    max-width: 150px;
    background-color: var(--primary-orange);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    border-radius: 10px;
    transition: background-color 0.3s ease;
  }

  .mobile-login-btn {
    background-color: #b55527;
  }

  .mobile-login-btn:hover {
    background-color: #e65c00;
  }

  .mobile-menu-link:hover {
    color: #b55527;
  }
}
