/* ============================================
   Responsive Styles - Tech Solutions Template
   ============================================ */

/* ============================================
   Extra Large Screens (1536px and up)
   ============================================ */

@media (min-width: 1536px) {
  .container {
    max-width: var(--container-2xl);
  }
}

/* ============================================
   Large Screens (1280px and below)
   ============================================ */

@media (max-width: 1280px) {
  :root {
    --text-6xl: 3.25rem;
    --text-5xl: 2.75rem;
  }

  .container {
    max-width: var(--container-lg);
  }

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

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

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

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

  .pricing-card.featured:hover {
    transform: translateY(-10px);
  }

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

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }

  .footer-brand {
    grid-column: span 1;
  }
}

/* ============================================
   Medium Screens (1024px and below)
   ============================================ */

@media (max-width: 1024px) {
  :root {
    --text-5xl: 2.5rem;
    --text-4xl: 2rem;
    --text-3xl: 1.5rem;
  }

  .section {
    padding: var(--space-16) 0;
  }

  .section-header {
    margin-bottom: var(--space-12);
  }

  /* Header */
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: var(--bg-secondary);
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-20) var(--space-8) var(--space-8);
    gap: 0;
    transition: right var(--transition-normal);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
  }

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

  .nav-item {
    width: 100%;
  }

  .nav-link {
    display: block;
    width: 100%;
    padding: var(--space-4) 0;
    border-bottom: 1px solid var(--border-color);
  }

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

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 0 0 0 var(--space-6);
    display: none;
  }

  .nav-item.dropdown-open .dropdown-menu {
    display: block;
  }

  .menu-toggle {
    display: flex;
    z-index: var(--z-modal);
  }

  /* Hero */
  .hero {
    min-height: auto;
    padding: var(--space-32) 0 var(--space-16);
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: var(--space-8);
  }

  /* About */
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }

  .about-image {
    order: -1;
    max-width: 500px;
    margin: 0 auto;
  }

  .about-content .section-title {
    text-align: center;
  }

  .about-content .section-subtitle {
    display: flex;
    justify-content: center;
  }

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

  /* Pricing */
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  /* Blog */
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }

  /* Team */
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }

  /* Testimonials */
  .testimonial-card {
    flex: 0 0 calc(50% - var(--space-4));
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8);
  }

  .footer-brand {
    grid-column: span 2;
    max-width: none;
    text-align: center;
  }

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

/* ============================================
   Small Screens (768px and below)
   ============================================ */

@media (max-width: 768px) {
  :root {
    --text-5xl: 2.25rem;
    --text-4xl: 1.75rem;
    --text-3xl: 1.375rem;
    --text-2xl: 1.25rem;
  }

  .container {
    padding: 0 var(--space-4);
  }

  .section {
    padding: var(--space-12) 0;
  }

  .section-header {
    margin-bottom: var(--space-10);
  }

  .section-subtitle::before,
  .section-subtitle::after {
    display: none;
  }

  /* Header */
  .header {
    padding: var(--space-3) 0;
  }

  .header-actions .btn {
    display: none;
  }

  .nav-menu {
    width: 100%;
    right: -100%;
  }

  /* Hero */
  .hero {
    padding: var(--space-24) 0 var(--space-12);
  }

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

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

  .hero-buttons {
    flex-direction: column;
    gap: var(--space-3);
  }

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

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

  .hero-shapes {
    display: none;
  }

  /* About */
  .about-features {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .about-badge {
    position: static;
    display: inline-block;
    margin-top: var(--space-6);
  }

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

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

  /* Pricing */
  .pricing-card {
    padding: var(--space-6);
  }

  /* Blog */
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-image img {
    height: 200px;
  }

  /* Team */
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }

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

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

  /* Contact */
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand {
    grid-column: span 1;
  }

  .footer-links {
    text-align: center;
  }

  .footer-links a:hover {
    padding-left: 0;
  }

  .footer-newsletter {
    text-align: center;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-form .btn {
    width: 100%;
  }

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

  .footer-bottom-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-4);
  }

  /* 404 Page */
  .error-code {
    font-size: var(--text-5xl);
  }

  .error-image {
    width: 200px;
  }
}

/* ============================================
   Extra Small Screens (480px and below)
   ============================================ */

@media (max-width: 480px) {
  :root {
    --text-4xl: 1.5rem;
    --text-3xl: 1.25rem;
    --text-2xl: 1.125rem;
  }

  .container {
    padding: 0 var(--space-4);
  }

  /* Header */
  .logo-text {
    font-size: var(--text-xl);
  }

  /* Hero */
  .hero {
    padding: var(--space-20) 0 var(--space-10);
  }

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

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

  /* Buttons */
  .btn {
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
  }

  .btn-lg {
    padding: var(--space-4) var(--space-6);
    font-size: var(--text-base);
  }

  /* Service Card */
  .service-icon {
    width: 60px;
    height: 60px;
  }

  .service-icon svg,
  .service-icon i {
    font-size: 28px;
  }

  /* Pricing */
  .pricing-amount {
    font-size: var(--text-4xl);
  }

  /* Team */
  .team-grid {
    grid-template-columns: 1fr;
    max-width: 280px;
    margin: 0 auto;
  }

  .team-image img {
    aspect-ratio: 3/4;
  }

  /* Contact */
  .contact-info,
  .contact-form {
    padding: var(--space-6);
  }

  .contact-info-item {
    flex-direction: column;
    text-align: center;
  }

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

  /* Back to Top */
  .back-to-top {
    width: 45px;
    height: 45px;
    bottom: 20px;
    right: 20px;
    font-size: 18px;
  }
}

/* ============================================
   Landscape Orientation
   ============================================ */

@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: var(--space-16) 0;
  }

  .nav-menu {
    padding-top: var(--space-16);
  }
}

/* ============================================
   High DPI Screens
   ============================================ */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .service-icon,
  .about-feature-icon,
  .contact-info-icon {
    -webkit-font-smoothing: antialiased;
  }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
  *,
  *::before,
  *::after {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  .header,
  .footer,
  .back-to-top,
  .preloader,
  .hero-shapes,
  .particles {
    display: none !important;
  }

  .section {
    padding: 20px 0;
    page-break-inside: avoid;
  }

  a {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
  }

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

/* ============================================
   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;
  }

  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale,
  .reveal-rotate {
    opacity: 1;
    transform: none;
  }
}

/* ============================================
   Dark Mode Preference
   ============================================ */

@media (prefers-color-scheme: light) {
  /* The template is designed dark-first, but we can add light mode overrides here */
}

/* ============================================
   Touch Device Styles
   ============================================ */

@media (hover: none) {
  .hover-lift:hover,
  .hover-scale:hover,
  .hover-rotate:hover {
    transform: none;
  }

  .hover-shine::before,
  .hover-ripple::after {
    display: none;
  }

  .service-card:hover,
  .blog-card:hover,
  .pricing-card:hover,
  .team-card:hover {
    transform: none;
  }

  .team-social {
    transform: translateY(0);
    position: static;
    background: none;
    padding: var(--space-4) 0 0;
  }
}

/* ============================================
   Focus Styles (Accessibility)
   ============================================ */

@media (scripting: enabled) {
  :focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
  }

  .btn:focus-visible,
  .nav-link:focus-visible,
  a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
  }
}
