/* ===============================
   Core Sections & Components
   =============================== */

/* .stats-section {
  color: var(--white);
} */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-8);
}

.stat-item {
  text-align: center;
  padding: var(--space-6);

  border-radius: var(--radius-2xl);
  backdrop-filter: blur(10px);
}

.stat-icon {
  width: 80px;
  height: 80px;

  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-4);
  font-size: var(--text-3xl);
}

.stat-number {
  font-size: var(--text-5xl);
  font-weight: 700;
  margin-bottom: var(--space-2);
  font-family: var(--font-display);
}

.stat-label {
  font-size: var(--text-lg);
  opacity: 0.9;
  margin: 0;
}

/* ===============================
   Responsive Design
   =============================== */

/* ----- Laptops & Small Desktops ----- */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: var(--space-12);
    text-align: center;
  }

  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

/* ----- Tablets & Large Mobiles ----- */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .title-main {
    font-size: var(--text-4xl);
  }

  .hero-actions {
    justify-content: center;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  /* Show two stats per row (2×2) */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
  }
}

/* ----- Small Mobiles ----- */
@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-3);
  }

  .hero-content {
    /* padding: var(--space-16) 0; */
    gap: var(--space-8);
    text-align: center;
  }

  .title-main {
    font-size: var(--text-3xl);
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  /* Keep two-column grid but allow shrink to 120px per item */
  .stats-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: var(--space-4);
  }

  .stat-item {
    padding: var(--space-4);
  }

  .stat-icon {
    width: 64px;
    height: 64px;
    font-size: var(--text-2xl);
  }

  .stat-number {
    font-size: var(--text-3xl);
  }

  .stat-label {
    font-size: var(--text-base);
  }

  .floating-card:nth-child(2),
  .floating-card:nth-child(3) {
    margin-right: 0;
  }
}

/* ===============================
   Accessibility & Media Preferences
   =============================== */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #000080;
    --secondary-color: #008000;
    --gray-600: #000000;
    --gray-700: #000000;
    --gray-800: #000000;
    --gray-900: #000000;
  }
}

/* ===============================
   Print Styles
   =============================== */

@media print {
  .modern-navbar,
  .hero-visual,
  .footer-wave {
    display: none;
  }

  .hero-section {
    background: white;
    color: black;
    min-height: auto;
  }

  .hero-text {
    color: black;
  }

  /* Print Typography Optimizations */
  body {
    font-size: 12pt;
    line-height: 1.4;
  }

  .hero-title .title-main {
    font-size: 24pt;
    color: black !important;
  }

  .section-title {
    font-size: 18pt;
    color: black !important;
    page-break-after: avoid;
  }

  .service-card h3,
  .project-card h3 {
    font-size: 14pt;
    color: black !important;
  }
}

/* ===============================
   Enhanced Mobile Typography
   =============================== */

@media (max-width: 768px) {
  .hero-title .title-main {
    font-size: clamp(var(--text-3xl), 10vw, var(--text-5xl));
    line-height: var(--leading-tight);
  }

  .hero-title .title-sub {
    font-size: clamp(var(--text-base), 4vw, var(--text-xl));
  }

  .section-title {
    font-size: clamp(var(--text-2xl), 6vw, var(--text-4xl));
    text-align: center;
  }

  .service-card,
  .project-card {
    padding: var(--space-6);
  }
}

@media (max-width: 480px) {
  .hero-title .title-main {
    font-size: var(--text-4xl);
  }

  .hero-title .title-sub {
    font-size: var(--text-lg);
  }

  .section-title {
    font-size: var(--text-3xl);
  }

  .service-card h3,
  .project-card h3 {
    font-size: var(--text-xl);
  }
}

@media (min-width: 1440px) {
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
  .container {
    max-width: 1400px;
  }
}

/* ===============================
            gov-entities
   =============================== */

/* Mobile responsiveness */
@media (max-width: 768px) {
  .admin-detail-container {
    padding: 10px;
  }

  .admin-card-centered {
    width: 250px;
    height: 250px;
    padding: 20px;
    margin-bottom: 20px;
  }

  .admin-card-centered .h2_title {
    font-size: 18px;
    margin-bottom: 15px;
  }

  .admin-card-centered img {
    max-width: 80px;
    max-height: 80px;
  }

  .admin-details-panel {
    padding: 20px;
    margin: 0 5px;
    max-width: 100%;
  }

  .admin-details-title {
    font-size: 22px;
    margin-bottom: 20px;
  }

  .admin-details-content {
    font-size: 14px;
  }

  .admin-details-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .admin-description {
    font-size: 16px;
    padding: 15px;
    margin-bottom: 20px;
  }

  .detail-item {
    padding: 12px;
  }

  .detail-label {
    font-size: 14px;
  }

  .detail-value {
    font-size: 13px;
  }

  .close-detail-btn {
    width: 40px;
    height: 40px;
    font-size: 16px;
    top: 15px;
    right: 15px;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .admin-detail-container {
    padding: 5px;
  }

  .admin-card-centered {
    width: 200px;
    height: 200px;
    padding: 15px;
  }

  .admin-card-centered .h2_title {
    font-size: 16px;
  }

  .admin-card-centered img {
    max-width: 60px;
    max-height: 60px;
  }

  .admin-details-panel {
    padding: 15px;
    margin: 0;
  }

  .admin-details-title {
    font-size: 20px;
  }

  .admin-description {
    font-size: 14px;
    padding: 12px;
  }

  .detail-item {
    padding: 10px;
  }

  .detail-label {
    font-size: 13px;
  }

  .detail-value {
    font-size: 12px;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .admin-detail-container {
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 20px;
    padding: 10px;
  }

  .admin-card-centered {
    width: 200px;
    height: 200px;
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .admin-details-panel {
    flex: 1;
    max-width: 400px;
    transform: translateX(50px);
  }

  .admin-details-panel.animate-in {
    transform: translateX(0);
  }
}
