/* ==========================================================================
   Balkan Electricians — pages.css
   Page-specific sections: hero, problem, CF band, guides, content prose
   ========================================================================== */

/* ---------- Hero ---------- */
.hero {
  background:
    linear-gradient(180deg, rgba(15, 27, 45, 0.92), rgba(15, 27, 45, 0.82)),
    var(--navy);
  color: var(--text-on-dark);
  padding-block: var(--space-8);
}

/* ---------- Premium electric atmosphere ---------- */
.hero--electric { position: relative; overflow: hidden; isolation: isolate; background: radial-gradient(circle at 78% 17%, rgba(57,139,255,.34), transparent 27%), radial-gradient(circle at 7% 90%, rgba(27,92,188,.30), transparent 31%), linear-gradient(120deg, #081526, #102B4A 58%, #0D213B); }
.hero--electric::before, .hero--electric::after { content: ""; position: absolute; pointer-events: none; z-index: -1; }
.hero--electric::before { width: 46rem; height: 46rem; right: -25rem; top: -25rem; border: 1px solid rgba(126,191,255,.20); border-radius: 50%; box-shadow: 0 0 0 4rem rgba(126,191,255,.035), 0 0 0 8rem rgba(126,191,255,.025); animation: electricPulse 6s ease-in-out infinite; }
.hero--electric::after { width: 75%; height: 2px; left: -10%; bottom: 15%; transform: rotate(-8deg); background: linear-gradient(90deg, transparent, rgba(111,192,255,.14), transparent); box-shadow: 0 0 22px rgba(90,174,255,.8); }
.hero__media--charged { position: relative; border: 1px solid rgba(138,196,255,.5); box-shadow: 0 24px 68px rgba(0,0,0,.34), 0 0 0 8px rgba(100,180,255,.055); }
.hero__media--charged::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(135deg, rgba(120,192,255,.18), transparent 32%, transparent 70%, rgba(22,90,170,.2)); mix-blend-mode: screen; }
.hero__media img { transition: transform 900ms cubic-bezier(.2,.8,.2,1); }
.hero__media:hover img { transform: scale(1.045); }
.hero__trust li { background: rgba(255,255,255,.065); padding: .45rem .65rem; border: 1px solid rgba(255,255,255,.10); border-radius: 999px; }

@keyframes electricPulse { 50% { transform: scale(1.07); opacity: .72; } }

.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-7);
  align-items: center;
}

.hero h1 {
  color: #fff;
  font-size: var(--fs-3xl);
  margin-bottom: var(--space-4);
}

.hero__lead {
  font-size: var(--fs-md);
  color: var(--text-on-dark);
  margin-bottom: var(--space-5);
  max-width: 46ch;
}

.hero__ctas {
  margin-bottom: var(--space-5);
}

.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: var(--fs-sm);
  color: var(--text-on-dark-muted);
  padding: 0;
  list-style: none;
}

.hero__trust li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
}

.hero__media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-dark);
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Compact hero for inner pages */
.hero--inner {
  padding-block: var(--space-7);
}

.hero--inner .hero__grid {
  grid-template-columns: 1fr;
}

/* Inner pages that DO have a hero image: two columns on DESKTOP only. Below
   1024px the base single-column rule + .hero__media{order:-1} take over, so the
   image sits on top on mobile (like the homepage). Scoped to min-width so it
   never beats the responsive collapse on small screens. */
@media (min-width: 1025px) {
  .hero--inner.hero--with-media .hero__grid {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
  }
}

.hero--inner h1 {
  font-size: var(--fs-2xl);
  max-width: 20ch;
}

.hero--with-media h1 {
  max-width: 18ch;
}

/* ---------- Problem section ---------- */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

