/* =========================================================
   Energocert.cz — shared stylesheet
   ========================================================= */

:root {
  --color-primary: #3F7D20;
  --color-primary-dark: #1F3D14;
  --color-accent: #8CC63F;
  --color-text: #1F2A22;
  --color-muted: #5B6B60;
  --color-bg: #FFFFFF;
  --color-bg-alt: #F3F9EF;
  --color-border: #E1EBDA;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 3px rgba(15, 35, 15, 0.08);
  --shadow-md: 0 12px 32px rgba(15, 35, 15, 0.10);

  --container-width: 1160px;

  --font-base: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
ul, ol { padding: 0; margin: 0; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 0.6em; }
p { margin: 0 0 1em; line-height: 1.7; }
.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: 1.25rem;
}
section { padding-block: 4.5rem; }
@media (max-width: 640px) {
  section { padding-block: 2.75rem; }
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-primary-dark);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 100;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.6rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  white-space: normal;
  text-align: center;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-secondary {
  background: transparent;
  color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}
.btn-secondary:hover { background: var(--color-bg-alt); }
.btn-sm { padding: 0.55rem 1.1rem; font-size: 0.9rem; }
.btn-arrow { text-decoration: none; font-weight: 700; color: var(--color-primary-dark); }
.btn-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }
.btn svg { flex-shrink: 0; }

/* ---------- Header ---------- */
.site-header {
  background: var(--color-primary-dark);
  position: sticky;
  top: 0;
  z-index: 60;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 0.7rem;
}
.logo-link { display: flex; align-items: center; }
.logo-img { height: 54px; width: auto; }
@media (max-width: 640px) {
  .logo-img { height: 46px; }
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: #fff;
  border-radius: 2px;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}
.primary-nav ul {
  display: flex;
  gap: 1.85rem;
  list-style: none;
}
.primary-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.97rem;
  letter-spacing: 0.01em;
  opacity: 0.9;
  padding-block: 0.25rem;
}
.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 6px;
}
.nav-cta {
  background: var(--color-accent);
  color: var(--color-primary-dark);
  white-space: nowrap;
  padding: 0.65rem 1.35rem;
  font-size: 0.92rem;
  box-shadow: var(--shadow-sm);
}
.nav-cta:hover { background: #fff; color: var(--color-primary-dark); }

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-primary-dark);
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem 1.25rem 2rem;
    display: none;
  }
  .primary-nav.is-open { display: flex; }
  .primary-nav ul {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
  }
  .nav-cta { width: 100%; justify-content: center; }
}

/* ---------- Breadcrumb ---------- */
.breadcrumb { padding-block: 1.25rem 0; }
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--color-muted);
}
.breadcrumb li:not(:last-child)::after { content: "/"; margin-left: 0.4rem; }
.breadcrumb a { color: var(--color-primary-dark); text-decoration: none; font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--color-bg-alt) 0%, #ffffff 100%);
  padding-block: 4.5rem 3.5rem;
  text-align: center;
}
@media (max-width: 640px) {
  .hero { padding-block: 3rem 2.5rem; }
}
.hero-eyebrow {
  display: inline-block;
  background: #fff;
  border: 1px solid var(--color-border);
  color: var(--color-primary-dark);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-pill);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.hero h1 {
  font-size: clamp(1.9rem, 4.2vw, 3.1rem);
  font-weight: 800;
  max-width: 860px;
  margin-inline: auto;
  margin-bottom: 0.75em;
  letter-spacing: -0.01em;
}
.hero-lead {
  max-width: 700px;
  margin-inline: auto;
  color: var(--color-text);
  font-size: 1.15rem;
  line-height: 1.75;
}
.hero-lead-secondary {
  max-width: 640px;
  margin-inline: auto;
  color: var(--color-muted);
  font-size: 1rem;
  line-height: 1.7;
  margin-top: 0.75rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 2.25rem;
}

/* ---------- Page intro (subpages) ---------- */
.page-intro { padding-block: 1rem 1rem; }
.page-intro h1 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  font-weight: 800;
  max-width: 900px;
}
.page-intro .lead {
  max-width: 780px;
  color: var(--color-muted);
  font-size: 1.1rem;
}

/* ---------- Section headings ---------- */
.section-heading { text-align: center; max-width: 700px; margin: 0 auto 2.5rem; }
.section-heading h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; }
.section-heading p { color: var(--color-muted); }

