/* Custom CSS for Disnaker Waropen with Materialize CSS */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

/* CSS Variables */
:root {
  --primary-color: #1565c0;
  --primary-light: #5e92f3;
  --primary-dark: #003c8f;
  --secondary-color: #ff6f00;
  --secondary-light: #ffa726;
  --secondary-dark: #c43e00;
  --text-primary: #212121;
  --text-secondary: #757575;
  --text-disabled: #bdbdbd;
  --divider-color: #e0e0e0;
  --background-color: #fafafa;
  --surface-color: #ffffff;
  --error-color: #f44336;
  --success-color: #4caf50;
  --warning-color: #ff9800;
  --info-color: #2196f3;
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  background-color: var(--background-color);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Dark Theme */
body.dark-theme {
  --background-color: #121212;
  --surface-color: #1e1e1e;
  --text-primary: #ffffff;
  --text-secondary: #b3b3b3;
  --divider-color: #333333;
}

body.dark-theme .card,
body.dark-theme .card-panel,
body.dark-theme .sidenav,
body.dark-theme .modal {
  background-color: var(--surface-color);
  color: var(--text-primary);
}

body.dark-theme .nav-wrapper {
  background-color: #0d47a1;
}

/* Hero Section */
.hero-section {
  background: url('../images/hero_bg.png') center/cover no-repeat;
  min-height: 80vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  width: 100%;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(13, 71, 161, 0.85) 0%, rgba(21, 101, 192, 0.6) 100%);
  z-index: 1;
}

