/*
Theme Name: FOR MAR
Theme URI: https://formar.hr
Author: Martin / OSMANLINE
Description: Prilagođena tema za FOR MAR — obrt za usluge čišćenja, Čazma.
Version: 1.3.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: formar
*/

:root {
  --blue: #1b3a9e;
  --blue-dark: #142f85;
  --blue-light: #eef2fb;
  --ink: #22262e;
  --muted: #5a6270;
  --bg: #ffffff;
  --bg-soft: #f5f7fc;
  --border: #e3e8f2;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(20, 47, 133, 0.08);
  --font: 'Open Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-script: 'Caveat', cursive;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
h1, h2, h3, h4 { color: var(--blue); line-height: 1.2; margin: 0 0 .5em; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 86px;
}
.site-logo img { height: 64px; width: auto; }
.main-nav { display: flex; align-items: center; gap: 38px; }
.main-nav a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--blue);
  padding: 8px 0;
  border-bottom: 3px solid transparent;
}
.main-nav a svg { width: 20px; height: 20px; }
.main-nav a:hover, .main-nav a.is-active { border-bottom-color: var(--blue); }
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
  color: var(--blue);
}
.nav-toggle svg { width: 28px; height: 28px; }

/* ---------- Hero ---------- */
.hero { background: var(--bg-soft); overflow: hidden; }
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 30px;
  align-items: stretch;
}
.hero-text { padding: 64px 0 48px; }
.hero-text h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .01em;
  margin-bottom: 34px;
  max-width: 420px;
}
.hero-media { position: relative; min-height: 320px; }
.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.hero-feats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 20px;
}
.hero-feat { text-align: left; max-width: 130px; }
.hero-feat svg { width: 40px; height: 40px; color: var(--blue); margin-bottom: 10px; }
.hero-feat strong { display: block; color: var(--blue); font-size: 15px; }
.hero-feat span { font-size: 13.5px; color: var(--ink); }

/* ---------- Section headings ---------- */
.section { padding: 64px 0; }
.section-title {
  text-align: center;
  font-size: 1.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
  margin-bottom: 8px;
}
.section-title::after {
  content: "";
  display: block;
  width: 34px;
  height: 4px;
  border-radius: 2px;
  background: var(--blue);
  margin: 10px auto 0;
}
.section-sub { text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto 30px; }

/* ---------- Services grid (naslovnica) ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-top: 38px;
}
.service-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 12px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.service-card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(20,47,133,.14); }
.service-card svg { width: 46px; height: 46px; color: var(--blue); margin: 0 auto 14px; }
.service-card h3 {
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  min-height: 3em;
  display: flex;
  align-items: center;
  justify-content: center;
}
.service-card img {
  border-radius: 10px;
  margin-top: auto;
  aspect-ratio: 8 / 7;
  object-fit: cover;
  width: 100%;
}
.img-ph {
  aspect-ratio: 8 / 7;
  width: 100%;
  margin-top: auto;
  border-radius: 10px;
  background: var(--blue-light);
  display: flex;
  align-items: center;
  justify-content: center;
}
.img-ph svg { width: 42px; height: 42px; color: var(--blue); opacity: .45; }
.service-row-media .img-ph--row {
  aspect-ratio: auto;
  height: 100%;
  min-height: 220px;
  border-radius: 0;
  margin: 0;
}

/* ---------- Blue band ---------- */
.band {
  background: var(--blue);
  color: #fff;
  padding: 40px 0;
}
.band .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.band-item { display: flex; gap: 14px; align-items: flex-start; }
.band-item svg { width: 40px; height: 40px; flex: none; }
.band-item strong {
  display: block;
  text-transform: uppercase;
  font-size: 14.5px;
  letter-spacing: .04em;
  margin-bottom: 4px;
}
.band-item p { margin: 0; font-size: 14px; opacity: .95; }

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 38px;
}
.gallery-grid img {
  border-radius: var(--radius);
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
  box-shadow: var(--shadow);
}

