/* ============================================================
   KSoftTools Website — Responsive Stylesheet
   Mobile, tablet, and small-desktop layout adjustments
   ============================================================ */

/* ============================================================
   LARGE DESKTOP (up to 1440px)
   ============================================================ */
@media (max-width: 1440px) {
  :root {
    --container: 1140px;
  }
}

/* ============================================================
   SMALL DESKTOP (up to 1200px)
   ============================================================ */
@media (max-width: 1200px) {
  :root {
    --container: 100%;
  }

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

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

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

  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 32px;
  }
}

/* ============================================================
   TABLET (up to 1024px)
   ============================================================ */
@media (max-width: 1024px) {
  .section {
    padding: 72px 0;
  }

  .nav-container {
    height: 64px;
  }

  .nav-menu a {
    padding: 8px 10px;
    font-size: 0.875rem;
  }

  .nav-cta span {
    display: none;
  }

  .nav-cta {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
  }

  .hero {
    padding: 60px 0 80px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-text {
    max-width: 100%;
    text-align: center;
  }

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

  .hero-actions,
  .hero-trust {
    justify-content: center;
  }

  .problem-grid,
  .why-grid,
  .pricing-grid,
  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .custom-box {
    grid-template-columns: 1fr;
    padding: 44px 40px;
    gap: 32px;
  }

  .custom-visual {
    order: -1;
  }

  .custom-icon {
    font-size: 5rem;
  }

  .custom-text {
    text-align: center;
  }

  .custom-actions {
    justify-content: center;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .footer-brand {
    grid-column: 1 / -1;
    max-width: 100%;
  }

  .page-header h1 {
    font-size: 2.25rem;
  }
}

/* ============================================================
   MOBILE LANDSCAPE / SMALL TABLET (up to 768px)
   ============================================================ */
@media (max-width: 768px) {
  .section {
    padding: 56px 0;
  }

  .container {
    padding: 0 20px;
  }

  .section-header {
    margin-bottom: 40px;
  }

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

  .section-subtitle {
    font-size: 1rem;
  }

  /* ---------- Navigation ---------- */
  .nav-toggle {
    display: flex;
  }

  .nav-cta {
    display: none;
  }

  .nav-menu {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 16px 20px 24px;
    gap: 4px;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    transform: translateY(-120%);
    transition: transform 0.3s ease;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
  }

  .nav-menu.active {
    transform: translateY(0);
  }

  .nav-menu a {
    padding: 12px 16px;
    font-size: 1rem;
    border-radius: var(--radius-md);
  }

  .nav-cta-mobile {
    display: block;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
  }

  .nav-cta-mobile .btn {
    width: 100%;
    padding: 12px 20px;
  }

  /* Hamburger animation */
  .nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* ---------- Hero ---------- */
  .hero {
    padding: 40px 0 60px;
  }

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

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

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

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

  .hero-trust {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .trust-item {
    font-size: 0.875rem;
  }

  /* ---------- Laptop mockup ---------- */
  .laptop-mockup {
    max-width: 100%;
  }

  /* ---------- Grids collapse to single column ---------- */
  .problem-grid,
  .feature-grid,
  .reports-preview-grid,
  .why-grid,
  .pricing-grid,
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .problem-card,
  .feature-card,
  .why-card,
  .step-card,
  .pricing-card {
    padding: 24px 20px;
  }

  .pricing-card-popular {
    transform: none;
  }

  .pricing-card-popular:hover {
    transform: translateY(-4px);
  }

  .pricing-badge {
    font-size: 0.6875rem;
  }

  .price-amount {
    font-size: 2rem;
  }

  /* ---------- Custom software ---------- */
  .custom-box {
    padding: 32px 24px;
    border-radius: var(--radius-lg);
  }

  .custom-text h2 {
    font-size: 1.5rem;
  }

  .custom-text p {
    font-size: 0.9375rem;
  }

  .custom-actions {
    flex-direction: column;
  }

  .custom-actions .btn {
    width: 100%;
  }

  .custom-icon {
    font-size: 4rem;
  }

  /* ---------- CTA ---------- */
  .cta-title {
    font-size: 1.75rem;
  }

  .cta-subtitle {
    font-size: 1rem;
  }

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

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

  /* ---------- Footer ---------- */
  .footer {
    padding: 48px 0 24px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 32px;
  }

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

  /* ---------- Page header ---------- */
  .page-header {
    padding: 40px 0 32px;
  }

  .page-header h1 {
    font-size: 1.75rem;
  }

  .page-header p {
    font-size: 1rem;
  }

  /* ---------- Buttons ---------- */
  .btn-lg {
    padding: 14px 24px;
    font-size: 0.9375rem;
  }

  /* ---------- Floating WhatsApp ---------- */
  .whatsapp-float {
    width: 54px;
    height: 54px;
    bottom: 16px;
    right: 16px;
  }

  .whatsapp-float svg {
    width: 24px;
    height: 24px;
  }
}

/* ============================================================
   SMALL MOBILE (up to 480px)
   ============================================================ */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .section {
    padding: 44px 0;
  }

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

  .hero-badge {
    font-size: 0.75rem;
    padding: 5px 12px;
  }

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

  .section-subtitle {
    font-size: 0.9375rem;
  }

  .nav-logo-text {
    font-size: 1.125rem;
  }

  .nav-logo-mark {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }

  .pricing-name {
    font-size: 1.125rem;
  }

  .price-amount {
    font-size: 1.75rem;
  }

  .custom-text h2 {
    font-size: 1.25rem;
  }

  .cta-title {
    font-size: 1.5rem;
  }

  .footer-logo-text {
    font-size: 1rem;
  }

  .footer-col h4 {
    font-size: 0.75rem;
  }

  .footer-col a {
    font-size: 0.875rem;
  }

  .page-header h1 {
    font-size: 1.5rem;
  }

  .page-header p {
    font-size: 0.9375rem;
  }
}

/* ============================================================
   VERY SMALL (up to 360px)
   ============================================================ */
@media (max-width: 360px) {
  .hero-title {
    font-size: 1.5rem;
  }

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

  .nav-container {
    padding: 0 14px;
  }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .navbar,
  .whatsapp-float,
  .hero-visual,
  .cta-section,
  .nav-toggle {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .section {
    padding: 20px 0;
  }
}

/* ============================================================
   ACCESSIBILITY: REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .custom-icon {
    animation: none;
  }

  .whatsapp-float {
    animation: none;
  }
}