/* ==========================================================================
   مؤسسة بوابة غرناطة للسباكة والكهرباء والدهانات بالرياض - Bawabat Garnada Est.
   Ultra-Sleek, High-Aesthetic Responsive & Mobile Layout Engine
   Full Mobile First & Breakpoint Precision (1024px, 768px, 480px, 360px)
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Desktop Laptop Screen Collision Protection (1025px - 1360px)
   -------------------------------------------------------------------------- */
@media (min-width: 1025px) and (max-width: 1360px) {
  .nav-inner {
    gap: 8px;
  }

  .nav-links {
    gap: clamp(2px, 0.5vw, 6px);
  }

  .nav-link {
    padding: 0 clamp(7px, 0.7vw, 10px);
    font-size: 0.84rem;
    height: 38px;
  }

  .btn-call-header,
  .btn-whatsapp-header {
    width: 38px;
    height: 38px;
    min-width: 38px;
    padding: 0 !important;
    justify-content: center;
    border-radius: 50% !important;
    flex-shrink: 0;
  }

  .brand-logo {
    gap: 8px;
  }

  .emblem-svg {
    width: 40px;
    height: 40px;
  }

  .brand-title {
    font-size: 1.15rem;
  }

  .brand-tag {
    font-size: 0.68rem;
  }
}

