/* ============================================
   SRV HOME CARE - Responsive Stylesheet
   ============================================ */

@media (max-width: 1366px) {
  :root {
    --container: 1140px;
  }
}

@media (max-width: 1024px) {
  :root {
    --container: 960px;
    --header-height: 72px;
  }

  .hero {
    min-height: 80vh;
  }

  .section {
    padding: 4rem 0;
  }

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

@media (max-width: 768px) {
  :root {
    --container: 100%;
    --header-height: 64px;
  }

  .top-bar {
    display: none;
  }

  .header {
    height: var(--header-height);
  }

  .hero {
    min-height: 70vh;
    padding-top: var(--header-height);
  }

  .section {
    padding: 3rem 0;
  }

  .section-header {
    margin-bottom: 2.5rem;
  }

  .trust-strip-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

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

  .service-card-image {
    height: 180px;
  }

  .process-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .process-grid::before {
    display: none;
  }

  .process-step {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

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

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

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

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

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

  .footer-columns {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-cta {
    padding: 2rem 1.5rem;
  }

  .booking-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .review-inner {
    padding: 1.75rem;
  }
}

@media (max-width: 480px) {
  .hero {
    min-height: 65vh;
  }

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

  .hero-subtitle {
    font-size: 1rem;
  }

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

  .trust-strip-grid {
    grid-template-columns: 1fr;
  }

  .trust-strip-item {
    justify-content: center;
  }

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

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

  .stat-item {
    padding: 1rem;
  }

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

  .urgent-call-btn,
  .urgent-whatsapp-btn {
    width: 100%;
    justify-content: center;
  }

  .footer-cta-buttons {
    flex-direction: column;
  }

  .footer-call-button,
  .footer-whatsapp-button {
    width: 100%;
    justify-content: center;
  }

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

  .service-card-actions {
    flex-direction: column;
  }

  .service-card-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .about-features {
    grid-template-columns: 1fr;
  }

  .gallery-comparison {
    aspect-ratio: 4 / 3;
  }
}

@media (min-width: 1920px) {
  :root {
    --container: 1320px;
  }

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

/* Touch device adjustments */
@media (hover: none) {
  .floating-btn:hover {
    transform: none;
  }

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

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

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

/* Safe area for notched phones */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .mobile-bottom-bar {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .floating-buttons {
    bottom: calc(70px + env(safe-area-inset-bottom));
  }
}

/* High resolution screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .service-card-image img,
  .hero-image-wrapper img {
    image-rendering: -webkit-optimize-contrast;
  }
}

/* Dark mode system preference (optional toggle support) */
@media (prefers-color-scheme: dark) {
  /* Website defaults to light mode; dark mode can be toggled via .dark-mode class */
}

/* Image and icon alignment refinements */
@media (max-width: 1024px) {
  .header-nav {
    gap: 0;
  }

  .header-nav a,
  .nav-dropdown-toggle {
    padding-inline: 0.65rem;
  }

  .hero-floating-badge.badge-location,
  .hero-floating-badge.badge-sameday {
    right: 0;
  }

  .hero-floating-badge.badge-doorstep {
    left: 0;
  }
}

@media (max-width: 768px) {
  .hero .container,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .hero .container {
    gap: 2.25rem;
    padding-top: 2.5rem;
    padding-bottom: 3rem;
  }

  .hero-content {
    max-width: none;
    text-align: center;
  }

  .hero-trust,
  .hero-buttons {
    justify-content: center;
  }

  .hero-visual {
    width: min(100%, 540px);
    margin-inline: auto;
  }

  .hero-floating-badge {
    font-size: 0.78rem;
    padding: 0.6rem 0.8rem;
  }

  .service-card-desc {
    min-height: 0;
  }

  .floating-buttons {
    display: none;
  }

  .mobile-bottom-bar {
    display: block;
  }

  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 480px) {
  .container {
    padding-inline: 1rem;
  }

  .hero-image-wrapper {
    border-radius: 22px;
  }

  .hero-floating-badge {
    position: static;
    width: fit-content;
    animation: none;
  }

  .hero-visual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }

  .hero-image-wrapper {
    grid-column: 1 / -1;
  }

  .hero-floating-badge.badge-sameday {
    grid-column: 1 / -1;
    justify-self: center;
  }

  .service-card-actions {
    flex-direction: row;
  }

  .service-card-actions .btn {
    width: auto;
    min-width: 0;
    padding-inline: 0.7rem;
  }

  .trust-strip-item {
    justify-content: flex-start;
    max-width: 280px;
    width: 100%;
    margin-inline: auto;
  }
}

@media (max-width: 768px) {
  .hero-visual {
    display: flex;
  }
}

@media (max-width: 480px) {
  .hero-visual {
    display: grid;
  }
}


/* ---------- Hero alignment correction ---------- */
@media (max-width: 1180px) {
  .home-hero .hero-layout {
    grid-template-columns: minmax(0, 1.02fr) minmax(390px, .98fr);
    gap: 2.75rem;
  }

  .hero-title {
    font-size: clamp(2.55rem, 5vw, 3.8rem);
  }

  .hero-floating-badge.badge-location,
  .hero-floating-badge.badge-sameday {
    right: 0;
  }

  .hero-floating-badge.badge-doorstep {
    left: 0;
  }
}

@media (max-width: 900px) {
  .hero,
  .home-hero {
    min-height: auto;
    padding: 4rem 0 5rem;
  }

  .home-hero .hero-layout {
    grid-template-columns: 1fr;
    gap: 3.25rem;
  }

  .hero-content {
    max-width: 760px;
    margin-inline: auto;
    text-align: center;
  }

  .hero-badge {
    margin-inline: auto;
  }

  .hero-subtitle,
  .hero-description,
  .hero-desc {
    margin-inline: auto;
  }

  .hero-trust,
  .hero-buttons {
    justify-content: center;
  }

  .hero-visual {
    max-width: 590px;
    margin-inline: auto;
  }
}

@media (max-width: 640px) {
  .hero,
  .home-hero {
    padding: 3.2rem 0 3.75rem;
  }

  .hero-title {
    font-size: clamp(2.15rem, 10vw, 3rem);
    line-height: 1.08;
  }

  .hero-highlight {
    white-space: normal;
  }

  .hero-subtitle {
    font-size: 1.05rem;
  }

  .hero-description,
  .hero-desc {
    font-size: 0.94rem;
    line-height: 1.65;
  }

  .hero-trust {
    gap: 0.55rem;
  }

  .hero-trust-item {
    padding: 0.45rem 0.62rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255,255,255,.82);
    font-size: 0.78rem;
  }

  .hero-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .hero-buttons .btn {
    width: 100%;
    min-width: 0;
    padding-inline: 0.8rem;
  }

  .hero-buttons .btn:first-child {
    grid-column: 1 / -1;
  }

  .hero-visual {
    display: block;
    padding: 0;
  }

  .hero-image-wrapper {
    border-width: 5px;
    border-radius: 26px;
    aspect-ratio: 1 / .92;
  }

  .hero-image-caption {
    left: 0.75rem;
    bottom: 0.75rem;
    min-width: 150px;
    padding: 0.62rem 0.7rem;
  }

  .hero-image-caption .caption-number {
    width: 36px;
    height: 36px;
    font-size: 1.12rem;
  }

  .hero-floating-badge {
    position: absolute;
    width: auto;
    max-width: 76%;
    padding: 0.58rem 0.7rem;
    font-size: 0.74rem;
    animation: none;
  }

  .hero-floating-badge.badge-location {
    top: -0.65rem;
    right: 0.55rem;
  }

  .hero-floating-badge.badge-doorstep {
    left: 0.55rem;
    bottom: 23%;
  }

  .hero-floating-badge.badge-sameday {
    right: 0.55rem;
    bottom: -0.75rem;
  }
}

@media (max-width: 390px) {
  .hero-buttons {
    grid-template-columns: 1fr;
  }

  .hero-buttons .btn:first-child {
    grid-column: auto;
  }

  .hero-floating-badge.badge-doorstep {
    display: none;
  }
}


/* Compact mobile hero: keep the service image visible above the fold */
@media (max-width: 640px) {
  .home-hero .hero-description,
  .home-hero .hero-contact-note {
    display: none;
  }

  .home-hero .hero-buttons .btn:not(:first-child) {
    display: none;
  }

  .home-hero .hero-buttons {
    display: block;
    max-width: 100%;
  }

  .home-hero .hero-buttons .btn:first-child {
    display: flex;
    width: min(100%, 330px);
    margin-inline: auto;
  }

  .home-hero .hero-layout {
    gap: 2.25rem;
  }

  .home-hero .hero-visual {
    width: calc(100% - 0.25rem);
  }
}
