/* ==========================================================================
   Period Calculator - Professional Responsive Adaptations
   ========================================================================== */

/* --- Medium Desktop / Laptops (max-width: 1024px) --- */
@media (max-width: 1024px) {
  html {
    font-size: 15px;
  }

  .container {
    padding: 0 1.5rem;
  }

  .hero-grid {
    gap: 2rem;
  }

  .hero-content h1 {
    font-size: 3rem;
  }

  .calc-grid {
    gap: 2rem;
  }

  .features-grid {
    gap: 1.5rem;
  }

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

/* --- Tablets & Small Laptops (max-width: 768px) --- */
@media (max-width: 768px) {
  .section {
    padding: 4rem 0;
  }

  .section-header {
    margin-bottom: 2.5rem;
  }

  .section-header h2 {
    font-size: 2rem;
  }

  /* Sticky Navigation Drawer on Mobile */
  .mobile-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-left: 1px solid var(--border-color);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 6rem 2.5rem 3rem 2.5rem;
    gap: 2rem;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
  }

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

  .nav-link {
    font-size: 1.15rem;
    width: 100%;
  }

  /* Hamburger Animating State */
  .mobile-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
  }

  .mobile-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .mobile-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -7px);
  }

  /* Hero Section Stacking */
  .hero-section {
    padding-top: 8rem;
    padding-bottom: 5rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }

  .hero-description {
    margin: 0 auto 2rem auto;
  }

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

  .trust-badges {
    margin: 0 auto;
  }

  .hero-visual {
    order: -1; /* Display wave on top of content on smaller screens */
  }

  .wave-container {
    width: 280px;
    height: 280px;
  }

  /* Calculator Form & Results Stacking */
  .calculator-wrapper {
    padding: 2rem;
    margin-top: -2rem;
  }

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

  .calc-results {
    min-height: auto;
  }

  /* Features Grid Stacking */
  .features-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }

  .feature-card {
    padding: 2.5rem 2rem;
  }

  /* Timeline Grid Stacking */
  .timeline {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .timeline::after {
    display: none; /* Hide timeline horizontal line on mobile */
  }

  .timeline-step {
    flex-direction: row;
    text-align: left;
    gap: 1.5rem;
    max-width: 500px;
    margin: 0 auto;
  }

  .timeline-step p {
    max-width: none;
  }

  .step-number {
    width: 60px;
    height: 60px;
    font-size: 1.25rem;
    flex-shrink: 0;
  }

  /* Benefits Grid Stacking */
  .benefits-grid {
    grid-template-columns: 1fr;
    max-width: 600px;
    margin: 0 auto;
  }

  /* Statistics Grid Stacking */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }

  /* Testimonials styling */
  .testimonial-card {
    padding: 2.5rem 1.5rem;
  }

  .testimonial-card p {
    font-size: 1.1rem;
  }

  /* CTA Banner spacing */
  .cta-banner {
    padding: 4rem 2rem;
  }

  .cta-banner h2 {
    font-size: 2rem;
  }

  /* Sub page contact columns */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* --- Mobile Phones (max-width: 480px) --- */
@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

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

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

  .trust-badges {
    grid-template-columns: 1fr;
  }

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

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

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

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

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

  .footer-bottom-links {
    justify-content: center;
    width: 100%;
  }

  .contact-form-wrapper {
    padding: 2rem 1.5rem;
  }
}
