/* TailwindCSS utility framework */
@import url('https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css');

/* Force responsive navigation display - EXACT match React behavior */
/* Desktop Navigation - Show on screens >= 768px */
@media (min-width: 768px) {
  .desktop-nav {
    display: flex !important;
    align-items: center;
    gap: 2rem;
  }
  
  .mobile-nav {
    display: none !important;
  }
  
  .mobile-menu {
    display: none !important;
  }
}

/* Mobile Navigation - Show on screens < 768px */
@media (max-width: 767px) {
  .desktop-nav {
    display: none !important;
  }
  
  .mobile-nav {
    display: block !important;
  }
  
  .mobile-menu.hidden {
    display: none !important;
  }
  
  .mobile-menu:not(.hidden) {
    display: block !important;
  }
}

/* Custom CSS Variables - EXACT match from React frontend index.css */
:root {
  --background: hsl(0, 0%, 100%);
  --foreground: hsl(20, 14.3%, 4.1%);
  --primary: hsl(213, 82%, 42%);
  --primary-foreground: hsl(211, 100%, 99%);
  --secondary: hsl(0, 84%, 55%);
  --secondary-foreground: hsl(0, 0%, 100%);
  --border: hsl(20, 5.9%, 90%);
}

/* Tailwind CSS utility classes for exact React match */
.bg-secondary {
  background-color: var(--secondary) !important;
}

.text-primary {
  color: var(--primary) !important;
}

.bg-primary {
  background-color: var(--primary) !important;
}

.text-blue-600 {
  color: hsl(213, 82%, 42%) !important;
}

.text-red-600 {
  color: hsl(0, 84%, 55%) !important;
}

/* Custom Utility Classes */
.text-primary { color: var(--primary); }
.bg-primary { background-color: var(--primary); }
.text-secondary { color: var(--secondary); }
.bg-secondary { background-color: var(--secondary); }
.border-primary { border-color: var(--primary); }
.border-secondary { border-color: var(--secondary); }

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
}

/* Running Text Animation - EXACT copy from React frontend index.css */
@keyframes marquee {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}

.animate-marquee {
  animation: marquee 30s linear infinite;
}

/* Hero Slider Styles - EXACT match from React frontend */
.hero-slider {
  position: relative;
}

.hero-slide {
  /* All slides are visible by default unless hidden */
}

.hero-slide.hidden {
  display: none !important;
}

/* Slider Navigation Dots - using Tailwind classes like React */

.slider-dot:not(.active):hover {
  background-color: rgba(255, 255, 255, 0.8) !important;
  transform: scale(1.05) !important;
}

/* Navigation Active State - matching React frontend exactly */
.nav-link.text-blue-600 {
  color: #2563eb !important;
}

.nav-link.font-semibold {
  font-weight: 600 !important;
}

.nav-link-mobile.text-blue-600 {
  color: #2563eb !important;
}

.nav-link-mobile.font-semibold {
  font-weight: 600 !important;
}

.nav-link-mobile.bg-blue-50 {
  background-color: #eff6ff !important;
}

/* Button Active/Selected State */
.btn-active,
.button-active,
.selected-button {
  background-color: #ffffff !important;
  color: #1f2937 !important;
  border: 2px solid #2563eb !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
}

.btn-active:hover,
.button-active:hover,
.selected-button:hover {
  background-color: #f8fafc !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 15px -3px rgba(0, 0, 0, 0.1) !important;
}

/* Card Hover Effects */
.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Gallery Image Styles - Exact copy from React GalleryGrid component */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  background-color: #f3f4f6;
  cursor: pointer;
  transition: all 0.3s ease;
  group: hover;
}

.gallery-item img {
  width: 100%;
  height: 12rem; /* h-48 = 192px = 12rem */
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay-content {
  text-align: center;
  color: white;
}

.gallery-overlay-icon {
  width: 1.5rem;
  height: 1.5rem;
  margin: 0 auto 0.5rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gallery-title {
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
}

/* Hero Slider Button Styles */
.slider-dot {
  transition: all 0.3s ease;
  background-color: rgba(255, 255, 255, 0.6) !important;
  border: 2px solid transparent !important;
}

.slider-dot:hover {
  background-color: rgba(255, 255, 255, 0.8) !important;
  transform: scale(1.05) !important;
}

.slider-dot.active {
  background-color: #ffffff !important;
  border: 2px solid rgba(255, 255, 255, 0.9) !important;
  transform: scale(1.1) !important;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.8), 0 0 30px rgba(255, 255, 255, 0.4) !important;
}

.hero-button {
  transition: all 0.3s ease;
  position: relative;
}

.hero-button.selected,
.hero-button.active {
  background-color: #ffffff !important;
  color: #1f2937 !important;
  border: 2px solid #2563eb !important;
  font-weight: 700 !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3) !important;
  transform: translateY(-2px) scale(1.05);
}

/* Perbaikan untuk tombol putih dengan teks putih */
.hero-button {
  transition: all 0.3s ease;
  position: relative;
}

