/* ========================================
   COMPLETE RESPONSIVE CSS FOR SAMAI WEBSITE
   Mobile First Approach with Perfect Alignment
   ======================================== */

/* Remove the embedded responsive CSS from main file and use this instead */

/* ========================================
   GLOBAL RESPONSIVE FIXES
   ======================================== */

/* Ensure proper box-sizing for all elements */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Prevent horizontal scroll */
html, body {
  overflow-x: hidden;
  width: 100%;
}

/* Responsive container utility */
.container-responsive {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .container-responsive {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container-responsive {
    padding: 0 2rem;
  }
}

/* ========================================
   TABLET RESPONSIVENESS (768px - 1024px)
   ======================================== */

@media (max-width: 1024px) {
  /* Header & Navigation Fixes */
  .navbar-container {
    padding: 0 1.5rem !important;
  }

  .mobile-toggle {
    display: flex !important;
  }

  .nav-menu {
    position: fixed !important;
    top: 0 !important;
    right: -100% !important;
    width: 100% !important;
    max-width: 400px !important;
    height: 100vh !important;
    background: linear-gradient(135deg, 
      rgba(255, 255, 255, 0.95) 0%, 
      rgba(255, 240, 250, 0.95) 100%) !important;
    backdrop-filter: blur(30px) !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    padding: 6rem 2rem 2rem !important;
    gap: 1rem !important;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 1000 !important;
    border-left: 2px solid rgba(255, 0, 110, 0.2) !important;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1) !important;
  }

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

  .nav-links {
    flex-direction: column !important;
    width: 100% !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    gap: 0.5rem !important;
    box-shadow: none !important;
  }

  .nav-link {
    width: 100% !important;
    text-align: center !important;
    padding: 1rem 1.5rem !important;
    border-radius: 15px !important;
    font-size: 1rem !important;
  }

  .nav-cta {
    width: 100% !important;
    justify-content: center !important;
    padding: 1rem 1.5rem !important;
    margin-top: 1rem !important;
  }

  /* Hero Section Fixes */
  .hero-container {
    grid-template-columns: 1fr !important;
    gap: 3rem !important;
    text-align: center !important;
    padding: 0 1.5rem !important;
  }
  
  .hero-title {
    font-size: 3.5rem !important;
    line-height: 1.2 !important;
  }

  .hero-subtitle {
    font-size: 1.2rem !important;
    margin-bottom: 2.5rem !important;
  }
  
  /* 3D Gallery Adjustments */
  .image-scroller-3d {
    height: 400px !important;
  }
  
  .scroller-wrapper,
  .scroller-item {
    width: 250px !important;
    height: 250px !important;
  }
  
  .scroller-item:nth-child(1) { transform: rotateY(0deg) translateZ(200px) !important; }
  .scroller-item:nth-child(2) { transform: rotateY(60deg) translateZ(200px) !important; }
  .scroller-item:nth-child(3) { transform: rotateY(120deg) translateZ(200px) !important; }
  .scroller-item:nth-child(4) { transform: rotateY(180deg) translateZ(200px) !important; }
  .scroller-item:nth-child(5) { transform: rotateY(240deg) translateZ(200px) !important; }
  .scroller-item:nth-child(6) { transform: rotateY(300deg) translateZ(200px) !important; }

  /* CTA Buttons */
  .cta-buttons {
    flex-direction: row !important;
    justify-content: center !important;
    gap: 1rem !important;
  }

  .btn-primary,
  .btn-secondary {
    padding: 1rem 1.8rem !important;
    font-size: 1rem !important;
  }

  /* Section Padding */
  .services-section,
  .details-section,
  .gallery-section-main,
  .testimonials-section,
  .pricing-section,
  .faq-section,
  .contact-section {
    padding: 60px 0 !important;
  }

  /* Features List */
  .features-list {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 1.5rem !important;
    padding: 0 1.5rem !important;
  }

  /* Gallery Grid - Horizontal Scrolling for Tablets */
  .gallery-grid {
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    gap: 1.5rem !important;
    padding: 0 1.5rem 1rem !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .gallery-item {
    flex: 0 0 300px !important;
    scroll-snap-align: start !important;
  }

  /* Custom Scrollbar for Gallery */
  .gallery-grid::-webkit-scrollbar {
    height: 8px;
  }

  .gallery-grid::-webkit-scrollbar-track {
    background: rgba(255, 0, 110, 0.1);
    border-radius: 10px;
  }

  .gallery-grid::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 10px;
  }

  /* Pricing Grid */
  .pricing-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 1.5rem !important;
    padding: 0 1.5rem !important;
  }

  /* FAQ Container */
  .faq-container {
    padding: 0 1.5rem !important;
  }

  /* Contact Info */
  .contact-info {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
}

