/* Sound of Borobudur - Main Stylesheet */
/* Adopsi desain dari React+Tailwind template */

/* ========== CSS VARIABLES ========== */
:root {
  --color-primary: #DF1D1B;
  --color-primary-dark: #C91452;
  --color-secondary: #8B4513;
  --color-gold: #D4AF37;
  --color-text: #e5e7eb;
  --color-text-light: #9ca3af;
  --color-bg: #111827;
  --color-gray-50: #1f2937;
  --color-gray-100: #374151;
  --color-gray-200: #4b5563;
  --color-gray-300: #6b7280;
  
  --font-primary: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  --transition-base: all 0.3s ease;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

/* ========== BASE RESET ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

/* ========== NAVIGATION ========== */
.nav-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-gray-200);
  transition: var(--transition-base);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

@media (max-width: 480px) {
  .nav-container {
    height: 56px;
  }
}

.nav-logo img {
  height: 40px;
  width: auto;
  transition: opacity 0.3s ease;
}

.nav-logo:hover img {
  opacity: 0.8;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  color: var(--color-text);
  font-weight: 500;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: var(--transition-base);
}

.nav-link:hover {
  opacity: 0.8;
}

.nav-link.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.lang-toggle {
  padding: 0.375rem 1rem;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  border-radius: 0.375rem;
  font-weight: 600;
  font-size: 0.875rem;
  transition: var(--transition-base);
}

.lang-toggle:hover {
  background: var(--color-primary);
  color: white;
}

.mobile-menu-toggle {
  display: none;
  color: var(--color-primary);
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: #111827;
  border-bottom: 1px solid var(--color-gray-200);
  padding: 1rem;
  box-shadow: var(--shadow-lg);
  z-index: 999;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
}

.mobile-menu.open {
  display: block;
}

.mobile-menu .nav-link {
  display: block;
  padding: 1rem;
  border-bottom: none;
  border-left: 3px solid transparent;
  color: var(--color-text);
  text-decoration: none;
  transition: all 0.2s ease;
}

.mobile-menu .nav-link:hover,
.mobile-menu .nav-link.active {
  background: var(--color-gray-50);
  border-left-color: var(--color-primary);
}

/* ========== HERO SECTION ========== */
.hero-section {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  pointer-events: auto;
}

.hero-overlay .container {
  position: relative;
  z-index: 10;
  max-width: 1280px;
  margin: 200px auto 0 auto;
  padding: 0 32px;
  width: 100%;
}

.hero-overlay .content {
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s forwards;
}

.hero-overlay .subtitle {
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.4);
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  line-height: 1.6;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-overlay .cta-button {
  background: white;
  color: #DF1D1B;
  font-size: 1.125rem;
  padding: 1.5rem 3rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-weight: 600;
  box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
  pointer-events: auto;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.hero-overlay .cta-button:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0px 8px 25px rgba(0, 0, 0, 0.3);
}

.hero-overlay .icon {
  font-size: 1.2rem;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

.hero-text {
  max-width: 42rem;
  animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-logo {
  width: 100%;
  max-width: 42rem;
  height: auto;
  margin-bottom: 2rem;
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.4));
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 2rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-size: 1.125rem;
  font-weight: 600;
  border-radius: 0.5rem;
  transition: var(--transition-base);
  box-shadow: var(--shadow-xl);
}

.btn-primary {
  background: #DF1D1B;
  color: white;
}

