@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800;900&display=swap');

:root {
  --navy: #071b2b;
  --orange: #f36b0a;
  --orange-hover: #e05e00;
  --ink: #182735;
  --muted: #647381;
  --line: #e4e9ed;
  --paper: #f3f6f7;
  --white: #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  color: var(--ink);
  background: var(--paper);
  font-family: Vazirmatn, Tahoma, sans-serif;
  line-height: 1.65;
  font-size: 14px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* HEADER */
.top {
  height: 60px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 clamp(14px, 2.8vw, 44px);
  border-bottom: 1px solid #edf0f2;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 6px rgba(0,0,0,.04);
}
.brand { order: 3; flex: 0 0 auto; }
.brand img { height: 42px; width: auto; object-fit: contain; }
.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(11px, 1.5vw, 24px);
  flex: 1;
  order: 2;
  font-size: 12.5px;
  font-weight: 700;
  color: #1d2730;
}
.nav a {
  height: 60px;
  display: flex;
  align-items: center;
  position: relative;
}
.nav a:hover, .nav a.active { color: var(--orange); }
.nav a.active::after {
  content: "";
  position: absolute;
  bottom: 0; right: 0; left: 0;
  height: 3px;
  background: var(--orange);
  border-radius: 3px 3px 0 0;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  order: 1;
  flex: 0 0 auto;
}
.call-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--orange);
  color: white;
  border-radius: 26px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 800;
  white-space: nowrap;
}
.call-btn:hover { background: var(--orange-hover); }
.call-label {
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.35;
  text-align: right;
}
.call-label small { display: block; font-size: 9.5px; opacity: .8; }

/* HERO - clean image + clean HTML overlay */
.hero {
  position: relative;
  width: 100%;
  height: 420px;
  background: var(--navy);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
  z-index: 1;
}
.hero-copy {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 42%;
  min-width: 300px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 28px 20px 12px;
  color: white;
  direction: rtl;
  text-align: right;
}
.hero-copy h1 {
  font-size: clamp(23px, 2.4vw, 31px);
  font-weight: 900;
  line-height: 1.4;
  margin-bottom: 12px;
  color: #fff;
}
.hero-copy h1 em {
  font-style: normal;
  color: #ff6b0b;
}
.hero-copy > p {
  font-size: 13px;
  line-height: 1.8;
  color: #cfd7df;
  margin-bottom: 18px;
  max-width: 95%;
}
.benefits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  margin-bottom: 22px;
}
.benefit-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #e4ebf2;
}
.b-icon {
  width: 28px;
  height: 28px;
  background: rgba(255,255,255,.12);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 20px;
  border-radius: 26px;
  font-size: 12.5px;
  font-weight: 800;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
}
.btn.orange {
  background: var(--orange);
  color: white;
}
.btn.orange:hover { background: var(--orange-hover); }
.btn.ghost {
  background: transparent;
  color: white;
  border-color: rgba(255,255,255,.45);
}
.btn.ghost:hover {
  background: rgba(255,255,255,.1);
  border-color: white;
}
.btn.wide { width: 100%; }

/* SERVICES */
.services-showcase {
  padding: 32px clamp(14px, 2.8vw, 44px) 14px;
  background: var(--paper);
}
.home-service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 12px;
}
.home-service-card {
  background: white;
  border-radius: 13px;
  overflow: hidden;
  box-shadow: 0 3px 16px rgba(0,0,0,.055);
  transition: transform .25s, box-shadow .25s;
}
.home-service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 26px rgba(0,0,0,.09);
}
.service-image {
  display: block;
  height: 160px;
  overflow: hidden;
  background: #f5f5f5;
}
.service-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform .4s;
}
.home-service-card:hover .service-image img { transform: scale(1.05); }
.service-card-copy { padding: 14px 14px 16px; }
.service-card-copy h3 {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 5px;
  color: var(--ink);
}
.service-card-copy p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 10px;
  min-height: 38px;
}
.more {
  font-size: 12px;
  font-weight: 700;
  color: var(--orange);
}