/* ========================================
   MOBILE RESPONSIVENESS (768px and below)
   ======================================== */

@media (max-width: 768px) {
  /* Container & Spacing */
  .navbar-container {
    padding: 0 1rem !important;
  }

  .hero-container {
    padding: 0 1rem !important;
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
    text-align: center !important;
  }

  /* Typography Fixes */
  .hero-title {
    font-size: 2.8rem !important;
    line-height: 1.2 !important;
    margin-bottom: 1.2rem !important;
  }

  .hero-subtitle {
    font-size: 1.1rem !important;
    margin-bottom: 2rem !important;
    line-height: 1.5 !important;
  }

  .section-heading {
    font-size: 2.5rem !important;
    line-height: 1.2 !important;
  }

  .section-description {
    font-size: 1rem !important;
    line-height: 1.6 !important;
  }

  /* CTA Buttons - Stack Vertically on Mobile */
  .cta-buttons {
    flex-direction: column !important;
    align-items: center !important;
    gap: 1rem !important;
    margin-bottom: 2rem !important;
  }

  .btn-primary,
  .btn-secondary {
    width: 100% !important;
    max-width: 280px !important;
    padding: 1rem 1.5rem !important;
    font-size: 1rem !important;
    justify-content: center !important;
  }

  /* Hide 3D Gallery on Mobile */
  .gallery-section {
    display: none !important;
  }

  /* Features List Mobile */
  .features-list {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    padding: 0 1rem !important;
  }

  .feature-item {
    padding: 1.5rem !important;
    text-align: center !important;
  }

  /* Gallery Grid - Horizontal Scrolling Mobile */
  .gallery-grid {
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    gap: 1rem !important;
    padding: 0 1rem 1rem !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .gallery-item {
    flex: 0 0 280px !important;
    scroll-snap-align: start !important;
    aspect-ratio: 16/10 !important;
  }

  /* Details Section Mobile */
  .details-item {
    margin-bottom: 3rem !important;
  }

  .details-content h3 {
    font-size: 1.5rem !important;
    margin-bottom: 1rem !important;
  }

  .details-content p {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
  }

  /* Testimonials Mobile */
  .testimonial-item {
    margin-bottom: 1.5rem !important;
    padding: 1.5rem !important;
  }

  /* Pricing Cards Mobile */
  .pricing-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    padding: 0 1rem !important;
  }

  .pricing-card {
    padding: 2rem 1.5rem !important;
  }

  .price {
    font-size: 2.5rem !important;
  }

  /* FAQ Section Mobile */
  .faq-container {
    padding: 0 1rem !important;
  }

  .faq-question {
    padding: 1.2rem !important;
    font-size: 1rem !important;
  }

  /* Contact Section Mobile */
  .contact-info {
    padding: 0 1rem !important;
  }

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

  /* Section Padding Mobile */
  .services-section,
  .details-section,
  .gallery-section-main,
  .testimonials-section,
  .pricing-section,
  .faq-section,
  .contact-section {
    padding: 50px 0 !important;
  }

  /* Container fixes */
  .container {
    padding: 0 1rem !important;
  }
}

/* ========================================
   SMALL MOBILE RESPONSIVENESS (480px and below)
   ======================================== */