.btn-primary:hover {
  background: #C91452;
  transform: translateY(-2px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* ========== FEATURES SECTION ========== */
.features-section {
  padding: 3rem 2rem;
  background: var(--color-gray-50);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.features-bg {
  width: 100%;
  max-width: 400px;
  height: auto;
  margin: 0 auto 0.5rem auto;
  display: block;
  opacity: 0.9;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--color-text);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: #1f2937;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition-base);
  border: 1px solid #374151;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: white;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

.feature-desc {
  color: var(--color-text-light);
  line-height: 1.7;
}

/* ========== INSTRUMENTS GRID ========== */
.instruments-section {
  padding: 6rem 2rem;
}

.category-filter {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.625rem 1.5rem;
  border: 2px solid var(--color-gray-300);
  color: var(--color-text-light);
  border-radius: 2rem;
  font-weight: 500;
  transition: var(--transition-base);
}

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(223, 29, 27, 0.05);
}

.instruments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.instrument-card {
  background: #1f2937;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  transition: var(--transition-base);
  cursor: pointer;
  border: 1px solid #374151;
}

.instrument-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.instrument-image {
  width: 100%;
  height: 240px;
  object-fit: contain;
  background: #111827;
  padding: 1rem;
}

.instrument-content {
  padding: 1.5rem;
}

.instrument-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(223, 29, 27, 0.1);
  color: var(--color-primary);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 1rem;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.instrument-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.instrument-description {
  color: var(--color-text-light);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========== ARTICLE CARDS ========== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.article-card {
  background: #1f2937;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition-base);
  border: 1px solid #374151;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.article-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.article-content {
  padding: 1.5rem;
}

.article-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--color-text-light);
  margin-bottom: 0.75rem;
}

.article-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

.article-excerpt {
  color: var(--color-text-light);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========== FOOTER ========== */
.footer {
  background: #000000;
  color: white;
  padding: 4rem 2rem 2rem;
}

.footer-content {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-logo {
  width: 200px;
  margin-bottom: 1rem;
}

.footer-desc {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.footer-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--color-gold);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-link {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-base);
}

.social-link:hover {
  background: var(--color-primary);
  transform: translateY(-2px);
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
}

/* ========== PAGINATION ========== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.pagination a,
.pagination span {
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-gray-300);
  border-radius: 0.375rem;
  transition: var(--transition-base);
}

.pagination a:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(223, 29, 27, 0.05);
}

.pagination .active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* ========== DETAIL PAGES ========== */
.detail-header {
  padding: 8rem 2rem 4rem;
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 100%);
  color: white;
}

.detail-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.detail-category {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

.detail-image {
  width: 100%;
  border-radius: 1rem;
  box-shadow: var(--shadow-xl);
}

.detail-info h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.detail-info p {
  color: var(--color-text-light);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--color-gray-100);
  color: var(--color-text);
  border-radius: 0.5rem;
  font-weight: 500;
  transition: var(--transition-base);
}

.back-btn:hover {
  background: var(--color-gray-200);
}

/* ========== RESPONSIVE ========== */
/* Tablet and small desktop */
@media (max-width: 1024px) {
  .hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
  }
  
  .hero-overlay .container {
    margin: 150px auto 0 auto;
    padding: 0 2rem;
  }
}

/* Tablet portrait */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }

  .mobile-menu-toggle {
    display: block;
  }
  
  .mobile-menu {
    top: 64px;
  }
  
  .mobile-menu .nav-link {
    font-size: 1rem;
    padding: 1rem 1.25rem;
  }

  .hero-section {
    height: 60vh;
    min-height: 400px;
    max-height: 500px;
    padding: 0;
  }

  .hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
  }

  .hero-overlay {
    background: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.3) 0%,
      rgba(0, 0, 0, 0.5) 100%);
  }

  .hero-overlay .container {
    margin: 60px auto 0 auto;
    padding: 0 1.5rem;
  }

  .hero-overlay .subtitle {
    font-size: clamp(0.875rem, 4vw, 1rem);
    padding: 0 1rem;
  }

  .hero-overlay .cta-button {
    font-size: 1rem;
    padding: 1.25rem 2.5rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .instruments-grid {
    grid-template-columns: 1fr;
  }

  .articles-grid {
    grid-template-columns: 1fr;
  }

  .detail-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 0 1rem;
  }
  
  .nav-logo img {
    height: 32px;
  }
  
  .mobile-menu {
    top: 56px;
  }
  
  .mobile-menu .nav-link {
    font-size: 0.95rem;
    padding: 0.875rem 1rem;
  }
  
  .mobile-menu .lang-toggle {
    width: calc(100% - 2rem);
    margin: 0.5rem 1rem !important;
    text-align: center;
  }

  .container {
    padding: 0 1rem;
  }

  .hero-section {
    height: 50vh;
    min-height: 350px;
    max-height: 450px;
  }

  .hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
  }

  .hero-content {
    padding: 0 1rem;
  }

  .hero-overlay .container {
    margin: 50px auto 0 auto;
  }

  .hero-overlay .subtitle {
    font-size: 0.875rem;
    padding: 0 0.5rem;
  }

  .hero-overlay .cta-button {
    font-size: 0.95rem;
    padding: 1rem 2rem;
  }

  .hero-cta {
    display: none !important;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Mobile landscape mode */
@media (max-width: 896px) and (orientation: landscape) {
  .hero-section {
    height: 80vh;
    min-height: 350px;
    max-height: 450px;
  }
  
  .hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
  }
  
  .hero-overlay .container {
    margin: 40px auto 0 auto;
  }
  
  .hero-overlay .subtitle {
    font-size: 0.95rem;
    margin-bottom: 1rem;
  }
  
  .hero-overlay .cta-button {
    font-size: 0.95rem;
    padding: 1rem 2rem;
  }
}

/* ========== UTILITY CLASSES ========== */
.mt-4 { margin-top: 2rem; }
.mb-4 { margin-bottom: 2rem; }
.text-center { text-align: center; }
.text-primary { color: var(--color-primary); }
.bg-gray { background: var(--color-gray-50); }

/* ========== LOADING ANIMATION ========== */
.loading {
  text-align: center;
  padding: 3rem;
}

.spinner {
  border: 4px solid var(--color-gray-200);
  border-top: 4px solid var(--color-primary);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ========== PAGE TRANSITIONS ========== */
.page-enter {
  animation: pageEnter 0.5s ease-out;
}

@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
