/* =============================================================================
   هیدرولیک تک تهران — Premium RTL Design System
   style.css
   ============================================================================= */

/* =============================================================================
   1. CUSTOM PROPERTIES
   ============================================================================= */

:root {
  --clr-primary:  #1B3A5C;
  --clr-accent:   #1A8C6A;
  --clr-bg:       #F8FAFB;
  --clr-text:     #1A2535;
  --clr-muted:    #6B7B8D;
  --clr-cta:      #E07B2A;
  --clr-footer:   #0D2137;
  --clr-border:   #DDE3EB;
}

/* =============================================================================
   2. FONT FACES — Vazirmatn Variable (self-hosted)
   ============================================================================= */

/* Arabic / Persian subset */
@font-face {
  font-family: 'Vazirmatn';
  src: url('/assets/fonts/vazirmatn-arabic-wght-normal.woff2') format('woff2');
  unicode-range: U+0600-U+06FF, U+FB50-U+FDFF, U+FE70-U+FEFF;
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Latin subset */
@font-face {
  font-family: 'Vazirmatn';
  src: url('/assets/fonts/vazirmatn-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-U+024F, U+0259, U+1E00-U+1EFF, U+2020, U+20A0-U+20AB,
                 U+20AD-U+20CF, U+2113, U+2C60-U+2C7F, U+A720-U+A7FF;
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* =============================================================================
   3. RESET & BASE
   ============================================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  direction: rtl;
  font-family: 'Vazirmatn', system-ui, sans-serif;
  font-size: 16px;
  background-color: var(--clr-bg);
  color: var(--clr-text);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  line-height: 1.7;
  min-height: 100vh;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
}

/* =============================================================================
   4. TYPOGRAPHY SCALE
   ============================================================================= */

h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  line-height: 1.3;
}

h2 {
  font-size: clamp(1.2rem, 2.5vw, 1.75rem);
  line-height: 1.35;
}

h3 {
  font-size: clamp(1rem, 2vw, 1.35rem);
  line-height: 1.4;
}

p,
li {
  font-size: 1rem;
  line-height: 1.7;
}

small {
  font-size: 0.875rem;
}

/* =============================================================================
   5. LAYOUT HELPERS
   ============================================================================= */

.container {
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.section {
  padding-block: 4.5rem;
}

.section--grey {
  background-color: #EEF2F7;
}

/* =============================================================================
   6. UTILITY CLASSES
   ============================================================================= */

.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
}

.section-title {
  font-size: clamp(1.2rem, 2.5vw, 1.75rem);
  color: var(--clr-primary);
  font-weight: 800;
}

.section-link {
  color: var(--clr-accent);
  font-weight: 600;
  text-decoration: none;
}

.section-link:hover {
  text-decoration: underline;
}

/* Alert messages */
.alert-success {
  background-color: #E8F7F2;
  color: #0e6646;
  border: 1px solid #b3e2d0;
  border-radius: 8px;
  padding: 0.85rem 1.25rem;
  font-size: 0.95rem;
}

.alert-error {
  background-color: #FEF0F0;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 0.85rem 1.25rem;
  font-size: 0.95rem;
}

/* =============================================================================
   7. TOP BAR
   ============================================================================= */

.topbar {
  background-color: var(--clr-primary);
  height: 40px;
  display: flex;
  align-items: center;
}

.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.topbar__contact {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
}

.topbar__contact svg {
  color: var(--clr-accent);
  width: 16px;
  height: 16px;
}

.topbar__phone-link {
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.topbar__whatsapp {
  color: var(--clr-accent);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: filter 0.2s;
}

.topbar__whatsapp:hover {
  filter: brightness(1.2);
}

/* =============================================================================
   8. SITE HEADER
   ============================================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #ffffff;
  border-bottom: 1px solid var(--clr-border);
  box-shadow: 0 2px 12px rgba(27, 58, 92, 0.08);
  height: 72px;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.header__logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--clr-primary);
  text-decoration: none;
  white-space: nowrap;
}

.header__logo .logo-accent {
  color: var(--clr-accent);
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.header__nav a {
  color: var(--clr-text);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}

.header__nav a:hover {
  color: var(--clr-accent);
}

.header__cta {
  background-color: var(--clr-cta);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 0.5rem 1.25rem;
  font-family: 'Vazirmatn', system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: filter 0.2s;
  white-space: nowrap;
  display: inline-block;
}

.header__cta:hover {
  filter: brightness(1.1);
}

/* Mobile hamburger (hidden on desktop) */
.header__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
}

.header__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--clr-primary);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* =============================================================================
   9. MOBILE NAV DRAWER
   ============================================================================= */