@media (max-width: 480px) {
  /* Header Mobile */
  .brand-text {
    font-size: 1.5rem !important;
  }

  .logo-image {
    width: 40px !important;
    height: 40px !important;
    margin-right: 0.5rem !important;
  }

  /* Typography Small Mobile */
  .hero-title {
    font-size: 2.2rem !important;
    line-height: 1.1 !important;
  }

  .hero-subtitle {
    font-size: 1rem !important;
    line-height: 1.5 !important;
  }

  .section-heading {
    font-size: 2rem !important;
    line-height: 1.1 !important;
  }

  .section-description {
    font-size: 0.95rem !important;
  }

  /* Hero Badge */
  .hero-badge {
    font-size: 0.8rem !important;
    padding: 0.4rem 0.8rem !important;
    margin-bottom: 1.5rem !important;
  }

  /* CTA Buttons Small Mobile */
  .btn-primary,
  .btn-secondary {
    padding: 0.9rem 1.2rem !important;
    font-size: 0.9rem !important;
    width: 100% !important;
    max-width: 260px !important;
  }

  /* Features Small Mobile */
  .feature-item {
    padding: 1.2rem !important;
  }

  .feature-item h3 {
    font-size: 1.1rem !important;
  }

  .feature-item p {
    font-size: 0.9rem !important;
  }

  /* Gallery Scrolling Small Mobile */
  .gallery-item {
    flex: 0 0 260px !important;
  }

  /* Details Content Small Mobile */
  .details-content h3 {
    font-size: 1.3rem !important;
  }

  .details-list li {
    font-size: 0.9rem !important;
    margin-bottom: 0.6rem !important;
  }

  /* Testimonials Small Mobile */
  .testimonial-item {
    padding: 1.2rem !important;
  }

  .testimonial-item h4 {
    font-size: 1.1rem !important;
  }

  .testimonial-item p {
    font-size: 0.9rem !important;
  }

  /* Pricing Small Mobile */
  .pricing-card {
    padding: 1.5rem 1rem !important;
  }

  .price {
    font-size: 2.2rem !important;
  }

  .pricing-features li {
    font-size: 0.9rem !important;
  }

  /* FAQ Small Mobile */
  .faq-question {
    padding: 1rem !important;
    font-size: 0.95rem !important;
  }

  /* Contact Small Mobile */
  .contact-item {
    padding: 1.5rem !important;
  }

  .contact-form {
    padding: 1.5rem 1rem !important;
  }

  .form-control {
    padding: 0.8rem !important;
    font-size: 0.9rem !important;
  }

  /* Section Padding Small Mobile */
  .services-section,
  .details-section,
  .gallery-section-main,
  .testimonials-section,
  .pricing-section,
  .faq-section,
  .contact-section {
    padding: 40px 0 !important;
  }

  /* Section Titles */
  .section-title {
    margin-bottom: 3rem !important;
  }

  .section-badge {
    font-size: 0.8rem !important;
    padding: 0.4rem 0.8rem !important;
  }

  /* Container Small Mobile */
  .hero-container,
  .container {
    padding: 0 0.8rem !important;
  }
}

/* ========================================
   EXTRA SMALL MOBILE (320px and below)
   ======================================== */

@media (max-width: 320px) {
  /* Container Extra Small */
  .hero-container,
  .navbar-container,
  .container {
    padding: 0 0.8rem !important;
  }

  /* Typography Extra Small */
  .hero-title {
    font-size: 1.8rem !important;
  }

  .section-heading {
    font-size: 1.8rem !important;
  }

  /* Navigation Extra Small */
  .nav-menu {
    padding: 5rem 1rem 2rem !important;
  }

  /* Gallery Extra Small */
  .gallery-item {
    flex: 0 0 240px !important;
  }

  /* Grid containers Extra Small */
  .features-list,
  .pricing-grid,
  .faq-container,
  .contact-info {
    padding: 0 0.8rem !important;
  }

  /* Form Elements Extra Small */
  .form-control {
    padding: 0.7rem !important;
  }

  .btn-primary,
  .btn-secondary {
    padding: 0.8rem 1rem !important;
    font-size: 0.85rem !important;
  }
}

