/* Custom CSS for Disnaker Nduga Website */

/* CSS Custom Properties - Design Tokens */
:root {
  --primary-color: #3273dc;
  --secondary-color: #00d1b2;
  --accent-color: #ff3860;
  --dark-bg: #1a1a1a;
  --dark-surface: #2d2d2d;
  --dark-text: #ffffff;
  --light-bg: #ffffff;
  --light-surface: #f5f5f5;
  --light-text: #363636;
  
  /* Animation Timing */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ============================================
   DARK MODE STYLES
   ============================================ */

/* Base dark mode */
body.dark-mode {
  background-color: var(--dark-bg);
  color: var(--dark-text);
}

/* Navbar dark mode */
body.dark-mode .navbar {
  background-color: var(--dark-surface) !important;
}

body.dark-mode .navbar-item,
body.dark-mode .navbar-link {
  color: var(--dark-text) !important;
}

body.dark-mode .navbar-dropdown {
  background-color: var(--dark-surface);
  border-color: #404040;
}

body.dark-mode .navbar-dropdown .navbar-item {
  color: var(--dark-text);
}

body.dark-mode .navbar-dropdown .navbar-item:hover {
  background-color: #404040;
}

body.dark-mode .navbar-burger {
  color: var(--dark-text);
}

/* Cards and boxes dark mode */
body.dark-mode .card {
  background-color: var(--dark-surface);
  color: var(--dark-text);
  box-shadow: var(--shadow-sm);
}

body.dark-mode .box {
  background-color: var(--dark-surface);
  color: var(--dark-text);
}

/* Background colors dark mode */
body.dark-mode .has-background-light {
  background-color: var(--dark-surface) !important;
}

body.dark-mode .has-background-white {
  background-color: var(--dark-surface) !important;
}

/* Text colors dark mode */
body.dark-mode .has-text-dark {
  color: var(--dark-text) !important;
}

body.dark-mode .has-text-grey {
  color: #b5b5b5 !important;
}

body.dark-mode .has-text-grey-light {
  color: #999999 !important;
}

body.dark-mode .content {
  color: var(--dark-text);
}

body.dark-mode .content h1,
body.dark-mode .content h2,
body.dark-mode .content h3,
body.dark-mode .content h4,
body.dark-mode .content h5,
body.dark-mode .content h6 {
  color: var(--dark-text);
}

body.dark-mode .title {
  color: var(--dark-text);
}

body.dark-mode .subtitle {
  color: #b5b5b5;
}

/* Footer dark mode */
body.dark-mode .footer {
  background-color: #0a0a0a !important;
}

/* Form elements dark mode */
body.dark-mode .input,
body.dark-mode .textarea,
body.dark-mode .select select {
  background-color: #404040;
  border-color: #505050;
  color: var(--dark-text);
}

body.dark-mode .input::placeholder,
body.dark-mode .textarea::placeholder {
  color: #888;
}

/* Breadcrumb dark mode */
body.dark-mode .breadcrumb li + li::before {
  color: #888;
}

/* Notification dark mode */
body.dark-mode .notification {
  background-color: #404040;
  color: var(--dark-text);
}

/* Stats box dark mode */
body.dark-mode .stat-box {
  background-color: var(--dark-surface);
}

/* Service card dark mode */
body.dark-mode .service-card {
  background-color: var(--dark-surface);
}

/* News card dark mode */
body.dark-mode .news-card {
  background-color: var(--dark-surface);
}

/* ============================================
   DARK MODE TOGGLE
   ============================================ */
.dark-mode-toggle {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 1000;
}

@media screen and (max-width: 768px) {
  .dark-mode-toggle {
    top: 70px;
    right: 15px;
  }
  
  .dark-mode-toggle .button {
    font-size: 0.75rem;
  }
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(50, 115, 220, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%), url('../images/hero-bg.png') no-repeat center center;
  background-size: cover;
  z-index: -1;
  will-change: transform;
}

.hero-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,112C1248,107,1344,117,1392,122.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
  background-size: cover;
}