/* STATS */
.stats {
  background: var(--navy);
  color: white;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 24px clamp(14px, 2.8vw, 44px);
  gap: 10px;
}
.stat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}
.stat-icon { font-size: 24px; opacity: .9; }
.stat-item b {
  display: block;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.2;
}
.stat-item span {
  font-size: 12px;
  opacity: .8;
}

/* PROJECTS */






.pair-item figcaption.before { background: #e74c3c; }
.pair-item figcaption.after { background: #27ae60; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  max-width: 1220px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 4px;
  background: transparent;
  position: relative;
  z-index: 2;
}
.section-head h2 {
  margin: 0;
  background: transparent;
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 3px;
}
.section-head p {
  font-size: 12.5px;
  color: var(--muted);
}
.all-projects {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--orange);
  border: 1.5px solid var(--orange);
  padding: 7px 15px;
  border-radius: 20px;
  transition: all .2s;
}
.all-projects:hover {
  background: var(--orange);
  color: white;
}
.project-slider {
  position: relative;
  max-width: 1220px;
  margin: 0 auto;
  overflow: hidden;
  clear: both;
}
.project-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 11px;
  overflow: hidden;
}
.project-thumb {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  height: 130px;
  background: #f5f5f5;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  isolation: isolate;
  contain: layout paint;
}
.project-thumb img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  border-radius: 12px;
  z-index: 1;
}
.project-thumb figcaption {
  position: absolute;
  bottom: 7px;
  right: 7px;
  z-index: 2;
  padding: 2px 10px;
  border-radius: 11px;
  font-size: 10.5px;
  font-weight: 800;
  color: white;
}
.project-thumb figcaption.before { background: #e74c3c; }
.project-thumb figcaption.after { background: #27ae60; }
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: white;
  border: 1px solid var(--line);
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
  font-size: 18px;
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slider-btn:hover {
  background: var(--orange);
  color: white;
  border-color: var(--orange);
}
.slider-btn.prev { left: -12px; }
.slider-btn.next { right: -12px; }

/* LOWER */
.lower {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 32px clamp(14px, 2.8vw, 44px) 52px;
  max-width: 1220px;
  margin: 0 auto;
}
.video-card {
  background: var(--navy);
  border-radius: 14px;
  overflow: hidden;
  color: white;
  display: flex;
  flex-direction: column;
}
.video-visual {
  position: relative;
  height: 200px;
  display: block;
}
.video-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .88;
}
.video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 58px;
  height: 58px;
  background: var(--orange);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  box-shadow: 0 4px 18px rgba(243,107,10,.4);
}
.video-copy { padding: 18px 20px 22px; }
.video-copy h2 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 7px;
}
.video-copy p {
  font-size: 12.5px;
  opacity: .85;
  margin-bottom: 12px;
  line-height: 1.7;
}
.form-card {
  background: white;
  border-radius: 14px;
  padding: 24px 22px;
  box-shadow: 0 3px 20px rgba(0,0,0,.055);
}
.form-card h2 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 5px;
}
.form-card > p {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 16px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.form-card label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
}
.form-card label.wide { margin-bottom: 14px; }
.form-card input,
.form-card select,
.form-card textarea {
  display: block;
  width: 100%;
  margin-top: 5px;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  font-family: inherit;
  font-size: 13px;
  background: #fafbfc;
}
.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus {
  outline: none;
  border-color: var(--orange);
  background: white;
}
.success {
  background: #e8f8ef;
  color: #1e7e4a;
  padding: 11px 14px;
  border-radius: 9px;
  margin-bottom: 14px;
  font-weight: 600;
  font-size: 12.5px;
}

/* FOOTER */
footer {
  background: var(--navy);
  color: rgba(255,255,255,.75);
  padding: 18px clamp(14px, 2.8vw, 44px);
}
.footer-inner {
  max-width: 1220px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 12.5px;
}
.footer-inner a { color: rgba(255,255,255,.9); }
.footer-inner a:hover { color: var(--orange); }

