/* ============================================================
   Устойчиви Енергийни Решения АД — самостоятелна тема (ses)
   Шрифт: Inter · Палитра: петрол/тийл с тюркоазен акцент
   ============================================================ */

:root {
  --brand:        #11333F;
  --brand-deep:   #0B2630;
  --accent:       #12A88C;
  --accent-light: #3FCBB0;
  --accent-soft:  #E3F5F0;
  --ink:          #29303B;
  --muted:        #67707E;
  --line:         #E4E8ED;
  --surface:      #FFFFFF;
  --soft:         #F4F7F7;
  --radius:       14px;
  --radius-sm:    10px;
  --maxw:         1180px;
  --shadow:       0 10px 30px rgba(11, 38, 48, 0.10);
  --shadow-sm:    0 4px 14px rgba(11, 38, 48, 0.07);
  --ease:         cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Inter', 'Segoe UI', system-ui, Arial, sans-serif;
  color: var(--ink);
  background: var(--surface);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

#main { flex: 1 0 auto; }

h1, h2, h3, h4 {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  color: var(--brand);
  line-height: 1.2;
  font-weight: 800;
  margin: 0 0 0.5em;
  letter-spacing: -0.018em;
}

h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

a { color: var(--accent); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--brand); }

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 24px;
}
.brand-logo { height: 46px; width: auto; }
.main-nav ul {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav a {
  display: block;
  padding: 10px 14px;
  color: var(--brand);
  font-weight: 600;
  font-size: 0.96rem;
  border-radius: 8px;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.main-nav a:hover { background: var(--soft); color: var(--brand); }
.main-nav a.active { color: var(--accent); }
.main-nav a.active::after {
  content: '';
  display: block;
  height: 2px;
  background: var(--accent);
  margin: 4px 14px 0;
  border-radius: 2px;
}

/* dropdown submenu */
.main-nav .has-sub { position: relative; }
.main-nav .caret { font-size: 0.7em; opacity: 0.7; }
.main-nav .submenu {
  position: absolute;
  top: 100%; left: 0;
  min-width: 230px;
  display: block;
  list-style: none;
  margin: 6px 0 0;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  opacity: 0; visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease), visibility 0.18s;
  z-index: 60;
}
.main-nav .has-sub:hover .submenu,
.main-nav .has-sub:focus-within .submenu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.main-nav .submenu a {
  display: block;
  white-space: nowrap;
  padding: 9px 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brand);
  border-radius: 8px;
}
.main-nav .submenu a:hover { background: var(--soft); color: var(--accent); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--brand);
  margin: 5px 0;
  border-radius: 2px;
  transition: 0.25s var(--ease);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 26px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.97rem;
  border-radius: 10px;
  border: 0;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}
.btn:hover { background: var(--accent-light); color: #fff; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(18, 168, 140, 0.30); }
.btn-ghost {
  background: transparent;
  color: var(--brand);
  border: 1.5px solid var(--line);
}
.btn-ghost:hover { background: var(--soft); color: var(--brand); border-color: var(--accent); box-shadow: none; }

/* ---------- Eyebrow / section ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: '';
  width: 26px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.section { padding: 84px 0; }
.section--soft { background: var(--soft); }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head p { color: var(--muted); font-size: 1.08rem; margin: 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  /* Слоеве отгоре надолу: затъмнение → снимка → резервен градиент (ако снимката липсва).
     За по-силно/по-слабо затъмнение променете алфа стойностите (0.94 / 0.80 / 0.50) на първия ред. */
  background:
    linear-gradient(105deg, rgba(11,38,48,0.94) 0%, rgba(15,46,56,0.80) 48%, rgba(17,51,63,0.50) 100%),
    url('../images/hero.jpg') center / cover no-repeat,
    linear-gradient(160deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: #fff;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  right: -120px;
  bottom: -160px;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, rgba(63, 203, 176, 0.24) 0%, rgba(63, 203, 176, 0) 70%);
  pointer-events: none;
}
.hero-inner { padding: 96px 0 104px; max-width: 760px; position: relative; z-index: 1; }
.hero .eyebrow { color: var(--accent-light); }
.hero .eyebrow::before { background: var(--accent-light); }
.hero h1 { color: #fff; margin-bottom: 22px; }
.hero p { color: rgba(255, 255, 255, 0.82); font-size: 1.15rem; max-width: 620px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .eyebrow::before { display: none; }

.mail-cta { font-size: 1.35rem; font-weight: 700; color: var(--accent); }
.mail-cta:hover { color: var(--brand); text-decoration: underline; }

/* ---------- Card grids ---------- */
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); margin: 0; font-size: 0.98rem; }
.card .icon-leaf {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  display: grid; place-items: center;
  margin-bottom: 18px;
}
.card .icon-leaf svg { width: 22px; height: 22px; }