.problem-item {
  position: relative;
  padding: var(--space-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--danger);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  background: linear-gradient(135deg, #fff, #FFF7F8);
}

.problem-item__icon { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 1rem; padding: .58rem; border-radius: 13px; background: linear-gradient(135deg, #FFE3E8, #FFF4F6); color: var(--danger); box-shadow: inset 0 0 0 1px rgba(220,76,91,.16), 0 8px 18px rgba(220,76,91,.12); }
.problem-item__icon svg { width: 100%; height: 100%; }
.problem-item h3 { max-width: 18ch; }

.problem-item h3 {
  font-size: var(--fs-md);
  margin-bottom: var(--space-2);
}

.problem-item p {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  margin: 0;
}

/* ---------- Candidate Force band ---------- */
.cf-band {
  background:
    radial-gradient(circle at 20% 20%, rgba(47, 128, 237, 0.25), transparent 55%),
    var(--navy);
  color: var(--text-on-dark);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(125,190,255,.24);
  border-radius: var(--radius-lg);
  padding: var(--space-7);
  text-align: center;
}

.cf-band::after { content: "⚡"; position: absolute; right: 6%; bottom: -1.55rem; font-size: 9rem; line-height: 1; color: rgba(128,194,255,.08); transform: rotate(-13deg); }

.cf-band h2 {
  color: #fff;
}

.cf-band p {
  max-width: 54ch;
  margin-inline: auto;
  color: var(--text-on-dark);
}

.cf-band .btn-row {
  justify-content: center;
  margin-top: var(--space-5);
}

/* ---------- Country grid ---------- */
.country-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

.country-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.country-item:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(47,128,237,.45); }
.country-item__flag { flex: 0 0 auto; width: 42px; height: 32px; border-radius: 6px; object-fit: cover; background: #F3F7FB; box-shadow: inset 0 0 0 1px rgba(15,27,45,.10), 0 1px 2px rgba(15,27,45,.14); }

.country-item__name {
  font-weight: 600;
  color: var(--navy);
}

.country-item__meta {
  font-size: var(--fs-xs);
  color: var(--text-secondary);
}

/* ---------- Content prose (guides, legal, long text) ---------- */
.prose {
  max-width: 72ch;
}

.prose h2 {
  margin-top: var(--space-7);
  padding-top: var(--space-2);
}

.prose h3 {
  margin-top: var(--space-5);
}

.prose > p,
.prose > ul,
.prose > ol {
  color: var(--text-primary);
}

.prose ul li,
.prose ol li {
  margin-bottom: var(--space-2);
}

/* Two-column split (e.g. Responsibilities | Skills on specialization pages).
   Collapses to a single column on tablet/mobile. */
.split-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-7);
  align-items: start;
}

@media (max-width: 768px) {
  .split-2 {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  padding: var(--space-4) 0;
  border-block: 1px solid var(--border);
  margin-bottom: var(--space-6);
}

.article-meta strong {
  color: var(--navy);
}

/* Content layout with sidebar (guides / specialization) */
.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: var(--space-7);
  align-items: start;
}

.sidebar {
  position: sticky;
  top: calc(var(--header-h) + var(--space-4));
  display: grid;
  gap: var(--space-5);
}

.sidebar__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-5);
}

.sidebar__card h3 {
  font-size: var(--fs-md);
}

.sidebar__links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar__links li {
  margin-bottom: var(--space-2);
}

.sidebar__links a {
  font-size: var(--fs-sm);
}

/* ---------- Related links ---------- */
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

.related-link {
  display: block;
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-weight: 600;
  color: var(--navy);
}

.will-reveal { opacity: 0; transform: translateY(18px); transition: opacity 620ms cubic-bezier(.2,.8,.2,1) var(--reveal-delay, 0ms), transform 620ms cubic-bezier(.2,.8,.2,1) var(--reveal-delay, 0ms); }
.will-reveal.is-revealed { opacity: 1; transform: none; }

.related-link:hover {
  border-color: var(--primary-blue);
  color: var(--primary-blue);
  text-decoration: none;
}

.related-link span {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 400;
  color: var(--text-secondary);
  margin-top: var(--space-1);
}

