/* ============================================
   DV PANDA — Style System
   Scandinavian + Mediterranean aesthetic
   Font: Outfit (variable)
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Base */
  --bg-primary: #F5F1EC;
  --bg-secondary: #FFFFFF;
  --bg-soft: #EDE8E1;

  /* Brand colors — direct from panda_logo.svg */
  --color-blue: #3f9cd6;
  --color-blue-dark: #547dbf;
  --color-green: #52aa53;
  --color-gold: #f4bb2c;
  --color-red: #e94534;

  /* Softened brand accents for backgrounds */
  --color-sage: #5EAD5F;            /* vivid green accent */
  --color-sage-dark: #4A9A4B;
  --color-terracotta: #E05A47;       /* warm red accent */
  --color-sky: #4BA3DB;             /* bright blue accent */
  --color-sun: #F0B821;             /* warm gold accent */
  --color-indigo: #5E7FC4;          /* deeper blue accent */

  /* Text */
  --text-primary: #2A2A2A;
  --text-secondary: #6B6B6B;
  --text-light: #999999;

  /* UI */
  --border: #E0DCD6;
  --shadow: 0 2px 20px rgba(0,0,0,0.04);
  --radius: 12px;
  --radius-sm: 8px;

  /* Spacing */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 32px;
  --space-lg: 64px;
  --space-xl: 96px;
  --space-2xl: 128px;

  /* Layout */
  --max-width: 1480px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Outfit", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol {
  list-style: none;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: "Outfit", sans-serif;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.3px;
  color: var(--text-primary);
}

h1 { font-size: clamp(40px, 5vw, 68px); font-weight: 700; }
h2 { font-size: clamp(28px, 3.5vw, 44px); }
h3 { font-size: clamp(22px, 2.5vw, 28px); }

p {
  margin-bottom: 1em;
  color: var(--text-secondary);
}

.label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-light);
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 140px);
}

section {
  padding: var(--space-xl) 0;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-family: "Outfit", sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.3px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--color-sage);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-sage-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--text-secondary);
  transform: translateY(-1px);
}

.btn-arrow::after {
  content: '\2192';
  transition: transform 0.3s ease;
}

.btn-arrow:hover::after {
  transform: translateX(4px);
}

/* --- Navigation (Progressive blur like edvincindrak.com) --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  transition: box-shadow 0.3s ease;
}

/* Progressive blur layers — heavy at top, fading to none */
.nav::before,
.nav::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.nav::before {
  background: linear-gradient(to bottom, rgba(245, 241, 236, 0.5) 0%, transparent 100%);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 30%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 0%, black 30%, transparent 100%);
}

.nav::after {
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 60%);
  mask-image: linear-gradient(to bottom, black 0%, transparent 60%);
}

.nav-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100px;
  max-width: 100%;
  margin: 0;
  padding: 0 clamp(24px, 5vw, 140px);
}

.nav-logo {
  position: relative;
  display: flex;
  align-items: center;
  height: 50px;
}

.nav-logo img {
  height: 50px;
  width: auto;
  transition: opacity 0.8s linear;
}

.nav-logo .logo-default {
  opacity: 1;
}

.nav-logo .logo-scrolled {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  opacity: 0;
}

.nav.scrolled .nav-logo .logo-default {
  opacity: 0;
}

.nav.scrolled .nav-logo .logo-scrolled {
  opacity: 1;
}

@media (max-width: 768px) {
  .nav-logo img {
    height: 40px;
  }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-size: 20px;
  font-weight: 500;
  color: #4A4A4A;
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2.5px;
  border-radius: 2px;
  transition: width 0.3s ease;
}

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

/* Colorful nav — each link gets its own brand color */
.nav-links a[data-color="green"] { --nav-color: var(--color-green); }
.nav-links a[data-color="blue"] { --nav-color: var(--color-blue); }
.nav-links a[data-color="gold"] { --nav-color: var(--color-gold); }
.nav-links a[data-color="red"] { --nav-color: var(--color-red); }
.nav-links a[data-color="indigo"] { --nav-color: var(--color-blue-dark); }
.nav-links a[data-color="sage"] { --nav-color: var(--color-green); }

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

.nav-links a::after {
  background: var(--nav-color, var(--color-sage));
}

.nav-cta {
  padding: 10px 28px !important;
  font-size: 20px !important;
  background: var(--color-sage) !important;
  color: #fff !important;
  border-radius: var(--radius-sm) !important;
}

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

.nav-cta:hover {
  background: var(--color-sage-dark) !important;
  color: #fff !important;
  transform: translateY(-1px);
}

/* Hamburger — colorful & playful */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 7px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 32px;
  height: 4px;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.nav-toggle span:nth-child(1) { background: var(--color-blue); }
.nav-toggle span:nth-child(2) { background: var(--color-gold); }
.nav-toggle span:nth-child(3) { background: var(--color-red); }

.nav-toggle.active span:nth-child(1) {
  background: var(--text-primary);
  transform: rotate(45deg) translate(7px, 8px);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  background: var(--text-primary);
  transform: rotate(-45deg) translate(7px, -8px);
}

/* Mobile overlay */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(245, 241, 236, 0.6);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-overlay.open {
  display: flex;
  opacity: 1;
}

.nav-overlay a {
  font-family: "Outfit", sans-serif;
  font-size: 32px;
  font-weight: 700;
  transition: opacity 0.3s ease;
}

.nav-overlay a:nth-child(1) { color: var(--color-blue); }
.nav-overlay a:nth-child(2) { color: var(--color-red); }
.nav-overlay a:nth-child(3) { color: var(--color-gold); }
.nav-overlay a:nth-child(4) { color: var(--color-green); }
.nav-overlay a:nth-child(5) { color: var(--color-sage); }