.hero-button.bg-white,
.hero-button[class*="bg-white"] {
  background-color: #ffffff !important;
  color: #1f2937 !important;
  border: 2px solid rgba(255, 255, 255, 0.9) !important;
}

.hero-button.bg-white:hover,
.hero-button[class*="bg-white"]:hover {
  background-color: #f8fafc !important;
  color: #1f2937 !important;
  transform: translateY(-1px) scale(1.02);
}

.hero-button.selected::before,
.hero-button.active::before {
  content: '';
  position: absolute;
  inset: -3px;
  background: linear-gradient(45deg, #2563eb, #3b82f6);
  border-radius: inherit;
  z-index: -1;
  opacity: 0.3;
}

/* Project Card Styles */
.project-card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid #e5e7eb;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.project-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.project-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.project-description {
  color: #6b7280;
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.project-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Category Colors */
.category-government { background-color: #dbeafe; color: #1e40af; }
.category-corporate { background-color: #ede9fe; color: #7c3aed; }
.category-finance { background-color: #d1fae5; color: #059669; }
.category-education { background-color: #e0e7ff; color: #4338ca; }
.category-healthcare { background-color: #fee2e2; color: #dc2626; }
.category-energy { background-color: #fef3c7; color: #d97706; }
.category-technology { background-color: #cffafe; color: #0891b2; }
.category-military { background-color: #f1f5f9; color: #475569; }
.category-default { background-color: #f3f4f6; color: #6b7280; }

/* Scale Badges */
.scale-large { background-color: #1f2937; color: white; }
.scale-medium { background-color: #6b7280; color: white; }
.scale-small { background-color: #e5e7eb; color: #374151; }

/* Loading Animation */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Form Styles */
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 9999px;
  transition: all 0.2s ease;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
}

.btn-primary:hover {
  background-color: #2563eb;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--secondary);
  color: white;
}

.btn-secondary:hover {
  background-color: #b91c1c;
  transform: translateY(-1px);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary);
  color: white;
}

/* Mobile Menu Animation */
.mobile-menu-enter {
  opacity: 0;
  transform: translateY(-10px);
}

.mobile-menu-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 300ms, transform 300ms;
}

.mobile-menu-exit {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu-exit-active {
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 300ms, transform 300ms;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-slide h1 {
    font-size: 2.5rem !important;
  }
  
  .hero-slide p {
    font-size: 1rem !important;
  }
  
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  .projects-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 640px) {
  .gallery-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Utility Classes */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }

.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }

.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }

.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }

.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }

.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }

.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

.space-x-4 > * + * { margin-left: 1rem; }
.space-x-6 > * + * { margin-left: 1.5rem; }
.space-x-8 > * + * { margin-left: 2rem; }

.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

.w-full { width: 100%; }
.h-full { height: 100%; }
.h-screen { height: 100vh; }
.max-w-4xl { max-width: 56rem; }
.max-w-3xl { max-width: 48rem; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }
.text-6xl { font-size: 3.75rem; }
.text-7xl { font-size: 4.5rem; }

.text-white { color: #ffffff; }
.text-gray-900 { color: #111827; }
.text-gray-800 { color: #1f2937; }
.text-gray-700 { color: #374151; }
.text-gray-600 { color: #4b5563; }
.text-gray-500 { color: #6b7280; }
.text-gray-400 { color: #9ca3af; }

.bg-white { background-color: #ffffff; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-200 { background-color: #e5e7eb; }
.bg-gray-900 { background-color: #111827; }

.border { border-width: 1px; }
.border-t { border-top-width: 1px; }
.border-gray-200 { border-color: #e5e7eb; }
.border-gray-300 { border-color: #d1d5db; }

.transition-colors { transition-property: color, background-color, border-color; }
.transition-all { transition-property: all; }
.duration-200 { transition-duration: 200ms; }
.duration-300 { transition-duration: 300ms; }

.hover\:bg-blue-700:hover { background-color: #1d4ed8; }
.hover\:bg-red-700:hover { background-color: #b91c1c; }
.hover\:bg-green-600:hover { background-color: #059669; }
.hover\:bg-gray-200:hover { background-color: #e5e7eb; }
.hover\:bg-gray-700:hover { background-color: #374151; }
.hover\:text-primary:hover { color: var(--primary); }
.hover\:text-white:hover { color: #ffffff; }
.hover\:scale-110:hover { transform: scale(1.1); }

.fixed { position: fixed; }
.absolute { position: absolute; }
.relative { position: relative; }
.sticky { position: sticky; }

.top-0 { top: 0; }
.bottom-6 { bottom: 1.5rem; }
.right-6 { right: 1.5rem; }
.left-4 { left: 1rem; }
.right-4 { right: 1rem; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }

.z-50 { z-index: 50; }

.overflow-hidden { overflow: hidden; }
.whitespace-nowrap { white-space: nowrap; }

.transform { transform: translateZ(0); }
.rotate-180 { transform: rotate(180deg); }
.scale-105 { transform: scale(1.05); }

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: .5;
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Dark mode compatibility */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #1f2937;
    --text-primary: #f9fafb;
  }
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  .hero-slide {
    opacity: 1 !important;
    page-break-inside: avoid;
  }
}