/* ========================================
   GALLERY SCROLLING ENHANCEMENTS
   ======================================== */

/* Gallery Scroll Indicators */
.gallery-section-main {
  position: relative;
}

.gallery-section-main::after {
  content: '← Swipe to see more →';
  display: block;
  text-align: center;
  color: var(--text-light);
  font-size: 0.9rem;
  margin-top: 1rem;
  opacity: 0.7;
}

/* Hide indicator on desktop */
@media (min-width: 1025px) {
  .gallery-section-main::after {
    display: none;
  }
}

/* Smooth Scrolling for Gallery */
.gallery-grid {
  scroll-behavior: smooth;
}

/* Touch Device Optimizations */
@media (hover: none) {
  .gallery-item::before,
  .gallery-item::after {
    opacity: 0;
  }
  
  .gallery-item:active::before {
    opacity: 0.8;
  }
  
  .gallery-item:active::after {
    opacity: 1;
  }
}

/* ========================================
   NAVIGATION SPECIFIC FIXES
   ======================================== */

/* Mobile Navigation Overlay */
@media (max-width: 1024px) {
  .nav-menu::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: -1;
  }

  .nav-menu.active::before {
    opacity: 1;
    visibility: visible;
  }
}

/* ========================================
   UTILITIES FOR BETTER RESPONSIVENESS
   ======================================== */

/* Text Alignment Utilities */
@media (max-width: 768px) {
  .text-center-mobile {
    text-align: center !important;
  }
  
  .hero-content {
    text-align: center !important;
  }

  /* Better spacing for mobile */
  .row {
    margin: 0 !important;
  }

  .col-md-6,
  .col-lg-4,
  .col-lg-8 {
    padding: 0 0.5rem !important;
  }
}

/* Touch Target Improvements */
@media (hover: none) {
  .nav-link,
  .nav-cta,
  .btn-primary,
  .btn-secondary,
  .faq-question {
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

/* Prevent iOS Zoom on Input Focus */
@media screen and (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  textarea {
    font-size: 16px !important;
  }
}

/* ========================================
   LANDSCAPE MOBILE OPTIMIZATIONS
   ======================================== */

@media screen and (max-height: 500px) and (orientation: landscape) {
  .hero-section {
    min-height: 80vh !important;
    padding: 120px 0 40px 0 !important;
  }
  
  .hero-title {
    font-size: 2rem !important;
    margin-bottom: 1rem !important;
  }
  
  .hero-subtitle {
    margin-bottom: 1.5rem !important;
  }
  
  .cta-buttons {
    margin-bottom: 1.5rem !important;
  }
}

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

@media print {
  .header,
  .nav-menu,
  .mobile-toggle,
  .popup-overlay,
  .scroll-top {
    display: none !important;
  }
  
  .hero-section {
    padding-top: 2rem !important;
  }
  
  * {
    background: white !important;
    color: black !important;
  }
}

/* ========================================
   CRITICAL MOBILE FIXES
   ======================================== */

/* Fix any remaining alignment issues */
@media (max-width: 768px) {
  /* Ensure all sections use proper container */
  .services-section .container,
  .details-section .container,
  .gallery-section-main .container,
  .testimonials-section .container,
  .pricing-section .container,
  .faq-section .container,
  .contact-section .container {
    padding: 0 1rem !important;
  }

  /* Fix hero section spacing */
  .hero-section {
    padding: 120px 0 60px 0 !important;
  }

  /* Fix any grid issues */
  .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .col-md-6,
  .col-lg-4,
  .col-lg-8,
  .col-md-4 {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }
}

/* Final override for any stubborn elements */
@media (max-width: 480px) {
  * {
    max-width: 100% !important;
  }

  .hero-container,
  .features-list,
  .gallery-grid,
  .pricing-grid,
  .faq-container {
    width: 100% !important;
    margin: 0 !important;
  }
}