/* ========================================
   RESPONSIVE STYLES
   Nusantara Prima Solutions
   ======================================== */

/* Large Tablets & Small Desktops */
@media (max-width: 1200px) {
  :root {
    --text-5xl: 2.5rem;
    --text-6xl: 3rem;
    --text-7xl: 3.5rem;
  }

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

  .vision-mission-grid {
    grid-template-columns: 1fr;
  }

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

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

/* Tablets */
@media (max-width: 992px) {
  :root {
    --text-4xl: 1.875rem;
    --text-5xl: 2rem;
    --container-padding: 1.25rem;
    --space-24: 4rem;
    --space-20: 3.5rem;
    --space-16: 2.5rem;
  }

  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-20) var(--space-6);
    gap: var(--space-4);
    transition: right var(--transition-base);
    box-shadow: var(--shadow-2xl);
    z-index: 1000;
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-link {
    color: var(--gray-700);
    font-size: var(--text-lg);
    padding: var(--space-3) 0;
  }

  .nav-link::after {
    display: none;
  }

  .nav-actions .btn-primary {
    display: none;
  }

  /* keep the icon visible and a bit smaller on narrow screens */
  .logo-icon {
    display: flex; /* ensure it isn't accidentally hidden */
    width: 30px;
    height: 30px;
  }

  /* responsive logo sizing for tablets */
  .logo img {
    height: clamp(24px, 6vw, 36px);
  }

  .logo-text {
    font-size: clamp(0.8rem, 3vw, 1.125rem);
  }

  .header.scrolled .logo img {
    height: clamp(20px, 5vw, 32px);
  }

  .header.scrolled .logo-text {
    font-size: clamp(0.75rem, 2.7vw, 1rem);
  }

  .hero-title {
    font-size: var(--text-4xl);
  }

  .hero-stats {
    flex-direction: column;
    gap: var(--space-6);
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }

  .about-images {
    max-width: 500px;
    margin: 0 auto;
  }

  .about-image-secondary {
    display: none;
  }

  .experience-badge {
    left: 20px;
  }

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

  .project-card.large {
    grid-column: span 1;
  }

  .cta-buttons {
    flex-direction: column;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
    text-align: center;
  }

  .footer-brand .logo {
    justify-content: center;
  }

  .footer-social {
    justify-content: center;
  }

  .footer-contact ul li {
    justify-content: center;
  }

  .footer-bottom-content {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }
}

/* Mobile Phones */
@media (max-width: 768px) {
  :root {
    --text-3xl: 1.5rem;
    --text-4xl: 1.625rem;
    --text-5xl: 1.75rem;
    --container-padding: 1rem;
    --space-24: 3rem;
    --space-20: 2.5rem;
    --space-16: 2rem;
    --space-12: 1.5rem;
    --space-10: 1.25rem;
    --space-8: 1rem;
  }

  /* responsive logo sizing for mobile phones */
  .logo img {
    height: clamp(22px, 7vw, 32px);
  }

  .logo-text {
    font-size: clamp(0.75rem, 3.5vw, 1rem);
  }

  .header.scrolled .logo img {
    height: clamp(18px, 6vw, 28px);
  }

  .header.scrolled .logo-text {
    font-size: clamp(0.7rem, 3vw, 0.9rem);
  }

  .hero {
    padding: var(--space-20) 0 var(--space-10);
    min-height: auto;
  }

  .hero-title {
    font-size: var(--text-3xl);
  }

  .hero-description {
    font-size: var(--text-base);
  }

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

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

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

  .vision-mission-grid {
    grid-template-columns: 1fr;
  }

    /* products page should show two columns on standard mobile viewports */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
  }

  .section-title {
    font-size: var(--text-2xl);
  }

  .about-image-main img {
    height: 350px;
  }

  .experience-badge {
    padding: var(--space-4);
    left: 10px;
    top: 10px;
  }

  .exp-number {
    font-size: var(--text-2xl);
  }

  .project-image img,
  .project-card.large .project-image img {
    height: 250px;
  }

  .testimonial-card {
    padding: var(--space-6);
  }

  .testimonial-text {
    font-size: var(--text-base);
  }

  .cta-content h2 {
    font-size: var(--text-2xl);
  }

  .cta-buttons {
    width: 100%;
  }

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

  .footer-top {
    padding: var(--space-12) 0 var(--space-8);
  }

  .footer-links h4,
  .footer-contact h4 {
    margin-bottom: var(--space-4);
  }

  .back-to-top {
    width: 40px;
    height: 40px;
    bottom: 20px;
    right: 20px;
  }
}

/* Small Mobile Phones */
@media (max-width: 480px) {
  /* responsive logo sizing for very small phones */
  .logo img {
    height: clamp(20px, 8vw, 28px);
  }

  .logo-text {
    font-size: clamp(0.7rem, 4vw, 0.9rem);
  }

  .header.scrolled .logo img {
    height: clamp(16px, 7vw, 24px);
  }

  .header.scrolled .logo-text {
    font-size: clamp(0.65rem, 3.5vw, 0.8rem);
  }

  .hero-badge {
    font-size: var(--text-xs);
    padding: var(--space-1) var(--space-3);
  }

  .hero-title {
    font-size: var(--text-2xl);
  }

  .stat-number {
    font-size: var(--text-3xl);
  }

  .feature-card {
    padding: var(--space-6);
  }

  .feature-icon {
    width: 55px;
    height: 55px;
  }

  .testimonial-author {
    flex-direction: column;
    text-align: center;
  }

  .testimonial-nav {
    gap: var(--space-4);
  }

  .testimonial-prev,
  .testimonial-next {
    width: 40px;
    height: 40px;
  }
}

/* Landscape Mode */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: var(--space-20) 0 var(--space-10);
  }

  .hero-scroll {
    display: none;
  }
}

/* High Resolution Screens */
@media (min-width: 1920px) {
  :root {
    --container-max: 1440px;
    --text-base: 1.125rem;
  }
}

/* Print Styles */
@media print {
  .header,
  .hero-scroll,
  .back-to-top,
  .cta,
  .footer {
    display: none;
  }

  .hero {
    min-height: auto;
    padding: 2rem 0;
  }

  .hero-bg {
    display: none;
  }

  .hero-content {
    color: var(--gray-900);
  }

  .hero-title {
    color: var(--gray-900);
  }

  section {
    page-break-inside: avoid;
  }
}
