/*
 * ADVE - Responsive Styles
 * Mobile-first responsive design
 */

/* ========================================
   TABLET (max-width: 1024px)
   ======================================== */

@media (max-width: 1024px) {
  :root {
    --container-padding: 1.5rem;
    --spacing-3xl: 4rem;
  }

  .section {
    padding: var(--spacing-2xl) 0;
  }

  /* Hero adjustments */
  .hero-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }

  .hero-right {
    height: 400px;
  }

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

  /* Portfolio grid */
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Stats grid */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* ========================================
   MOBILE (max-width: 768px)
   ======================================== */

@media (max-width: 768px) {
  :root {
    --container-padding: 1rem;
    --spacing-3xl: 3rem;
    --spacing-2xl: 2rem;
  }

  /* Typography */
  h1 {
    font-size: 2rem;
    letter-spacing: -0.5px;
  }

  h2 {
    font-size: 1.75rem;
  }

  h3 {
    font-size: 1.375rem;
  }

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

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

  /* Navigation */
  .nav-menu {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: var(--color-bg-dark);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    transform: translateX(-100%);
    transition: transform var(--duration-normal);
    box-shadow: var(--shadow-xl);
  }

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

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

  .mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
  }

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

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

  /* Hero */
  .hero-section {
    padding-top: 100px;
    min-height: auto;
  }

  .hero-content {
    padding: 2rem 0;
  }

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

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

  .hero-stats {
    flex-direction: column;
    gap: 1rem;
  }

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

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

  .hero-right {
    height: 300px;
    margin-top: var(--spacing-xl);
  }

  .metric-card {
    padding: 1rem;
  }

  .card-value {
    font-size: 1.5rem;
  }

  .card-label {
    font-size: 0.75rem;
  }

  /* Problem/Solution */
  .ps-item,
  .ps-item.reverse {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    direction: ltr;
  }

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

  /* Stats */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

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

  /* Services */
  .services-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    padding: var(--spacing-lg);
  }

  /* Portfolio */
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .case-results {
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
  }

  .result-value {
    font-size: 1.25rem;
  }

  /* Comparison Table */
  .comparison-table {
    overflow-x: scroll;
    -webkit-overflow-scrolling: touch;
  }

  .comparison-table table {
    min-width: 600px;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 0.875rem;
    font-size: 0.875rem;
  }

  /* Process Timeline */
  .process-step {
    grid-template-columns: 60px 1fr;
    gap: var(--spacing-md);
  }

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

  .step-title {
    font-size: 1.25rem;
  }

  .step-description {
    font-size: 0.9375rem;
  }

  /* Testimonials */
  .testimonial-card {
    flex: 0 0 100%;
  }

  .slider-nav {
    display: none;
  }

  .testimonial-text {
    font-size: 0.9375rem;
  }

  /* Buttons */
  .btn {
    padding: 0.875rem 2rem;
  }

  .btn-large {
    padding: 1rem 2.5rem;
    font-size: 1rem;
  }

  /* CTA Section */
  .cta-buttons {
    flex-direction: column;
  }

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

  .contact-info {
    flex-direction: column;
    gap: var(--spacing-md);
  }

  .contact-item {
    font-size: 1rem;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

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

  .footer-bottom-links {
    flex-direction: column;
    gap: 0.75rem;
  }

  /* Modal */
  .modal-content {
    padding: var(--spacing-lg);
    width: 95%;
    max-height: 85vh;
  }

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

  .form-row {
    grid-template-columns: 1fr;
  }

  .consultation-form input,
  .consultation-form select {
    padding: 0.75rem;
  }
}


/* ========================================
   SMALL MOBILE (max-width: 480px)
   ======================================== */

@media (max-width: 480px) {
  :root {
    --spacing-xl: 2rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

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

  .metric-card {
    position: static !important;
    margin-bottom: 1rem;
  }

  .floating-cards {
    display: flex;
    flex-direction: column;
    height: auto;
  }

  .stat-card {
    padding: var(--spacing-md);
  }

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

  .service-icon {
    width: 48px;
    height: 48px;
  }

  .service-title {
    font-size: 1.25rem;
  }

  .case-title {
    font-size: 1.25rem;
  }

  .process-step {
    grid-template-columns: 50px 1fr;
  }

  .step-number {
    width: 50px;
    height: 50px;
    font-size: 1rem;
  }

  .modal-content {
    padding: 1rem;
  }

  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
  }
}


/* ========================================
   LANDSCAPE MOBILE (max-height: 500px)
   ======================================== */

@media (max-height: 500px) and (orientation: landscape) {
  .hero-section {
    min-height: auto;
  }

  .hero-right {
    display: none;
  }

  .section {
    padding: var(--spacing-xl) 0;
  }
}


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

@media print {
  .navbar,
  .mobile-menu-toggle,
  .hero-cta,
  .cta-buttons,
  .back-to-top,
  .slider-nav,
  .modal {
    display: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
  }

  h1, h2, h3, h4 {
    page-break-after: avoid;
  }

  img {
    max-width: 100% !important;
  }

  a {
    text-decoration: underline;
  }

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


/* ========================================
   HIGH RESOLUTION DISPLAYS
   ======================================== */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Enhance for retina displays */
  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  img {
    image-rendering: -webkit-optimize-contrast;
  }
}


/* ========================================
   DARK MODE SUPPORT (Optional)
   ======================================== */

@media (prefers-color-scheme: dark) {
  /* Optional: Add dark mode styles if needed */
}
