/* ============================================
   RAU-Service Oy – SI Group Design System
   Värimaailma: wearesi.se
   ============================================ */

:root {
  --color-primary: #006766;
  --color-primary-dark: #004d4d;
  --color-primary-light: #008585;
  --color-accent: #FF9934;
  --color-green-light: #9ACC99;
  --color-text: #333333;
  --color-text-light: #666666;
  --color-white: #FFFFFF;
  --color-bg: #FFFFFF;
  --color-bg-light: #f5f7f7;
  --color-bg-dark: rgba(0, 0, 0, 0.05);
  --color-footer-bg: #004040;

  --font-main: 'Montserrat', sans-serif;
  --font-weight-normal: 400;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  --header-height: 80px;
  --max-width: 1200px;
  --border-radius: 5px;
  --transition: all 0.3s ease;
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  font-family: var(--font-main);
  font-weight: var(--font-weight-normal);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, p, address, li, a {
  overflow-wrap: break-word;
  word-break: break-word;
  -webkit-hyphens: auto;
  hyphens: auto;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--color-primary-light);
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-extrabold);
  line-height: 1.2;
  color: var(--color-text);
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.6rem); }
h4 { font-size: 1.1rem; }

p {
  margin-bottom: 1rem;
}

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

/* ============================================
   Top Bar (SI Group linkki)
   ============================================ */
.top-bar {
  background: var(--color-primary-dark);
  padding: 8px 0;
}

.top-bar .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.top-bar a {
  color: var(--color-white);
  font-size: 0.8rem;
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.top-bar a:hover {
  color: var(--color-green-light);
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  position: absolute;
  right: 24px;
}

.top-bar .container {
  position: relative;
}

.lang-switch a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 3px;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.lang-switch a img {
  display: inline-block;
  vertical-align: middle;
  border-radius: 1px;
}

.lang-switch a:hover {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.15);
}

.lang-switch a.active {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.2);
}

.lang-switch span {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.7rem;
}

/* ============================================
   Header / Navigation
   ============================================ */
.header {
  background: var(--color-white);
  height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 64px;
  width: auto;
}

.logo-icon {
  width: 44px;
  height: 44px;
  background: var(--color-primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-weight: var(--font-weight-extrabold);
  font-size: 1.4rem;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-text .si-prefix {
  font-size: 0.7rem;
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.logo-text .company-name {
  font-size: 1.3rem;
  font-weight: var(--font-weight-extrabold);
  color: var(--color-text);
}

/* Desktop Navigation */
.nav-desktop {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-desktop a {
  color: var(--color-text);
  font-weight: var(--font-weight-semibold);
  font-size: 0.9rem;
  position: relative;
  padding: 4px 0;
}

.nav-desktop a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: var(--transition);
}

.nav-desktop a:hover::after,
.nav-desktop a.active::after {
  width: 100%;
}

.nav-desktop a:hover {
  color: var(--color-primary);
}

.nav-cta {
  background: var(--color-primary) !important;
  color: var(--color-white) !important;
  padding: 10px 24px !important;
  border-radius: var(--border-radius);
  font-weight: var(--font-weight-semibold) !important;
}

.nav-cta::after {
  display: none !important;
}

.nav-cta:hover {
  background: var(--color-primary-dark) !important;
  color: var(--color-white) !important;
}

/* Phone link in header */
.header-phone {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--color-primary);
  font-weight: var(--font-weight-semibold);
  font-size: 0.9rem;
  margin-right: 16px;
}

/* Mobile Navigation */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  margin: 6px 0;
  transition: var(--transition);
}

.nav-mobile {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-white);
  padding: 32px 24px;
  z-index: 999;
  overflow-y: auto;
}

.nav-mobile.active {
  display: block;
}

.nav-mobile a {
  display: block;
  padding: 16px 0;
  color: var(--color-text);
  font-weight: var(--font-weight-semibold);
  font-size: 1.1rem;
  border-bottom: 1px solid var(--color-bg-dark);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(0, 77, 77, 0.85), rgba(0, 103, 102, 0.75)),
              url('../img/hero-bg.jpg') center/cover no-repeat;
  background-color: var(--color-primary);
  color: var(--color-white);
  overflow: hidden;
}

