/* ============================================================
   Solvis-ER Design System — shared/style.css
   Used by both SI/ and HR/ sites via ../shared/style.css
   Deployment note: copy to each site folder before independent
   domain deployment, then update <link> to ./style.css
   ============================================================ */

/* ── 1. Custom Properties (Design Tokens) ─────────────────── */
:root {
  --primary:       #1a237e;   /* deep indigo — nav, footer, H2 borders */
  --primary-light: #283593;   /* medium indigo — hero gradient end, H3 */
  --primary-mid:   #3949ab;   /* lighter indigo — hover states */
  --accent:        #00b4d8;   /* electric teal — card accents, CTA, active nav */
  --accent-dark:   #0096b7;   /* teal hover */
  --bg:            #f0f4f8;   /* page background */
  --surface:       #ffffff;   /* cards, nav, sections */
  --text:          #1a2332;   /* body text */
  --muted:         #5a6a7e;   /* subtitles, descriptions */
  --shadow-sm:     0 2px 8px rgba(0,0,0,0.08);
  --shadow-md:     0 4px 16px rgba(0,0,0,0.12);
  --radius:        8px;
  --radius-sm:     4px;
}

/* ── 2. Reset & Base ──────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ── 3. Typography ────────────────────────────────────────── */
h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
}

h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--accent);
  margin-bottom: 2rem;
}

h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary-light);
  margin-bottom: 0.5rem;
}

h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.4rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text);
}

p:last-child {
  margin-bottom: 0;
}

/* ── 4. Layout ────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 4rem 0;
}

.section--surface {
  background-color: var(--surface);
}

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

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.grid-5 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

/* ── 5. Navigation ────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: #4f65a1;
  box-shadow: var(--shadow-md);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-logo img {
  height: 80px;
  width: auto;
}

.site-logo span {
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav a {
  color: rgba(255,255,255,0.88);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-sm);
  transition: color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover {
  color: var(--accent);
  background: rgba(255,255,255,0.07);
}

.site-nav a.active {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
}

/* Hamburger toggle button */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.4rem;
  line-height: 1;
  transition: color 0.2s ease;
}

.nav-toggle:hover {
  color: var(--accent);
}

/* ── 6. Hero ──────────────────────────────────────────────── */
.hero {
  /* image injected randomly by shared/main.js; gradient is CSS fallback */
  background: linear-gradient(135deg, rgba(26,35,126,0.87), rgba(40,53,147,0.82));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  padding: 7rem 2rem 5rem;
  text-align: center;
}

.hero__subtitle {
  font-size: 1.25rem;
  color: rgba(255,255,255,0.85);
  margin: 1.25rem auto 2.5rem;
  max-width: 600px;
}

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

/* Reduced-height hero for inner pages */
.page-hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  padding: 4rem 2rem 3rem;
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 0.75rem;
}

.page-hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.85);
  margin: 0;
}

/* ── 7. Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn--primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  transform: translateY(-2px);
}

.btn--outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.7);
}

.btn--outline:hover {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
  transform: translateY(-2px);
}

/* ── 8. Cards ─────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.75rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card__icon {
  font-size: 2.2rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.card h3 {
  margin-bottom: 0.75rem;
}

.card p {
  color: var(--muted);
  font-size: 0.95rem;
}

.card__features {
  margin-top: 1rem;
  padding-left: 0;
}

.card__features li {
  padding: 0.3rem 0 0.3rem 1.5rem;
  position: relative;
  color: var(--muted);
  font-size: 0.9rem;
}

.card__features li::before {
  content: "›";
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 700;
  position: absolute;
  left: 0;
  top: 0.25rem;
}

/* Full-width card variant for services/platform detail pages */
.card--full {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.card--full .card__icon {
  font-size: 2.8rem;
  flex-shrink: 0;
  margin-bottom: 0;
  min-width: 3.5rem;
  text-align: center;
}

.card--full .card__body {
  flex: 1;
}

.card--full h2 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.card--full .card__features li {
  font-size: 0.95rem;
}

/* Small model sub-cards within a service card */
.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.model-card {
  background: var(--bg);
  border: 1px solid rgba(0,180,216,0.3);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
}

.model-card h4 {
  color: var(--accent);
  font-size: 0.9rem;
}

.model-card p {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
}

/* ── 9. CTA Banner ────────────────────────────────────────── */
.cta-banner {
  background: var(--primary);
  color: #fff;
  text-align: center;
  padding: 4rem 2rem;
}

.cta-banner h2 {
  color: #fff;
  border-bottom-color: var(--accent);
  display: inline-block;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.cta-banner p {
  color: rgba(255,255,255,0.82);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

/* ── 10. Market Badges ────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  margin-right: 0.4rem;
  margin-bottom: 0.4rem;
}

.badge--si {
  background: #3b82f6;  /* Slovenian blue */
}

.badge--hr {
  background: #ef4444;  /* Croatian red */
}

.market-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
}

.market-card h3 {
  margin-bottom: 1rem;
}

.market-participant {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--bg);
}

