/* Custom styles for Năng lực số - Digital Capability */

/* Hero Slider Styles */
.hero-slider {
  position: relative;
  height: 60vh;
  min-height: 400px;
  overflow: hidden;
}

.hero-slide {
  height: 60vh;
  min-height: 400px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

.hero-slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.carousel-caption {
  z-index: 2;
  bottom: 20%;
  text-align: left;
  left: 10%;
  right: 10%;
}

.carousel-caption h1 {
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  margin-bottom: 1rem;
}

.carousel-caption p {
  color: white;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
  font-size: 1.2rem;
}

/* Navigation Styles */
.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
}

.navbar {
  position: relative; /* anchor absolute children like toggler/collapse */
}

.navbar-nav .nav-link {
  font-weight: 500;
  transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
  color: #0d6efd !important;
}

.navbar-nav .btn {
  border-radius: 25px;
  padding: 0.5rem 1.5rem;
  font-weight: 500;
}

/* Mobile Menu Enhancements */
.navbar-toggler {
  border: 2px solid #dee2e6;
  padding: 0.5rem 0.75rem;
  position: relative;
  z-index: 1030;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.navbar-collapse {
  transition: all 0.3s ease-in-out;
}

/* Ensure burger menu stays at top right on mobile */
@media (max-width: 991.98px) {
  .navbar-toggler {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    transform: none; /* do not shift when header height changes */
    width: 2.5rem;
    height: 2.5rem;
    padding: 0.375rem 0.5rem;
    font-size: 1rem;
    z-index: 1041; /* above collapse */
  }

  /* Space for toggler */
  .navbar-brand {
    margin-right: 4rem;
  }

  /* Make the collapsing menu float below the header so it doesn't push it down */
  .navbar-collapse {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background-color: #fff;
    padding: 1rem;
    border-radius: 0 0 0.5rem 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    z-index: 1040;
  }

  .navbar-nav .btn {
    margin-top: 0.5rem;
    margin-left: 0 !important;
    width: 100%;
    text-align: center;
  }
  
  .navbar-nav .nav-item {
    padding: 0.25rem 0;
  }
}

/* Content Sections */
section {
  padding: 4rem 0;
}

.card {
  border: none;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.img-fluid {
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.img-fluid:hover {
  transform: scale(1.02);
}

/* Zigzag Layout */
.row.align-items-center {
  margin-bottom: 3rem;
}

.row.align-items-center:last-child {
  margin-bottom: 0;
}

/* Full Width Section */
.bg-light {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Stats Cards */
.display-4 {
  font-size: 2.5rem;
  font-weight: 700;
}

/* Footer */
footer {
  margin-top: auto;
}

footer .social-links a {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

footer .social-links a:hover {
  transform: translateY(-2px);
}

footer ul li {
  margin-bottom: 0.5rem;
}

footer a:hover {
  color: #0d6efd !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-slider {
    height: 50vh;
    min-height: 300px;
  }

  .carousel-caption {
    bottom: 10%;
    left: 5%;
    right: 5%;
  }

  .carousel-caption h1 {
    font-size: 2rem;
  }

  .carousel-caption p {
    font-size: 1rem;
  }

  .display-4 {
    font-size: 2rem;
  }

  section {
    padding: 2rem 0;
  }

  .navbar-brand {
    font-size: 1.25rem;
  }
}

@media (max-width: 576px) {
  .hero-slider {
    height: 40vh;
    min-height: 250px;
  }

  .carousel-caption {
    display: none !important;
  }

  .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }
}

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

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

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

/* Loading Animation */
.loading {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.2s forwards;
}

/* Highcharts tooltip container - ensure it appears above everything */
.highcharts-tooltip-container {
  z-index: 1000 !important;
}

/* Icon Styles */
.bi {
  vertical-align: -0.125em;
}

/* Round data labels for charts (matching sample styling) */
.round-datalabels {
  background-color: rgba(252,163,51,0.4) !important;
  border: 1px solid rgba(252,163,51,0.75) !important;
  border-radius: 28px !important;
  padding: 4px 8px !important;
  color: #000 !important;
  font-weight: bold !important;
  font-size: 1em !important;
  white-space: nowrap !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
}

/* Polar chart data label styling */
.polar-label {
  display: inline-block;
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.45);
}

.polar-tooltip {
  font-size: 12px;
  line-height: 1.4;
}

/* Highcharts tooltip styling */
.highcharts-tooltip-title {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.highcharts-tooltip-desc {
  margin: 0 0 8px 0;
  font-size: 12px;
  color: #666;
  line-height: 1.4;
}

.highcharts-tooltip-label {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}