/* אורן אלחריזי - עבודות הנדסה אזרחית
   Design system: Swiss-editorial construction/architecture — Playfair Display (display serif)
   + Inter (body/UI). Brand anchors: deep green + terracotta red, taken from the real company logo. */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,600;0,700;0,800;0,900;1,500&family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --green: #16352a;
  --green-dark: #0b1f18;
  --green-light: #1f4a3a;
  --red: #c8391f;
  --red-dark: #a52d17;
  --cream: #f6f3ec;
  --paper: #fbf9f4;
  --white: #ffffff;
  --ink: #14201b;
  --muted: #62695f;
  --border: #e3ddce;
  --shadow: 0 20px 50px rgba(11, 31, 24, 0.14);
  --shadow-sm: 0 6px 18px rgba(11, 31, 24, 0.08);
  --radius: 4px;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Inter', 'Heebo', Arial, sans-serif;
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  direction: rtl;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--serif); }

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 249, 244, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 32px;
  max-width: 1240px;
  margin: 0 auto;
}

.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand img { height: 50px; width: auto; max-width: none; flex-shrink: 0; }

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-family: var(--serif); font-size: 1.2rem; font-weight: 700; color: var(--green); }
.brand-text span { font-size: 0.72rem; color: var(--muted); font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }

.main-nav ul { display: flex; gap: 2px; list-style: none; }

.main-nav a {
  display: block;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  position: relative;
  transition: color .2s;
  white-space: nowrap;
}
.main-nav a::after {
  content: "";
  position: absolute;
  right: 14px;
  left: 14px;
  bottom: 5px;
  height: 1.5px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .25s var(--ease);
}
.main-nav a:hover::after,
.main-nav a.active::after { transform: scaleX(1); }
.main-nav a.active { color: var(--red); }

.header-cta { display: flex; align-items: center; gap: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: .03em;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s, color .2s, border-color .2s;
  border: 1.5px solid transparent;
  cursor: pointer;
}

.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-dark); box-shadow: 0 10px 24px rgba(200,57,31,.35); transform: translateY(-2px); }

.btn-outline { background: transparent; color: var(--green); border-color: var(--green); }
.btn-outline:hover { background: var(--green); color: var(--white); border-color: var(--green); }

.btn-ghost-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,.55); }
.btn-ghost-light:hover { background: var(--white); color: var(--green); border-color: var(--white); }

.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.hamburger span { width: 26px; height: 2px; background: var(--green); }

/* ---------- Hero (flagship, homepage) ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  color: var(--white);
  background: var(--green);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,31,24,.25) 0%, rgba(11,31,24,.35) 45%, rgba(11,31,24,.92) 100%);
}
.hero-grain { position: absolute; inset: 0; opacity: .5; mix-blend-mode: overlay;
  background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 3px 3px; }

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px 80px;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.8rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #d7cf9f;
  font-weight: 600;
  margin-bottom: 26px;
}
.hero-eyebrow::before { content: ""; width: 44px; height: 1.5px; background: var(--red); display: block; }

.hero h1 {
  font-size: clamp(2.6rem, 6.4vw, 5.4rem);
  font-weight: 700;
  margin: 0 0 26px;
  line-height: 1.06;
  letter-spacing: -0.01em;
  max-width: 900px;
}
.hero h1 em { font-style: italic; color: #e8ceae; font-weight: 500; }

.hero p {
  font-size: 1.15rem;
  color: #e4e9e4;
  margin: 0 0 38px;
  font-weight: 300;
  max-width: 560px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 56px; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  text-align: center;
  border: 1.5px solid rgba(255,255,255,.55);
  border-radius: 10px;
  background: rgba(11,31,24,.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 18px 40px rgba(0,0,0,.25);
  overflow: hidden;
}
.hero-stats .stat { padding: 26px 14px; border-inline-end: 1px solid rgba(255,255,255,.3); }
.hero-stats .stat:last-child { border-inline-end: none; }
.hero-stats .stat b {
  display: block; font-family: var(--serif); font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 700;
  color: var(--white); line-height: 1; margin-bottom: 10px; letter-spacing: -0.01em;
}
.hero-stats .stat span { display: block; font-size: 0.76rem; color: #dbe4de; letter-spacing: .02em; line-height: 1.5; }

/* Back-compat: inner pages still use .hero-content / .hero-tag markup */
.hero-content { position: relative; z-index: 2; max-width: 720px; padding: 70px 24px 0; margin: 0 auto; text-align: center; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 10px; font-size: 0.8rem; letter-spacing: .16em; text-transform: uppercase;
  color: #d7cf9f; font-weight: 600; margin-bottom: 22px;
}
.hero-tag::before { content: ""; width: 30px; height: 1.5px; background: var(--red); display: inline-block; }
.hero-content h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 700; margin: 0 0 16px; line-height: 1.15; }
.hero-content p { font-size: 1.05rem; color: #e4e9e4; font-weight: 300; max-width: 640px; margin: 0 auto; }

/* Inner page hero - shorter, still editorial */
.page-hero {
  min-height: 50vh;
  align-items: center;
  text-align: center;
}
.page-hero .hero-inner { padding-bottom: 0; text-align: center; }
.page-hero .hero-eyebrow { justify-content: center; }
.page-hero .hero-eyebrow::before { display: none; }
.page-hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); margin: 0 auto 14px; }
.page-hero p { margin: 0 auto; text-align: center; }