.nav-overlay a:hover {
  opacity: 0.7;
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  margin-top: 0;
  padding-top: 100px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

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

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(245, 241, 236, 0.95) 0%,
    rgba(245, 241, 236, 0.85) 40%,
    rgba(245, 241, 236, 0.4) 70%,
    rgba(245, 241, 236, 0.15) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
  padding: var(--space-xl) 0;
}

.hero-label {
  display: inline-block;
  margin-bottom: var(--space-sm);
  padding: 6px 16px;
  background: rgba(82, 170, 83, 0.12);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-sage);
}

.hero h1 {
  margin-bottom: var(--space-md);
  line-height: 1.15;
}

.hero p {
  font-size: 19px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  max-width: 520px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* --- Stats Section --- */
.stats {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-md);
  text-align: center;
}

.stat-item {
  padding: var(--space-md) var(--space-sm);
}

.stat-number {
  font-family: "Outfit", sans-serif;
  font-size: clamp(36px, 3.5vw, 52px);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 6px;
}

/* Color stat numbers with logo brand colors */
.stat-item[data-stat-color="blue"] .stat-number { color: var(--color-blue); }
.stat-item[data-stat-color="green"] .stat-number { color: var(--color-green); }
.stat-item[data-stat-color="red"] .stat-number { color: var(--color-red); }
.stat-item[data-stat-color="gold"] .stat-number { color: var(--color-gold); }
.stat-item[data-stat-color="indigo"] .stat-number { color: var(--color-blue-dark); }

.stat-number .suffix {
  font-size: 0.45em;
  font-weight: 500;
  vertical-align: baseline;
  margin-left: 2px;
}

.stat-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--text-light);
}

/* --- Programs Section --- */
.programs {
  background: var(--bg-primary);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.section-header .label {
  margin-bottom: var(--space-xs);
}

.section-header h2 {
  margin-bottom: var(--space-sm);
}

.section-header p {
  max-width: 560px;
  margin: 0 auto;
}

.programs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.program-card {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: var(--space-md);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  border-top: 3px solid transparent;
}

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

/* Colored top borders on program cards */
.program-card:nth-child(1) { border-top-color: var(--color-green); }
.program-card:nth-child(2) { border-top-color: var(--color-red); }
.program-card:nth-child(3) { border-top-color: var(--color-blue); }
.program-card:nth-child(4) { border-top-color: var(--color-gold); }
.program-card:nth-child(5) { border-top-color: var(--color-blue-dark); }

.program-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-sm);
}

.program-icon svg {
  width: 28px;
  height: 28px;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.program-icon.green { background: rgba(82, 170, 83, 0.1); }
.program-icon.green svg { stroke: var(--color-green); }

.program-icon.red { background: rgba(233, 69, 52, 0.08); }
.program-icon.red svg { stroke: var(--color-red); }

.program-icon.blue { background: rgba(63, 156, 214, 0.1); }
.program-icon.blue svg { stroke: var(--color-blue); }

.program-icon.gold { background: rgba(244, 187, 44, 0.1); }
.program-icon.gold svg { stroke: var(--color-gold); }

.program-icon.indigo { background: rgba(84, 125, 191, 0.1); }
.program-icon.indigo svg { stroke: var(--color-blue-dark); }

.program-card h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.program-card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  flex: 1;
}

.program-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--space-sm);
  font-size: 14px;
  font-weight: 600;
  transition: gap 0.3s ease;
}

.program-card:nth-child(1) .program-link { color: var(--color-green); }
.program-card:nth-child(2) .program-link { color: var(--color-red); }
.program-card:nth-child(3) .program-link { color: var(--color-blue); }
.program-card:nth-child(4) .program-link { color: var(--color-gold); }
.program-card:nth-child(5) .program-link { color: var(--color-blue-dark); }

.program-link:hover {
  gap: 10px;
}

/* --- News Section --- */
.news {
  background: var(--bg-soft);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.news-card {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.news-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.news-card-body {
  padding: var(--space-md);
}

.news-date {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-light);
  margin-bottom: 8px;
}

.news-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
  line-height: 1.4;
}

.news-card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* --- Footer (Light, Simplified) --- */
.footer {
  background: var(--bg-soft);
  color: var(--text-secondary);
  padding: var(--space-lg) 0 var(--space-md);
  border-top: 1px solid var(--border);
}

.footer-simple {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-lg);
  margin-bottom: var(--space-md);
}

.footer-logo img {
  height: 36px;
  width: auto;
  margin-bottom: var(--space-sm);
}

.footer-desc {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-light);
  max-width: 360px;
}

.footer-contact p {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 4px;
  text-align: right;
}

.footer-contact a {
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

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

.footer-eu {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-top: 1px solid var(--border);
  margin-bottom: var(--space-sm);
}

.footer-eu img {
  height: 48px;
  width: auto;
  opacity: 0.85;
}

.footer-eu span {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.4;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: var(--space-sm);
  text-align: center;
  font-size: 14px;
  color: var(--text-light);
}

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .programs-grid {
    grid-template-columns: repeat(2, 1fr);
  }

}

@media (max-width: 768px) {
  section {
    padding: var(--space-lg) 0;
  }

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    min-height: 90vh;
  }

  .hero-content {
    padding: var(--space-lg) 0;
  }

  .hero-bg::after {
    background: linear-gradient(
      to bottom,
      rgba(245, 241, 236, 0.92) 0%,
      rgba(245, 241, 236, 0.75) 50%,
      rgba(245, 241, 236, 0.5) 100%
    );
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }

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

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

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-simple {
    flex-direction: column;
    gap: var(--space-md);
  }

  .footer-contact p {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .stat-item {
    padding: var(--space-sm) var(--space-xs);
  }

  .stat-number {
    font-size: 28px;
  }
}