/* ---------- Language gateway (root) ---------- */
.gateway {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--space-6);
  background:
    linear-gradient(180deg, rgba(15, 27, 45, 0.95), rgba(15, 27, 45, 0.88)),
    var(--navy);
  color: var(--text-on-dark);
  text-align: center;
}

.gateway__inner {
  max-width: 520px;
}

.gateway h1 {
  color: #fff;
  margin-bottom: var(--space-3);
}

.gateway__brand {
  font-size: var(--fs-xl);
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--space-6);
}

.gateway__choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.gateway__choice {
  display: block;
  padding: var(--space-6) var(--space-5);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  color: #fff;
  font-size: var(--fs-md);
  font-weight: 600;
}

.gateway__choice:hover {
  background: var(--primary-blue);
  border-color: var(--primary-blue);
  text-decoration: none;
}

.gateway__choice span {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 400;
  color: var(--text-on-dark-muted);
  margin-top: var(--space-1);
}

.gateway__choice:hover span {
  color: rgba(255, 255, 255, 0.85);
}

/* ---------- 404 ---------- */
.error-page {
  text-align: center;
  padding-block: var(--space-9);
}

.error-page__code {
  font-size: 5rem;
  font-weight: 800;
  color: var(--steel-blue);
  line-height: 1;
  margin-bottom: var(--space-3);
}

/* ---------- Editorial section system ---------- */
/* overflow-x: clip contains decorative ::before glows (e.g. .section--surface)
   so they never cause horizontal page overflow. `clip` (not hidden) does not
   create a scroll container, so sticky descendants keep working. */
.section { position: relative; overflow-x: clip; }
.section--surface { background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(242,247,253,.9)); border-block: 1px solid rgba(207,220,233,.58); }
.section--surface::before { content: ""; position: absolute; width: 26rem; height: 26rem; right: -17rem; top: -18rem; pointer-events: none; border-radius: 50%; background: radial-gradient(circle, rgba(85,163,255,.11), transparent 68%); }
.section__intro { position: relative; padding-left: 1.25rem; }
.section__intro::before { content: ""; position: absolute; left: 0; top: .15rem; bottom: .45rem; width: 3px; border-radius: 999px; background: linear-gradient(var(--primary-blue), var(--electric)); box-shadow: 0 0 14px rgba(47,128,237,.35); }
.section__intro h2 { font-size: clamp(1.7rem, 2.4vw, 2.45rem); letter-spacing: -.035em; max-width: 24ch; }
.section__intro .lead { max-width: 63ch; font-size: clamp(1rem, 1.25vw, 1.14rem); line-height: 1.7; }
.section__intro--center { padding-left: 0; }
.section__intro--center::before { left: 50%; top: auto; bottom: -.7rem; width: 62px; height: 3px; transform: translateX(-50%); }

/* ---------- Card collections ---------- */
.grid:has(.card) { align-items: stretch; }
.card { min-height: 100%; padding: 1.6rem; }
.card::before { content: ""; position: absolute; left: 1.6rem; right: 1.6rem; top: 0; height: 3px; border-radius: 0 0 9px 9px; background: linear-gradient(90deg, var(--primary-blue), var(--electric)); transform: scaleX(.22); transform-origin: left; transition: transform 420ms cubic-bezier(.2,.8,.2,1); }
.card:hover::before { transform: scaleX(1); }
.card__title { font-size: 1.16rem; letter-spacing: -.018em; }
.card__text { line-height: 1.7; }
.card__more { display: inline-flex; align-items: center; gap: .4rem; padding-top: .45rem; }
.card__more::after { content: ""; width: 17px; height: 1px; background: currentColor; transition: width var(--transition); }
.card:hover .card__more::after { width: 28px; }

