/* ==========================================================================
   أحسان للتكييف والتبريد - Ahsan Air Conditioning & Refrigeration
   Responsive Breakpoints, Mobile Optimization & Mobile Hero Image Canvas
   ========================================================================== */

/* Large Tablets & Small Laptops (max-width: 1024px) */
@media (max-width: 1024px) {
  .nav-inner {
    height: 64px;
    gap: 10px;
  }

  .logo-img {
    height: 40px;
    min-width: 150px;
    max-width: 210px;
  }

  .nav-links {
    position: fixed;
    top: 64px;
    right: 0;
    left: 0;
    width: 100%;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    flex-direction: column;
    align-items: stretch;
    padding: 20px clamp(16px, 4vw, 32px) 30px;
    gap: 8px;
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: 0 24px 48px rgba(8, 24, 43, 0.15);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, visibility 0.25s;
    z-index: 999;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-link {
    padding: 12px 18px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    border: 1px solid #f1f5f9;
    background: #f8fafc;
    color: var(--primary-navy);
  }

  .nav-link:hover,
  .nav-link.active {
    background: var(--primary-blue-light);
    border-color: rgba(29, 78, 216, 0.2);
    color: var(--primary-blue);
  }

  .nav-cta .btn-call,
  .nav-cta .btn-call-header,
  .nav-actions .btn-call,
  .nav-actions .btn-call-header {
    display: none;
  }

  .mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }

  .hero-grid,
  .subpage-hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero-visual {
    max-width: 560px;
    margin: 0 auto;
    width: 100%;
  }

  .hero-img-box img {
    height: 360px;
  }

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

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

  .warranty-banner {
    grid-template-columns: 1fr;
  }

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

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

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 36px;
  }
}

/* Tablets & Mobile Phones (max-width: 768px) */
@media (max-width: 768px) {
  /* High-Impact Mobile Hero Section with Photographic Background & Glassmorphic Layering */
  .hero-section {
    background: 
      linear-gradient(180deg, rgba(8, 24, 43, 0.88) 0%, rgba(8, 24, 43, 0.96) 100%),
      url('../images/hero-ac.jpg') center/cover no-repeat;
    color: #ffffff;
    padding: clamp(38px, 6vw, 56px) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    position: relative;
  }

  .hero-section::before {
    display: none;
  }

  .hero-title {
    color: #ffffff;
    font-size: 2.1rem;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
  }

  .hero-title .highlight {
    color: #38bdf8;
    background: linear-gradient(135deg, #38bdf8 0%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .hero-desc {
    color: #e2e8f0;
    font-weight: 500;
  }

  .hero-desc strong {
    color: #ffffff;
    font-weight: 800;
  }

  .policy-disclosure-banner {
    background: rgba(13, 38, 69, 0.88);
    border-color: rgba(56, 189, 248, 0.35);
    color: #e2e8f0;
    backdrop-filter: blur(14px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  }

  .policy-disclosure-banner svg {
    color: #38bdf8;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    border-top-color: rgba(255, 255, 255, 0.15);
  }

  .stat-card,
  .stat-item {
    background: rgba(13, 38, 69, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  }

  .stat-num {
    color: #ffffff;
    text-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
  }

  .stat-label {
    color: #cbd5e1;
  }

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

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

  .calc-result-box {
    flex-direction: column;
    text-align: center;
    align-items: stretch;
  }

  .calc-result-box .btn {
    width: 100%;
  }

  .google-rating-banner,
  .google-badge-hero {
    flex-direction: column;
    text-align: center;
    align-items: center;
    padding: 24px;
    gap: 20px;
  }

  .gbp-stars-wrap {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  .cta-banner-inner {
    flex-direction: column;
    text-align: center;
  }

  .cta-actions {
    width: 100%;
    flex-direction: column;
  }

  .cta-actions .btn {
    width: 100%;
  }

  .mobile-bottom-bar {
    display: block;
    padding: 5px 10px max(6px, env(safe-area-inset-bottom));
  }

  .mobile-bottom-grid,
  .mob-bar-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    max-width: 380px;
    margin: 0 auto;
  }

  .mob-cta-btn {
    height: 38px;
    padding: 4px 8px;
    font-size: 0.82rem;
    gap: 6px;
    border-radius: 8px;
    font-weight: 700;
  }

  .mob-cta-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
  }

  /* Hide floating circular action buttons on mobile to avoid screen clutter and overlapping with bottom bar */
  .floating-actions {
    display: none !important;
  }

  .scroll-top-btn {
    bottom: calc(58px + env(safe-area-inset-bottom, 0px));
    right: 14px;
    width: 38px;
    height: 38px;
  }

  html[dir="ltr"] .scroll-top-btn {
    left: 14px;
    right: auto;
  }

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

/* Mobile Phones (max-width: 480px) */
@media (max-width: 480px) {
  .top-bar {
    display: none;
  }

  .site-header {
    background: rgba(255, 255, 255, 0.98);
  }

  .nav-inner {
    height: 58px;
    gap: 8px;
    padding: 0 6px;
  }

  .logo-img {
    height: 36px;
    min-width: 120px;
    max-width: 160px;
  }

  .nav-cta .btn-call,
  .nav-cta .btn-call-header,
  .nav-actions .btn-call,
  .nav-actions .btn-call-header {
    display: none !important;
  }

  .lang-switcher {
    padding: 5px 9px;
    font-size: 0.78rem;
    border-radius: 16px;
    gap: 4px;
  }

  .mobile-toggle {
    width: 38px;
    height: 38px;
    border-radius: 8px;
  }

  .hero-title {
    font-size: 1.62rem;
    line-height: 1.35;
  }

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

  .hero-badge-wrap {
    gap: 6px;
  }

  .no-appointment-badge,
  .service-area-pill,
  .hours-tag-active {
    font-size: 0.76rem;
    padding: 4px 10px;
  }

  .hero-cta-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-bottom: 20px;
  }

  .hero-cta-group .btn {
    flex: 1;
    min-width: 0;
    padding: 10px 8px;
    font-size: 0.86rem;
    font-weight: 700;
    border-radius: 10px;
    justify-content: center;
    gap: 6px;
  }

  .hero-cta-group .btn svg {
    width: 17px;
    height: 17px;
  }

  .hero-stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stat-card,
  .stat-item {
    padding: 8px 10px;
  }

  .stat-num {
    font-size: 1.35rem;
  }

  .hero-img-box img {
    height: 290px;
  }

  .hero-live-badge {
    bottom: 12px;
    right: 12px;
    left: 12px;
    padding: 10px 12px;
  }

  .badge-icon {
    font-size: 1.4rem;
  }

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

  .section {
    padding: 52px 0;
  }

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

  .section-desc {
    font-size: 0.94rem;
  }

  .service-img-wrap,
  .gallery-img-wrap {
    height: 210px;
  }

  .service-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .service-footer .btn {
    width: 100%;
  }

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

  .brands-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .neighborhoods-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .warranty-points {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .footer-legal-links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
  }
}

/* Extra Small Phones (max-width: 360px) */
@media (max-width: 360px) {
  .logo-img {
    max-width: 175px;
    min-width: 130px;
  }

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

  .stat-num {
    font-size: 1.3rem;
  }

  .mob-cta-btn {
    font-size: 0.78rem;
    padding: 4px 6px;
    gap: 4px;
    height: 36px;
  }
}