.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  padding: 5rem 2rem 2rem;
  z-index: 999;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  box-shadow: 4px 0 24px rgba(27, 58, 92, 0.12);
  overflow-y: auto;
}

.mobile-nav.is-open {
  transform: translateX(0);
}

.mobile-nav__close {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--clr-primary);
  padding: 0.5rem;
  line-height: 0;
}

.mobile-nav > ul {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.mobile-nav a {
  color: var(--clr-text);
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  padding-block: 0.75rem;
  border-bottom: 1px solid var(--clr-border);
  transition: color 0.2s;
  display: block;
}

.mobile-nav a:hover {
  color: var(--clr-accent);
}

.mobile-nav-overlay,
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(13, 33, 55, 0.45);
  z-index: 998;
}

.mobile-nav-overlay.is-open,
.nav-overlay.is-open {
  display: block;
}

/* =============================================================================
   10. HERO
   ============================================================================= */

.hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  background-color: #0d2137;
  background-size: cover;
  background-position: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to left,
    rgba(13, 33, 55, 0.82) 0%,
    rgba(13, 33, 55, 0.55) 60%,
    transparent 100%
  );
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 580px;
}

.hero__title {
  color: #ffffff;
  font-weight: 900;
  line-height: 1.3;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.hero__subtitle {
  color: rgba(255, 255, 255, 0.85);
  margin-top: 1rem;
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero__benefits {
  list-style: none;
  margin-block: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.hero__benefits li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.95rem;
}

.hero__benefits li svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--clr-accent);
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Primary / Ghost buttons (hero) */
.btn-primary {
  background-color: var(--clr-accent);
  color: #ffffff;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-family: 'Vazirmatn', system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
  display: inline-block;
  white-space: nowrap;
}

.btn-primary:hover {
  background-color: #156f54;
}

.btn-ghost {
  background-color: transparent;
  color: #ffffff;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  border: 2px solid #ffffff;
  font-family: 'Vazirmatn', system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
  display: inline-block;
  white-space: nowrap;
}

.btn-ghost:hover {
  background-color: #ffffff;
  color: var(--clr-primary);
}

/* =============================================================================
   11. KPI STRIP
   ============================================================================= */

.kpi-strip {
  background-color: var(--clr-primary);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.kpi-item {
  padding: 2.5rem 2rem;
  text-align: center;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.kpi-item:last-child {
  border-left: none;
}

.kpi-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.6rem;
  color: var(--clr-accent);
  height: 32px;
}

.kpi-icon svg {
  width: 28px;
  height: 28px;
  color: var(--clr-accent);
}

.kpi-num {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  color: #ffffff;
  line-height: 1.1;
}

.kpi-label {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
  margin-top: 0.4rem;
}

/* =============================================================================
   12. CATEGORY GRID
   ============================================================================= */

.categories {
  background-color: #ffffff;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.cat-card {
  background-color: #ffffff;
  border: 1px solid var(--clr-border);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: box-shadow 0.25s, transform 0.25s;
  text-decoration: none;
  display: block;
}

.cat-card:hover {
  box-shadow: 0 8px 32px rgba(27, 58, 92, 0.12);
  transform: translateY(-3px);
}

.cat-card::after {
  content: '';
  display: block;
  height: 3px;
  background-color: var(--clr-accent);
  border-radius: 0 0 12px 12px;
  margin-top: 1.25rem;
}

.cat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background-color: #EEF7F3;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.cat-icon svg {
  color: var(--clr-accent);
  width: 28px;
  height: 28px;
}

.cat-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--clr-text);
}

/* =============================================================================
   13. PRODUCTS SECTION
   ============================================================================= */

.products-section {
  background-color: var(--clr-bg);
}

.prod-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.prod-card {
  background-color: #ffffff;
  border: 1px solid var(--clr-border);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.25s;
}

.prod-card:hover {
  box-shadow: 0 12px 40px rgba(27, 58, 92, 0.14);
  transform: translateY(-4px);
}

.prod-card__img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.prod-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s;
}

.prod-card:hover .prod-card__img img {
  transform: scale(1.04);
}

.prod-card__body {
  padding: 1.25rem;
}

.prod-card__name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--clr-text);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.prod-card__badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}