.market-participant:last-child {
  border-bottom: none;
}

.market-participant strong {
  color: var(--primary);
  font-size: 0.95rem;
  display: block;
}

.market-participant span {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ── 11. Contact Form ─────────────────────────────────────── */
.form-group {
  margin-bottom: 1.25rem;
}

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

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 2px solid #d1d9e0;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,180,216,0.15);
}

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

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-info h3 {
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
}

.contact-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.contact-item i {
  font-size: 1.2rem;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 0.15rem;
  width: 1.4rem;
  text-align: center;
}

.contact-item p {
  color: var(--muted);
  font-size: 0.95rem;
}

.contact-item strong {
  color: var(--primary);
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.form-note {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-top: 1.5rem;
  font-size: 0.88rem;
  color: #78350f;
}

/* ── 12. Footer ───────────────────────────────────────────── */
.site-footer {
  background: var(--primary);
  color: rgba(255,255,255,0.75);
  text-align: center;
  padding: 3rem 2rem;
}

.site-footer img {
  height: 80px;
  width: auto;
  margin: 0 auto 1rem;
  opacity: 0.9;
}

.site-footer p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.65);
  margin-bottom: 0.3rem;
}

.site-footer a {
  color: var(--accent);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* ── 13. Section Header ───────────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header p {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ── 14. About / Text Sections ────────────────────────────── */
.about-text {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.about-text p {
  font-size: 1.05rem;
  color: var(--muted);
}

/* ── 15. Platform Teaser ──────────────────────────────────── */
.platform-teaser {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.platform-teaser__text h2 {
  text-align: left;
}

.platform-teaser__text p {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.platform-teaser__modules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.module-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary-light);
}

.module-pill i {
  color: var(--accent);
  font-size: 1rem;
}

/* ── 16. Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
  /* Show hamburger */
  .nav-toggle {
    display: block;
  }

  /* Vertical mobile nav */
  .site-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--primary);
    padding: 1rem 0;
    box-shadow: var(--shadow-md);
    z-index: 199;
    gap: 0;
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    display: block;
    padding: 0.75rem 1.5rem;
    border-radius: 0;
    width: 100%;
  }

  .site-nav a.active {
    border-bottom: none;
    background: rgba(0,180,216,0.15);
    color: var(--accent);
  }

  /* Hero */
  .hero {
    padding: 5rem 1.5rem 4rem;
  }

  /* Grids → 1 column */
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  /* Full-width card → stacked */
  .card--full {
    flex-direction: column;
    gap: 1rem;
  }

  /* Contact & platform teaser → stacked */
  .contact-layout,
  .platform-teaser {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .platform-teaser__modules {
    grid-template-columns: 1fr 1fr;
  }

  h2 {
    font-size: 1.6rem;
  }
}

@media (max-width: 480px) {
  /* Hero buttons stack */
  .hero__actions {
    flex-direction: column;
    align-items: center;
  }

  .hero {
    padding: 4rem 1rem 3rem;
  }

  .container {
    padding: 0 1rem;
  }

  .section {
    padding: 3rem 0;
  }

  .platform-teaser__modules {
    grid-template-columns: 1fr;
  }

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