.hero .container {
  position: relative;
  z-index: 2;
  padding-top: 60px;
  padding-bottom: 60px;
}

.hero-tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: var(--font-weight-semibold);
  color: var(--color-green-light);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.hero h1 {
  color: var(--color-white);
  margin-bottom: 20px;
  max-width: 700px;
}

.hero p {
  font-size: 1.15rem;
  max-width: 600px;
  opacity: 0.9;
  margin-bottom: 32px;
  line-height: 1.8;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--border-radius);
  font-family: var(--font-main);
  font-weight: var(--font-weight-semibold);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}

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

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

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

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

.btn-white {
  background: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}

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

.btn-arrow::after {
  content: '\2192';
  font-size: 1.1rem;
}

/* ============================================
   Sections
   ============================================ */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--color-bg-light);
}

.section-dark {
  background: var(--color-primary);
  color: var(--color-white);
}

.section-dark h2,
.section-dark h3 {
  color: var(--color-white);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 48px;
}

.section-header .section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.section-header h2 {
  margin-bottom: 16px;
}

.section-header p {
  color: var(--color-text-light);
  font-size: 1.05rem;
}

/* ============================================
   Service Cards
   ============================================ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  background: var(--color-white);
  border-radius: 12px;
  padding: 36px 28px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.card-icon {
  width: 56px;
  height: 56px;
  background: rgba(0, 103, 102, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.5rem;
  color: var(--color-primary);
}

.card h3 {
  margin-bottom: 12px;
}

.card p {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-weight: var(--font-weight-semibold);
  font-size: 0.9rem;
  color: var(--color-primary);
}

.card-link::after {
  content: '\2192';
  transition: var(--transition);
}

.card:hover .card-link::after {
  transform: translateX(4px);
}

/* ============================================
   Mission / CTA Section
   ============================================ */
.mission {
  text-align: center;
}

.mission-quote {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: var(--font-weight-semibold);
  color: var(--color-white);
  max-width: 800px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

/* ============================================
   Stats
   ============================================ */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  padding: 48px 0;
}

.stat {
  text-align: center;
}

.stat-number {
  font-size: 2.8rem;
  font-weight: var(--font-weight-extrabold);
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 8px;
}

.section-dark .stat-number {
  color: var(--color-green-light);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--color-text-light);
  font-weight: var(--font-weight-semibold);
}

.section-dark .stat-label {
  color: rgba(255, 255, 255, 0.7);
}

/* ============================================
   References
   ============================================ */
.ref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.ref-card {
  background: var(--color-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: var(--transition);
}

.ref-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.ref-card-img {
  height: 200px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-size: 2.5rem;
  opacity: 0.6;
}

.ref-card-body {
  padding: 24px;
}

.ref-card-body h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.ref-badge {
  display: inline-block;
  background: rgba(0, 103, 102, 0.1);
  color: var(--color-primary);
  font-size: 0.75rem;
  font-weight: var(--font-weight-semibold);
  padding: 4px 10px;
  border-radius: 20px;
  margin-top: 8px;
}

/* ============================================
   Brands / Partners
   ============================================ */
.brands {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 24px 0;
}

.brand-item {
  font-size: 1.3rem;
  font-weight: var(--font-weight-bold);
  color: #999;
  opacity: 0.6;
  transition: var(--transition);
}

.brand-item:hover {
  opacity: 1;
  color: var(--color-text);
}

/* ============================================
   Contact / Team
   ============================================ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.team-card {
  background: var(--color-white);
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  text-align: center;
  transition: var(--transition);
}

.team-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}

.team-avatar {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--color-white);
  font-size: 1.5rem;
  font-weight: var(--font-weight-bold);
}

.team-card h4 {
  margin-bottom: 4px;
  color: var(--color-text);
}

.team-role {
  font-size: 0.85rem;
  color: var(--color-primary);
  font-weight: var(--font-weight-semibold);
  margin-bottom: 12px;
}

.team-contact {
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.team-contact a {
  display: block;
  color: var(--color-text-light);
  margin: 4px 0;
}

.team-contact a:hover {
  color: var(--color-primary);
}

/* ============================================
   Office locations
   ============================================ */
.offices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.office-card {
  background: var(--color-white);
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border-left: 4px solid var(--color-primary);
}

.office-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--color-primary);
}

