/* ========================================
   Mend Your Home - Responsive Styles
   Mobile-First Responsive Design
   ======================================== */

/* ========================================
   MOBILE FIRST (Default: 320px+)
   ======================================== */

/* Small devices already covered in main.css */

/* ========================================
   TABLET (768px+)
   ======================================== */
@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
  
  .hero {
    padding: 5rem 0;
  }
  
  .hero-content {
    max-width: 700px;
  }
  
  .hero-cta {
    flex-direction: row;
  }
}

/* ========================================
   DESKTOP (1024px+)
   ======================================== */
@media (min-width: 1024px) {
  .section {
    padding: 5rem 0;
  }
  
  .hero {
    min-height: 600px;
    display: flex;
    align-items: center;
  }
  
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ========================================
   LARGE DESKTOP (1280px+)
   ======================================== */
@media (min-width: 1280px) {
  .container {
    max-width: 1280px;
  }
  
  .hero-content {
    max-width: 800px;
  }
}

/* ========================================
   TESTIMONIAL CAROUSEL RESPONSIVE
   ======================================== */

/* Mobile: 1 column */
.testimonial-grid {
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.testimonial-carousel {
  padding: 0 1rem;
}

/* Adjust card height for mobile */
.testimonial-carousel-3 .testimonial-card {
  min-height: 300px;
}

/* Tablet: 2 columns */
@media (min-width: 768px) {
  .testimonial-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .testimonial-carousel {
    padding: 0 2rem;
  }
  
  .testimonial-carousel-3 .testimonial-card {
    min-height: 320px;
  }
}

/* Desktop: 3 columns */
@media (min-width: 1024px) {
  .testimonial-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
  
  .testimonial-carousel {
    padding: 0 3rem;
  }
  
  .testimonial-carousel-3 .testimonial-card {
    min-height: 350px;
  }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
  .whatsapp-float,
  .header-top,
  .mobile-menu-toggle,
  .emergency-banner {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    color: black;
  }
  
  a {
    text-decoration: underline;
  }
}

/* ========================================
   SERVICE CARDS WITH IMAGES - RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
  .service-card-image {
    height: 380px;
  }
}

@media (max-width: 768px) {
  .service-card-image {
    height: 350px;
  }
  
  .service-card-title {
    font-size: 1.5rem;
  }
  
  .service-card-desc {
    font-size: 0.95rem;
  }
  
  .service-card-icon {
    width: 60px;
    height: 60px;
  }
  
  .service-card-icon i {
    font-size: 1.75rem;
  }
}

@media (max-width: 480px) {
  .service-card-image {
    height: 320px;
  }
  
  .service-card-content {
    padding: 1.5rem;
  }
  
  .service-card-title {
    font-size: 1.35rem;
  }
  
  .service-card-desc {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }
  
  .service-card-link {
    font-size: 1rem;
  }
}

/* ========================================
   RESPONSIVE LOGO IMAGES
   Uses optimized WebP logos across all pages
   ======================================== */

/* Header logo - responsive sizing */
.logo img {
  max-width: 132px;
  height: auto;
}

@media (max-width: 480px) {
  .logo img {
    max-width: 100px;
    height: auto;
  }
}

/* ========================================
   RESPONSIVE BACKGROUND IMAGES
   Overrides inline styles with smaller images on mobile for performance
   ======================================== */

/* Mobile backgrounds (768px and below) - Override inline styles */
@media (max-width: 768px) {
  /* Disable fixed background on mobile for better performance */
  #services,
  #areas,
  section[style*="background-attachment: fixed"] {
    background-attachment: scroll !important;
  }
  
  /* Section backgrounds - mobile versions */
  #services {
    background-image: url('../images/webp gallery/smart radiatoir install-mobile.webp') !important;
  }
  
  section[style*="Undersink heat & plumbing.webp"] {
    background-image: url('../images/webp gallery/Undersink heat & plumbing-mobile.webp') !important;
  }
  
  #areas {
    background-image: url('../images/webp gallery/illustration/map-mobile.webp') !important;
  }
  
  /* Service cards - mobile versions */
  .service-card-image[style*="worcester loft install.webp"] {
    background-image: url('../images/webp gallery/worcester loft install-mobile.webp') !important;
  }
  
  .service-card-image[style*="Boiler repair.webp"] {
    background-image: url('../images/webp gallery/Boiler repair-mobile.webp') !important;
  }
  
  .service-card-image[style*="worcester greenstar.webp"] {
    background-image: url('../images/webp gallery/worcester greenstar-mobile.webp') !important;
  }
  
  .service-card-image[style*="bathroom install.webp"] {
    background-image: url('../images/webp gallery/bathroom install-mobile.webp') !important;
  }
  
  .service-card-image[style*="leaking pipe.webp"] {
    background-image: url('../images/webp gallery/leaking pipe-mobile.webp') !important;
  }
  
  .service-card-image[style*="dripping tap.webp"] {
    background-image: url('../images/webp gallery/dripping tap-mobile.webp') !important;
  }
  
  .service-card-image[style*="powerflush - Copy.webp"] {
    background-image: url('../images/webp gallery/powerflush - Copy-mobile.webp') !important;
  }
  
  .service-card-image[style*="heatpump 1.webp"] {
    background-image: url('../images/webp gallery/heatpump 1-mobile.webp') !important;
  }
  
  .service-card-image[style*="ufh.webp"] {
    background-image: url('../images/webp gallery/illustration/ufh-mobile.webp') !important;
  }
  
  .service-card-image[style*="smart radiatoir install.webp"] {
    background-image: url('../images/webp gallery/smart radiatoir install-mobile.webp') !important;
  }
  
  .service-card-image[style*="Worcester combi loft install with employee.webp"] {
    background-image: url('../images/webp gallery/Worcester combi loft install with employee-mobile.webp') !important;
  }
}