/* ---------- Stats / trust band ---------- */
.stats-band {
  background: var(--color-primary-dark);
  color: #fff;
}
.stats-band .section-heading h2,
.stats-band .section-heading p { color: #fff; }
.stats-band .section-heading p { color: #cfe3c2; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.stat-card {
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.stat-number {
  display: block;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  font-weight: 800;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}
.stat-label { font-size: 0.95rem; color: #e6f2dc; line-height: 1.55; }

/* ---------- Card grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.75rem;
  align-items: stretch;
}
.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.85rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--color-accent); }
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  flex-shrink: 0;
}
.card h3 { font-size: 1.15rem; font-weight: 700; }
.card p { color: var(--color-muted); font-size: 0.95rem; line-height: 1.65; flex-grow: 1; }

/* ---------- Steps ---------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2rem;
}
.step {
  text-align: center;
  padding: 1.5rem;
}
.step-number {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  font-weight: 800;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  box-shadow: 0 0 0 6px var(--color-bg-alt), var(--shadow-md);
}
.step h3 { font-size: 1.1rem; font-weight: 700; }
.step p { color: var(--color-muted); font-size: 0.95rem; line-height: 1.65; }

/* ---------- Articles ---------- */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.article-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: 1.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  height: 100%;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.article-tag {
  display: inline-block;
  align-self: flex-start;
  background: var(--color-bg-alt);
  color: var(--color-primary-dark);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.article-card h3 { font-size: 1.1rem; font-weight: 700; }
.article-card p { color: var(--color-muted); font-size: 0.95rem; line-height: 1.65; flex-grow: 1; }
.article-meta {
  font-size: 0.8rem;
  color: var(--color-muted);
  border-top: 1px solid var(--color-border);
  padding-top: 0.75rem;
  margin-top: 0.25rem;
}

/* ---------- FAQ ---------- */
.faq-list { max-width: 800px; margin-inline: auto; display: flex; flex-direction: column; gap: 0.75rem; }
.faq-item {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.25rem 1.25rem;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  padding: 1rem 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--color-primary);
  flex-shrink: 0;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item .faq-answer { padding-bottom: 1.1rem; color: var(--color-muted); }
.faq-item .faq-answer p:last-child { margin-bottom: 0; }

/* ---------- Internal links list ---------- */
.related-links { background: var(--color-bg-alt); border-radius: var(--radius-md); padding: 1.75rem; }
.related-links h2 { font-size: 1.2rem; }
.related-links ul { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.related-links a { color: var(--color-primary-dark); font-weight: 700; text-decoration: none; }
.related-links a:hover { text-decoration: underline; }

/* ---------- Page meta / sources ---------- */
.page-meta-wrap { padding-block: 0.5rem; }
.page-meta {
  font-size: 0.9rem;
  color: var(--color-muted);
  border-top: 1px solid var(--color-border);
  padding-top: 1.25rem;
  margin-top: 1rem;
}
.sources { background: var(--color-bg-alt); }
.sources-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 2rem 2.25rem;
  box-shadow: var(--shadow-sm);
}
.sources h2 { font-size: 1.2rem; }
.sources ul { list-style: disc; padding-left: 1.2rem; color: var(--color-muted); font-size: 0.95rem; }
.sources li { margin-bottom: 0.5rem; line-height: 1.6; }
.sources a { color: var(--color-primary-dark); font-weight: 600; }
.sources-note { font-size: 0.85rem; color: var(--color-muted); margin-top: 1rem; margin-bottom: 0; line-height: 1.6; }

/* ---------- Summary callout (dark "ve zkratce" box) ---------- */
.summary-callout {
  background: var(--color-primary-dark);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 1.75rem;
  align-items: start;
}
.summary-callout h2 { color: #fff; margin-bottom: 0.5rem; }
.summary-callout > div > p { color: #cfe3c2; margin: 0; }
@media (max-width: 720px) {
  .summary-callout { grid-template-columns: 1fr; padding: 1.75rem; }
}
.check-list { list-style: none; display: grid; gap: 0.85rem; }
.check-list li { position: relative; padding-left: 2rem; color: #e6f2dc; }
.check-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
}

/* ---------- Info grid (small definition cards) ---------- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.info-card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.3rem;
}
.info-card strong { display: block; margin-bottom: 0.3rem; color: var(--color-primary-dark); }
.info-card span { color: var(--color-muted); font-size: 0.92rem; }

/* ---------- Content sections (subpages) ---------- */
.content-section h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-top: 0.5rem;
}
.content-section p, .content-section li { color: var(--color-text); }
.content-section ul, .content-section ol { padding-left: 1.3rem; margin-bottom: 1em; }
.content-section li { margin-bottom: 0.4em; }
.content-block + .content-block { margin-top: 2.5rem; }
.callout {
  background: var(--color-bg-alt);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  margin-block: 1.5rem;
}
.callout p:last-child { margin-bottom: 0; }

/* ---------- Notice banner (project status) ---------- */
.status-banner {
  background: #fff;
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.75rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.status-banner svg { flex-shrink: 0; color: var(--color-primary); margin-top: 0.15rem; }
.status-banner p { margin: 0; color: var(--color-muted); }
.status-banner strong { color: var(--color-text); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-primary-dark);
  color: #dfeed3;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.4fr;
  gap: 2.5rem;
  padding-block: 3.5rem 2.5rem;
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 2.25rem; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-logo { height: 46px; margin-bottom: 1.1rem; }
.footer-brand p { color: #b9d2a8; font-size: 0.9rem; line-height: 1.65; }
.site-footer h2 { font-size: 1rem; color: #fff; margin-bottom: 1.1rem; }
.footer-nav ul { list-style: none; display: flex; flex-direction: column; gap: 0.7rem; }
.footer-nav a { color: #cfe3c2; text-decoration: none; font-size: 0.92rem; }
.footer-nav a:hover { color: #fff; text-decoration: underline; }
.footer-contact p { color: #cfe3c2; font-size: 0.92rem; line-height: 1.65; }
.footer-contact a { color: var(--color-accent); font-weight: 700; text-decoration: none; }
.footer-contact a:hover { text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-block: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #a9c797;
}

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.bg-alt { background: var(--color-bg-alt); }
.mt-lg { margin-top: 2.5rem; }
