/* =========================================
   Viserv.fi – Main Stylesheet
   ========================================= */

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

:root {
  --primary:    #1a3c5e;
  --accent:     #e8a020;
  --accent-hover: #d4911a;
  --white:      #ffffff;
  --light:      #f4f6f9;
  --mid:        #dde3ea;
  --text:       #2d2d2d;
  --muted:      #6b7a8d;
  --radius:     6px;
  --shadow:     0 4px 20px rgba(0,0,0,0.10);
  --transition: 0.25s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
}

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

a { color: inherit; text-decoration: none; }

/* ─── COOKIE BANNER ─────────────────────── */
#cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(26,60,94,0.97);
  color: #fff;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  z-index: 9999;
  font-size: 0.9rem;
}
#cookie-banner a { color: var(--accent); text-decoration: underline; }
#cookie-banner button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.9rem;
  white-space: nowrap;
}
#cookie-banner button:hover { background: var(--accent-hover); }

/* ─── NAVIGATION ────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  box-shadow: 0 2px 12px rgba(0,0,0,0.09);
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo img {
  height: 44px;
  width: auto;
}

.nav-logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  transition: background var(--transition), color var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--light);
  color: var(--primary);
}

.nav-links .btn-login {
  background: var(--primary);
  color: var(--white);
  padding: 8px 20px;
  border-radius: var(--radius);
}

.nav-links .btn-login:hover {
  background: #254f7a;
  color: var(--white);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  background: none;
  border: none;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ─── HERO ──────────────────────────────── */
.hero {
  background: linear-gradient(rgba(26,60,94,0.82), rgba(26,60,94,0.82)),
              url('../img/titlebar.jpg') center center / cover no-repeat;
  color: var(--white);
  text-align: center;
  padding: 100px 24px 90px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 200"><path fill="rgba(255,255,255,0.03)" d="M0,96L80,112C160,128,320,160,480,154.7C640,149,800,107,960,96C1120,85,1280,107,1360,117.3L1440,128L1440,200L1360,200C1280,200,1120,200,960,200C800,200,640,200,480,200C320,200,160,200,80,200L0,200Z"/></svg>') no-repeat bottom center;
  background-size: cover;
}

.hero-content { position: relative; max-width: 820px; margin: 0 auto; }

.hero-eyebrow {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: 1.5px;
  line-height: 1.15;
  margin-bottom: 22px;
  text-transform: uppercase;
}

.hero p {
  font-size: 1.15rem;
  opacity: 0.88;
  max-width: 600px;
  margin: 0 auto 36px;
}

/* ─── BUTTONS ───────────────────────────── */
.btn {
  display: inline-block;
  padding: 13px 34px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  border: 2px solid transparent;
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.15); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}
.btn-outline:hover { background: rgba(255,255,255,0.12); border-color: var(--white); }

.btn-secondary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
.btn-secondary:hover { background: #254f7a; border-color: #254f7a; }

/* ─── SECTIONS ──────────────────────────── */
section { padding: 80px 24px; }

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
  margin-bottom: 18px;
}

.section-lead {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 680px;
  margin-bottom: 50px;
}

.text-center { text-align: center; }
.text-center .section-lead { margin-left: auto; margin-right: auto; }

/* ─── INTRO SECTION ─────────────────────── */
.intro { background: var(--white); }

.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.intro-text p {
  color: var(--muted);
  margin-bottom: 16px;
  font-size: 1.05rem;
}

.intro-visual {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.intro-visual img {
  width: 100%;
  height: 100%;
  max-height: 380px;
  object-fit: cover;
  display: block;
}

/* ─── BENEFITS ──────────────────────────── */
.benefits { background: var(--light); }

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.benefit-card {
  background: var(--white);
  border-radius: 12px;
  padding: 36px 30px;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  border-top: 4px solid var(--accent);
}

.benefit-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 35px rgba(0,0,0,0.13);
}

.benefit-icon {
  font-size: 2.4rem;
  margin-bottom: 18px;
}

.benefit-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}

.benefit-card p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* ─── CLIENTS ───────────────────────────── */
.clients { background: var(--white); padding: 60px 24px; }

.clients-label {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 32px;
}

.clients-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px 40px;
}

.client-logo {
  background: var(--light);
  border: 1px solid var(--mid);
  border-radius: 8px;
  padding: 14px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary);
  transition: background var(--transition), box-shadow var(--transition);
}

.client-logo:hover {
  background: var(--white);
  box-shadow: var(--shadow);
}

/* ─── CTA BANNER ────────────────────────── */
.cta-banner {
  background: linear-gradient(135deg, #1a3c5e 0%, #254f7a 100%);
  color: white;
  text-align: center;
  padding: 80px 24px;
}

.cta-banner h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.cta-banner p {
  font-size: 1.1rem;
  opacity: 0.85;
  margin-bottom: 36px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ─── SERVICE PAGE ──────────────────────── */
.service-hero {
  background: linear-gradient(rgba(26,60,94,0.80), rgba(26,60,94,0.80)),
              url('../img/titlebar.jpg') center center / cover no-repeat;
  color: white;
  padding: 80px 24px 70px;
  text-align: center;
}

.service-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 18px;
  letter-spacing: 1px;
}

.service-hero p {
  font-size: 1.1rem;
  opacity: 0.88;
  max-width: 640px;
  margin: 0 auto;
}

.service-overview {
  background: var(--light);
}

.service-pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.service-pillar {
  background: var(--white);
  border-radius: 10px;
  padding: 28px 22px;
  text-align: center;
  box-shadow: var(--shadow);
}

.service-pillar .pillar-icon { font-size: 2rem; margin-bottom: 12px; }
.service-pillar h4 { font-size: 1rem; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.service-pillar p { font-size: 0.9rem; color: var(--muted); }

.service-features { background: var(--white); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 40px;
}

.feature-card {
  background: var(--light);
  border-radius: 12px;
  padding: 32px 26px;
  border-left: 4px solid var(--primary);
}

.feature-card .feature-icon { font-size: 2rem; margin-bottom: 14px; }
.feature-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--primary); margin-bottom: 10px; }
.feature-card p { color: var(--muted); font-size: 0.93rem; line-height: 1.65; }

