:root {
  --primary-color: #95aac4;
  --secondary-color: #86BC25;
  --dark-color: #000000;
  --light-gray: #F7F7F7;
  --text-color: #333333;
  --white: #FFFFFF;
}

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

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Navigation */
.navbar {
  background: var(--white);
  padding: 1rem 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.navbar.scrolled {
  padding: 0.5rem 0;
  box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.navbar-brand {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary-color) !important;
}

.navbar-brand img {
  height: 60px;
  margin-right: 15px;
  transition: height 0.3s ease;
}

.navbar.scrolled .navbar-brand img {
  height: 45px;
}

.navbar-nav {
  margin-left: auto !important;
  margin-right: 0 !important;
}

.navbar-nav .nav-link {
  color: var(--text-color) !important;
  font-weight: 500;
  margin: 0 1rem;
  position: relative;
  transition: color 0.3s ease;
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
  width: 100%;
}

.language-toggle {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-left: 1rem;
}

.language-toggle button {
  background: none;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  padding: 0.375rem 1rem;
  border-radius: 25px;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
}

.language-toggle button.active,
.language-toggle button:hover {
  background: var(--primary-color);
  color: var(--white);
}

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url('../images/03632BDB-C6CA-417A-9E6E-06A9864968D1.png') no-repeat center center;
  background-size: cover;
  overflow: hidden;
  margin-top: 76px;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5); /* Adding a dark overlay to ensure text readability */
  z-index: 1;
}

.hero-content {
  text-align: center;
  color: var(--white);
  z-index: 2; /* Ensuring content appears above the overlay */
  padding: 0 20px;
  animation: fadeInUp 1s ease;
}

.hero h1 {
  font-size: 4rem;
  font-weight: 900;
  margin-bottom: 1.5rem;
  letter-spacing: -2px;
}

.hero p {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: inline-block;
  background: var(--secondary-color);
  color: var(--white);
  padding: 1rem 2.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  margin-top: 1rem;
}

.hero-cta:hover {
  background: #6fa61e;
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(134, 188, 37, 0.3);
}

/* About Section */
.about-section {
  padding: 100px 0;
  background: var(--white);
}

.section-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 3rem;
  text-align: center;
  color: var(--dark-color);
}

.solution-card {
  background: var(--light-gray);
  padding: 3rem;
  border-radius: 20px;
  height: 100%;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.solution-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--primary-color);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.solution-card:hover::before {
  transform: translateX(0);
}

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

.solution-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

/* Portfolio Section */
.portfolio-section {
  padding: 100px 0;
  background: var(--light-gray);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 40px;
  margin-top: 60px;
}

.portfolio-item {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
  cursor: pointer;
}

.portfolio-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.portfolio-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-image {
  transform: scale(1.05);
}

.portfolio-content {
  padding: 2rem;
}

.portfolio-content h3 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  color: var(--dark-color);
}

.portfolio-content p {
  color: var(--text-color);
  margin-bottom: 1.5rem;
}

