/* === ELEVATED MOBILE & TABLET MASTER RESPONSIVE SYSTEM === */
html, body {
  width: 100% !important;
  max-width: 100vw !important;
  overflow-x: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Header & Mobile Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 4px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  z-index: 1050;
  padding: 0;
  flex-shrink: 0;
  margin-left: auto;
}
.mobile-menu-toggle span {
  width: 16px;
  height: 2px;
  background: #ffffff;
  transition: all 0.25s ease;
  display: block;
}
header.is-scrolled .mobile-menu-toggle {
  background: #f0ede6;
  border-color: #dcd6cb;
}
header.is-scrolled .mobile-menu-toggle span {
  background: #111111;
}

/* Slide-Over Drawer */
.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1201;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(3px);
}
.mobile-drawer-overlay.open { opacity: 1; visibility: visible; }

.mobile-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 82%;
  max-width: 300px;
  height: 100vh;
  background: #ffffff;
  z-index: 1202;
  transition: right 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  overflow-y: auto;
  padding: 4.2rem 1.4rem 2.5rem 1.4rem;
  box-shadow: -8px 0 25px rgba(0,0,0,0.18);
  box-sizing: border-box;
}
.mobile-drawer.open { right: 0; }

.drawer-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  background: #f4f0eb;
  border: 1px solid #e0dad0;
  border-radius: 50%;
  color: #111111;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1205;
}

