/* Responsive design styles for Pronounce Yourself Happy website */

/* Mobile First Approach */

/* Extra Small Devices (phones, 320px and up) */
@media (min-width: 320px) {
  .container {
    padding: 0 0.75rem;
  }

  .section {
    padding: 2rem 0;
  }

  .section-lg {
    padding: 3rem 0;
  }
}

/* Small Devices (phones, 480px and up) */
@media (min-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .btn {
    min-width: auto;
  }

  .grid {
    gap: 1.5rem;
  }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) {
  .container {
    padding: 0 1.5rem;
  }

  .section {
    padding: 4rem 0;
  }

  .section-lg {
    padding: 6rem 0;
  }

  .grid {
    gap: 2rem;
  }

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

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

  .flex-md-row {
    flex-direction: row;
  }

  .text-md-left {
    text-align: left;
  }

  .text-md-center {
    text-align: center;
  }

  /* Header adjustments */
  .mobile-menu {
    display: none !important;
  }

  .nav-desktop {
    display: flex !important;
  }

  /* Card layouts */
  .card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  /* Product cards */
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

/* Large Devices (desktops, 1024px and up) */
@media (min-width: 1024px) {
  .container {
    max-width: 1200px;
    padding: 0 2rem;
  }

  .grid {
    gap: 2.5rem;
  }

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

  .grid-lg-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Enhanced hover effects for larger screens */
  .hover-lift:hover {
    transform: translateY(-12px);
  }

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

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

  /* Brand cards */
  .brand-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

  /* Hero sections */
  .hero-content {
    max-width: 4xl;
  }

  /* Navigation */
  .nav-link {
    padding: 0.75rem 1rem;
  }
}

/* Extra Large Devices (large desktops, 1280px and up) */
@media (min-width: 1280px) {
  .container {
    max-width: 1280px;
  }

  .section-lg {
    padding: 8rem 0;
  }

  /* Typography scaling */
  h1 {
    font-size: 4.5rem;
  }

  h2 {
    font-size: 3.5rem;
  }

  /* Enhanced spacing */
  .grid {
    gap: 3rem;
  }

  /* Product showcase */
  .product-showcase {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Ultra Wide Screens (1536px and up) */
@media (min-width: 1536px) {
  .container {
    max-width: 1536px;
  }

  /* Maximum content width for readability */
  .content-max {
    max-width: 1200px;
    margin: 0 auto;
  }
}

/* Mobile Specific Styles */
@media (max-width: 767px) {
  /* Typography */
  h1 {
    font-size: 2.5rem;
    line-height: 1.1;
  }

  h2 {
    font-size: 2rem;
  }

  h3 {
    font-size: 1.5rem;
  }

  /* Buttons */
  .btn {
    width: 100%;
    justify-content: center;
  }

  .btn-group {
    flex-direction: column;
    gap: 0.75rem;
  }

  /* Cards */
  .card {
    margin-bottom: 1rem;
  }

  .card-body {
    padding: 1rem;
  }

  /* Forms */
  .form-row {
    flex-direction: column;
  }

  .form-group {
    margin-bottom: 1rem;
  }

  /* Navigation */
  .nav-desktop {
    display: none !important;
  }

  .mobile-menu-btn {
    display: block !important;
  }

  /* Hero sections */
  .hero-section {
    padding: 3rem 0;
    text-align: center;
  }

  /* Modals */
  .modal-content {
    margin: 1rem;
    padding: 1.5rem;
    max-height: calc(100vh - 2rem);
  }

  /* Tables */
  .table-responsive {
    overflow-x: auto;
  }

  /* Images */
  .img-responsive {
    width: 100%;
    height: auto;
  }

  /* Spacing adjustments */
  .px-mobile-4 {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .py-mobile-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  /* Hide elements on mobile */
  .hidden-mobile {
    display: none !important;
  }

  /* Show only on mobile */
  .mobile-only {
    display: block !important;
  }
}

/* Tablet Specific Styles */
@media (min-width: 768px) and (max-width: 1023px) {
  /* Hybrid layouts for tablets */
  .tablet-grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .tablet-flex-col {
    flex-direction: column;
  }

  /* Adjusted spacing */
  .tablet-px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  /* Card adjustments */
  .card-tablet {
    display: flex;
    flex-direction: row;
    align-items: center;
  }

  .card-tablet .card-image {
    width: 40%;
    flex-shrink: 0;
  }

  .card-tablet .card-content {
    flex: 1;
    padding: 1.5rem;
  }
}

/* Landscape Phone Styles */
@media (max-width: 767px) and (orientation: landscape) {
  .hero-section {
    padding: 2rem 0;
  }

  .section {
    padding: 2rem 0;
  }

  /* Adjust modal height for landscape */
  .modal-content {
    max-height: 80vh;
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Crisp images for retina displays */
  .img-retina {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Print Styles */
@media print {
  /* Hide interactive elements */
  .no-print,
  .btn,
  .nav,
  .mobile-menu,
  .modal,
  .notification {
    display: none !important;
  }

  /* Optimize for print */
  body {
    background: white !important;
    color: black !important;
    font-size: 12pt;
    line-height: 1.4;
  }

  .container {
    max-width: none;
    padding: 0;
  }

  /* Page breaks */
  .page-break {
    page-break-before: always;
  }

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

  /* Links */
  a[href]:after {
    content: " (" attr(href) ")";
    font-size: 10pt;
    color: #666;
  }

  /* Headers */
  h1,
  h2,
  h3 {
    page-break-after: avoid;
  }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .hover-lift:hover {
    transform: none;
  }

  .animate-fade-in,
  .animate-fade-in-up,
  .animate-slide-up {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  /* This would be expanded if dark mode is implemented */
  .card {
    background: #1f2937;
    color: #f9fafb;
  }

  .form-input {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
  }
}

/* Container Queries (Future-proofing) */
@supports (container-type: inline-size) {
  .card-container {
    container-type: inline-size;
  }

  @container (min-width: 300px) {
    .card-responsive {
      display: flex;
      flex-direction: row;
    }
  }
}

/* Utility Classes for Responsive Design */
.responsive-text {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
}

.responsive-heading {
  font-size: clamp(1.5rem, 5vw, 3rem);
}

.responsive-spacing {
  padding: clamp(1rem, 4vw, 3rem);
}

.responsive-gap {
  gap: clamp(1rem, 3vw, 2rem);
}

/* Aspect Ratio Utilities */
.aspect-square {
  aspect-ratio: 1 / 1;
}

.aspect-video {
  aspect-ratio: 16 / 9;
}

.aspect-photo {
  aspect-ratio: 4 / 3;
}

/* Responsive Images */
.img-fluid {
  max-width: 100%;
  height: auto;
}

.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-contain {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