.hero-section .container {
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero-section h1 {
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: 0.5px;
  text-shadow: 2px 4px 6px rgba(0,0,0,0.4);
  animation: fadeInUp 1s ease forwards;
}

.hero-section p {
  font-size: 1.3rem;
  margin-bottom: 2.5rem;
  opacity: 0.95;
  text-shadow: 1px 2px 4px rgba(0,0,0,0.3);
  animation: fadeInUp 1.2s ease forwards;
}

.hero-section .btn-large {
  animation: fadeInUp 1.4s ease forwards;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.hero-section .btn-large:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* Navigation Enhancements */
.nav-wrapper {
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.nav-wrapper.scrolled {
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.brand-logo {
  display: flex;
  align-items: center;
  font-weight: 500;
}

.logo-img {
  height: 40px;
  margin-right: 10px;
  transition: transform 0.3s ease;
}

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

.sidenav {
  transform: translateX(-100%);
}

.sidenav li > a {
  transition: all 0.3s ease;
}

.sidenav li > a:hover {
  background-color: rgba(21, 101, 192, 0.1);
}

/* Card Enhancements */
.card {
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.card-image img {
  transition: transform 0.3s ease;
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-reveal {
  border-radius: 0 0 12px 12px;
}

/* Button Enhancements */
.btn {
  border-radius: 25px;
  text-transform: none;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.btn-large {
  border-radius: 30px;
  padding: 0 2rem;
}

.btn-floating {
  border-radius: 50%;
  transition: all 0.3s ease;
}

.btn-floating:hover {
  transform: scale(1.1) rotate(5deg);
}

/* Form Enhancements */
.input-field input:focus,
.input-field textarea:focus {
  border-bottom: 1px solid var(--primary-color) !important;
  box-shadow: 0 1px 0 0 var(--primary-color) !important;
}

.input-field input:focus + label,
.input-field textarea:focus + label {
  color: var(--primary-color) !important;
}

.input-field .prefix.active {
  color: var(--primary-color) !important;
}

/* Statistics Cards */
.stats-card {
  background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
  color: white;
  border-radius: 15px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stats-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: pulse 3s ease-in-out infinite;
}

.stats-card:hover {
  transform: translateY(-10px) scale(1.02);
}

.stats-card h4 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0.5rem 0;
}

/* Animations */
@keyframes pulse {
  0% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
  100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.animate-on-scroll.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-scroll.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

.animate-on-scroll.slide-in-left {
  animation: slideInLeft 0.6s ease forwards;
}

.animate-on-scroll.slide-in-right {
  animation: slideInRight 0.6s ease forwards;
}

/* Service Cards */
.service-card {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.service-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  transition: all 0.3s ease;
}

.service-card:hover .service-icon {
  transform: scale(1.1) rotate(5deg);
}

/* News Section */
.news-card {
  border-radius: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
  background: white;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.news-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.news-card .card-image {
  height: 200px;
  overflow: hidden;
}

.news-card .card-image img {
  transition: transform 0.5s ease;
}

.news-card:hover .card-image img {
  transform: scale(1.1);
}

/* Testimonial Cards */
.testimonial-card {
  background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
  border-radius: 20px;
  padding: 2rem;
  position: relative;
  margin-bottom: 2rem;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 10px;
  left: 20px;
  font-size: 4rem;
  color: var(--primary-color);
  opacity: 0.3;
}

.testimonial-content {
  position: relative;
  z-index: 1;
  font-style: italic;
  margin-bottom: 1.5rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  font-weight: 500;
}

.testimonial-author img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-right: 1rem;
}

/* Footer Enhancements */
footer {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

footer a {
  transition: all 0.3s ease;
}

footer a:hover {
  color: var(--secondary-light) !important;
  transform: translateX(5px);
}

/* Floating Action Button Enhancements */
.fixed-action-btn ul {
  bottom: 60px;
}

.fixed-action-btn ul li {
  margin-bottom: 10px;
}

/* Responsive Design */
@media only screen and (max-width: 600px) {
  .hero-section {
    min-height: 60vh;
  }
  
  .hero-section h1 {
    font-size: 2rem;
  }
  
  .stats-card h4 {
    font-size: 2rem;
  }
  
  .service-card {
    margin-bottom: 1rem;
  }
}

@media only screen and (min-width: 601px) and (max-width: 992px) {
  .hero-section {
    min-height: 70vh;
  }
}

/* Loading States */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* Print Styles */
@media print {
  .fixed-action-btn,
  .sidenav-trigger,
  footer {
    display: none !important;
  }
  
  .hero-section {
    background: none !important;
    color: black !important;
  }
  
  .card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }
}

/* 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 */
.btn:focus,
.btn-floating:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #0000ff;
    --text-primary: #000000;
    --background-color: #ffffff;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Dark Mode Toggle */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* Network Status Indicator */
#network-status {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
  font-size: 1.5rem;
}

/* PWA Install Prompt */
#install-prompt {
  animation: bounce 2s infinite;
}

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

/* Custom Components */
.feature-list {
  list-style: none;
  padding: 0;
}

.feature-list li {
  padding: 1rem;
  margin-bottom: 1rem;
  background: white;
  border-radius: 10px;
  border-left: 4px solid var(--primary-color);
  transition: all 0.3s ease;
}

.feature-list li:hover {
  transform: translateX(10px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.feature-list .material-icons {
  vertical-align: middle;
  margin-right: 10px;
  color: var(--primary-color);
}

/* Timeline Component */
.timeline {
  position: relative;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--primary-color);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
  width: 50%;
}

.timeline-item:nth-child(odd) {
  left: 0;
  text-align: right;
  padding-right: 2rem;
}

.timeline-item:nth-child(even) {
  left: 50%;
  padding-left: 2rem;
}

.timeline-dot {
  position: absolute;
  top: 0;
  width: 20px;
  height: 20px;
  background: var(--primary-color);
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.timeline-item:nth-child(odd) .timeline-dot {
  right: -10px;
}

.timeline-item:nth-child(even) .timeline-dot {
  left: -10px;
}

@media only screen and (max-width: 600px) {
  .timeline::before {
    left: 30px;
  }
  
  .timeline-item {
    width: 100%;
    left: 0 !important;
    text-align: left !important;
    padding-left: 60px !important;
    padding-right: 0 !important;
  }
  
  .timeline-dot {
    left: 20px !important;
    right: auto !important;
  }
}