/* ==========================================================================
   SGPI RCY UNIT — Responsive Stylesheet
   Breakpoints: 1024px (tablet/laptop), 768px (tablet/mobile), 480px, 360px
   ========================================================================== */

/* Mobile Navigation Overlay & Drawer */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.mobile-nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 290px;
  max-width: 85vw;
  background-color: #FFFFFF;
  z-index: 999;
  box-shadow: -4px 0 24px rgba(15, 23, 42, 0.12);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

.mobile-nav-drawer.active {
  transform: translateX(0);
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 1.5rem;
}

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  overflow-y: auto;
}

.mobile-nav-item a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-body);
  transition: all var(--transition-fast);
}

.mobile-nav-item a:hover,
.mobile-nav-item a.active {
  background-color: var(--sky-blue-light);
  color: var(--sky-blue);
}

.mobile-drawer-footer {
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Screen Size Adaptations */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-visual {
    max-width: 540px;
    margin: 0 auto;
    width: 100%;
  }

  .grid-cards-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-cards-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .footer-grid,
  .footer-grid-ref {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }

  /* About Redesign Card Responsive */
  .about-ref-card {
    flex-direction: column;
    align-items: stretch;
    gap: 2rem;
    padding: 2.25rem 2rem;
  }

  .about-ref-visual {
    width: 100%;
    max-width: 360px;
    height: 230px;
    margin: 0 auto;
  }

  .about-ref-divider {
    width: 100%;
    height: 1px;
    margin: 0;
  }

  .about-ref-features {
    flex: 1 1 auto;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 66px;
  }

  .section {
    padding: 3rem 0;
  }

  .section-title {
    font-size: 1.625rem;
  }

  .nav-links,
  .header-actions .btn-desktop {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-section {
    padding: 3rem 0 1.5rem 0;
  }

  .hero-about-section {
    padding: 1.5rem 0 3rem 0;
  }

  .hero-description {
    font-size: 1rem;
  }

  .hero-banner-img {
    height: 240px;
  }

  .hero-floating-stat {
    bottom: -10px;
    right: -5px;
    padding: 0.625rem 0.875rem;
  }

  .floating-stat-num {
    font-size: 1.125rem;
  }

  .grid-cards-3,
  .grid-cards-2 {
    grid-template-columns: 1fr;
  }

  .article-title {
    font-size: 1.75rem;
  }

  .footer-grid,
  .footer-grid-ref {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .section-title {
    font-size: 1.45rem;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  #toast-container {
    left: 1rem;
    right: 1rem;
    max-width: calc(100vw - 2rem);
  }
}

@media (max-width: 480px) {
  .header-blood-btn {
    font-size: 0.75rem;
    padding: 0.3rem 0.65rem;
  }
}

@media (max-width: 380px) {
  .header-blood-btn span.blood-btn-text-full {
    display: none;
  }
}

@media (max-width: 360px) {
  .brand-title {
    font-size: 0.95rem;
  }

  .brand-subtitle {
    display: none;
  }
}

@media (max-width: 640px) {
  .about-ref-card {
    padding: 1.75rem 1.25rem;
    border-radius: 20px;
  }

  .about-ref-visual {
    max-width: 100%;
    height: 200px;
  }

  .about-ref-title {
    font-size: 1.75rem;
  }

  .about-ref-features {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}
