/* =========================================================
   Legion МАСЦО — Hydro/Chem Site — Main CSS
   Palette: terracotta #c8560a, wheat #d4a847, olive #6a8a2f, lime #8dc63f
   ========================================================= */

:root {
  --primary: #c8560a;
  --primary-dark: #a03f05;
  --primary-light: #e8753a;
  --accent: #8dc63f;
  --accent-dark: #6a8a2f;
  --gold: #d4a847;
  --gold-dark: #a3791e;
  --bg: #fafaf5;
  --bg-alt: #f2f5e8;
  --surface: #ffffff;
  --text: #2a2a1e;
  --text-muted: #5a5a40;
  --border: #d8dfc0;
  --shadow: rgba(100,90,30,0.12);
  --nav-bg: #2a2a1e;
  --nav-text: #f2f0e0;
  --footer-bg: #2a2a1e;
  --footer-text: #c8c8a0;
  --hero-overlay: rgba(42,42,30,0.45);
  --card-bg: #ffffff;
  --radius: 10px;
  --radius-lg: 18px;
  --transition: 0.22s ease;
  --font: 'Segoe UI', 'Arial', sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1e1e14;
    --bg-alt: #252518;
    --surface: #2a2a1e;
    --text: #e8e8cc;
    --text-muted: #a0a080;
    --border: #3a3a28;
    --shadow: rgba(0,0,0,0.35);
    --card-bg: #2e2e22;
    --nav-bg: #141410;
    --hero-overlay: rgba(10,10,5,0.6);
  }
}

[data-theme="dark"] {
  --bg: #1e1e14;
  --bg-alt: #252518;
  --surface: #2a2a1e;
  --text: #e8e8cc;
  --text-muted: #a0a080;
  --border: #3a3a28;
  --shadow: rgba(0,0,0,0.35);
  --card-bg: #2e2e22;
  --nav-bg: #141410;
  --hero-overlay: rgba(10,10,5,0.6);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.65; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-light); }
ul { list-style: none; }

/* CONTAINER */
.container { max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }

/* NAVBAR */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--nav-bg);
  display: flex; align-items: center; flex-wrap: wrap;
  padding: .55rem 1.25rem;
  box-shadow: 0 2px 12px var(--shadow);
}
.nav-brand {
  display: flex; align-items: center; gap: .5rem;
  font-size: 1.15rem; font-weight: 700; color: #f0ead0;
  flex: 1;
}
.nav-logo-icon { color: var(--primary-light); font-size: 1.4rem; }
.brand-name { letter-spacing: .03em; }

.nav-toggle {
  display: none; background: none; border: none;
  color: #f0ead0; font-size: 1.4rem; cursor: pointer; padding: .3rem;
}

.nav-links {
  display: flex; align-items: center; gap: .1rem; flex-wrap: wrap;
}
.nav-link {
  display: flex; align-items: center; gap: .35rem;
  color: #c8c8a0; padding: .5rem .75rem; border-radius: 6px;
  font-size: .88rem; transition: background var(--transition), color var(--transition);
}
.nav-link:hover, .nav-link.active {
  background: rgba(200,86,10,.18); color: var(--primary-light);
}
.nav-link i { font-size: .9rem; transition: color var(--transition); }
.nav-link:hover i { color: var(--primary-light); }

.lang-switcher { display: flex; gap: .3rem; margin-left: .5rem; }
.lang-btn {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  color: #c8c8a0; border-radius: 5px; padding: .25rem .55rem;
  font-size: .8rem; cursor: pointer; transition: background var(--transition), color var(--transition);
}
.lang-btn:hover, .lang-btn.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
}

/* HERO */
.hero { position: relative; min-height: 520px; display: flex; align-items: center; overflow: hidden; }
.hero-img-wrap { position: absolute; inset: 0; }
.hero-img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; background: var(--hero-overlay); }
.hero-content {
  position: relative; z-index: 2; max-width: 740px;
  padding: 4rem 1.5rem 4rem 2.5rem;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--primary); color: #fff;
  border-radius: 20px; padding: .35rem .9rem;
  font-size: .82rem; font-weight: 600; margin-bottom: 1rem;
  text-transform: uppercase; letter-spacing: .05em;
}
.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.6rem); font-weight: 800;
  color: #f5f0d0; line-height: 1.22; margin-bottom: 1rem;
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
}
.hero-sub {
  font-size: 1.05rem; color: #e0dcc0;
  max-width: 580px; margin-bottom: 1.5rem;
  text-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.5rem; border-radius: var(--radius);
  font-size: .95rem; font-weight: 600; cursor: pointer;
  transition: all var(--transition); border: 2px solid transparent;
  text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-secondary { background: transparent; color: #f0ead0; border-color: #f0ead0; }
.btn-secondary:hover { background: rgba(240,234,208,.15); color: #fff; }
.btn-sm { padding: .45rem 1rem; font-size: .85rem; }

/* SECTIONS */
.section { padding: 4rem 0; }
.section-alt { background: var(--bg-alt); }
.section-title {
  font-size: clamp(1.3rem, 3vw, 1.9rem); font-weight: 700;
  color: var(--text); margin-bottom: 2.5rem; text-align: center;
  display: flex; align-items: center; justify-content: center; gap: .6rem;
}
.section-title i { color: var(--primary); font-size: 1.3em; }

/* FEATURES GRID */
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem;
}
.feature-card {
  background: var(--card-bg); border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem; border: 1px solid var(--border);
  box-shadow: 0 3px 14px var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 8px 28px var(--shadow); }
.feature-icon {
  width: 54px; height: 54px; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--gold));
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem; color: #fff; font-size: 1.5rem;
  transition: background var(--transition);
}
.feature-card:hover .feature-icon { background: linear-gradient(135deg, var(--accent-dark), var(--accent)); }
.feature-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .6rem; color: var(--text); }
.feature-card p { font-size: .9rem; color: var(--text-muted); line-height: 1.55; }

