/* main.css — lean layout, content, header & footer */

/* ========== Reset & layers ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }

#content-container { position: relative; z-index: 1; } /* sits above the canvas */
body { /* inherits theme from background.css */ }

/* ========== Page transition & loader (used by navigation.js) ========== */
.page-content {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .3s ease, transform .3s ease;
  position: relative;
}
.page-content.active { display: block !important; opacity: 1 !important; transform: translateY(0) !important; }
.loading-page { display: none; }
.loading-page.active { display: block !important; }
.loading { text-align: center; padding: 100px 20px; }
.loading::after {
  content: '';
  display: inline-block;
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #1FB8FB;
  animation: spin .6s linear infinite;
  margin-left: 8px; vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Ensure the certificate lightbox overlays everything */
.certificate-lightbox { position: fixed; z-index: 10; }

/* ========== Hero / base content ========== */
.content {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 120px 20px 40px;
  text-align: center;
}
h1 { font-size: 3.5rem; margin-bottom: 2rem; letter-spacing: 1px; text-transform: uppercase; }
p { font-size: 1.2rem; line-height: 1.7; margin-bottom: 2rem; opacity: 0.8; }
.buttons { display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; }
.button {
  display: inline-block;
  padding: 12px 30px;
  background: rgba(255,255,255,0.1);
  color: #fff; border: 2px solid #fff; border-radius: 30px;
  font-size: 1rem; font-weight: bold; text-decoration: none;
  transition: all .3s ease;
}
.button:hover { background: rgba(255,255,255,0.2); transform: translateY(-3px); }

/* ========== Sections & container ========== */
.section { padding: 64px 0; position: relative; z-index: 10; }
.container { width: min(1100px, 92%); margin: 0 auto; }
.section-title { font-size: 2rem; margin-bottom: 10px; }
.section-subtitle { color: rgba(255,255,255,.7); margin-bottom: 28px; }

/* Center the services heading/subtitle only */
.section-services .section-title,
.section-services .section-subtitle {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  max-width: 820px;
}

/* ========== Services grid ========== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
@media (max-width: 700px) {
  .services-grid { grid-template-columns: 1fr; }
}

.service-card {
  background: rgba(15,15,20,.75);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 22px;
  backdrop-filter: blur(10px);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.service-card:hover {
  transform: translateY(-2px);
  border-color: rgba(31,184,251,.5);
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
}

/* Icon + title on the same line */
.service-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.service-title-row h3 { margin: 0; font-size: 1.15rem; }
.service-icon { font-size: 28px; color: #1FB8FB; }
.service-blurb { color: rgba(255,255,255,.85); margin: 8px 0 10px; }
.service-points { margin: 0 0 14px; padding-left: 18px; }
.service-points li { margin: 6px 0; color: rgba(255,255,255,.75); }

/* Card-style buttons */
.btn { display: inline-block; padding: 10px 14px; border-radius: 8px; text-decoration: none; }
.btn-ghost { border: 1px solid rgba(31,184,251,.4); color: #1FB8FB; }
.btn-ghost:hover { background: rgba(31,184,251,.15); }
.btn-primary {
  background: linear-gradient(90deg, #FF3CAC, #784BA0, #2B86C5, #1FB8FB);
  color: #fff; border: none;
}
.btn-primary:hover { filter: brightness(1.08); }

/* ========== “Why choose me” card ========== */
.section-why .why-card {
  background: rgba(15,15,20,.85);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  padding: 26px;
  box-shadow: 0 12px 28px rgba(0,0,0,.35);
}
.section-why .why-intro,
.section-why .why-outro { color: rgba(255,255,255,.9); }
.section-why .ticks { padding-left: 18px; margin: 10px 0 18px; }
.section-why .ticks li { margin: 6px 0; }

/* ========== Footer (matches the header style) ========== */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 40px;
  color: #fff;
  background: rgba(10,10,14,0.55);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* CTA strip */
.footer-cta {
  padding: 36px 0 30px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-align: center;
}
.footer-cta-title { font-size: 1.6rem; margin-bottom: 8px; }
.footer-cta-sub { color: rgba(255,255,255,0.75); margin-bottom: 16px; }
.footer-cta-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* Footer buttons (scoped) */
.footer-btn {
  display: inline-block;
  padding: 11px 16px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.footer-btn.primary {
  background: linear-gradient(90deg, #2B86C5, #1FB8FB);
  color: #fff;
  border: 1px solid transparent;
  box-shadow: 0 8px 20px rgba(0,0,0,0.28);
}
.footer-btn.primary:hover { transform: translateY(-2px); }
.footer-btn.outline {
  background: rgba(31,184,251,0.12);
  border: 1px solid rgba(31,184,251,0.45);
  color: #1FB8FB;
}
.footer-btn.outline:hover { background: rgba(31,184,251,0.18); transform: translateY(-2px); }

/* Main footer grid */
.footer-main { padding: 28px 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 28px;
}
.footer-col { min-width: 0; }
.footer-heading {
  font-size: 1rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
  margin: 4px 0 12px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 8px;
  background: rgba(31,184,251,0.16);
  border: 1px solid rgba(31,184,251,0.45);
  color: #1FB8FB; font-weight: 800;
}
.brand-name { font-weight: 700; }
.footer-text { color: rgba(255,255,255,0.75); line-height: 1.6; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-links a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  display: inline-flex; align-items: center; gap: 8px;
}
.footer-links a:hover { color: #fff; border-bottom-color: rgba(31,184,251,0.35); }

/* Bottom strip */
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); background: rgba(10,10,14,0.5); }
.footer-bottom-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 0;
  color: rgba(255,255,255,0.8);
}
.footer-mini { display: flex; gap: 14px; flex-wrap: wrap; }
.footer-mini a {
  color: rgba(255,255,255,0.85); text-decoration: none; border-bottom: 1px solid transparent;
}
.footer-mini a:hover { color: #fff; border-bottom-color: rgba(31,184,251,0.35); }

/* ========== Header (compact, edge-aligned, one line) ========== */
/* Requires the `.site-header > .header-inner > (a.brand) + nav.main-nav` markup we set */
.site-header {
  position: relative;
  z-index: 3;
  width: 100%;
  padding: 0;
  background: rgba(10,10,14,0.55);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.site-header .header-inner {
  display: flex;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 8px 20px;          /* slim */
  gap: 16px;
  min-height: 48px;           /* one-line feel */
  line-height: 1;
}
.site-header .brand {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; color: #fff; line-height: 1;
}
.site-header .brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 7px;
  background: rgba(31,184,251,0.16);
  border: 1px solid rgba(31,184,251,0.45);
  color: #1FB8FB; font-weight: 800; font-size: .8rem;
}
.site-header .brand-name { font-weight: 700; letter-spacing: .4px; font-size: 1rem; }

/* Nav hard-right */
.site-header .main-nav { margin-left: auto; }
.site-header .main-nav ul {
  display: flex; list-style: none; margin: 0; padding: 0;
  gap: 18px; justify-content: flex-end;
}
.site-header .main-nav .nav-link {
  color: rgba(255,255,255,0.92);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 8px; border: 1px solid transparent;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
  line-height: 1;
}
.site-header .main-nav .nav-link:hover {
  background: rgba(31,184,251,0.12);
  border-color: rgba(31,184,251,0.35);
  color: #fff; transform: translateY(-1px);
}
.site-header .main-nav .nav-link.active {
  background: rgba(31,184,251,0.12);
  border-color: rgba(31,184,251,0.45);
  color: #1FB8FB;
}

/* ========== Responsive tweaks ========== */
@media (max-width: 900px) {
  .content { padding: 80px 20px 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .site-header .header-inner { flex-wrap: wrap; row-gap: 8px; }
  .site-header .brand-name { font-size: .95rem; }
  .site-header .main-nav { width: 100%; }
  .site-header .main-nav ul { justify-content: flex-end; }
}

@media (max-width: 620px) {
  /* Stack to one column (you already had this) */
  .footer-grid { grid-template-columns: 1fr; }

  /* Center the main footer content */
  .footer-col,
  .footer-text,
  .footer-heading { text-align: center; }

  .footer-brand { justify-content: center; }
  .footer-links { justify-items: center; }
  .footer-links a { justify-content: center; } /* inline-flex -> center label & icon */

  /* Bottom strip centered */
  .footer-bottom-inner {
    flex-direction: column;
    align-items: center;     /* center the © line */
    text-align: center;
  }
  .footer-mini {
    justify-content: center; /* center the mini nav */
    gap: 12px;
  }

  /* Keep CTA title a hair smaller */
  .footer-cta-title { font-size: 1.4rem; }
}


@media (max-width: 720px) {
  .site-header .main-nav ul { gap: 1px; }         /* tighten on mobile */
  .site-header .main-nav .nav-link { padding: 5px 10px; }
}

/* 1) Consistent vertical rhythm (mobile first) */
:root {
  --section-gap: clamp(28px, 7vw, 48px);
  --stack-gap:   clamp(12px, 4vw, 20px);
}


/* 3) Section spacing (use a common class on sections) */
.section { padding-block: var(--section-gap); } /* top & bottom */
.section .section-title { margin-bottom: var(--stack-gap); }

/* 4) Map to your markup */
.hero { padding-block-end: var(--section-gap); } /* space below “HV Vahe…” */
.content.contact-content { padding-block: var(--section-gap); }
.contact-title { margin-bottom: var(--stack-gap); }
.form-title { margin-block: var(--section-gap) var(--stack-gap); }

/* 5) Optional: larger screens can open spacing up */
@media (min-width: 640px) {
  :root { --section-gap: 64px; --stack-gap: 24px; }
}

/* ==== Mobile menu toggle (keeps desktop unchanged) ==== */

/* Toggle button (hidden on desktop) */
.site-header .nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 6px;
  margin-left: 8px;
  cursor: pointer;
  border-radius: 8px;
  transition: background .2s ease, transform .2s ease;
}
.site-header .nav-toggle:focus-visible { outline: 2px solid rgba(31,184,251,.6); }
.site-header .nav-toggle .bar {
  display: block;
  width: 20px; height: 2px;
  background: #fff;
  margin: 4px 0;
  border-radius: 1px;
}

/* ==== Mobile header layout (≤720px) ==== */
@media (max-width: 720px) {
  /* Keep the header slim and allow wrapping to a second row */
  .site-header .header-inner {
    flex-wrap: wrap;
    row-gap: 8px;
  }

  /* Show the toggle and push it to the FAR RIGHT of the first row */
  .site-header .nav-toggle {
    display: inline-block;
    order: 3;
    margin-left: auto;    /* <-- this is what pins it to the right edge */
  }

  /* Nav becomes a slide-down panel on its OWN row (below the toggle) */
  .site-header .main-nav {
    order: 4;             /* after the toggle */
    width: 100%;
    margin-left: 0;       /* remove desktop push-right */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    transition: max-height .25s ease, opacity .2s ease;
  }
  .site-header.open .main-nav {
    max-height: 260px;
    opacity: 1;
  }

  /* Center the dropdown links */
  .site-header .main-nav ul {
    display: flex;
    flex-direction: column;
    align-items: center;  /* <-- center each link */
    gap: 10px;
    padding: 10px 0 8px;
    margin: 0;
  }
  .site-header .main-nav .nav-link {
    padding: 10px 14px;
  }

  /* Slightly tighter brand text */
  .site-header .brand-name { font-size: .95rem; }
}

/* Desktop stays as you like it (nav hard-right, spaced out) */
@media (min-width: 721px) {
  .site-header .main-nav { margin-left: auto; }
  .site-header .main-nav ul { display: flex; gap: 18px; justify-content: flex-end; }
  .site-header .main-nav .nav-link { padding: 6px 14px; }
}

/* --- Mobile menu spacing + separators + no glow (≤720px) --- */
@media (max-width: 720px) {
  /* Center column; separators controlled on <li> */
  .site-header .main-nav ul {
    gap: 0;                /* separators handle spacing */
    padding: 6px 0 8px;
    align-items: center;   /* keep centered */
  }

  /* Constrain list width so separators don't run edge-to-edge */
  .site-header .main-nav li {
    width: 100%;
    max-width: 320px;      /* tweak to taste (280–360 works well) */
  }
  .site-header .main-nav li + li {
    border-top: 1px solid rgba(255,255,255,0.12); /* subtle separator */
  }

  /* Bigger tap targets + centered label */
  .site-header .main-nav .nav-link {
    display: block;
    text-align: center;
    padding: 12px 14px;    /* more vertical space */
    border-radius: 8px;
    border: 1px solid transparent;
    -webkit-tap-highlight-color: transparent;
  }

  /* No hover glow or lift on mobile */
  .site-header .main-nav .nav-link:hover {
    background: transparent;
    border-color: transparent;
    transform: none;
  }

  /* Remove the active glow; keep a subtle color cue */
  .site-header .main-nav .nav-link.active {
    background: transparent;
    border-color: transparent;
    color: #1FB8FB;        /* or use #fff if you prefer zero color change */
  }
}



/* Custom Dark Theme Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: rgba(31,184,251,0.3); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: rgba(31,184,251,0.6); }

/* Glitch Hover Effect for Brand */
.site-header .brand:hover .brand-mark {
  animation: glitch-skew 1.9s cubic-bezier(0.05, 0.06, 0.05, 0.14) both infinite;
  background: rgba(31,184,251,0.3);
  color: #fff;
  border-color: #1FB8FB;
  box-shadow: 0 0 10px rgba(31,184,251,0.5);
}

@keyframes glitch-skew {
  0% { transform: translate(0) }
  20% { transform: translate(-1px, 1px) }
  40% { transform: translate(-1px, -1px) }
  60% { transform: translate(1px, 1px) }
  80% { transform: translate(1px, -1px) }
  100% { transform: translate(0) }
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  will-change: opacity, transform;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}


.service-card {
  /* ... keep your existing properties ... */
  position: relative;
  overflow: hidden; /* Crucial for the spotlight to stay inside the card */
}

/* The Spotlight Gradient */
.service-card::before {
  content: "";
  position: absolute;
  top: var(--mouse-y, 0);
  left: var(--mouse-x, 0);
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(31,184,251,0.12) 0%, transparent 60%);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none; /* Let clicks pass through */
  z-index: 0;
}

.service-card:hover::before { opacity: 1; }

/* Ensure text and icons stay visually above the glow */
.service-card > * { position: relative; z-index: 1; }


/* Terminal Typing Effect */
.terminal-text {
  font-size: 2.2rem;
  margin-bottom: 2rem;
  text-transform: none;
  letter-spacing: 0;
}
.terminal-text .prompt {
  color: #1FB8FB;
  text-shadow: 0 0 8px rgba(31,184,251,0.4);
}
.terminal-text .cursor {
  color: #FF3CAC;
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}