/* ---------- Footer CTA ---------- */
.footer-cta { background: var(--bg-soft); padding: 48px 0 42px; }
.footer-cta .container {
  display: grid;
  grid-template-columns: 300px 1.2fr 1fr;
  gap: 36px;
  align-items: center;
}
.footer-cta-media img { max-height: 230px; width: auto; }
.footer-cta h2 {
  font-size: 1.6rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.footer-script {
  font-family: var(--font-script);
  font-size: 1.9rem;
  color: var(--blue);
  font-weight: 700;
  margin: 0 0 12px;
}
.footer-cta p.lead { color: var(--ink); margin: 0 0 20px; max-width: 340px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 14px 26px;
  border-radius: 10px;
  border: 0;
  cursor: pointer;
  transition: background .15s ease;
}
.btn:hover { background: var(--blue-dark); color: #fff; }
.btn svg { width: 18px; height: 18px; }
.footer-contacts { display: flex; flex-direction: column; gap: 16px; }
.footer-contact { display: flex; align-items: center; gap: 14px; font-size: 16px; color: var(--ink); }
.footer-contact svg { width: 24px; height: 24px; color: var(--blue); flex: none; }
.footer-social { display: flex; gap: 14px; margin-top: 6px; }
.footer-social a {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.footer-social a:hover { background: var(--blue-dark); }
.footer-social svg { width: 22px; height: 22px; }

.site-footer-bar {
  background: var(--blue);
  color: #fff;
  text-align: center;
  font-size: 14px;
  padding: 14px 20px;
}

/* ---------- Inner pages ---------- */
.page-hero {
  background: var(--blue);
  color: #fff;
  padding: 54px 0;
  text-align: center;
}
.page-hero h1 {
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  text-transform: uppercase;
  margin: 0;
}
.page-hero p { margin: 10px auto 0; max-width: 620px; opacity: .95; }

/* Usluge page */
.service-rows { display: flex; flex-direction: column; gap: 26px; margin-top: 40px; }
.service-row {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.service-row:nth-child(even) { grid-template-columns: 1fr 320px; }
.service-row:nth-child(even) .service-row-media { order: 2; }
.service-row-media img { width: 100%; height: 100%; object-fit: cover; min-height: 220px; }
.service-row-body { padding: 28px 32px; display: flex; flex-direction: column; justify-content: center; }
.service-row-body h3 {
  display: flex; align-items: center; gap: 12px;
  font-size: 1.15rem; text-transform: uppercase; letter-spacing: .02em;
}
.service-row-body h3 svg { width: 34px; height: 34px; flex: none; }
.service-row-body p { margin: 0; color: var(--muted); }

/* Kontakt page */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  margin-top: 40px;
  align-items: start;
}
.contact-cards { display: flex; flex-direction: column; gap: 16px; }
.contact-card {
  display: flex; align-items: center; gap: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 22px;
}
.contact-card svg { width: 28px; height: 28px; color: var(--blue); flex: none; }
.contact-card strong { display: block; color: var(--blue); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.contact-card a, .contact-card span.val { color: var(--ink); font-size: 16px; }

.contact-form {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
}
.contact-form h3 { font-size: 1.2rem; text-transform: uppercase; }
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--ink); }
.form-field input, .form-field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
  font-size: 15px;
  background: var(--bg-soft);
}
.form-field input:focus, .form-field textarea:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
  background: #fff;
}
.form-notice {
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 18px;
  font-weight: 600;
}
.form-notice.ok { background: #e8f6ec; color: #1d6b34; border: 1px solid #bfe4cb; }
.form-notice.err { background: #fdecec; color: #a33030; border: 1px solid #f2c6c6; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* Generic page content */
.page-content { padding: 56px 0; }
.page-content .entry { max-width: 800px; margin: 0 auto; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }
  .band .container { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-cta .container { grid-template-columns: 1fr 1fr; }
  .footer-cta-media { display: none; }
}
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 10px 20px 16px;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 0; width: 100%; border-bottom: 1px solid var(--border); }
  .hero .container { grid-template-columns: 1fr; }
  .hero-media { min-height: 280px; margin: 0 -20px; }
  .hero-media img { position: relative; }
  .hero-text { padding: 40px 0 8px; }
  .hero-feats { grid-template-columns: repeat(2, 1fr); margin-bottom: 30px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .service-row, .service-row:nth-child(even) { grid-template-columns: 1fr; }
  .service-row:nth-child(even) .service-row-media { order: 0; }
  .service-row-media img { min-height: 180px; max-height: 240px; }
  .contact-layout { grid-template-columns: 1fr; }
  .footer-cta .container { grid-template-columns: 1fr; }
  .band .container { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .services-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .gallery-grid { grid-template-columns: 1fr; }
}
