/* =====================================================
   RASHMI RADIANCE - Responsive Styles
   Mobile-First Approach
   ===================================================== */

/* =====================================================
   SMALL DEVICES (Phones, 576px and up)
   ===================================================== */
@media (min-width: 576px) {
  :root {
    --container-padding: var(--spacing-lg);
  }

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

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

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

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

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

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
  }

  .form-row .form-group {
    margin-bottom: 0;
  }
}

/* =====================================================
   MEDIUM DEVICES (Tablets, 768px and up)
   ===================================================== */
@media (min-width: 768px) {
  :root {
    --container-padding: var(--spacing-xl);
    --text-4xl: 2.5rem;
    --text-5xl: 3.5rem;
    --text-6xl: 4.5rem;
  }

  h1 { font-size: var(--text-5xl); }
  h2 { font-size: var(--text-4xl); }

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

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

  /* Hero */
  .hero-title {
    font-size: var(--text-6xl);
  }

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

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

  .service-detail-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-xl);
  }

  /* Features */
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Testimonials */
  .testimonial-card {
    padding: var(--spacing-2xl);
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }

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

  .gallery-filters {
    justify-content: center;
  }

  /* About */
  .about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-3xl);
    align-items: center;
  }

  .about-image {
    order: 0;
  }

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

  /* Contact */
  .contact-grid {
    grid-template-columns: 2fr 1fr;
    gap: var(--spacing-3xl);
  }

  /* Process Timeline */
  .process-timeline {
    flex-direction: row;
    justify-content: space-between;
  }

  .process-step {
    flex: 1;
    text-align: center;
  }

  .process-connector {
    display: block;
    position: absolute;
    top: 35px;
    left: calc(50% + 40px);
    width: calc(100% - 80px);
    height: 2px;
    background: var(--color-border);
  }

  .process-step:last-child .process-connector {
    display: none;
  }
}

/* =====================================================
   LARGE DEVICES (Desktops, 992px and up)
   ===================================================== */
@media (min-width: 992px) {
  :root {
    --header-height: 80px;
  }

  /* Navigation */
  .nav {
    display: block;
  }

  .menu-toggle {
    display: none;
  }

  .mobile-nav {
    display: none !important;
  }

  /* Header */
  .header-inner {
    gap: var(--spacing-xl);
  }

  .nav-list {
    gap: var(--spacing-2xl);
  }

  /* Hero */
  .hero-content {
    max-width: 900px;
  }

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

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

  /* Gallery */
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Testimonials */
  .testimonials-track {
    display: flex;
  }

  .testimonial-card {
    flex: 0 0 50%;
  }

  /* CTA */
  .cta h2 {
    font-size: var(--text-4xl);
  }

  /* Contact */
  .contact-wrapper {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: var(--spacing-3xl);
  }
}

/* =====================================================
   EXTRA LARGE DEVICES (Large desktops, 1200px and up)
   ===================================================== */
@media (min-width: 1200px) {
  :root {
    --container-max: 1200px;
    --text-5xl: 3.5rem;
    --text-6xl: 5rem;
  }

  /* Services - keep at 3 columns on desktop */
  .service-detail-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Gallery */
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }

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

/* =====================================================
   EXTRA EXTRA LARGE DEVICES (1400px and up)
   ===================================================== */
@media (min-width: 1400px) {
  :root {
    --container-max: 1320px;
  }
}

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

  .hero-slide-bg {
    animation: none;
  }

  .whatsapp-float {
    animation: none;
  }
}

/* =====================================================
   PRINT STYLES
   ===================================================== */