/* --------------------------------------------------------------------------
   1. Large Tablets & Small Laptops (max-width: 1024px)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
  }

  .nav-inner {
    position: relative;
    height: 64px;
    gap: 8px;
    padding: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
  }

  .brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 1;
    min-width: 0;
    max-width: calc(100% - 175px);
  }

  .emblem-svg {
    width: 38px;
    height: 38px;
    display: block;
    flex-shrink: 0;
  }

  .brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.15;
    min-width: 0;
    overflow: hidden;
  }

  .brand-title {
    font-size: clamp(0.96rem, 3.2vw, 1.15rem);
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
  }

  .brand-tag {
    font-size: clamp(0.60rem, 1.8vw, 0.67rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
  }

  .nav-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-shrink: 0;
  }

  /* Compact 1-Tap Mobile Action Pills */
  .btn-call-header span,
  .btn-whatsapp-header span {
    display: none !important;
  }

  .btn-call-header,
  .btn-whatsapp-header {
    display: inline-flex !important;
    width: 38px;
    height: 38px;
    min-width: 38px;
    padding: 0 !important;
    justify-content: center;
    align-items: center;
    border-radius: 50% !important;
    flex-shrink: 0;
    box-sizing: border-box;
  }

  .btn-call-header svg,
  .btn-whatsapp-header svg {
    width: 18px;
    height: 18px;
  }

  .mobile-toggle {
    display: inline-flex !important;
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 10px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-sizing: border-box;
  }

  .lang-pill {
    height: 38px;
    padding: 0 12px;
    font-size: 0.82rem;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    flex-shrink: 0;
    box-sizing: border-box;
    font-weight: 900;
  }

  /* Mobile Slide-Out / Dropdown Navigation attached to header bottom */
  .main-nav {
    position: static;
    order: 2;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    width: 100%;
    max-height: calc(100vh - 68px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #ffffff;
flex-direction: column;
    align-items: stretch;
    padding: 16px clamp(16px, 4vw, 32px) 24px;
    gap: 8px;
    border-bottom: 2px solid rgba(29, 78, 216, 0.16);
    box-shadow: 0 20px 48px rgba(9, 23, 41, 0.18);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.12s ease, visibility 0.12s;
    z-index: 999;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-link {
    padding: 0 16px;
    height: 44px;
    font-size: 0.96rem;
    font-weight: 800;
    border-radius: var(--radius-sm);
    border: 1px solid #f1f5f9;
    background: #f8fafc;
    color: var(--primary-navy);
    display: flex;
    align-items: center;
    justify-content: flex-start;
  }

  .nav-link:hover,
  .nav-link.active {
    background: var(--primary-blue-light);
    border-color: rgba(29, 78, 216, 0.25);
    color: var(--primary-blue);
  }

  .nav-link::after {
    display: none;
  }

  /* Grid adaptations */
  .hero-grid,
  .subpage-hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-visual {
    max-width: 580px;
    margin: 0 auto;
    width: 100%;
  }

  .hero-img-box img {
    height: 380px;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .reviews-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .video-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .work-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 36px;
  }
}

/* --------------------------------------------------------------------------
   2. Tablets & Mobile Phones (max-width: 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  /* Announcement bar */
  .top-announcement {
    padding: 8px 0;
    font-size: 0.82rem;
  }

  .top-announcement-inner {
    flex-direction: column;
    text-align: center;
    gap: 6px;
  }

  .announcement-text {
    white-space: normal;
    line-height: 1.45;
  }

  .announcement-contact {
    display: none;
  }

  /* Header adjustments */
  .site-header {
    background: rgba(255, 255, 255, 0.96);
  }

  .nav-inner {
    height: 64px;
    gap: 8px;
    padding: 0;
    width: 100%;
    flex-wrap: nowrap;
  }

  .brand-logo {
    gap: 8px;
    max-width: calc(100% - 165px);
    flex-shrink: 1;
    min-width: 0;
  }

  .emblem-svg {
    width: 36px;
    height: 36px;
  }

  .brand-title {
    font-size: 1.05rem;
  }

  .brand-tag {
    font-size: 0.64rem;
  }

  .nav-actions {
    gap: 6px;
  }

  .btn-call-header,
  .btn-whatsapp-header {
    display: inline-flex !important;
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0 !important;
    justify-content: center;
    align-items: center;
    border-radius: 50% !important;
    flex-shrink: 0;
  }

  .btn-call-header span,
  .btn-whatsapp-header span {
    display: none !important;
  }

  .btn-call-header svg,
  .btn-whatsapp-header svg {
    width: 17px;
    height: 17px;
  }

  .mobile-toggle {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 9px;
  }

  .lang-pill {
    height: 36px;
    padding: 0 10px;
    font-size: 0.78rem;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  /* Hero Section Mobile Enhancement */
  .hero-section {
    padding: clamp(36px, 6vw, 56px) 0 36px;
  }

  .hero-title {
    font-size: clamp(1.75rem, 6vw, 2.3rem);
    line-height: 1.28;
    margin-bottom: 14px;
  }

  .hero-subtitle {
    font-size: 0.98rem;
    line-height: 1.68;
    margin-bottom: 22px;
  }

  .hero-highlights {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 24px;
  }

  .highlight-item {
    font-size: 0.92rem;
  }

  .hero-cta-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-bottom: 22px;
  }

  .hero-cta-group .btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 0.96rem;
  }

  .hero-img-box img {
    height: 300px;
  }

  .hero-live-badge {
    bottom: 14px;
    right: 14px;
    padding: 10px 14px;
    gap: 10px;
  }

  html[dir="ltr"] .hero-live-badge {
    right: auto;
    left: 14px;
  }

  .hero-trust-tag {
    top: 14px;
    left: 14px;
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  html[dir="ltr"] .hero-trust-tag {
    left: auto;
    right: 14px;
  }

  /* Stats Strip */
  .stats-strip {
    padding: 24px 0;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 14px;
  }

  .stat-item:nth-child(2)::after {
    display: none;
  }

  .stat-num {
    font-size: 1.8rem;
  }

  .stat-lbl {
    font-size: 0.84rem;
  }

  /* Section Spacing */
  .section {
    padding: clamp(44px, 7vw, 68px) 0;
  }

  .section-head {
    margin-bottom: 32px;
  }

  .section-title {
    font-size: clamp(1.5rem, 5vw, 1.95rem);
    line-height: 1.32;
  }

  .section-desc {
    font-size: 0.94rem;
    line-height: 1.62;
  }

  /* Services Grid */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .service-card {
    border-radius: var(--radius-lg);
  }

  .service-img-wrap {
    height: 200px;
  }

  .service-content {
    padding: 22px 18px;
  }

  .service-name {
    font-size: 1.22rem;
  }

  /* Calculator Form */
  .calc-card {
    padding: 24px 16px;
    border-radius: var(--radius-lg);
  }

  .calc-header {
    margin-bottom: 24px;
  }

  .calc-header h2 {
    font-size: 1.45rem;
    line-height: 1.35;
  }

  .calc-row {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 20px;
  }

  .calc-result-box {
    flex-direction: column;
    text-align: center;
    padding: 22px 16px;
    gap: 16px;
    border-radius: var(--radius-md);
  }

  .result-action,
  .result-action .btn {
    width: 100%;
  }

  /* Features Grid */
  .features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .feature-box {
    padding: 24px 18px;
  }

  /* Districts Grid */
  .nh-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .nh-card {
    padding: 18px;
  }

  /* Reviews Grid */
  .reviews-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .review-card {
    padding: 20px 16px;
  }

  /* Video & Work Gallery Mobile */
  .video-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .video-player-wrap {
    height: 280px;
  }

  .work-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .work-gallery-item {
    height: 180px;
  }

  /* FAQ List */
  .faq-question {
    padding: 16px 18px;
    font-size: 0.96rem;
  }

  .faq-answer {
    padding: 0 18px;
  }

  .faq-item.active .faq-answer {
    padding: 0 18px 16px;
  }

  /* CTA Banner */
  .cta-banner-box {
    padding: 32px 18px;
    border-radius: var(--radius-lg);
  }

  .cta-title {
    font-size: 1.45rem;
  }

  .cta-desc {
    font-size: 0.94rem;
    margin-bottom: 22px;
  }

  .cta-buttons {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }

  .cta-buttons .btn {
    width: 100%;
  }

  /* Subpages */
  .page-header {
    padding: 36px 0;
  }

  .page-title {
    font-size: 1.6rem;
  }

  .page-subtitle {
    font-size: 0.94rem;
  }

  .service-points-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .cta-inline-box {
    padding: 22px 16px;
  }

  .cta-inline-btns {
    flex-direction: column;
  }

  .cta-inline-btns .btn {
    width: 100%;
  }

  .districts-directory-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .district-detail-card {
    padding: 20px 16px;
  }

  .about-pillars-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .contact-cards-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .contact-form-wrap {
    padding: 22px 16px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .hours-card {
    padding: 22px 16px;
  }

  .hours-inner {
    flex-direction: column;
    text-align: center;
    gap: 14px;
  }

  .workflow-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .workflow-card {
    padding: 28px 20px 24px;
  }

  .workflow-cta-banner {
    flex-direction: column;
    text-align: center;
    gap: 20px;
    padding: 28px 20px;
  }

  .workflow-cta-actions {
    width: 100%;
    flex-direction: column;
  }

  .workflow-cta-actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .footer-legal-links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
  }

  /* Mobile Sticky Action Bar - Activated */
  .sticky-cta-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    max-width: 100%;
  }

  body {
    padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px));
  }

  .scroll-top-btn {
    bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    right: 14px;
    width: 40px;
    height: 40px;
  }

  html[dir="ltr"] .scroll-top-btn {
    right: auto;
    left: 14px;
  }
}

