/* Gilad Renovations — mobile-first refinements (v1.1).
 * All major layout changes are scoped to small viewports. Desktop remains the
 * same as the approved v1.0 design.
 */

.gilad-menu-toggle,
#gilad-mobile-nav { display: none; }

#gilad-mobile-nav[hidden] { display: none !important; }

@media (max-width: 1023px) {
  #gilad-site-header { isolation: isolate; }

  #gilad-site-header .gilad-menu-toggle {
    display: inline-flex;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    color: #1e2022;
    background: #f0ede8;
    border: 1px solid #dfdcd5;
    border-radius: 13px;
    cursor: pointer;
    transition: background-color .2s, border-color .2s;
  }

  #gilad-site-header .gilad-menu-toggle:hover,
  #gilad-site-header .gilad-menu-toggle[aria-expanded="true"] {
    background: #e9dfd2;
    border-color: #a77b4c;
  }

  #gilad-site-header .gilad-menu-toggle:focus-visible,
  #gilad-mobile-nav a:focus-visible {
    outline: 3px solid #b58850;
    outline-offset: 3px;
  }

  #gilad-mobile-nav:not([hidden]) {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    padding: 16px max(20px, env(safe-area-inset-right)) 24px max(20px, env(safe-area-inset-left));
    background: #fbf9f6;
    border-top: 1px solid rgba(37, 37, 32, .08);
    border-bottom: 1px solid #d9d3c9;
    box-shadow: 0 20px 35px rgba(20, 24, 24, .16);
    max-height: calc(100dvh - 72px);
    overflow-y: auto;
    z-index: 60;
  }

  #gilad-mobile-nav a {
    display: flex;
    align-items: center;
    min-height: 54px;
    padding: 10px 12px;
    color: #1e2022;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid #e8e4dc;
  }

  #gilad-mobile-nav a:last-child {
    margin-top: 14px;
    justify-content: center;
    min-height: 50px;
    background: #85531f;
    color: #fff;
    border: 0;
    border-radius: 13px;
  }

  body.gilad-menu-open { overflow: hidden; }
}