.portfolio-link {
  display: inline-flex;
  align-items: center;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.portfolio-link i {
  margin-left: 0.5rem;
  transition: transform 0.3s ease;
}

.portfolio-link:hover {
  color: var(--secondary-color);
}

.portfolio-link:hover i {
  transform: translateX(5px);
}

/* Contact Section */
.contact-section {
  padding: 100px 0;
  background: var(--white);
}

.contact-form {
  background: var(--light-gray);
  padding: 3rem;
  border-radius: 20px;
}

.form-control,
.form-select {
  background: var(--white);
  border: none;
  padding: 1rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
  outline: none;
}

.submit-btn {
  background: var(--primary-color);
  color: var(--white);
  border: none;
  padding: 1rem 3rem;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
  width: 100%;
}

.submit-btn:hover {
  background: #0052a3;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 102, 204, 0.3);
}

/* Footer */
.footer {
  background: var(--dark-color);
  color: var(--white);
  padding: 50px 0 30px;
}

.footer h5 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.social-links {
  display: flex;
  gap: 20px;
  margin-top: 2rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  color: var(--white);
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
}

/* NEWS DETAIL / EARLY WARNING SYSTEM SPECIFIC STYLES */

/* News Detail Section */
.news-detail {
  padding: 120px 0 80px;
  background: var(--white);
}

.section-padding {
  padding: 80px 0;
}

/* Sticky Table of Contents */
.sticky-toc {
  position: sticky;
  top: 120px;
  padding: 25px;
  background: var(--light-gray);
  border: 2px solid #e0e0e0;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  font-weight: bold;
}

.sticky-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sticky-toc ul li {
  margin-bottom: 12px;
}

.sticky-toc ul li a {
  text-decoration: none;
  color: var(--text-color);
  font-size: 16px;
  transition: all 0.3s ease;
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
}

.sticky-toc ul li a:hover {
  color: var(--primary-color);
  background: rgba(0, 102, 204, 0.05);
  transform: translateX(5px);
}

.sticky-toc ul li a.active {
  font-weight: bold;
  color: var(--white);
  background: var(--primary-color);
  border-left: 4px solid var(--secondary-color);
  box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

/* Content Steps/Sections */
.step {
  margin-bottom: 50px;
  padding: 30px;
  background: var(--light-gray);
  border-radius: 15px;
  border-left: 5px solid var(--primary-color);
  transition: all 0.3s ease;
}

.step:hover {
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.step h5 {
  color: var(--primary-color);
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 10px;
}

.step h6 {
  color: var(--dark-color);
  font-weight: 600;
  font-size: 1.2rem;
  margin: 25px 0 15px 0;
}

.step p {
  line-height: 1.8;
  margin-bottom: 15px;
  color: var(--text-color);
}

/* Figure and Image Styling */
.figure {
  margin: 30px 0;
  text-align: center;
}

.portfolio-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.portfolio-image:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}

.figure-caption {
  margin-top: 15px;
  font-style: italic;
  color: #666;
  font-size: 0.95rem;
  font-weight: 500;
}

/* Image Popup Link */
.image-popup {
  display: block;
  transition: all 0.3s ease;
}

.image-popup:hover {
  opacity: 0.9;
}

/* Site Footer */
.site-footer {
  background: var(--dark-color);
  color: var(--white);
  padding: 60px 0 40px;
  margin-top: 80px;
}

.site-footer h5 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
}

.site-footer h5 i {
  margin-right: 12px;
  color: var(--primary-color);
  font-size: 1.3rem;
}

.social-icon {
  display: flex;
  gap: 15px;
  list-style: none;
  padding: 0;
  margin: 0;
  justify-content: center;
}

.social-icon li {
  margin: 0;
}

.social-icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  color: var(--white);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1.2rem;
}

.social-icon-link:hover {
  background: var(--primary-color);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 102, 204, 0.3);
}

/* Page Title */
.news-detail h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--dark-color);
  margin-bottom: 3rem;
  text-align: center;
  position: relative;
}

.news-detail h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 2px;
}

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

.fade-in {
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
}

/* AOS Animation Overrides */
[data-aos="fade-up"] {
  transition: all 0.6s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero h1 {
      font-size: 2.5rem;
  }
  
  .hero p {
      font-size: 1.2rem;
  }
  
  .section-title {
      font-size: 2rem;
  }
  
  .portfolio-grid {
      grid-template-columns: 1fr;
  }
  
  .navbar-nav {
      text-align: center;
      padding: 1rem 0;
  }
  
  .language-toggle {
      justify-content: center;
      margin-top: 1rem;
  }
  
  .news-detail {
      padding: 100px 0 60px;
  }
  
  .news-detail h2 {
      font-size: 2rem;
  }
  
  .step {
      padding: 20px;
      margin-bottom: 30px;
  }
  
  .step h5 {
      font-size: 1.3rem;
  }
  
  .sticky-toc {
      position: relative;
      top: 0;
      margin-bottom: 30px;
  }
}

@media (max-width: 576px) {
  .news-detail h2 {
      font-size: 1.8rem;
  }
  
  .step h5 {
      font-size: 1.2rem;
  }
  
  .step h6 {
      font-size: 1.1rem;
  }
  
  .sticky-toc ul li a {
      font-size: 14px;
  }
}

/* Language-specific styles */
[data-lang]:not(.active) {
  display: none !important;
}

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

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

::-webkit-scrollbar-track {
  background: var(--light-gray);
}

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

::-webkit-scrollbar-thumb:hover {
  background: #0052a3;
}

/* Loading states and transitions */
.step,
.sticky-toc {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.step:nth-child(1) { animation-delay: 0.1s; }
.step:nth-child(2) { animation-delay: 0.2s; }
.step:nth-child(3) { animation-delay: 0.3s; }
.sticky-toc { animation-delay: 0s; }

/* Focus states for accessibility */
.sticky-toc ul li a:focus,
.nav-link:focus,
.language-toggle button:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .navbar,
  .sticky-toc,
  .site-footer {
      display: none;
  }
  
  .news-detail {
      padding: 20px 0;
  }
  
  .step {
      break-inside: avoid;
      margin-bottom: 30px;
  }
}