/* TWO COL */
.two-col {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center;
}
.two-col-reverse { direction: rtl; }
.two-col-reverse > * { direction: ltr; }
.col-text h2 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); font-weight: 800; margin-bottom: 1rem; }
.col-img img { border-radius: var(--radius-lg); box-shadow: 0 8px 30px var(--shadow); }

/* CHECK LIST */
.check-list { display: flex; flex-direction: column; gap: .75rem; margin-top: .5rem; }
.check-list li { display: flex; align-items: flex-start; gap: .65rem; font-size: .93rem; color: var(--text-muted); }
.check-list i { color: var(--accent-dark); font-size: 1.1rem; margin-top: .1rem; flex-shrink: 0; transition: color var(--transition); }
.check-list li:hover i { color: var(--primary); }

/* QUOTE */
.quote-section { background: linear-gradient(135deg, var(--primary), var(--gold-dark)); padding: 2.5rem 0; }
.expert-quote {
  max-width: 860px; margin: 0 auto; text-align: center;
  position: relative; padding: 0 2rem;
}
.expert-quote i.fa-quote-left { font-size: 2.5rem; color: rgba(255,255,255,.35); display: block; margin-bottom: .75rem; }
.expert-quote p { font-size: 1.05rem; color: #fff; font-style: italic; line-height: 1.65; }

/* SCENARIO CARDS */
.scenario-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.scenario-card {
  background: var(--card-bg); border-radius: var(--radius-lg);
  padding: 1.5rem; border-left: 5px solid;
  box-shadow: 0 3px 14px var(--shadow);
  display: flex; flex-direction: column; gap: .75rem;
  transition: transform var(--transition);
}
.scenario-card:hover { transform: translateY(-3px); }
.card-hydro { border-color: #3a8cbf; }
.card-chem { border-color: var(--primary); }
.card-combined { border-color: var(--gold-dark); }
.scenario-header { display: flex; align-items: center; gap: .6rem; }
.scenario-header i { font-size: 1.4rem; }
.card-hydro .scenario-header i { color: #3a8cbf; }
.card-chem .scenario-header i { color: var(--primary); }
.card-combined .scenario-header i { color: var(--gold-dark); }
.scenario-header i:hover { transform: scale(1.15); transition: transform .2s; }
.scenario-header h3 { font-size: 1rem; font-weight: 700; }
.param-list { display: grid; grid-template-columns: 1fr 1fr; gap: .3rem .5rem; font-size: .85rem; }
.param-list dt { color: var(--text-muted); display: flex; align-items: center; gap: .3rem; font-weight: 600; }
.param-list dd { color: var(--text); font-weight: 500; }
.param-list i { color: var(--primary); font-size: .85rem; transition: color var(--transition); }
.param-list dt:hover i { color: var(--accent-dark); }

/* STATS */
.stats-section { background: var(--nav-bg); padding: 2.5rem 0; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.5rem; text-align: center; }
.stat-item { padding: 1.25rem; }
.stat-icon { font-size: 2rem; color: var(--primary-light); margin-bottom: .5rem; transition: color var(--transition); }
.stat-item:hover .stat-icon { color: var(--accent); }
.stat-value { font-size: 2.2rem; font-weight: 900; color: var(--gold); }
.stat-label { font-size: .85rem; color: #a0a080; margin-top: .25rem; }

/* FOOTER */
.site-footer { background: var(--footer-bg); color: var(--footer-text); padding: 3rem 0 0; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }
.footer-brand { display: flex; align-items: center; gap: .5rem; font-size: 1.15rem; font-weight: 700; color: #f0ead0; margin-bottom: .75rem; }
.footer-brand i { color: var(--primary-light); font-size: 1.4rem; }
.footer-col p, .footer-col address p { font-size: .88rem; line-height: 1.6; margin-bottom: .5rem; }
.footer-col h4 { font-size: .95rem; font-weight: 700; color: #d8d8b0; margin-bottom: .75rem; display: flex; align-items: center; gap: .4rem; }
.footer-links li { margin-bottom: .35rem; }
.footer-links a { color: var(--footer-text); font-size: .87rem; display: flex; align-items: center; gap: .4rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--primary-light); }
.footer-links i { font-size: .85rem; width: 16px; color: var(--gold-dark); transition: color var(--transition); }
.footer-links a:hover i { color: var(--primary-light); }
address { font-style: normal; }
address a { color: var(--footer-text); }
address a:hover { color: var(--primary-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 2rem; padding: 1rem 0; text-align: center; }
.footer-bottom p { font-size: .8rem; color: #707060; }

/* PAGE HEADER */
.page-header {
  background: linear-gradient(135deg, var(--primary), var(--gold-dark));
  padding: 3rem 1.5rem;
}
.page-header h1 { font-size: clamp(1.5rem, 4vw, 2.4rem); color: #fff; font-weight: 800; margin-bottom: .5rem; }
.page-header .breadcrumb { color: rgba(255,255,255,.75); font-size: .9rem; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.page-header .breadcrumb a { color: rgba(255,255,255,.9); }
.page-header .breadcrumb a:hover { color: #fff; }

/* CONTENT PROSE */
.content-prose { max-width: 860px; }
.content-prose h2 { font-size: 1.45rem; font-weight: 800; margin: 2rem 0 .75rem; color: var(--text); border-left: 4px solid var(--primary); padding-left: .75rem; }
.content-prose h3 { font-size: 1.1rem; font-weight: 700; margin: 1.5rem 0 .5rem; color: var(--text); }
.content-prose p { margin-bottom: 1rem; color: var(--text-muted); line-height: 1.7; }
.content-prose ul { margin: .75rem 0 1rem 1.5rem; list-style: disc; }
.content-prose li { margin-bottom: .4rem; color: var(--text-muted); font-size: .93rem; }

/* TABLE */
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.data-table th { background: var(--primary); color: #fff; padding: .75rem 1rem; text-align: left; font-weight: 600; }
.data-table td { padding: .6rem 1rem; border-bottom: 1px solid var(--border); color: var(--text-muted); }
.data-table tr:hover td { background: var(--bg-alt); }
.data-table code { background: var(--bg-alt); padding: .15rem .4rem; border-radius: 4px; font-family: monospace; font-size: .85rem; }

/* CODE BLOCK */
.code-block {
  background: #1e1e14; color: #d4d0b0; border-radius: var(--radius);
  padding: 1.25rem 1.5rem; overflow-x: auto;
  font-family: 'Consolas', 'Courier New', monospace; font-size: .87rem;
  line-height: 1.6; margin: 1rem 0;
  border: 1px solid rgba(255,255,255,.08);
}

/* INFO BOXES */
.info-box {
  border-radius: var(--radius); padding: 1rem 1.25rem;
  margin: 1rem 0; display: flex; gap: .75rem; align-items: flex-start;
}
.info-box i { font-size: 1.25rem; margin-top: .1rem; flex-shrink: 0; }
.info-box-green { background: rgba(141,198,63,.12); border: 1px solid rgba(141,198,63,.3); }
.info-box-green i { color: var(--accent-dark); }
.info-box-orange { background: rgba(200,86,10,.1); border: 1px solid rgba(200,86,10,.3); }
.info-box-orange i { color: var(--primary); }
.info-box p { font-size: .9rem; margin: 0; color: var(--text-muted); }

/* CONTACTS */
.contacts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.contact-card {
  background: var(--card-bg); border-radius: var(--radius-lg);
  padding: 1.75rem; border: 1px solid var(--border);
  box-shadow: 0 3px 14px var(--shadow);
}
.contact-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 1rem; color: var(--text); display: flex; align-items: center; gap: .5rem; }
.contact-card h3 i { color: var(--primary); transition: color var(--transition); }
.contact-card:hover h3 i { color: var(--accent-dark); }
.contact-row { display: flex; align-items: center; gap: .65rem; margin-bottom: .65rem; font-size: .93rem; color: var(--text-muted); }
.contact-row i { width: 20px; color: var(--gold-dark); font-size: 1rem; flex-shrink: 0; transition: color var(--transition); }
.contact-row:hover i { color: var(--primary); }
.contact-row a { color: var(--text-muted); }
.contact-row a:hover { color: var(--primary); }
.map-container { border-radius: var(--radius-lg); overflow: hidden; height: 340px; border: 1px solid var(--border); }
.map-container iframe { width: 100%; height: 100%; border: none; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .two-col, .two-col-reverse, .contacts-grid { grid-template-columns: 1fr; direction: ltr; }
  .two-col-reverse { direction: ltr; }
  .hero-content { padding: 2.5rem 1.25rem; }
}

@media (max-width: 700px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; flex-direction: column; align-items: flex-start;
    width: 100%; padding: .75rem 0;
    background: rgba(0,0,0,.15); border-radius: 0 0 var(--radius) var(--radius);
  }
  .nav-links.open { display: flex; }
  .navbar { flex-wrap: wrap; }
  .hero { min-height: 380px; }
  .hero h1 { font-size: 1.4rem; }
  .param-list { grid-template-columns: 1fr; }
}

/* HIDDEN LANG */
[lang="uk"], [lang="en"], [lang="pl"] { }