/* news / project cards with link */
.entry-card { display: flex; flex-direction: column; }
.entry-card .meta { font-size: 0.82rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 10px; }
.entry-card .more { margin-top: 16px; font-weight: 700; font-size: 0.92rem; color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }
.entry-card:hover .more { gap: 10px; }

/* ---------- Investor documents ---------- */
.doc-list { display: flex; flex-direction: column; gap: 14px; }
.doc-group { margin-bottom: 38px; }
.doc-group > h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.doc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.doc-item:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.doc-item .doc-title { font-weight: 600; color: var(--brand); }
.doc-item .doc-date { font-size: 0.84rem; color: var(--muted); margin-top: 2px; }
.doc-download {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--brand);
}
.doc-download:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.doc-empty { color: var(--muted); font-style: italic; }

/* ---------- Investors / about info blocks ---------- */
.lead { font-size: 1.12rem; color: var(--ink); max-width: 760px; }
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }
.prose-medium { max-width: 980px; }
.prose-full { max-width: none; }
.prose-medium table, .prose-full table { display: block; max-width: 100%; overflow-x: auto; }

/* ---------- Team ---------- */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.team-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; text-align: center; }
.team-card .avatar {
  width: 84px; height: 84px; margin: 0 auto 18px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(150deg, var(--brand), var(--brand-deep));
  display: grid; place-items: center;
  color: var(--accent-light);
  font-weight: 800; font-size: 1.5rem;
}
.team-card .avatar img { width: 100%; height: 100%; object-fit: cover; }
.team-card h3 { font-size: 1.15rem; margin: 0 0 4px; }
.team-card .role { color: var(--accent); font-weight: 700; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }
.team-card p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 44px; align-items: start; }
.contact-info dl { margin: 0; }
.contact-info dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-top: 22px; font-weight: 700; }
.contact-info dd { margin: 4px 0 0; color: var(--brand); font-weight: 600; }
.contact-info dd a { color: var(--brand); }
.contact-info dd a:hover { color: var(--accent); }

form .form-field { margin-bottom: 18px; }
form label { display: block; font-weight: 600; font-size: 0.9rem; color: var(--brand); margin-bottom: 6px; }
form input, form textarea, form select {
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
form input:focus, form textarea:focus, form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(18, 168, 140, 0.16);
}
form textarea { min-height: 140px; resize: vertical; }

/* ---------- Page header band (interior pages) ---------- */
.page-band {
  background: linear-gradient(160deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: #fff;
  padding: 70px 0 60px;
  position: relative;
  overflow: hidden;
}
.page-band::after {
  content: '';
  position: absolute; right: -100px; top: -120px;
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(63, 203, 176, 0.20) 0%, rgba(63, 203, 176, 0) 70%);
}
.page-band h1 { color: #fff; margin: 0 0 10px; position: relative; }
.page-band p { color: rgba(255,255,255,0.8); margin: 0; max-width: 640px; position: relative; }
.page-band .eyebrow { color: var(--accent-light); }
.page-band .eyebrow::before { background: var(--accent-light); display: none; }

/* ---------- Footer ---------- */
.site-footer {
  flex-shrink: 0;
  background: var(--brand-deep);
  color: rgba(255, 255, 255, 0.72);
  padding: 56px 0 28px;
  font-size: 0.95rem;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 36px; }
.site-footer .brand-logo { height: 42px; margin-bottom: 16px; }
.site-footer h4 { color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: rgba(255, 255, 255, 0.72); }
.site-footer a:hover { color: var(--accent-light); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.85rem; color: rgba(255,255,255,0.55); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s var(--ease);
  }
  .main-nav.open { max-height: 80vh; overflow-y: auto; }
  .main-nav ul { flex-direction: column; padding: 12px 16px; gap: 2px; }
  .main-nav a.active::after { display: none; }
  .main-nav .submenu {
    position: static;
    opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: none; background: transparent;
    min-width: 0; margin: 0; padding: 0 0 6px 18px;
  }
  .main-nav .submenu a { color: var(--muted); padding: 8px 10px; }
  .main-nav .caret { display: none; }
  .grid-3, .grid-2, .team-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .section { padding: 60px 0; }
  .hero-inner { padding: 70px 0 76px; }
}

@media (max-width: 560px) {
  .doc-item { flex-direction: column; align-items: flex-start; }
  .doc-download { align-self: stretch; justify-content: center; }
}

/* ---------- Accessibility ---------- */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