/* --------------------------------------------------------------------------
   3. Small Mobile Phones (max-width: 480px)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .nav-inner {
    height: 60px;
    padding: 0;
    gap: 6px;
    width: 100%;
    flex-wrap: nowrap;
  }

  .brand-logo {
    gap: 6px;
    max-width: calc(100% - 152px);
    flex-shrink: 1;
    min-width: 0;
  }

  .emblem-svg {
    width: 34px;
    height: 34px;
  }

  .brand-title {
    font-size: 0.98rem;
  }

  .brand-tag {
    font-size: 0.58rem;
  }

  .nav-actions {
    gap: 5px;
  }

  .btn-call-header,
  .btn-whatsapp-header {
    width: 34px;
    height: 34px;
    min-width: 34px;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .btn-call-header svg,
  .btn-whatsapp-header svg {
    width: 16px;
    height: 16px;
  }

  .mobile-toggle {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 8px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .mobile-toggle svg {
    width: 18px;
    height: 18px;
  }

  .lang-pill {
    height: 34px;
    padding: 0 8px;
    font-size: 0.75rem;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .hero-title {
    font-size: 1.55rem;
  }

  .badge-pill {
    padding: 5px 12px;
    font-size: 0.78rem;
    gap: 6px;
  }

  .symptom-chips {
    gap: 6px;
  }

  .symptom-chip {
    padding: 5px 10px;
    font-size: 0.8rem;
  }

  .hero-img-box img {
    height: 250px;
  }

  .hero-live-badge {
    padding: 8px 10px;
  }

  .hero-live-badge .badge-icon {
    font-size: 1.2rem;
  }

  .hero-live-badge strong {
    font-size: 0.84rem;
  }

  .hero-live-badge span {
    font-size: 0.74rem;
  }

  .stat-num {
    font-size: 1.5rem;
  }

  .section-title {
    font-size: 1.45rem;
  }

  .sticky-btn {
    height: 44px;
    font-size: 0.88rem;
    gap: 6px;
  }

  .sticky-btn svg {
    width: 18px;
    height: 18px;
  }
}

/* --------------------------------------------------------------------------
   4. Extra Small Phones (max-width: 360px)
   -------------------------------------------------------------------------- */
@media (max-width: 360px) {
  .nav-inner {
    height: 58px;
    gap: 4px;
    padding: 0;
    height: 56px;
    gap: 4px;
    width: 100%;
    flex-wrap: nowrap;
  }

  .brand-logo {
    gap: 5px;
    max-width: calc(100% - 146px);
    flex-shrink: 1;
    min-width: 0;
  }

  .emblem-svg {
    width: 30px;
    height: 30px;
  }

  .brand-title {
    font-size: 0.88rem;
  }

  .brand-tag {
    font-size: 0.54rem;
  }

  .nav-actions {
    gap: 4px;
  }

  .btn-call-header,
  .btn-whatsapp-header {
    width: 32px;
    height: 32px;
    min-width: 32px;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .btn-call-header svg,
  .btn-whatsapp-header svg {
    width: 14px;
    height: 14px;
  }

  .mobile-toggle {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 8px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .mobile-toggle svg {
    width: 17px;
    height: 17px;
  }

  .lang-pill {
    height: 32px;
    padding: 0 7px;
    font-size: 0.72rem;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .hero-title {
    font-size: 1.38rem;
  }

  .btn {
    padding: 12px 16px;
    font-size: 0.9rem;
  }

  .sticky-btn {
    font-size: 0.82rem;
    height: 40px;
    padding: 4px 6px;
  }

  .sticky-btn svg {
    width: 16px;
    height: 16px;
  }
}