.badge--new {
  background-color: #E8F7F2;
  color: var(--clr-accent);
}

.badge--stock {
  background-color: #FFF3E8;
  color: var(--clr-cta);
}

.badge--cat {
  background-color: #EEF2F7;
  color: var(--clr-primary);
}

.prod-card__price {
  color: var(--clr-primary);
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.btn-inquiry {
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  background-color: var(--clr-accent);
  color: #ffffff;
  border: none;
  padding: 0.65rem;
  border-radius: 8px;
  font-family: 'Vazirmatn', system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-inquiry:hover {
  background-color: #156f54;
}

/* =============================================================================
   14. TRUST BAR
   ============================================================================= */

.trust-bar {
  background-color: #EEF2F7;
  padding-block: 2.5rem;
}

.trust-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.trust-logo {
  font-size: 1rem;
  font-weight: 700;
  color: var(--clr-muted);
  letter-spacing: 0.5px;
  opacity: 0.75;
  transition: opacity 0.2s;
}

.trust-logo:hover {
  opacity: 1;
}

/* =============================================================================
   15. INQUIRY FORM
   ============================================================================= */

.inquiry-section {
  background-color: var(--clr-bg);
}

.inquiry-card {
  max-width: 700px;
  margin-inline: auto;
  background-color: #ffffff;
  border-radius: 16px;
  padding: 3rem 2.5rem;
  box-shadow: 0 4px 32px rgba(27, 58, 92, 0.10);
}

.inquiry-card h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--clr-primary);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--clr-text);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  border: 1.5px solid var(--clr-border);
  border-radius: 8px;
  padding: 0.7rem 1rem;
  font-family: 'Vazirmatn', system-ui, sans-serif;
  font-size: 0.95rem;
  color: var(--clr-text);
  background-color: #FAFBFC;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--clr-accent);
  box-shadow: 0 0 0 3px rgba(26, 140, 106, 0.15);
}

.form-group textarea {
  min-height: 110px;
  resize: vertical;
}

.btn-submit {
  width: 100%;
  background-color: var(--clr-primary);
  color: #ffffff;
  border: none;
  padding: 0.85rem;
  border-radius: 8px;
  font-family: 'Vazirmatn', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-top: 0.5rem;
}

.btn-submit:hover {
  background-color: #142d4a;
}

/* =============================================================================
   16. SITE FOOTER
   ============================================================================= */

.site-footer {
  background-color: var(--clr-footer);
  padding-top: 4rem;
  color: rgba(255, 255, 255, 0.80);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 3rem;
}

.footer-col h4 {
  color: #ffffff;
  font-weight: 700;
  margin-bottom: 1.25rem;
  font-size: 1rem;
}

.footer-col p,
.footer-col li {
  font-size: 0.9rem;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.70);
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.70);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--clr-accent);
}

.footer-phone {
  direction: ltr;
  unicode-bidi: embed;
  color: rgba(255, 255, 255, 0.90);
  font-weight: 600;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  margin-top: 3rem;
  padding-block: 1.25rem;
}

.footer-bottom__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-bottom p {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.50);
}

.footer-credit {
  color: var(--clr-accent);
  font-size: 0.82rem;
  text-decoration: none;
}

/* =============================================================================
   17. RESPONSIVE — max-width 1024px
   ============================================================================= */

@media (max-width: 1024px) {
  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .prod-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .kpi-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Reset left-border on first item in second row */
  .kpi-item:nth-child(2) {
    border-left: none;
  }

  .kpi-item:nth-child(3) {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .kpi-item:nth-child(4) {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* =============================================================================
   18. RESPONSIVE — max-width 768px
   ============================================================================= */

@media (max-width: 768px) {
  /* Hide desktop nav, show hamburger */
  .header__nav {
    display: none;
  }

  .header__cta {
    display: none;
  }

  .header__toggle {
    display: flex;
  }

  /* Hero */
  .hero {
    min-height: 420px;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* =============================================================================
   19. RESPONSIVE — max-width 480px
   ============================================================================= */

@media (max-width: 480px) {
  .cat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .prod-grid {
    grid-template-columns: 1fr;
  }

  .kpi-strip {
    grid-template-columns: 1fr 1fr;
  }

  .hero__actions {
    flex-direction: column;
  }

  .hero__actions .btn-primary,
  .hero__actions .btn-ghost {
    text-align: center;
  }

  .inquiry-card {
    padding: 2rem 1.25rem;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}
