/* Responsive Design - Media Queries & Mobile Optimizations */

/* Responsive */
@media (max-width: 1024px) {
  .container { padding: 0 2rem; }
  .hero-spiral-bg { 
    width: 800px; 
    height: 800px; 
  }
  .hero-title {
    font-size: clamp(3rem, 10vw, 6rem);
  }
  .projects-grid { grid-template-columns: 1fr; }
  .project-featured { grid-template-columns: 1fr; gap: 2rem; }
  .stats { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  nav { display: none; }
  .hero-title { 
    font-size: clamp(2.5rem, 8vw, 4rem);
  }
  .hero-tagline {
    font-size: 1.1rem;
  }
  .hero-spiral-bg { 
    width: 600px; 
    height: 600px; 
  }
  .spiral-background { 
    opacity: 0.08; 
  }
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  .project-content h3 { font-size: 1.5rem; }
  .neo-card { padding: 1.5rem; }
  .cursor, .cursor-follower { display: none; }
}

/* Mobile First Approach */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  /* Header */
  header {
    padding: 1rem 0;
    flex-direction: column;
    gap: 1rem;
  }

  nav {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  nav a {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }

  /* Hero */
  .hero {
    min-height: 80vh;
    padding: 2rem 0;
  }

  .hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
    margin-bottom: 1rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 2rem;
  }

  .launch-badge {
    padding: 0.75rem 1.5rem;
    margin-bottom: 1.5rem;
  }

  .badge-text {
    font-size: 0.8rem;
  }

  .badge-subtitle {
    font-size: 0.7rem;
  }

  /* Pricing */
  .price-comparison {
    flex-direction: column;
    gap: 1rem;
  }

  .price-amount {
    font-size: 2rem;
  }

  .vs-divider {
    transform: rotate(90deg);
    font-size: 1.2rem;
  }

  .hero-guarantees {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .guarantee-item {
    padding: 0.75rem;
    font-size: 0.9rem;
  }

  /* Pricing Grid */
  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

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

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

  /* Trust & Authority Hub - Mobile Layout */
  .container > div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  /* Right side info blocks - stack vertically on mobile */
  .container div[style*="grid-template-columns:1fr 1fr"]:not(:first-child) {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  /* Testimonial Carousel */
  .testimonial-carousel {
    margin: 2rem auto;
    max-width: calc(100vw - 2rem);
  }
  
  .testimonial-slide {
    padding: 0 0.5rem;
  }
  
  .testimonial-slide .neo-card {
    padding: 2rem 1.5rem;
  }
  
  .carousel-navigation {
    gap: 0.75rem;
    margin-top: 1.5rem;
  }
  
  .carousel-nav {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .carousel-dot {
    width: 10px;
    height: 10px;
  }

  /* Neo Cards */
  .neo-card {
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: 
      10px 10px 20px var(--shadow-dark),
      -10px -10px 20px var(--shadow-light);
  }

  .neo-card:hover {
    transform: translateY(-5px);
  }

  /* Buttons */
  .neo-button {
    padding: 1rem 2rem;
    font-size: 0.9rem;
  }

  /* Contact Modal */
  .contact-modal-container {
    width: 95%;
    margin: 1rem;
  }

  .contact-modal-header,
  .contact-modal-body {
    padding: 1.5rem;
  }

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

  .package-grid {
    grid-template-columns: 1fr;
  }

  /* WhatsApp */
  .whatsapp-float {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    bottom: 1rem;
    right: 1rem;
  }

  .whatsapp-chat-modal {
    width: calc(100% - 2rem);
    right: 1rem;
    bottom: 80px;
    left: 1rem;
    transform: translateY(20px) scale(0.95);
  }

  .whatsapp-chat-modal.active {
    transform: translateY(0) scale(1);
  }

  .whatsapp-chat-body {
    max-height: 250px;
    padding: 1rem;
  }

  .whatsapp-chat-header,
  .whatsapp-chat-footer {
    padding: 1rem;
  }

  /* Section Spacing */
  section {
    padding: 3rem 0 !important;
  }

  .section-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }

  /* Footer */
  footer > .container > div:first-child {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
}

/* Responsive Grid Adjustments for Contact Form */
@media (max-width: 768px) {
  #contactForm div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  
  #contactForm div[style*="grid-template-columns:repeat(auto-fit, minmax(200px, 1fr))"] {
    grid-template-columns: 1fr !important;
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .whatsapp-chat-modal {
    left: 50%;
    transform: translateX(-50%) translateY(20px) scale(0.95);
    bottom: 90px;
    width: calc(100vw - 40px);
  }
  
  .whatsapp-chat-modal.active {
    transform: translateX(-50%) translateY(0) scale(1);
  }
  
  .whatsapp-chat-body {
    max-height: 250px;
  }
}

/* Responsive Carousel */
@media (max-width: 768px) {
  .carousel-nav {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .carousel-prev {
    left: 10px;
  }
  
  .carousel-next {
    right: 10px;
  }
  
  .carousel-dots {
    padding: 8px 16px;
    gap: 8px;
  }
  
  .carousel-dot {
    width: 10px;
    height: 10px;
  }
  
  .carousel-counter {
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    font-size: 0.8rem;
  }
}

/* Responsive adjustments for portrait */
@media (max-width: 1024px) {
  .about-portrait {
    height: 500px;
  }
}

@media (max-width: 768px) {
  .about-portrait {
    height: 400px;
    margin-bottom: 2rem;
  }
}

/* Mobile Navigation Dropdown */
@media (max-width: 768px) {
  nav {
    display: none;
  }
}

/* Responsive Logo */
@media (max-width: 768px) {
  .logo div:first-child {
    font-size: 1.4rem !important;
  }
  
  .logo div:last-child {
    font-size: 0.6rem !important;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .price-comparison {
    flex-direction: column;
    gap: 1rem;
  }
  
  .hero-guarantees {
    flex-direction: column;
    gap: 1rem;
  }
  
  .pricing-card.featured {
    transform: none;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .price-amount {
    font-size: 1.5rem;
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .contact-modal-container {
    width: 95%;
    max-height: 95vh;
  }
  
  .contact-modal-header {
    padding: 1.5rem 2rem;
  }
  
  .contact-modal-header h2 {
    font-size: 2rem;
  }
  
  .contact-modal-body {
    padding: 2rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .package-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile optimizations for carousel */
@media (max-width: 768px) {
  .testimonial-carousel {
    margin: 2rem auto;
  }
  
  .testimonial-slide {
    padding: 0 0.5rem;
  }
  
  .carousel-nav {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .carousel-dot {
    width: 10px;
    height: 10px;
  }
}

/* Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    padding: 0 1.5rem;
  }

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

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

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

  /* Trust & Authority Hub - Tablet adjustments */
  .container > div[style*="grid-template-columns:1fr 1fr"] {
    gap: 2rem;
  }
}

/* Large Desktop */
@media (min-width: 1400px) {
  .container {
    max-width: 1400px;
  }

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

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

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  .carousel-nav {
    width: 44px;
    height: 44px;
  }
  
  .carousel-dot {
    width: 14px;
    height: 14px;
  }

  .neo-button {
    min-height: 44px;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    min-height: 44px;
  }

  /* Remove hover effects on touch devices */
  .neo-card:hover {
    transform: none;
    box-shadow: 
      15px 15px 30px var(--shadow-dark),
      -15px -15px 30px var(--shadow-light);
    border-color: rgba(255, 255, 255, 0.05);
  }

  .neo-button:hover {
    transform: none;
    border-color: rgba(255, 209, 102, 0.3);
    box-shadow: 
      8px 8px 16px var(--shadow-dark),
      -8px -8px 16px var(--shadow-light);
  }

  .carousel-nav:hover {
    color: var(--text-secondary);
    transform: none;
    box-shadow: 
      2px 2px 4px var(--shadow-dark),
      -2px -2px 4px var(--shadow-light);
  }
}

/* Ensure dropdown works on touch devices */
@media (hover: none) {
  .nav-dropdown-toggle {
    pointer-events: none;
  }
  
  .nav-dropdown-menu {
    pointer-events: all;
  }
}

/* Touch-friendly sizing for mobile */
@media (hover: none) and (pointer: coarse) {
  .carousel-nav {
    width: 44px;
    height: 44px;
  }
  
  .carousel-dot {
    width: 14px;
    height: 14px;
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .spiral-background {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Print Styles */
@media print {
  .animated-bg,
  .grid-overlay,
  .cursor,
  .cursor-follower,
  .whatsapp-float,
  .contact-modal,
  .whatsapp-chat-modal {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }

  .neo-card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }

  .neo-button {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
}

/* Accessibility - Focus Styles */
@media (prefers-reduced-motion: no-preference) {
  .carousel-nav:focus,
  .carousel-dot:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .testimonial-track {
    transition: transform 0.2s ease;
  }
  
  .carousel-nav,
  .carousel-dot {
    transition: color 0.2s ease, background-color 0.2s ease;
  }
}

/* Focus styles for accessibility */
.carousel-nav:focus,
.carousel-dot:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Dark Mode Support (if needed) */
@media (prefers-color-scheme: light) {
  /* Currently using dark theme by default */
  /* Add light mode overrides here if needed */
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    min-height: 100vh;
  }

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

  .hero-subtitle {
    font-size: 1rem;
  }
}
/* Trust & Authority Grid Responsive */
@media (max-width: 1024px) {
  .trust-authority-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
  }
  
  .trust-main-tile {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    aspect-ratio: unset;
    min-height: 300px;
  }
  
  .trust-cluster-container {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
    aspect-ratio: unset;
  }
  
  .trust-tile-5,
  .trust-tile-6 {
    grid-column: 1 / 2;
    height: 320px; /* Back to original tablet height */
  }
  
  .trust-tile-5 {
    grid-row: 3 / 4;
  }
  
  .trust-tile-6 {
    grid-row: 4 / 5;
  }
}

@media (max-width: 768px) {
  .trust-authority-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 1.5rem;
  }
  
  .trust-main-tile,
  .trust-cluster-container,
  .trust-tile-5,
  .trust-tile-6 {
    grid-column: 1 / 2;
    grid-row: auto;
    aspect-ratio: unset;
    height: 280px; /* Back to original mobile height */
  }
  
  .trust-cluster-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
  }
  
  .trust-tile-1,
  .trust-tile-2,
  .trust-tile-3,
  .trust-tile-4 {
    grid-column: 1 / 2;
    grid-row: auto;
    min-height: 200px;
  }

  /* Testimonial Carousel Mobile */
  .testimonial-carousel {
    margin: 2rem auto;
    max-width: calc(100vw - 2rem);
  }
  
  .testimonial-track {
    gap: 1rem;
  }
  
  .testimonial-card,
  .testimonial-card-featured {
    padding: 2rem;
  }
}
  
  .trust-main-tile {
    padding: 2rem;
  }
  
  .trust-main-title {
    font-size: 1.5rem;
  }
  
  .trust-main-text {
    font-size: 1rem;
  }
  
  .trust-urgency-stats {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .urgency-arrow {
    transform: rotate(90deg);
  }
}