/* ===================================
   RESPONSIVE DESIGN & MOBILE OPTIMIZATION
   =================================== */

/* ===================================
   MOBILE NAVIGATION - ADDED FUNCTIONALITY
   =================================== */

/* Hamburger button styling - hidden by default */
.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.nav-toggle .bar {
  width: 25px;
  height: 3px;
  background: #2C5282;
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 2px;
}

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

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

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

/* ===================================
   LARGE DESKTOP (1200px+)
   =================================== */

@media (min-width: 1200px) {
  .container {
    max-width: var(--container-xl);
    padding: 0 var(--space-xl);
  }
  
  .hero-title {
    font-size: var(--fs-6xl);
  }
  
  .section-title {
    font-size: var(--fs-5xl);
  }
  
  .value-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .faq-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .included-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ===================================
   DESKTOP (1024px - 1199px)
   =================================== */

@media (max-width: 1199px) and (min-width: 1024px) {
  .hero-container {
    gap: var(--space-3xl);
  }
  
  .value-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .included-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===================================
   TABLET LANDSCAPE (768px - 1023px)
   =================================== */

@media (max-width: 1023px) and (min-width: 768px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
    text-align: center;
  }
  
  .hero-image {
    order: -1;
    max-width: 400px;
    margin: 0 auto;
  }
  
  .hero-stats {
    grid-template-columns: repeat(3, 1fr);
    max-width: 500px;
    margin: 0 auto var(--space-2xl);
  }
  
  .hero-cta {
    justify-content: center;
  }
  
  .value-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .process-steps {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .included-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .cta-offer {
    grid-template-columns: auto 1fr;
    gap: var(--space-xl);
  }
  
  .proof-stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ===================================
   TABLET PORTRAIT (481px - 767px)
   =================================== */

@media (max-width: 767px) and (min-width: 481px) {
  /* Navigation - Enhanced mobile menu */
  .nav-toggle {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(255,255,255,0.98);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 5rem;
    transition: left var(--transition-normal);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    backdrop-filter: blur(10px);
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .nav-menu a {
    margin: var(--space-md) 0;
    font-size: var(--fs-lg);
    color: #2C5282;
    text-decoration: none;
    font-weight: 500;
    padding: var(--space-md);
  }
  
  .nav-menu a:hover {
    background: rgba(44, 82, 130, 0.1);
    border-radius: 8px;
  }
  
  /* Hero Section */
  .hero {
    padding: calc(80px + var(--space-2xl)) 0 var(--space-2xl);
  }
  
  .hero-container {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
    text-align: center;
  }
  
  .hero-title {
    font-size: var(--fs-3xl);
    line-height: 1.2;
  }
  
  .hero-subtitle {
    font-size: var(--fs-lg);
  }
  
  .hero-stats {
    grid-template-columns: 1fr;
    gap: var(--space-md);
    padding: var(--space-lg);
  }
  
  .stat-number {
    font-size: var(--fs-xl);
  }
  
  .hero-cta {
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
  }
  
  .hero-image {
    order: -1;
  }
  
  /* Sections */
  .section-title {
    font-size: var(--fs-3xl);
  }
  
  .section-subtitle {
    font-size: var(--fs-lg);
  }
  
  /* Grids */
  .value-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  
  .process-steps {
    grid-template-columns: 1fr;
  }
  
  .included-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
  
  .faq-grid {
    grid-template-columns: 1fr;
  }
  
  /* CTA Section */
  .cta-offer {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-lg);
  }
  
  .price {
    order: -1;
  }
  
  /* Social Proof */
  .proof-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }
  
  /* Footer */
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
  }
}

/* ===================================
   MOBILE (320px - 480px)
   =================================== */

@media (max-width: 480px) {
  /* Base adjustments */
  .container {
    padding: 0 var(--space-sm);
  }
  
  /* Navigation - Enhanced for mobile */
  .nav-container {
    padding: var(--space-sm) var(--space-sm);
  }
  
  .nav-logo h2 {
    font-size: var(--fs-xl);
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(255,255,255,0.98);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 5rem 2rem 2rem 2rem;
    transition: left 0.3s ease;
    box-shadow: 0 10px 27px rgba(0,0,0,0.05);
    z-index: 1000;
    backdrop-filter: blur(10px);
    overflow-y: auto;
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .nav-menu a {
    font-size: 1.2rem;
    padding: 1rem;
    display: block;
    color: #2C5282;
    text-decoration: none;
    font-weight: 500;
    margin: 0.5rem 0;
    width: 100%;
    text-align: center;
  }
  
  .nav-menu a:hover {
    background: rgba(44, 82, 130, 0.1);
    border-radius: 8px;
  }
  
  /* Hero Section */
  .hero {
    padding: calc(70px + var(--space-xl)) 0 var(--space-xl);
  }
  
  .hero-title {
    font-size: var(--fs-2xl);
    margin-bottom: var(--space-md);
  }
  
  .hero-subtitle {
    font-size: var(--fs-base);
    margin-bottom: var(--space-xl);
  }
  
  .hero-stats {
    padding: var(--space-md);
    gap: var(--space-sm);
  }
  
  .stat-number {
    font-size: var(--fs-lg);
  }
  
  .stat-label {
    font-size: var(--fs-xs);
  }
  
  .hero-guarantee {
    flex-direction: column;
    gap: var(--space-xs);
    text-align: center;
  }
  
  /* Typography */
  .section-title {
    font-size: var(--fs-2xl);
    margin-bottom: var(--space-md);
  }
  
  .section-subtitle {
    font-size: var(--fs-base);
    margin-bottom: var(--space-xl);
  }
  
  /* Buttons */
  .btn {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }
  
  .hero-cta .btn {
    width: 100%;
  }
  
  /* Spacing */
  .value-prop,
  .process-preview,
  .whats-included,
  .testimonials,
  .faq-preview,
  .final-cta {
    padding: var(--space-2xl) 0;
  }
  
  /* Cards */
  .value-card,
  .step,
  .included-item,
  .testimonial,
  .faq-item {
    padding: var(--space-lg);
  }
  
  .value-card h3,
  .step-content h3 {
    font-size: var(--fs-lg);
  }
  
  /* Testimonials */
  .testimonial-content p {
    font-size: var(--fs-base);
  }
  
  .testimonial-author img {
    width: 48px;
    height: 48px;
  }
  
  /* Process Steps */
  .step {
    flex-direction: column;
    text-align: center;
    gap: var(--space-md);
  }
  
  .step-number {
    width: 40px;
    height: 40px;
    font-size: var(--fs-base);
  }
  
  /* Social Proof */
  .proof-stats {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  
  .proof-number {
    font-size: var(--fs-3xl);
  }
  
  /* Final CTA */
  .cta-content h2 {
    font-size: var(--fs-2xl);
  }
  
  .cta-subtitle {
    font-size: var(--fs-base);
  }
  
  .price-amount {
    font-size: var(--fs-3xl);
  }
  
  .cta-benefits {
    text-align: center;
  }
  
  .cta-benefits p {
    justify-content: center;
  }
  
  /* Footer */
  .footer {
    padding: var(--space-2xl) 0 var(--space-lg);
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    text-align: center;
  }
  
  .footer-section ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm) var(--space-lg);
  }
}

/* ===================================
   SMALL MOBILE (up to 375px)
   =================================== */

@media (max-width: 375px) {
  .hero-title {
    font-size: calc(var(--fs-xl) + 0.25rem);
    line-height: 1.3;
  }
  
  .section-title {
    font-size: calc(var(--fs-xl) + 0.125rem);
  }
  
  .nav-logo h2 {
    font-size: var(--fs-lg);
  }
  
  .value-card,
  .step,
  .included-item,
  .testimonial,
  .faq-item {
    padding: var(--space-md);
  }
  
  .hero-stats,
  .cta-offer {
    padding: var(--space-sm);
  }
  
  .btn {
    padding: var(--space-sm) var(--space-lg);
    font-size: var(--fs-sm);
  }
  
  .btn-large {
    padding: var(--space-md) var(--space-xl);
    font-size: var(--fs-base);
  }
}

/* ===================================
   FORM RESPONSIVE DESIGN
   =================================== */

@media (max-width: 768px) {
  .form-container {
    margin: var(--space-md);
    border-radius: var(--radius-lg);
  }
  
  .form-header,
  .form-section {
    padding: var(--space-lg);
  }
  
  .form-section-title {
    font-size: var(--fs-xl);
    flex-direction: column;
    text-align: center;
    gap: var(--space-sm);
  }
  
  .section-number {
    align-self: center;
  }
  
  .form-group {
    margin-bottom: var(--space-lg);
  }
  
  .checkbox-group,
  .radio-group {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }
  
  .checkbox-item,
  .radio-item {
    padding: var(--space-sm);
  }
  
  .slider-container {
    padding: var(--space-md);
  }
}

@media (max-width: 480px) {
  .form-container {
    margin: var(--space-sm);
    border-radius: var(--radius-md);
  }
  
  .form-header {
    padding: var(--space-md);
  }
  
  .form-header h2 {
    font-size: var(--fs-2xl);
  }
  
  .form-section {
    padding: var(--space-md);
  }
  
  .form-section-title {
    font-size: var(--fs-lg);
  }
  
  .section-number {
    width: 28px;
    height: 28px;
    font-size: var(--fs-xs);
  }
  
  .form-input,
  .form-select {
    padding: var(--space-sm);
  }
  
  .checkbox-item label,
  .radio-item label {
    font-size: var(--fs-xs);
  }
}

/* ===================================
   TOUCH DEVICE OPTIMIZATIONS
   =================================== */

@media (hover: none) and (pointer: coarse) {
  /* Remove hover effects on touch devices */
  .btn:hover,
  .nav-link:hover,
  .nav-cta:hover,
  .value-card:hover,
  .step:hover,
  .included-item:hover,
  .testimonial:hover,
  .faq-item:hover {
    transform: none;
    box-shadow: initial;
  }
  
  /* Increase touch targets */
  .btn {
    min-height: 48px;
    padding: var(--space-md) var(--space-lg);
  }
  
  .nav-link,
  .nav-cta {
    padding: var(--space-md);
    margin: var(--space-xs) 0;
  }
  
  .checkbox-item,
  .radio-item {
    min-height: 48px;
    padding: var(--space-md);
  }
  
  .form-input,
  .form-select {
    min-height: 48px;
    padding: var(--space-md);
  }
  
  /* Improve text readability */
  body {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
}

/* ===================================
   HIGH DENSITY DISPLAYS
   =================================== */

@media (-webkit-min-device-pixel-ratio: 2),
       (min-resolution: 192dpi) {
  /* Optimize for retina displays */
  .hero-image img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
  
  .testimonial-author img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* ===================================
   PRINT STYLES
   =================================== */

@media print {
  * {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  .navbar,
  .nav-toggle,
  .hero-cta,
  .process-cta,
  .cta-buttons,
  .footer {
    display: none !important;
  }
  
  .hero-container,
  .value-grid,
  .process-steps,
  .included-grid,
  .testimonials-grid,
  .faq-grid,
  .proof-stats,
  .footer-content {
    grid-template-columns: 1fr !important;
    gap: var(--space-md) !important;
  }
  
  .section-title,
  .hero-title {
    font-size: var(--fs-2xl) !important;
    page-break-after: avoid;
  }
  
  .value-card,
  .step,
  .included-item,
  .testimonial,
  .faq-item {
    page-break-inside: avoid;
    margin-bottom: var(--space-lg);
  }
  
  a[href^="http"]:after {
    content: " (" attr(href) ")";
    font-size: var(--fs-xs);
  }
}

/* ===================================
   ACCESSIBILITY ENHANCEMENTS
   =================================== */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .hero-image img {
    transform: none !important;
  }
  
  .value-card:hover,
  .step:hover,
  .included-item:hover,
  .testimonial:hover {
    transform: none !important;
  }
}

@media (prefers-contrast: high) {
  :root {
    --text-primary: #000000;
    --text-secondary: #333333;
    --bg-white: #ffffff;
    --bg-light: #f0f0f0;
    --primary-blue: #1a365d;
    --primary-green: #22543d;
  }
  
  .btn-primary {
    background: var(--primary-blue);
    border: 2px solid var(--text-primary);
  }
  
  .form-input:focus {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.3);
  }
}

/* ===================================
   LANDSCAPE ORIENTATION MOBILE
   =================================== */

@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    padding: calc(70px + var(--space-lg)) 0 var(--space-lg);
  }
  
  .hero-container {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    text-align: left;
  }
  
  .hero-image {
    order: 1;
  }
  
  .hero-stats {
    grid-template-columns: repeat(3, 1fr);
    padding: var(--space-sm);
  }
  
  .nav-menu.active {
    height: calc(100vh - 60px);
  }
}