.mobile-drawer a.mob-link {
  font-family: var(--font-heading, 'Playfair Display', serif);
  font-size: 0.95rem;
  font-weight: 600;
  color: #111111;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #ebe7e0;
}
.mobile-drawer .has-submenu .mob-sub {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  display: flex;
  flex-direction: column;
  background: #f9f8f6;
  border-radius: 6px;
  margin: 0.3rem 0;
}
.mobile-drawer .has-submenu.open .mob-sub {
  max-height: 1400px;
  padding: 0.6rem 0.9rem;
}
.mobile-drawer .mob-sub a {
  font-size: 0.82rem;
  padding: 0.35rem 0;
  color: #555555;
  display: block;
}
.mobile-drawer .mob-sub a.sub-head {
  font-weight: 700;
  color: var(--accent-wood, #8c6239);
  margin-top: 0.5rem;
  text-transform: uppercase;
  font-size: 0.74rem;
  letter-spacing: 0.8px;
}

@media (max-width: 992px) {
  header {
    padding: 0.6rem 4% !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }
  header .logo {
    display: flex !important;
    align-items: center !important;
  }
  header .logo img {
    height: 32px !important;
  }
  header nav {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
  }
  header nav ul {
    display: none !important;
  }
  .mobile-menu-toggle {
    display: flex !important;
  }
  .phone-btn {
    padding: 0.35rem 0.65rem !important;
    font-size: 0.7rem !important;
    gap: 5px !important;
    white-space: nowrap !important;
  }
}

@media (max-width: 768px) {
  /* Universal Section Padding & Heading Bounds */
  .gallery-main, .gallery-wrap, .content-section, .what-we-do, .certificates, 
  .google-ratings-section, .connect-newsletter-section, .social-follow-section { 
    padding: 3.5rem 5% 2.5rem !important; 
    width: 100% !important; 
    max-width: 100vw !important; 
    box-sizing: border-box !important; 
  }

  .section-title-center { font-size: 1.35rem !important; margin-bottom: 0.8rem !important; }
  .section-desc-center { font-size: 0.82rem !important; margin-bottom: 1.5rem !important; }
  .page-heading, .project-meta { margin-bottom: 1.5rem !important; }
  .page-heading h1, .project-meta h1 { font-size: 1.8rem !important; line-height: 1.2 !important; }
  .page-hero { height: 44vh !important; min-height: 320px !important; }
  .page-hero-content h1 { font-size: 1.85rem !important; }

  /* ------------------------------------------------------------------------
     UNIVERSAL 2-IN-A-ROW GRID SYSTEM FOR ALL LEVEL 1, 2, AND 3 PAGES
  ------------------------------------------------------------------------ */
  .offerings-grid,
  .subcat-grid,
  .subcat-grid.facade-3col,
  .material-grid,
  .species-grid,
  .info-grid,
  .why-us-grid,
  .project-grid,
  .album,
  .gallery-cards,
  .category-cards-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
    margin-top: 1rem !important;
    padding: 0 !important;
  }

  /* Card Structures: Offerings, Sub-categories & Materials */
  .offering-card, .subcat-card, .material-card {
    aspect-ratio: 3.2/4.2 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    height: auto !important;
    min-height: unset !important;
  }
  .offering-card-overlay, .subcat-card-overlay, .material-card-overlay, .project-card-overlay {
    padding: 0.75rem 0.65rem !important;
  }
  .offering-card-overlay h3, .subcat-card-overlay h3, .material-card-overlay h3, .project-card-overlay h3 {
    font-size: 0.92rem !important;
    line-height: 1.25 !important;
    margin: 0.2rem 0 !important;
  }
  .offering-card-overlay p, .subcat-card-overlay p, .material-card-overlay p {
    font-size: 0.68rem !important;
    line-height: 1.35 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }
  .offering-card-overlay .view-link, .subcat-card-overlay .view-link, 
  .material-card-overlay .view-link, .project-card-overlay .view-link {
    font-size: 0.66rem !important;
    margin-top: 0.3rem !important;
    opacity: 1 !important;
    transform: none !important;
  }

  /* Compact Info, Species & Why-Us Cards */
  .info-card, .species-card, .why-us-card {
    padding: 1.1rem 0.6rem !important;
    border-radius: 8px !important;
  }
  .info-card i, .species-card .species-icon, .why-us-card i {
    font-size: 1.3rem !important;
    margin-bottom: 0.5rem !important;
  }
  .info-card p, .why-us-card p {
    font-size: 0.75rem !important;
    line-height: 1.4 !important;
  }
  .species-card h4 {
    font-size: 0.85rem !important;
    margin-bottom: 0.2rem !important;
  }
  .species-card span {
    font-size: 0.65rem !important;
  }

  /* Sub-Listing Project Cards (deckwood-flooring, exterior-cladding, etc.) */
  .project-card {
    border-radius: 8px !important;
    overflow: hidden !important;
    height: auto !important;
    min-height: unset !important;
  }
  .project-image {
    aspect-ratio: 1.35/1 !important;
    width: 100% !important;
  }
  .project-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }
  .project-info {
    min-height: unset !important;
    padding: 0.6rem 0.7rem !important;
    gap: 0.4rem !important;
  }
  .project-info h2 {
    font-size: 0.78rem !important;
    line-height: 1.25 !important;
    font-weight: 600 !important;
  }
  .project-plus {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
  }
  .project-plus:before, .project-plus:after {
    width: 9px !important;
  }

  /* Narrative & Two-Column Stacks */
  .two-col-block {
    grid-template-columns: 1fr !important;
    gap: 1.6rem !important;
  }
  .two-col-block.img-right .col-img {
    order: 0 !important;
  }
  .two-col-block h2 {
    font-size: 1.3rem !important;
  }
  .two-col-block p {
    font-size: 0.84rem !important;
    line-height: 1.6 !important;
  }

  /* Universal Photo Gallery Modal & Scaled Arrow Controls */
  .lightbox {
    padding: 50px 10px 40px !important;
  }
  .lightbox-image {
    max-width: 88vw !important;
    max-height: 65vh !important;
    object-fit: contain !important;
  }
  .lb-arrow {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.75rem !important;
    border-radius: 50% !important;
    z-index: 3100 !important;
  }
  .lb-prev { left: 8px !important; }
  .lb-next { right: 8px !important; }
  .lb-close {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.85rem !important;
    top: 14px !important;
    right: 14px !important;
    z-index: 3100 !important;
  }
  .lb-counter {
    top: 18px !important;
    font-size: 0.7rem !important;
  }

  /* Instagram Link Button */
  .instagram-link, .project-social a {
    font-size: 0.7rem !important;
    letter-spacing: 0.8px !important;
    padding: 0.35rem 0.6rem !important;
    gap: 5px !important;
  }
  .project-social {
    margin: 1.5rem auto 0 !important;
    padding: 1.2rem 1rem !important;
  }

  /* Universal Centered Social Media Channels */
  .social-grid, .social-grid-center {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    flex-wrap: nowrap !important;
    margin: 1rem auto 0 auto !important;
    width: 100% !important;
    text-align: center !important;
  }
  .connect-left-sub, .social-follow-section {
    text-align: center !important;
  }
  .connect-left-sub p, .newsletter-right-sub p {
    text-align: center !important;
    margin-bottom: 1.2rem !important;
  }
  .social-tile {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    border: 1px solid var(--border-color, #ebe7e0) !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .social-tile i {
    font-size: 1rem !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Google Reviews Section */
  .google-ratings-section { position: relative !important; width: 100% !important; }
  .reviews-layout-flex {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 1.5rem !important;
    width: 100% !important;
  }
  .rating-summary-unboxed { width: 100% !important; text-align: center !important; margin: 0 auto !important; }
  .rating-summary-unboxed h3 { font-size: 1rem !important; margin-bottom: 4px !important; }
  .rating-summary-unboxed .stars-large { justify-content: center !important; margin-bottom: 4px !important; }
  .rating-summary-unboxed .reviews-count-text { font-size: 0.78rem !important; margin-bottom: 6px !important; }
  .rating-summary-unboxed .google-brand { font-size: 1.4rem !important; }
  .reviews-carousel-viewport { width: 100% !important; overflow: hidden !important; position: relative !important; padding: 8px 0 !important; }
  .reviews-track { display: flex !important; width: 100% !important; gap: 12px !important; transition: transform 0.4s ease !important; }
  .review-card-item {
    flex: 0 0 100% !important;
    width: 100% !important;
    background: #ffffff !important;
    border: 1px solid #ebebeb !important;
    border-radius: 12px !important;
    padding: 1.2rem !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
    min-height: 200px !important;
  }
  .carousel-arrow {
    width: 30px !important;
    height: 30px !important;
    font-size: 0.75rem !important;
    background: #ffffff !important;
    border: 1px solid #dcdcdc !important;
    color: #333333 !important;
    border-radius: 50% !important;
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 25 !important;
  }
  .carousel-arrow.prev-btn { left: 4px !important; }
  .carousel-arrow.next-btn { right: 4px !important; }

  /* Trustindex */
  .trustindex-bottom-wrapper {
    position: relative !important;
    bottom: 0 !important;
    right: 0 !important;
    margin-top: 1.2rem !important;
    text-align: center !important;
    display: flex !important;
    justify-content: center !important;
  }
  .trustindex-badge-btn { padding: 0.3rem 0.7rem !important; font-size: 0.68rem !important; }
  .trustindex-popover { width: 240px !important; padding: 0.65rem !important; font-size: 0.72rem !important; left: 50% !important; right: auto !important; transform: translateX(-50%) !important; }

  /* Footer */
  footer { padding: 2.2rem 5% 1.2rem !important; font-size: 0.76rem !important; }
  .footer-grid { grid-template-columns: 1fr !important; gap: 1.4rem !important; margin-bottom: 1.5rem !important; }
  .footer-brand img { height: 30px !important; margin-bottom: 0.8rem !important; }
  .footer-brand p { font-size: 0.76rem !important; margin-bottom: 0.8rem !important; }
  .footer-col h4 { font-size: 0.85rem !important; margin-bottom: 0.6rem !important; }
  .footer-col ul { gap: 0.4rem !important; }
  .footer-col a, .address-text { font-size: 0.75rem !important; }
  .map-box { min-height: 150px !important; max-height: 165px !important; }
  .footer-bottom { padding-top: 1.2rem !important; font-size: 0.68rem !important; }
}