.office-card address {
  font-style: normal;
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.6;
}

/* ============================================
   Contact Form
   ============================================ */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

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

.form-group label {
  display: block;
  font-weight: var(--font-weight-semibold);
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--color-text);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: var(--border-radius);
  font-family: var(--font-main);
  font-size: 0.95rem;
  transition: var(--transition);
  background: var(--color-white);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-primary);
}

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

/* ============================================
   News / Press
   ============================================ */
.news-card {
  background: var(--color-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: var(--transition);
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.news-card-body {
  padding: 24px;
}

.news-date {
  font-size: 0.8rem;
  color: var(--color-primary);
  font-weight: var(--font-weight-semibold);
  margin-bottom: 8px;
}

.news-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.news-card p {
  font-size: 0.9rem;
  color: var(--color-text-light);
}

/* ============================================
   CTA Banner
   ============================================ */
.cta-banner {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  padding: 64px 0;
  text-align: center;
}

.cta-banner h2 {
  color: var(--color-white);
  margin-bottom: 16px;
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 28px;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  background: var(--color-footer-bg);
  color: var(--color-white);
  padding: 64px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo-text {
  font-size: 1.5rem;
  font-weight: var(--font-weight-extrabold);
  color: var(--color-white);
  letter-spacing: 0.5px;
}

.footer-brand .logo-text .si-prefix {
  color: var(--color-green-light);
}

.footer-brand .logo-text .company-name {
  color: var(--color-white);
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  margin-top: 16px;
  line-height: 1.7;
}

.footer h4 {
  color: var(--color-green-light);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 20px;
}

.footer-links a {
  display: block;
  color: rgba(255, 255, 255, 0.6);
  padding: 4px 0;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--color-white);
}

.footer-contact-info p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.footer-contact-info a {
  color: rgba(255, 255, 255, 0.6);
}

.footer-contact-info a:hover {
  color: var(--color-white);
}

.footer-social {
  display: flex;
  gap: 16px;
  margin-top: 20px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
}

.footer-bottom {
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  margin: 0;
}

.footer-bottom-links {
  display: flex;
  gap: 24px;
}

.footer-bottom-links a {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
}

.footer-bottom-links a:hover {
  color: var(--color-white);
}

/* ============================================
   Page Header (alasivut)
   ============================================ */
.page-header {
  background: linear-gradient(135deg, rgba(0, 77, 77, 0.9), rgba(0, 103, 102, 0.8)),
              url('../img/hero-bg.jpg') center/cover no-repeat;
  background-color: var(--color-primary);
  padding: 100px 0 60px;
  color: var(--color-white);
  text-align: center;
}

.page-header h1 {
  color: var(--color-white);
  margin-bottom: 12px;
}

.page-header p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   Maps Grid
   ============================================ */
.maps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.map-card {
  background: var(--color-white);
  border-radius: var(--border-radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.map-card h4 {
  margin-bottom: 12px;
  color: var(--color-primary);
  font-size: 0.95rem;
}

/* ============================================
   Contact Form
   ============================================ */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: var(--font-weight-semibold);
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: var(--color-text);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 1rem;
  transition: border-color 0.2s;
  background: var(--color-white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.form-group textarea {
  resize: vertical;
}

.form-success {
  text-align: center;
  padding: 32px;
  background: rgba(0, 103, 102, 0.08);
  border-radius: var(--border-radius);
  margin-top: 20px;
}

.form-success p {
  color: var(--color-primary);
  font-weight: var(--font-weight-semibold);
  font-size: 1.1rem;
}

/* Energia hero & video */
.energia-hero {
  max-width: 1000px;
  margin: 0 auto 40px;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.energia-hero img {
  width: 100%;
  height: auto;
  display: block;
}

.energia-video {
  margin: 32px 0;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.video-caption {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  margin-top: 12px;
  font-style: italic;
}

.energia-contact {
  text-align: center;
  margin-top: 40px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius);
  color: rgba(255, 255, 255, 0.9);
}

.energia-contact p {
  margin-bottom: 8px;
}

.energia-contact a {
  color: var(--color-green-light);
  text-decoration: none;
  font-weight: var(--font-weight-semibold);
}

.energia-contact a:hover {
  text-decoration: underline;
}

/* ============================================
   404 Error Page
   ============================================ */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  text-align: center;
  background: var(--color-bg-light);
}

.error-code {
  font-size: clamp(6rem, 15vw, 12rem);
  font-weight: var(--font-weight-extrabold);
  color: var(--color-primary);
  opacity: 0.15;
  line-height: 1;
  margin-bottom: -20px;
}

.error-page h1 {
  margin-bottom: 16px;
}

.error-page p {
  color: var(--color-text-light);
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto;
}

/* ============================================
   Back to Top Button
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 900;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* ============================================
   Cookie Banner
   ============================================ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-footer-bg);
  color: var(--color-white);
  padding: 20px 24px;
  z-index: 9999;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
  display: none;
}

.cookie-banner.show {
  display: block;
}

.cookie-banner .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cookie-banner p {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  flex: 1;
  min-width: 280px;
}

.cookie-banner a {
  color: var(--color-green-light);
  text-decoration: underline;
}

.cookie-buttons {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 10px 24px;
  border-radius: var(--border-radius);
  font-family: var(--font-main);
  font-weight: var(--font-weight-semibold);
  font-size: 0.85rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.cookie-btn-accept {
  background: var(--color-primary-light);
  color: var(--color-white);
}

.cookie-btn-accept:hover {
  background: var(--color-green-light);
  color: var(--color-primary-dark);
}

.cookie-btn-decline {
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.cookie-btn-decline:hover {
  color: var(--color-white);
  border-color: var(--color-white);
}

/* ============================================
   Animations
   ============================================ */

/* 1. Fade + Slide Up (scroll-triggered) */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays for grid children */
.animate-on-scroll.delay-1 { transition-delay: 0.1s; }
.animate-on-scroll.delay-2 { transition-delay: 0.2s; }
.animate-on-scroll.delay-3 { transition-delay: 0.3s; }
.animate-on-scroll.delay-4 { transition-delay: 0.4s; }

/* 2. Hero entrance animation */
@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero .hero-tag {
  animation: heroFadeUp 0.8s ease 0.2s both;
}

.hero h1 {
  animation: heroFadeUp 0.8s ease 0.4s both;
}

.hero p {
  animation: heroFadeUp 0.8s ease 0.6s both;
}

.hero > .container > div:last-child {
  animation: heroFadeUp 0.8s ease 0.8s both;
}

/* Page header animation */
.page-header h1 {
  animation: heroFadeUp 0.8s ease 0.2s both;
}

.page-header p {
  animation: heroFadeUp 0.8s ease 0.4s both;
}

/* 3. Counter animation - handled in JS */
.stat-number {
  display: inline-block;
}

/* 5. Parallax hero background */
.hero {
  background-attachment: fixed;
}

@media (max-width: 768px) {
  .hero {
    background-attachment: scroll; /* Disable parallax on mobile for performance */
  }
}

/* Section headers fade in */
.section-header {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-header.animated {
  opacity: 1;
  transform: translateY(0);
}

/* CTA banner animation */
.cta-banner h2,
.cta-banner p,
.cta-banner .btn {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.cta-banner.animated h2 {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0s;
}

.cta-banner.animated p {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.15s;
}

.cta-banner.animated .btn {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.3s;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll,
  .section-header,
  .cta-banner h2,
  .cta-banner p,
  .cta-banner .btn {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
  .hero {
    background-attachment: scroll;
  }
  .hero .hero-tag,
  .hero h1,
  .hero p,
  .hero > .container > div:last-child,
  .page-header h1,
  .page-header p {
    animation: none !important;
    opacity: 1 !important;
  }
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
  .nav-desktop {
    display: none;
  }

  .header-phone {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

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

@media (max-width: 768px) {
  .hero {
    min-height: 60vh;
  }

  .section {
    padding: 56px 0;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

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

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .maps-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 480px) {
  .hero {
    min-height: 50vh;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}