/* ADMIN */
.admin { max-width: 1100px; margin: 0 auto; padding: 28px 20px; }
.admin h1 { font-size: 22px; margin-bottom: 20px; }
.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.admin-stats > div {
  background: white;
  padding: 16px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.admin-stats b { display: block; font-size: 24px; color: var(--orange); }
.table-wrap { overflow-x: auto; background: white; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,.05); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 12px 14px; text-align: right; border-bottom: 1px solid var(--line); }
th { background: #f8fafb; font-weight: 700; }
.actions-cell { white-space: nowrap; }
.actions-cell form { display: inline; }
.danger {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
}
.crud-layout { display: grid; grid-template-columns: 340px 1fr; gap: 24px; }
.login {
  max-width: 400px;
  margin: 80px auto;
  background: white;
  padding: 36px 32px;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0,0,0,.08);
  text-align: center;
}
.login h1 { margin: 18px 0 22px; font-size: 22px; }
.login form { text-align: right; }
.login label { display: block; margin-bottom: 14px; font-weight: 600; font-size: 13px; }
.login input {
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
}
.login .btn { width: 100%; margin-top: 8px; }
.error { background: #fdecea; color: #c0392b; padding: 10px; border-radius: 8px; margin-bottom: 14px; font-size: 13px; }

/* ========== RESPONSIVE ========== */

/* Tablet */
@media (max-width: 1024px) {
  .nav { display: none; }
  .hero { height: 380px; }
  .hero-copy {
    width: 48%;
    min-width: 300px;
    padding: 24px 20px 22px 16px;
  }
  .hero-copy h1 { font-size: 24px; }
  .home-service-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 16px; padding: 22px 20px; }
  .project-strip { grid-template-columns: repeat(3, 1fr); }
  .lower { grid-template-columns: 1fr; gap: 20px; }
  .section-head { flex-wrap: wrap; gap: 12px; }
}