/* Photography turns topic cards into editorial entry points instead of plain boxes. */
.card__visual { height: 154px; margin: -1.6rem -1.6rem 1.2rem; overflow: hidden; position: relative; background: var(--navy); }
.card__visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(8,23,42,.34), transparent 58%), linear-gradient(0deg, rgba(8,23,42,.26), transparent 48%); transition: opacity 420ms ease; }
.card__visual img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.86) contrast(1.07); transition: transform 760ms cubic-bezier(.2,.8,.2,1), filter 460ms ease; }
.card:has(.card__visual) .card__icon { position: absolute; z-index: 2; left: 1rem; top: 1rem; margin: 0; background: rgba(255,255,255,.93); box-shadow: 0 7px 18px rgba(4,18,34,.18); backdrop-filter: blur(9px); }
.card:hover .card__visual img { transform: scale(1.1); filter: saturate(1.12) contrast(1.04); }
.card:hover .card__visual::after { opacity: .55; }
.card.is-tilting { transition: transform 80ms linear, box-shadow 180ms ease; transform: translateY(-8px) rotateX(var(--card-rotate-x, 0deg)) rotateY(var(--card-rotate-y, 0deg)); box-shadow: 0 22px 42px rgba(16,47,81,.19); }

/* ---------- Long-form and split content ---------- */
.content-layout > div:last-child > img { border-radius: var(--radius-lg); box-shadow: 0 20px 46px rgba(15,27,45,.16); border: 5px solid rgba(255,255,255,.8); }
.prose { font-size: 1.04rem; line-height: 1.78; }
.prose h2 { border-top: 1px solid var(--border); }
.sidebar__card { box-shadow: var(--shadow); border: 1px solid rgba(183,201,219,.72); }
.sidebar__card::before { content: "⚡"; color: var(--primary-blue); display: inline-block; margin-bottom: .55rem; }

/* ---------- Process, FAQ and positive status ---------- */
.steps { gap: 0; position: relative; }
.steps::before { content: ""; position: absolute; left: 1.1rem; top: 1.1rem; bottom: 1.1rem; width: 2px; background: linear-gradient(var(--primary-blue), var(--success)); }
.steps__item { padding: 0 0 2.25rem 4.5rem; }
.steps__item:last-child { padding-bottom: 0; }
.steps__item::before { width: 2.25rem; height: 2.25rem; border: 4px solid #fff; box-shadow: 0 0 0 2px rgba(47,128,237,.2), 0 7px 16px rgba(47,128,237,.23); z-index: 1; }
.steps__title { margin-bottom: .35rem; }
.faq { border-radius: var(--radius-lg); box-shadow: var(--shadow); border-color: rgba(179,198,217,.75); }
.faq__item { transition: background var(--transition); }
.faq__item:has(.faq__question[aria-expanded="true"]) { background: linear-gradient(90deg, #F5FAFF, #FFF); }
.faq__question { padding: 1.2rem 1.45rem; }
.faq__question[aria-expanded="true"] { color: var(--primary-blue); }
.faq__answer-inner { line-height: 1.75; }
.checklist { padding: 1.15rem 1.25rem; border: 1px solid #CDECDD; border-radius: var(--radius); background: linear-gradient(135deg, #F5FFFA, #EAF9F1); }

/* ---------- Country system ---------- */
.country-grid { padding: .3rem; border-radius: var(--radius-lg); background: rgba(223,234,246,.5); }
.country-item { background: rgba(255,255,255,.94); }
.country-item__name { letter-spacing: -.012em; }

/* Region overview is text-led: country cards are the visual focus, not a side image. */
.region-showcase { display: block; max-width: 1040px; margin-inline: auto; }
.region-showcase > div { text-align: center; }
.region-showcase > div > p { max-width: 910px; margin-inline: auto; }
.region-showcase .country-grid { text-align: left; margin-top: 2rem; }

/* ---------- High-energy hero details ---------- */
.hero--electric .hero__grid { position: relative; }
.hero__ctas .btn--primary { position: relative; overflow: hidden; }
.hero__ctas .btn--primary::after { content: ""; position: absolute; width: 44px; height: 160%; top: -30%; left: -65px; transform: rotate(20deg); background: rgba(255,255,255,.28); animation: buttonSheen 5s ease-in-out infinite; }
@keyframes buttonSheen { 35%, 100% { left: 135%; } }