.hero-illustration {
  max-width: 100%;
  height: auto;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Scroll Indicator */
.scroll-indicator {
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
  animation: bounce 2s infinite;
}

.scroll-indicator i {
  display: block;
  font-size: 1.5rem;
  margin-top: 0.5rem;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* ============================================
   SERVICE CARDS
   ============================================ */
.service-card {
  height: 100%;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  border: none;
  box-shadow: var(--shadow-md);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
}

.service-card .card-content {
  padding: 1.5rem;
}

.icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.icon-box.is-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.icon-box.is-info {
  background: linear-gradient(135deg, #00d1b2 0%, #0099cc 100%);
  color: white;
}

.icon-box.is-success {
  background: linear-gradient(135deg, #48c774 0%, #3ec46d 100%);
  color: white;
}

.icon-box.is-warning {
  background: linear-gradient(135deg, #ffdd57 0%, #ff9f43 100%);
  color: white;
}

.icon-box.is-small {
  width: 60px;
  height: 60px;
}

.service-card:hover .icon-box {
  transform: scale(1.1);
}

/* ============================================
   STATISTICS SECTION
   ============================================ */
.stat-box {
  padding: 2rem;
  background: white;
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.stat-box:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

body.dark-mode .stat-box {
  background-color: var(--dark-surface);
}

.stat-number {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1.1rem;
  font-weight: 500;
}

/* ============================================
   NEWS CARDS
   ============================================ */
.news-card {
  height: 100%;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  border: none;
  box-shadow: var(--shadow-md);
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.news-card .card-content {
  padding: 1.25rem;
}

/* Navigation Enhancements */
.navbar {
  backdrop-filter: blur(10px);
  background-color: rgba(50, 115, 220, 0.95) !important;
  transition: all 0.3s ease;
}

.navbar.is-scrolled {
  background-color: rgba(50, 115, 220, 0.98) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo-nav {
  height: 40px;
  margin-right: 10px;
}

/* Mobile Menu */
.navbar-burger {
  color: white;
}

.navbar-burger:hover {
  color: white;
}

/* Buttons Enhancement */
.button {
  transition: all 0.3s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.is-rounded {
  border-radius: 50px;
}

/* Contact Info */
.contact-info .media {
  transition: all 0.3s ease;
}

.contact-info .media:hover {
  transform: translateX(10px);
}

/* Social Links */
.social-links .button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.social-links .button:hover {
  transform: translateY(-3px);
}

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

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media screen and (max-width: 1024px) {
  .hero .title.is-1 {
    font-size: 2.5rem;
  }
  
  .hero .subtitle.is-4 {
    font-size: 1.25rem;
  }
}

@media screen and (max-width: 768px) {
  .hero-illustration {
    max-height: 300px;
  }
  
  .hero .title.is-1 {
    font-size: 2rem;
  }
  
  .hero .subtitle.is-4 {
    font-size: 1.1rem;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .icon-box {
    width: 80px;
    height: 80px;
  }
  
  .service-card,
  .news-card {
    margin-bottom: 1rem;
  }
}

@media screen and (max-width: 480px) {
  .hero .title.is-1 {
    font-size: 1.75rem;
  }
  
  .section {
    padding: 2rem 1rem;
  }
}

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

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

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 5px;
  transition: background var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: #667eea #f1f1f1;
}

/* Dark Mode Custom Scrollbar */
body.dark-mode ::-webkit-scrollbar-track {
  background: var(--dark-surface);
}

body.dark-mode ::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #5a6a7d 0%, #3d4758 100%);
}

body.dark-mode * {
  scrollbar-color: #4a5568 var(--dark-surface);
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus Styles */
.button:focus,
.navbar-item:focus,
input:focus,
textarea:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .navbar,
  .dark-mode-toggle,
  .scroll-indicator,
  .social-links,
  .buttons,
  .hero-footer {
    display: none !important;
  }
  
  .hero {
    min-height: auto;
    padding: 2rem 0;
    background: white !important;
  }
  
  .hero-bg {
    display: none;
  }
  
  .hero .title,
  .hero .subtitle {
    color: black !important;
  }
  
  .section {
    page-break-inside: avoid;
    padding: 1rem 0;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
  
  .card,
  .box {
    box-shadow: none;
    border: 1px solid #ddd;
  }
  
  a {
    text-decoration: underline;
    color: black !important;
  }
  
  a[href]:after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
  }
  
  /* Don't show URL for internal anchors */
  a[href^="#"]:after {
    content: "";
  }
}