@media (max-width: 767px) {
  html, body { max-width: 100%; overflow-x: clip; }
  html { scroll-padding-top: 78px; }

  /* A compact, informative navbar with 44px touch targets. */
  #gilad-site-header {
    background: rgba(251, 249, 246, .97) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }
  #gilad-site-header > div:first-child {
    height: 72px !important;
    padding-inline: 12px !important;
    gap: 8px !important;
  }
  #gilad-site-header a[aria-label^="גלעד שיפוצים"] { gap: 5px !important; }
  #gilad-site-header a[aria-label^="גלעד שיפוצים"] > img {
    height: 34px !important;
    max-width: 72px;
  }
  #gilad-site-header .gilad-brand-copy {
    display: flex !important;
    max-width: 108px;
    min-width: 0;
    white-space: normal;
    line-height: 1.25;
  }
  #gilad-site-header .gilad-brand-copy strong {
    font-size: 14px !important;
    line-height: 1.25;
    letter-spacing: -.025em;
  }
  #gilad-site-header .gilad-brand-copy > span {
    font-size: 9px !important;
    margin-top: 3px;
    line-height: 1.2;
  }
  #gilad-site-header .gilad-header-actions { gap: 5px !important; }
  #gilad-site-header .gilad-header-actions > a {
    width: 42px;
    height: 44px;
    padding: 0 !important;
    border-radius: 13px;
    justify-content: center;
  }
  #gilad-site-header .gilad-header-actions > a > span:not(.material-symbols-outlined) { display: none !important; }
  #gilad-site-header .gilad-menu-toggle { width: 42px; height: 44px; }

  main { padding-top: 72px !important; }

  /* Portrait Hero: real image, no scale filter, deliberate focal point. */
  #hero {
    min-height: min(760px, calc(100svh - 72px));
    display: flex;
    align-items: center;
    isolation: isolate;
  }
  #hero > div:first-child > img {
    object-position: 34% center !important;
    transform: none !important;
    filter: none !important;
  }
  #hero .gilad-mobile-hero-shade {
    background-image: linear-gradient(180deg, rgba(16, 20, 22, .60) 0%, rgba(16, 20, 22, .50) 45%, rgba(16, 20, 22, .83) 100%) !important;
  }
  #hero .ambient-sunbeam,
  #hero .dust-particles-container { display: none !important; }
  #hero .gilad-hero-content {
    padding: 64px 21px 62px !important;
    max-width: 480px;
    margin-inline: auto;
  }
  #hero .gilad-hero-grid { gap: 0 !important; }
  #hero .gilad-hero-text { align-items: stretch !important; }
  #hero .gilad-hero-eyebrow {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 8px;
    color: #f7e4c3;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 13px;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 99px;
    background: rgba(18, 20, 22, .28);
    backdrop-filter: blur(8px);
    margin-bottom: 17px;
  }
  #hero .gilad-hero-eyebrow::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #c99b60;
  }
  #hero .gilad-hero-headline {
    font-size: clamp(34px, 9.5vw, 42px) !important;
    line-height: 1.13 !important;
    letter-spacing: -.035em !important;
    margin-bottom: 17px !important;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .18);
  }
  #hero .gilad-hero-description {
    font-size: 15px !important;
    line-height: 1.8 !important;
    color: #f0ede8 !important;
    margin-bottom: 22px !important;
    max-width: 350px;
    text-wrap: pretty;
  }
  #hero .gilad-hero-actions {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 10px !important;
    width: 100% !important;
    max-width: 390px;
    margin-bottom: 20px !important;
  }
  #hero .gilad-hero-actions a {
    width: 100%;
    min-height: 51px;
    font-size: 15px !important;
    border-radius: 14px;
  }
  #hero .gilad-hero-actions a:first-child { background: #a66e31; }
  #hero .gilad-hero-actions a:last-child { background: rgba(255,255,255,.13); }
  #hero .gilad-hero-trust {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px !important;
    padding: 12px 8px !important;
    max-width: 390px;
    border-radius: 15px !important;
    background: rgba(16, 20, 22, .36) !important;
    border-color: rgba(255, 255, 255, .22) !important;
  }
  #hero .gilad-hero-trust > div:not([class*="hidden"]) {
    flex-direction: column;
    justify-content: flex-start;
    gap: 5px;
    text-align: center;
    min-width: 0;
  }
  #hero .gilad-hero-trust > div[class*="hidden"] { display: none !important; }
  #hero .gilad-hero-trust span:not(.material-symbols-outlined) {
    font-size: 10.5px !important;
    line-height: 1.4;
  }
  #hero .gilad-hero-trust .material-symbols-outlined { font-size: 17px !important; }
  #hero .gilad-hero-scroll { display: none !important; }

  /* Section rhythm — compact but still airy. */
  #features { padding-block: 52px !important; }
  #services, #portfolio, #process, #testimonials, #contact { padding-block: 60px !important; }
  #features > div, #services, #portfolio > div, #process, #testimonials > div, #contact {
    padding-inline: 20px !important;
  }
  #services h2, #portfolio h2, #process h2, #testimonials h2, #contact h2 {
    font-size: 28px !important;
    line-height: 1.27 !important;
    letter-spacing: -.02em;
  }
  #services p, #portfolio p, #process p, #testimonials p { overflow-wrap: anywhere; }

  /* Four feature blocks become clear horizontal mini-cards. */
  #features > div > div.grid { grid-template-columns: 1fr !important; gap: 11px !important; }
  #features > div > div.grid > div {
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 14px;
    align-items: start;
    padding: 17px !important;
    border-radius: 18px !important;
  }
  #features > div > div.grid > div > div:first-child {
    grid-column: 1; grid-row: 1 / 3;
    width: 44px; height: 44px;
    margin: 0 !important;
  }
  #features > div > div.grid > div h3 {
    grid-column: 2; grid-row: 1;
    font-size: 16px !important;
    line-height: 1.38 !important;
    margin-bottom: 4px !important;
  }
  #features > div > div.grid > div p {
    grid-column: 2; grid-row: 2;
    font-size: 12.5px !important;
    line-height: 1.65 !important;
  }

  #services .grid { gap: 14px !important; }
  #services .grid > div { padding: 22px !important; border-radius: 20px !important; }
  #services .grid h3 { font-size: 18px !important; }

  /* An easy thumb-scrollable portfolio filter, full-width image cards. */
  #portfolio-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    border-radius: 15px !important;
    gap: 4px !important;
    padding: 5px !important;
  }
  #portfolio-tabs::-webkit-scrollbar { display: none; }
  #portfolio-tabs button {
    flex: 0 0 auto;
    min-height: 42px;
    white-space: nowrap;
    padding-inline: 15px !important;
    scroll-snap-align: start;
    font-size: 13px !important;
  }
  #portfolio-grid { gap: 16px !important; }
  #portfolio-grid .project-card { border-radius: 20px !important; }
  #portfolio-grid .project-card > div:first-child { aspect-ratio: 1.24 / 1 !important; }
  #portfolio-grid .project-card > div:last-child { padding: 21px !important; }
  #portfolio-grid .project-card h3 { font-size: 19px !important; }

  #process .relative.grid { gap: 13px !important; }
  #process .relative.grid > div { padding: 20px !important; border-radius: 20px !important; }
  #testimonials .grid { gap: 14px !important; }
  #testimonials .grid > div { padding: 23px !important; border-radius: 20px !important; }

  /* Contact on a narrow phone — no tiny form text or overflowing phone CTA. */
  #contact > div { padding: 23px 18px !important; border-radius: 21px !important; }
  #contact .grid { gap: 27px !important; }
  #contact .grid > div > .bg-surface-container-low { padding: 17px !important; border-radius: 18px !important; }
  #contact p { font-size: 14px !important; line-height: 1.75 !important; }
  #contact form input, #contact form select, #contact form textarea {
    max-width: 100%;
    font-size: 16px !important; /* Prevents iOS Safari focus zoom. */
  }
  #contact form input, #contact form select { min-height: 50px; }
  #contact a[href^="tel:"] { font-size: 17px !important; white-space: nowrap; }
  #contact a[href^="https://wa.me/"] { padding-inline: 12px !important; font-size: 14px !important; }

  footer { padding-block: 54px 30px !important; }
  footer > div:first-child { padding-inline: 21px !important; gap: 30px !important; }
  footer > div:last-child { padding-inline: 21px !important; margin-top: 32px !important; }
  footer p { line-height: 1.7; }

  body > aside.fixed { left: 16px !important; bottom: calc(16px + env(safe-area-inset-bottom)) !important; }
  body > aside.fixed a { width: 52px !important; height: 52px !important; }

  /* Touch devices should not animate image zoom or lift the whole card. */
  .hover-lift:hover, .img-zoom:hover img { transform: none !important; }
  .reveal-on-scroll { transform: none !important; }
}

@media (max-width: 359px) {
  #gilad-site-header .gilad-brand-copy strong { font-size: 13px !important; }
  #gilad-site-header .gilad-brand-copy { max-width: 93px; }
  #gilad-site-header a[aria-label^="גלעד שיפוצים"] > img { height: 30px !important; }
  #hero .gilad-hero-content { padding-inline: 17px !important; }
  #hero .gilad-hero-headline { font-size: 32px !important; }
  #hero .gilad-hero-trust span:not(.material-symbols-outlined) { font-size: 9.5px !important; }
}

@media (prefers-reduced-motion: reduce) {
  #hero .ambient-sunbeam, #hero .dust-particles-container { display: none !important; }
  #gilad-mobile-nav, .gilad-menu-toggle { transition: none !important; }
}