@media print {
  .header,
  .footer,
  .whatsapp-float,
  .hero-indicators,
  .testimonials-nav,
  .gallery-filters,
  .btn {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .hero {
    min-height: auto;
    padding: 2rem 0;
  }

  .section {
    padding: 1rem 0;
  }

  a {
    color: black;
    text-decoration: underline;
  }

  .card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
}

/* =====================================================
   DARK MODE SPECIFIC RESPONSIVE ADJUSTMENTS
   ===================================================== */
@media (min-width: 768px) {
  [data-theme="dark"] .hero-overlay {
    background: linear-gradient(
      135deg,
      rgba(15, 15, 26, 0.92) 0%,
      rgba(26, 26, 46, 0.88) 100%
    );
  }
}

/* =====================================================
   TOUCH DEVICE OPTIMIZATIONS
   ===================================================== */
@media (hover: none) and (pointer: coarse) {
  /* Remove 300ms tap delay on all interactive elements */
  .btn,
  .theme-toggle,
  .menu-toggle,
  .nav-link,
  .mobile-nav-link,
  .accordion-header,
  .filter-btn,
  .social-link,
  .whatsapp-float,
  a,
  button {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  /* Larger touch targets */
  .btn {
    min-height: 48px;
    min-width: 48px;
  }

  .nav-link {
    padding: var(--spacing-md) var(--spacing-sm);
  }

  .accordion-header {
    min-height: 56px;
  }

  /* Disable hover effects that cause double-tap issues */
  .card:hover {
    transform: none;
  }

  .service-card:hover {
    transform: none;
  }

  .feature-item:hover .feature-icon {
    transform: none;
    background: var(--color-background-alt);
    color: var(--color-accent);
  }

  /* Theme toggle - disable hover effect on touch */
  .theme-toggle:hover {
    background: var(--color-background-alt);
    color: var(--color-text);
    border-color: var(--color-border);
  }

  /* Service detail cards - disable hover transform */
  .service-detail-card:hover {
    transform: none;
  }

  /* Value cards - disable hover transform */
  .value-card:hover {
    transform: none;
  }

  /* Qualification items - disable hover transform */
  .qualification-item:hover {
    transform: none;
  }

  /* Social links - disable hover effects */
  .social-link:hover {
    transform: none;
  }

  /* Filter buttons */
  .filter-btn:hover {
    transform: none;
  }

  /* Active state for touch - provides feedback */
  .btn:active {
    transform: scale(0.98);
  }

  .card:active {
    transform: scale(0.99);
  }

  .theme-toggle:active {
    background: var(--color-primary);
    color: white;
  }

  .service-detail-card:active {
    transform: scale(0.99);
  }
}

/* =====================================================
   HIGH CONTRAST MODE
   ===================================================== */
@media (prefers-contrast: high) {
  :root {
    --color-border: #333333;
    --color-shadow: rgba(0, 0, 0, 0.3);
  }

  .btn-primary {
    background: var(--color-accent);
    border: 2px solid var(--color-text);
  }

  .btn-secondary {
    border-width: 3px;
  }

  a {
    text-decoration: underline;
  }
}

/* =====================================================
   LANDSCAPE MOBILE
   ===================================================== */
@media (max-width: 767px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: calc(var(--header-height) + var(--spacing-2xl)) 0 var(--spacing-2xl);
  }

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

  .hero-subtitle {
    font-size: var(--text-base);
    margin-bottom: var(--spacing-lg);
  }

  .hero-indicators {
    bottom: var(--spacing-md);
  }
}

/* =====================================================
   VERY SMALL SCREENS (Less than 375px)
   ===================================================== */
@media (max-width: 374px) {
  :root {
    --text-base: 0.875rem;
    --text-lg: 1rem;
    --text-xl: 1.125rem;
    --text-2xl: 1.25rem;
    --text-3xl: 1.5rem;
    --text-4xl: 1.75rem;
    --text-5xl: 2rem;
    --container-padding: var(--spacing-sm);
  }

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

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

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

  .btn {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--text-sm);
  }

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

  .service-card-icon {
    width: 60px;
    height: 60px;
    font-size: var(--text-2xl);
  }

  .footer-grid {
    gap: var(--spacing-lg);
  }

  .whatsapp-float {
    width: 50px;
    height: 50px;
    right: var(--spacing-md);
    bottom: var(--spacing-md);
  }
}