/* Mobile large */
@media (max-width: 768px) {
  .top { height: 56px; padding: 0 12px; }
  .call-label { display: none; }
  .brand img { height: 36px; }
  .call-btn { padding: 8px 12px; font-size: 12px; }

  .hero {
    height: auto;
    min-height: 340px;
    display: flex;
    flex-direction: column;
  }
  .hero-bg {
    position: relative;
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center top;
  }
  .hero-copy {
    position: relative;
    width: 100%;
    min-width: 0;
    right: auto;
    top: auto;
    bottom: auto;
    padding: 22px 18px 26px;
    background: var(--navy);
  }
  .hero-copy h1 { font-size: 22px; }
  .benefits { gap: 10px 12px; }
  .actions { gap: 8px; }
  .btn { padding: 10px 16px; font-size: 12px; }

  .services-showcase { padding: 24px 14px 12px; }
  .home-service-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .service-image { height: 120px; }
  .service-card-copy h3 { font-size: 14px; }
  .service-card-copy p { font-size: 11.5px; min-height: 34px; }

  .stats {
    grid-template-columns: 1fr 1fr;
    padding: 18px 14px;
    gap: 14px;
  }
  .stat-item b { font-size: 18px; }
  .stat-item span { font-size: 11px; }

  
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .section-head h2 { font-size: 18px; }
  .project-strip { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .project-thumb { height: 110px; }
  .slider-btn { display: none; }

  .lower {
    grid-template-columns: 1fr;
    padding: 24px 14px 40px;
    gap: 18px;
  }
  .video-visual { height: 180px; }
  .form-row { grid-template-columns: 1fr; }
  .form-card { padding: 20px 16px; }

  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
  .crud-layout { grid-template-columns: 1fr; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
}

/* Mobile small */
@media (max-width: 480px) {
  .top { height: 52px; padding: 0 10px; }
  .call-btn { font-size: 11px; padding: 7px 10px; }

  .hero-bg { height: 190px; }
  .hero-copy { padding: 18px 14px 22px; }
  .hero-copy h1 { font-size: 20px; }
  .hero-copy > p { font-size: 12px; }
  .benefits { grid-template-columns: 1fr 1fr; gap: 8px; }
  .benefit-item { font-size: 11.5px; }
  .b-icon { width: 24px; height: 24px; font-size: 12px; }

  .home-service-grid { grid-template-columns: 1fr; }
  .service-image { height: 140px; }

  .stats {
    grid-template-columns: 1fr 1fr;
    padding: 16px 10px;
  }
  .stat-icon { font-size: 20px; }
  .stat-item b { font-size: 16px; }

  .project-strip { grid-template-columns: 1fr 1fr; }
  .project-thumb { height: 100px; }

  .video-visual { height: 160px; }
  .form-card h2 { font-size: 15px; }
}



/* ===== SAMPLE WORKS (fresh) ===== */
.sample-works {
  background: #ffffff;
  padding: 36px clamp(16px, 3vw, 48px) 44px;
}
.works-header {
  max-width: 1100px;
  margin: 0 auto 22px;
  text-align: right;
}
.works-header h2 {
  font-size: 21px;
  font-weight: 900;
  color: #182735;
  margin: 0;
}
.works-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.work-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.work-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #111;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  aspect-ratio: 16 / 10;
  max-height: 280px;
}
.work-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #111;
}
.work-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b0b0b0;
  font-size: 13px;
  font-weight: 600;
  background: #f7f7f7;
}
.work-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  z-index: 2;
}
.work-badge.before { background: #e74c3c; }
.work-badge.after { background: #27ae60; }

@media (max-width: 700px) {
  .work-pair { grid-template-columns: 1fr; }
  .work-card { height: 170px; }
}

.work-pair-wrap {
  margin-bottom: 8px;
}
.work-pair-title {
  font-size: 15px;
  font-weight: 800;
  color: #182735;
  margin-bottom: 10px;
  padding-right: 4px;
}

/* ===== STANDARD LAYOUT ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
section {
  position: relative;
}
/* Better focus states for accessibility */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}
/* Consistent section spacing */
.services-showcase,
.projects,
.sample-works,
.lower {
  padding-top: 48px;
  padding-bottom: 48px;
}
@media (max-width: 768px) {
  .services-showcase,
  .projects,
  .sample-works,
  .lower {
    padding-top: 32px;
    padding-bottom: 32px;
  }
}

.phones-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.phones-wrap .call-btn {
  font-size: 12px;
  padding: 6px 12px;
}

.consult-dropdown {
  position: relative;
  display: inline-block;
}
.consult-phones {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
  padding: 8px 0;
  min-width: 160px;
  z-index: 20;
  margin-top: 6px;
}
.consult-dropdown.open .consult-phones {
  display: block;
}
.consult-phones span {
  display: block;
  padding: 8px 16px;
  color: #182735;
  font-size: 13px;
  font-weight: 600;
  cursor: default;
}
.consult-phones span:hover {
  background: #f5f5f5;
}

.consult-wrap { position: relative; display: inline-block; }
.consult-panel {
  display: none;
  position: fixed;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
  min-width: 240px;
  z-index: 99999;
  overflow: hidden;
  animation: slideDown .2s ease;
}
.consult-panel.show { display: block; }
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.consult-title {
  background: linear-gradient(135deg, #071b2b, #0d2a40);
  color: #fff;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}
.consult-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  transition: background .15s;
}
.consult-item:last-child { border-bottom: none; }
.consult-item:hover { background: #f8f9fa; }
.consult-num {
  width: 24px;
  height: 24px;
  background: var(--orange);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}
.consult-phone {
  font-size: 14px;
  font-weight: 600;
  color: #182735;
  letter-spacing: 0.5px;
}
.consult-empty {
  padding: 16px;
  text-align: center;
  color: #999;
  font-size: 13px;
}

/* R13: retired 1254px logo override; active 3x rules below remain unchanged. */

/* HAMID_LOGO_X3_DISPLAY_START */
.top { height: 144px !important; }
.brand img { height: 126px !important; width: auto !important; max-width: none !important; object-fit: contain !important; }
.nav a { height: 144px !important; }
@media (max-width: 768px) { .top { height: 168px !important; } .brand img { height: 108px !important; } .nav a { height: 168px !important; } }
@media (max-width: 480px) { .top { height: 156px !important; } .brand img { height: 108px !important; } .nav a { height: 156px !important; } }
/* HAMID_LOGO_X3_DISPLAY_END */

/* HAMID_UNIFIED_LAYOUT_R1_START */
/* Public site only. Do not change brand/logo sizing, text, colors, or site features. */
:root { --hamid-content-width: 1200px; --hamid-edge: clamp(16px, 3vw, 32px); --hamid-section-gap: 48px; }
html, body { max-width: 100%; overflow-x: clip; }
.services-showcase, .sample-works { padding-inline: var(--hamid-edge); padding-block: var(--hamid-section-gap); }
.home-service-grid, .works-header, .works-grid, .lower, .footer-inner {
  width: 100%; max-width: var(--hamid-content-width); margin-inline: auto;
}
.home-service-grid { padding: 0; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 20px; }
.home-service-card { min-width: 0; height: 100%; display: flex; flex-direction: column; }
.service-image { height: auto; aspect-ratio: 16 / 10; flex: none; }
.service-image img { object-fit: contain; }
.service-card-copy { display: flex; flex: 1; flex-direction: column; }
.service-card-copy .more { margin-top: auto; }
.stats { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; padding-inline: max(var(--hamid-edge),calc((100% - var(--hamid-content-width))/2)); }
.stat-item { min-width: 0; }
.works-grid { gap: 24px; }
.work-pair-wrap { min-width: 0; }
.work-pair { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.work-card { max-height: none; aspect-ratio: 16 / 10; }
.lower { box-sizing: content-box; width: auto; max-width: var(--hamid-content-width); grid-template-columns: repeat(2,minmax(0,1fr)); padding: var(--hamid-section-gap) var(--hamid-edge); gap: 24px; }
.lower > * { min-width: 0; }
.video-visual { height: auto; aspect-ratio: 16 / 10; }
.form-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
footer { padding-inline: var(--hamid-edge); }
@media (max-width: 1024px) {
  :root { --hamid-section-gap: 36px; }
  .home-service-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .lower { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 700px) {
  :root { --hamid-section-gap: 28px; --hamid-edge: 16px; }
  .home-service-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .home-service-card { min-width: 0; }
  .service-card-copy { padding: 12px; }
  .work-pair { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .work-card { height: auto; aspect-ratio: 16 / 10; }
  .form-row { grid-template-columns: minmax(0,1fr); }
  .lower { padding-inline: var(--hamid-edge); }
}
@media (max-width: 400px) { .home-service-grid { grid-template-columns: minmax(0,1fr); } }
/* HAMID_UNIFIED_LAYOUT_R1_END */
/* HAMID_COMPACT_LOWER_R2_START */
/* Public homepage only: compact video/order columns, without changing content. */
body:has(> main > .lower) .lower {
  width: min(100%, 960px) !important;
  max-width: 960px !important;
  box-sizing: border-box !important;
  margin-inline: auto !important;
  padding: 34px 20px 40px !important;
  display: grid !important;
  grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  gap: 20px !important;
  align-items: start !important;
}
body:has(> main > .lower) .lower > * { min-width: 0; }
body:has(> main > .lower) .video-card { align-self: start !important; height: auto !important; }
body:has(> main > .lower) .video-visual { height: 220px !important; aspect-ratio: auto !important; }
body:has(> main > .lower) .form-card { align-self: start !important; padding: 20px !important; }
/* Disable header's sticky behavior only on public pages with the image logo. */
body > header.top:has(.brand img[src*="izogam-sara-logo"]) { position: relative !important; top: auto !important; }
@media (max-width: 800px) {
  body:has(> main > .lower) .lower {
    max-width: 600px !important;
    grid-template-columns: minmax(0,1fr) !important;
    padding: 28px 16px !important;
    gap: 18px !important;
  }
  body:has(> main > .lower) .video-visual { height: 200px !important; }
}
@media (max-width: 480px) {
  body:has(> main > .lower) .form-row { grid-template-columns: minmax(0,1fr) !important; }
  body:has(> main > .lower) .form-card { padding: 16px !important; }
}
/* HAMID_COMPACT_LOWER_R2_END */
/* HAMID_PROJECT_CARDS_R3_START */
/* Only homepage sample-work cards: compact, consistent, no cropping. */
body:has(> main > .sample-works) .sample-works { padding-block: 28px 34px; }
body:has(> main > .sample-works) .works-header,
body:has(> main > .sample-works) .works-grid { width: min(100%, 920px); max-width: 920px; margin-inline: auto; }
body:has(> main > .sample-works) .works-grid { gap: 18px; }
body:has(> main > .sample-works) .work-pair-wrap { width: 100%; min-width: 0; margin-bottom: 0; }
body:has(> main > .sample-works) .work-pair { display:grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; align-items: start; }
body:has(> main > .sample-works) .work-card {
  width:100%; min-width:0; height:210px; max-height:210px; aspect-ratio:auto;
  overflow:hidden; border-radius:12px; background:#111;
}
body:has(> main > .sample-works) .work-card img {
  width:100%; height:100%; max-width:100%; max-height:100%; object-fit:contain; object-position:center;
}
@media (max-width:700px) {
  body:has(> main > .sample-works) .works-header,
  body:has(> main > .sample-works) .works-grid { max-width: 520px; }
  body:has(> main > .sample-works) .work-pair { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  body:has(> main > .sample-works) .work-card { height:150px; max-height:150px; }
  body:has(> main > .sample-works) .work-badge { font-size:10px; padding:3px 8px; right:6px; bottom:6px; }
}
@media (max-width:360px) {
  body:has(> main > .sample-works) .work-card { height:125px; max-height:125px; }
}
/* HAMID_PROJECT_CARDS_R3_END */

/* HAMID_LOWER_COMPACT_R4_START */
/* Only the public homepage video + request form are targeted. */
body .lower {
  width: calc(100% - 32px) !important;
  max-width: 920px !important;
  margin-inline: auto !important;
  padding: 18px 0 28px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  align-items: start !important;
  gap: 16px !important;
}
body .lower > .video-card,
body .lower > .form-card {
  min-width: 0 !important;
  height: auto !important;
  align-self: start !important;
  border-radius: 12px !important;
}
body .lower .video-visual { height: 195px !important; }
body .lower .video-copy { padding: 11px 14px 12px !important; }
body .lower .video-copy h2 { font-size: 14px !important; margin-bottom: 3px !important; }
body .lower .video-copy p { font-size: 11.5px !important; margin-bottom: 0 !important; line-height: 1.5 !important; }
body .lower .form-card { padding: 13px 15px 12px !important; }
body .lower .form-card h2 { font-size: 14px !important; margin-bottom: 3px !important; }
body .lower .form-card > p { font-size: 11px !important; margin-bottom: 8px !important; line-height: 1.5 !important; }
body .lower .form-row { gap: 8px !important; margin-bottom: 4px !important; }
body .lower .form-card label { font-size: 11px !important; margin-bottom: 4px !important; }
body .lower .form-card label.wide { margin-bottom: 7px !important; }
body .lower .form-card input,
body .lower .form-card select,
body .lower .form-card textarea { font-size: 12px !important; padding: 6px 9px !important; margin-top: 3px !important; border-radius: 7px !important; }
body .lower .form-card textarea { height: 51px !important; min-height: 51px !important; resize: vertical !important; }
body .lower .form-card .btn { padding: 7px 12px !important; font-size: 12px !important; }
@media (max-width: 768px) {
  body .lower { width: calc(100% - 28px) !important; grid-template-columns: minmax(0, 1fr) !important; gap: 14px !important; }
  body .lower .video-visual { height: 185px !important; }
  body .lower .form-card { padding: 15px 14px 13px !important; }
}
@media (max-width: 380px) {
  body .lower .form-row { grid-template-columns: minmax(0, 1fr) !important; }
  body .lower .video-visual { height: 170px !important; }
}
/* HAMID_LOWER_COMPACT_R4_END */


/* HAMID_LAYOUT_R7_START: project-pairs + 40/60 lower; homepage only */
body > main > .sample-works { padding: 30px clamp(14px,2.8vw,44px) 36px !important; }
body > main > .sample-works .works-header,
body > main > .sample-works .works-grid { width:100%;max-width:1200px !important;margin-inline:auto !important; }
body > main > .sample-works .works-grid {
 display:grid !important;grid-template-columns:repeat(4,minmax(0,1fr)) !important;
 gap:16px !important;align-items:start !important;
}
body > main > .sample-works .hamid-project-pair {
 min-width:0; background:#fff;border-radius:13px;border:1px solid #e4e9ed;
 box-shadow:0 3px 14px rgba(0,0,0,.065);padding:9px;overflow:hidden;
}
body > main > .sample-works .hamid-pair-photos {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;}
body > main > .sample-works .hamid-pair-photo {
 position:relative;min-width:0;aspect-ratio:4/3;margin:0;
 border-radius:8px;overflow:hidden;background:#f1f3f5;
}
body > main > .sample-works .hamid-pair-photo img {
 display:block;width:100%;height:100%;object-fit:contain;object-position:center;
 background:#f1f3f5;max-width:none;
}
body > main > .sample-works .hamid-pair-empty {height:100%;display:grid;place-items:center;font-size:10px;color:#687482;text-align:center;}
body > main > .sample-works .hamid-pair-photo .work-badge {bottom:4px;right:4px;padding:2px 6px;font-size:10px;border-radius:5px;}
body > main > .sample-works .hamid-pair-title {font-size:13px;font-weight:800;line-height:1.6;margin:9px 2px 1px;overflow-wrap:anywhere;}
body > main > .lower {
 width:calc(100% - 32px) !important;max-width:1200px !important;
 margin:0 auto !important;padding:24px 0 42px !important;
 display:grid !important;grid-template-columns:minmax(0,2fr) minmax(0,3fr) !important;
 gap:16px !important;align-items:stretch !important;
}
body > main > .lower > .video-card,
body > main > .lower > .form-card {min-width:0;width:100% !important;min-height:0; height:100% !important;max-height:none !important;margin:0 !important;box-sizing:border-box;}
body > main > .lower > .video-card {display:flex !important;flex-direction:column !important;}
body > main > .lower > .video-card > .video-visual {flex:1 1 0;min-height:170px;max-height:none !important;height:auto !important;overflow:hidden;}
body > main > .lower > .video-card > .video-visual img {object-fit:contain;background:#071b2b;}
body > main > .lower > .video-card > .video-copy {flex:0 0 auto;padding:13px 16px !important;}
body > main > .lower > .form-card {padding:18px 20px !important;overflow:visible !important;}
body > main > .lower > .form-card .form-row {gap:9px;margin-bottom:7px;}
body > main > .lower > .form-card label {margin-bottom:6px;}
body > main > .lower > .form-card input,
body > main > .lower > .form-card select,
body > main > .lower > .form-card textarea {padding:7px 10px;}
@media(max-width:900px) {
 body > main > .sample-works .works-grid {grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
 body > main > .lower {grid-template-columns:minmax(0,1fr) !important;}
 body > main > .lower > .video-card > .video-visual {min-height:190px;}
}
@media(max-width:500px) {
 body > main > .sample-works .works-grid {gap:9px !important;}
 body > main > .sample-works .hamid-project-pair {padding:5px;}
 body > main > .sample-works .hamid-pair-photos {gap:3px;}
 body > main > .sample-works .hamid-pair-title {font-size:11px;}
 body > main > .lower {width:calc(100% - 24px) !important;}
}
/* HAMID_LAYOUT_R7_END */