.advantages-list { background: var(--light); }

.adv-items {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.adv-items li {
  background: var(--white);
  border-radius: 8px;
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.adv-items li::before {
  content: '✓';
  background: var(--accent);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ─── COMPANY / YRITYS PAGE ─────────────── */
.company-hero {
  background: linear-gradient(rgba(26,60,94,0.80), rgba(26,60,94,0.80)),
              url('../img/titlebar.jpg') center center / cover no-repeat;
  color: white;
  text-align: center;
  padding: 80px 24px;
}

.company-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.company-hero p { font-size: 1.1rem; opacity: 0.85; }

.company-info { background: var(--light); }

.company-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.info-card {
  background: var(--white);
  border-radius: 12px;
  padding: 36px 32px;
  box-shadow: var(--shadow);
}

.info-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--mid);
}

.info-row {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--light);
  font-size: 0.95rem;
}

.info-row:last-child { border-bottom: none; }

.info-row .label {
  color: var(--muted);
  font-weight: 600;
  min-width: 120px;
  flex-shrink: 0;
}

.info-row .value { color: var(--text); }
.info-row .value a { color: var(--primary); text-decoration: underline; }
.info-row .value a:hover { color: var(--accent); }

/* ─── CONTACT FORM ──────────────────────── */
.contact-section { background: var(--white); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 50px;
  align-items: start;
}

.contact-info h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
}

.contact-info p {
  color: var(--muted);
  margin-bottom: 28px;
  font-size: 1rem;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 0.95rem;
}

.contact-detail .icon {
  background: var(--light);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact-detail a { color: var(--primary); }
.contact-detail a:hover { color: var(--accent); text-decoration: underline; }

/* Form */
.contact-form {
  background: var(--light);
  border-radius: 14px;
  padding: 40px 36px;
  box-shadow: var(--shadow);
}

.contact-form h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 28px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 7px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 11px 15px;
  border: 1px solid var(--mid);
  border-radius: var(--radius);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,60,94,0.08);
}

.form-group textarea { resize: vertical; min-height: 130px; }

.form-submit {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.form-message {
  font-size: 0.9rem;
  padding: 10px 16px;
  border-radius: var(--radius);
  display: none;
}

.form-message.success {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
  display: block;
}

.form-message.error {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ffcdd2;
  display: block;
}

/* ─── PRIVACY POLICY PAGE ───────────────── */
.policy-hero {
  background: linear-gradient(rgba(26,60,94,0.80), rgba(26,60,94,0.80)),
              url('../img/titlebar.jpg') center center / cover no-repeat;
  color: white;
  text-align: center;
  padding: 70px 24px;
}

.policy-hero h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.policy-hero p { opacity: 0.8; font-size: 0.95rem; }

.policy-content { background: var(--white); }

.policy-body {
  max-width: 780px;
  margin: 0 auto;
}

.policy-section {
  margin-bottom: 48px;
}

.policy-section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--mid);
}

.policy-section p,
.policy-section li {
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.75;
  margin-bottom: 12px;
}

.policy-section ul {
  padding-left: 24px;
  margin-bottom: 12px;
}

/* ─── FOOTER ────────────────────────────── */
footer {
  background: #12253a;
  color: rgba(255,255,255,0.75);
  padding: 56px 24px 24px;
}

.footer-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand .brand-name {
  font-size: 1.4rem;
  font-weight: 800;
  color: white;
  letter-spacing: 1px;
  margin-bottom: 14px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.65;
  max-width: 280px;
}

.footer-col h4 {
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.footer-col ul { list-style: none; }

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.65);
  transition: color var(--transition);
}

.footer-col ul li a:hover { color: var(--accent); }

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.45);
}

.footer-bottom a {
  color: rgba(255,255,255,0.55);
  transition: color var(--transition);
}
.footer-bottom a:hover { color: var(--accent); }

/* ─── PAGE HERO (inner pages generic) ───── */
.page-hero {
  background: linear-gradient(135deg, #1a3c5e 0%, #254f7a 100%);
  color: white;
  text-align: center;
  padding: 70px 24px;
}
.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ─── ALERT / FLASH MESSAGES ────────────── */
.alert {
  padding: 16px 22px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  font-size: 0.95rem;
  font-weight: 500;
}
.alert-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.alert-error   { background: #ffebee; color: #c62828; border: 1px solid #ffcdd2; }

/* ─── RESPONSIVE ────────────────────────── */
@media (max-width: 900px) {
  .benefits-grid,
  .features-grid { grid-template-columns: 1fr 1fr; }

  .intro-grid,
  .company-grid,
  .contact-grid,
  .footer-grid { grid-template-columns: 1fr; }

  .intro-visual { display: none; }
}

@media (max-width: 640px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 72px; left: 0; right: 0; background: white; padding: 16px; box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }

  .benefits-grid,
  .features-grid { grid-template-columns: 1fr; }

  .form-row { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; }

  section { padding: 55px 20px; }

  .hero { padding: 70px 20px 60px; }
}
