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

:root {
  --gd: #1a3a0f;
  --gm: #2d6a1a;
  --gl: #6aad3a;
  --cream: #f4f0e8;
  --light: #faf8f4;
  --text: #1c1c1c;
  --muted: #6a6a6a;
  --white: #fff;
  --err: #b94a48;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Lora', Georgia, serif;
  color: var(--text);
  overflow-x: hidden;
}

/* ── NAV ── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 1.2rem 2rem;
  transition: background .3s, box-shadow .3s;
}
#navbar.scrolled {
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0,0,0,.1);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-size: 1.5rem; font-weight: 700; letter-spacing: .1em;
  color: var(--white); text-decoration: none; transition: color .3s;
}
#navbar.scrolled .nav-logo { color: var(--gd); }

.nav-links { display: flex; gap: 2.5rem; }
.nav-links a {
  color: rgba(255,255,255,.9); text-decoration: none;
  font-size: .85rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; transition: color .3s;
}
#navbar.scrolled .nav-links a { color: var(--text); }
.nav-links a:hover { color: var(--gl); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--white); transition: background .3s;
}
#navbar.scrolled .nav-toggle span { background: var(--gd); }

.nav-contact {
  display: flex; flex-direction: row; align-items: center; gap: 1.25rem;
}
.nav-contact a {
  color: rgba(255,255,255,.8); text-decoration: none;
  font-size: .75rem; letter-spacing: .04em; transition: color .3s;
}
#navbar.scrolled .nav-contact a { color: var(--muted); }
.nav-contact a:hover { color: var(--gl); }

/* ── HERO ── */
#hero {
  height: 100vh; min-height: 580px;
  background: url('assets/image1.jpg') center/cover no-repeat;
  display: flex; align-items: center; justify-content: center; text-align: center;
  position: relative;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(10,28,6,.7) 0%, rgba(10,28,6,.5) 100%);
}
.hero-content { position: relative; z-index: 1; color: var(--white); padding: 2rem; }
.hero-content h1 {
  font-size: clamp(3.5rem, 10vw, 7rem); font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase; margin-bottom: 1rem;
}
.hero-tagline {
  font-size: clamp(.95rem, 2vw, 1.2rem); font-weight: 400; font-style: italic;
  opacity: .85; margin-bottom: 2.5rem; letter-spacing: .02em;
}
.hero-actions {
  display: flex; align-items: center; justify-content: center; gap: 2.5rem;
}
.btn {
  display: inline-block; padding: .85rem 2.5rem;
  border: 2px solid rgba(255,255,255,.8); color: var(--white);
  text-decoration: none; font-size: .8rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; transition: all .25s;
  white-space: nowrap;
}
.btn:hover { background: var(--white); color: var(--gd); border-color: var(--white); }

/* ── SHARED ── */
.container { max-width: 1100px; margin: 0 auto; padding: 5rem 2rem; }

h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 700;
  letter-spacing: .04em; margin-bottom: 3rem;
}
h2::after {
  content: ''; display: block; width: 48px; height: 3px;
  background: var(--gl); margin-top: .75rem;
}

/* ── ABOUT ── */
#o-nas { background: var(--light); }
.about-wrap {
  display: grid; grid-template-columns: 1fr 1fr; min-height: 480px;
}
.about-text {
  padding: 5rem 3rem 5rem 5rem;
  display: flex; flex-direction: column; justify-content: center;
  color: var(--text);
}
.about-text h2 { color: var(--text); }
.about-text p {
  font-size: 1rem; line-height: 1.85; opacity: .88; margin-bottom: 1.25rem;
}

/* ── SERVICES ── */
#storitve { background: #3a5c28; }
#storitve h2 { color: var(--white); }
#storitve h2::after { background: rgba(255,255,255,.3); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: 90px;
  gap: 1.25rem;
}
.service-card {
  background: var(--white);
  padding: 0 1.5rem 0 2rem;
  border-left: 4px solid var(--gl);
  border-radius: 2px;
  display: flex; align-items: center;
  transition: transform .2s, box-shadow .2s;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
}
.service-card h3 { font-size: .95rem; font-weight: 600; line-height: 1.55; }

.about-photo {
  background: url('assets/image2.jpg') center/cover no-repeat;
}

/* ── INQUIRY FORM ── */
#povprasevanje { background: var(--light); }
.inquiry-form { max-width: 680px; }

.field { display: flex; flex-direction: column; gap: .45rem; margin-bottom: 1.5rem; }

.field label {
  font-size: .75rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}

/* Required asterisk */
.required-mark { color: var(--err); margin-left: .15em; }

.field input, .field textarea {
  font-family: inherit; font-size: .95rem; color: var(--text);
  background: var(--white); border: 1.5px solid #d8d2c8;
  border-radius: 2px; padding: .75rem 1rem;
  transition: border-color .2s; outline: none; width: 100%;
  -webkit-appearance: none; /* fixes iOS rounded inputs */
}
.field input:focus, .field textarea:focus { border-color: var(--gm); }
.field textarea { resize: vertical; min-height: 120px; }

/* JS-driven invalid state (works on all browsers including old iOS Safari) */
.field input.invalid,
.field textarea.invalid {
  border-color: var(--err);
}
.field input.invalid:focus,
.field textarea.invalid:focus {
  border-color: var(--err);
  box-shadow: 0 0 0 3px rgba(185,74,72,.12);
}

/* Inline field error message */
.field-error {
  font-size: .78rem; color: var(--err);
  font-style: italic; margin-top: .1rem;
}

.btn-submit {
  background: var(--gd); color: var(--white); border: none;
  padding: .9rem 2.5rem; font-family: inherit; font-size: .85rem;
  font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  border-radius: 2px; cursor: pointer; transition: background .25s;
  -webkit-appearance: none;
}
.btn-submit:hover { background: var(--gm); }
.btn-submit:disabled { opacity: .6; cursor: not-allowed; }
.form-msg { margin-top: .85rem; font-size: .88rem; font-style: italic; }
.form-msg--ok  { color: var(--gm); }
.form-msg--err { color: var(--err); }

/* ── CONTACT ── */
#kontakt { background: var(--cream); }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.5rem;
}
.contact-item {
  background: var(--white); padding: 1.5rem 1.75rem;
  border-radius: 2px; display: flex; flex-direction: column; gap: .4rem;
}
.cl {
  font-size: .7rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
}
.cv { font-size: .95rem; font-weight: 500; color: var(--text); text-decoration: none; white-space: nowrap; }
a.cv:hover { color: var(--gm); }

/* ── FOOTER ── */
footer {
  background: #0f2108; color: rgba(255,255,255,.45);
  text-align: center; padding: 1.75rem 2rem;
  font-size: .8rem; letter-spacing: .06em;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-contact { display: none; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; background: var(--white);
    padding: 1rem 2rem 2rem; gap: 1.25rem;
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
  }
  .nav-links.open { display: flex; }
  .nav-links a { color: var(--text) !important; }

  .hero-content { padding: 1rem; }
  .hero-actions { flex-direction: column; gap: 1rem; }
  .btn { padding: .75rem 1.5rem; font-size: .75rem; }
  .about-wrap { grid-template-columns: 1fr; }
  .about-text { padding: 3rem 2rem; }
  .about-photo { min-height: 260px; }
  .services-grid { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 60px; }
}

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