/* ---------- Sections ---------- */
section { padding: 96px 0; }
.section-tight { padding: 48px 0; }
.section-alt { background: var(--cream); }

.section-head { max-width: 720px; margin: 0 auto 56px; }
.section-head.center { text-align: center; }

.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--red);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.section-head.center .kicker { justify-content: center; }
.kicker::before { content: ""; width: 30px; height: 1.5px; background: var(--red); }
.section-head.center .kicker::before { display: none; }

.section-head h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  color: var(--green);
  margin: 0 0 14px;
  font-weight: 700;
  line-height: 1.2;
}
.section-head p { color: var(--muted); margin: 0; font-size: 1.02rem; }

.prose { font-size: 1.06rem; color: #333; max-width: 820px; margin: 0 auto; }
.prose + .prose { margin-top: 18px; }

/* ---------- Cards / Features ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); }

.card { background: var(--green); color: var(--white); padding: 44px 36px; position: relative; }
.card h3 { font-size: 1.3rem; margin: 0 0 16px; font-weight: 700; }
.card ul { list-style: none; margin: 0 0 22px; padding: 0; color: #cbd6cf; font-size: 0.94rem; }
.card ul li { padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.card ul li:last-child { border-bottom: none; }
.card-link { color: var(--white); font-weight: 600; font-size: 0.86rem; letter-spacing: .02em; border-bottom: 1.5px solid var(--red); padding-bottom: 3px; transition: opacity .2s; }
.card-link:hover { opacity: .75; }

.card-light { background: var(--paper); color: var(--ink); }
.card-light h3 { color: var(--green); }
.card-light ul { color: var(--muted); }
.card-light ul li { border-bottom: 1px solid var(--border); }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 4px; }

/* Small galleries (2-3 images): fixed equal columns instead of auto-fill, so they don't wrap unevenly */
.gallery.gallery-compact { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .gallery.gallery-compact { grid-template-columns: 1fr; } }

.gallery figure {
  margin: 0; position: relative; overflow: hidden; cursor: zoom-in; aspect-ratio: 4/3;
}
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.gallery figure:hover img { transform: scale(1.06); }
.gallery figure::after { content:""; position:absolute; inset:0; background:linear-gradient(0deg, rgba(11,31,24,.55), transparent 55%); opacity:0; transition:opacity .3s; }
.gallery figure:hover::after { opacity: 1; }

.gallery figcaption {
  position: absolute; bottom: 0; right: 0; left: 0; padding: 16px 18px;
  color: var(--white); font-size: 0.8rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s;
}
.gallery figure:hover figcaption { opacity: 1; transform: translateY(0); }

/* ---------- Tabs (tichnun page) ---------- */
.tabs { display: flex; gap: 0; justify-content: center; margin-bottom: 48px; border-bottom: 1.5px solid var(--border); }
.tab-btn {
  padding: 14px 30px; border: none; background: transparent; color: var(--muted);
  font-weight: 600; cursor: pointer; font-size: 0.98rem; font-family: var(--sans);
  border-bottom: 2px solid transparent; margin-bottom: -1.5px; transition: color .2s, border-color .2s;
}
.tab-btn.active { color: var(--green); border-color: var(--red); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.spec-block { background: var(--white); border: 1px solid var(--border); padding: 40px 44px; max-width: 880px; margin: 0 auto; }
.spec-block h4 { color: var(--green); font-size: 1.08rem; margin: 30px 0 12px; font-weight: 700; }
.spec-block h4:first-child { margin-top: 0; }
.spec-block p { margin: 0 0 10px; color: #333; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-info { display: flex; flex-direction: column; gap: 1px; background: var(--border); border: 1px solid var(--border); }

.contact-item { display: flex; gap: 18px; align-items: flex-start; background: var(--white); padding: 26px 28px; }
.contact-item .icon {
  width: 44px; height: 44px; border-radius: var(--radius); background: var(--green); color: var(--white);
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0;
}
.contact-item h4 { margin: 0 0 4px; color: var(--green); font-size: 0.98rem; font-family: var(--sans); font-weight: 700; }
.contact-item p, .contact-item a { margin: 0; color: var(--muted); font-size: 0.98rem; }
.contact-item a:hover { color: var(--red); }

.map-frame { overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.map-frame iframe { width: 100%; height: 100%; min-height: 380px; border: 0; }

.mailto-card { background: var(--green); color: var(--white); padding: 48px 40px; text-align: center; margin-top: 1px; }
.mailto-card h3 { margin: 0 0 12px; font-size: 1.5rem; }
.mailto-card p { color: #cbd6cf; margin: 0 0 26px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-dark); color: #b9c4bb; padding: 72px 0 28px; margin-top: 0; }

.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }

.footer-brand img { height: 56px; margin-bottom: 16px; border-radius: var(--radius); background: #fff; padding: 6px 10px; }
.footer-brand p { color: #90a096; font-size: 0.92rem; max-width: 320px; }

.site-footer h5 { color: var(--white); font-size: 0.82rem; margin: 0 0 20px; text-transform: uppercase; letter-spacing: .1em; font-family: var(--sans); font-weight: 700; }

.site-footer ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.site-footer a { color: #b9c4bb; font-size: 0.93rem; transition: color .2s; }
.site-footer a:hover { color: var(--red); }

.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 24px; text-align: center; font-size: 0.82rem; color: #6e7d73; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; background: rgba(8,17,13,.95); display: none; align-items: center; justify-content: center; z-index: 1000; padding: 30px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 88vh; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lightbox-close { position: absolute; top: 24px; left: 24px; background: rgba(255,255,255,.12); color: var(--white); border: none; width: 44px; height: 44px; border-radius: 50%; font-size: 1.4rem; cursor: pointer; }

/* ---------- Utilities ---------- */
.two-col { display: grid; grid-template-columns: .85fr 1.15fr; gap: 60px; align-items: center; }
.about-photo { overflow: hidden; box-shadow: var(--shadow); }

.text-blocks { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 56px; background: var(--border); border: 1px solid var(--border); }
.text-blocks .block { background: var(--white); padding: 32px 34px; font-size: 0.97rem; color: #333; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .cards-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .contact-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .text-blocks { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-stats .stat { border-inline-end: none; border-bottom: 1px solid rgba(255,255,255,.3); }
  .hero-stats .stat:nth-child(odd) { border-inline-end: 1px solid rgba(255,255,255,.3); }
  .hero-stats .stat:nth-last-child(-n+2) { border-bottom: none; }
}

@media (max-width: 1180px) {
  .main-nav a { padding: 10px 9px; font-size: 0.84rem; }
  .header-cta .btn { padding: 11px 18px; font-size: 0.82rem; }
}

@media (max-width: 1020px) {
  .main-nav { display: none; }
  .hamburger { display: flex; }
  .header-cta .btn-outline { display: none; }

  .main-nav.open {
    display: block; position: fixed; top: 70px; right: 0; left: 0;
    background: var(--white); box-shadow: 0 12px 24px rgba(0,0,0,.12); padding: 12px; z-index: 99;
  }
  .main-nav.open ul { flex-direction: column; gap: 2px; }
  .main-nav.open a { padding: 14px 16px; }
}

@media (max-width: 560px) {
  .brand-text span { display: none; }
  section { padding: 60px 0; }
  .hero { min-height: 78vh; }
  .hero-actions { margin-bottom: 40px; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
