/* style.css */
:root {
  /* Colors - Option 1 (Light) */
  --color-bg: #f8f9fa;
  --color-bg-alt: #ffffff;
  --color-text: #495057;
  --color-text-muted: #6c757d;
  --color-heading: #11182a;
  --color-primary: #0056b3;
  --color-primary-dark: #004494;
  --color-white: #ffffff;
  --color-border: #e9ecef;
  
  /* Typography */
  --font-family-main: 'Inter', sans-serif;
  
  /* Transitions */
  --transition-speed: 0.3s;
}

[data-theme="dark"] {
  /* Colors - Option 1 (Dark) */
  --color-bg: #0f172a; /* Темніший для фону сторінки (як футер) */
  --color-bg-alt: #1e293b; /* Світліший для блоків, щоб не зливались */
  --color-text: #cbd5e1;
  --color-text-muted: #94a3b8;
  --color-heading: #f8fafc;
  --color-primary: #3b82f6;
  --color-primary-dark: #2563eb;
  --color-border: #334155;
}

/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family-main);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  transition: background-color var(--transition-speed), color var(--transition-speed);
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-speed);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-speed);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-white);
  border: 2px solid var(--color-primary);
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: var(--color-white);
}

[data-theme="dark"] .btn-primary:hover {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}

/* Header - Option B (Modern Float) */
.header {
  position: fixed;
  top: 15px;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 15px;
}

.header-inner {
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 5px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-speed);
}

.header-inner.scrolled {
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .header-inner {
  background-color: rgba(15, 23, 42, 0.85);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .header-inner.scrolled {
  background-color: rgba(15, 23, 42, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  border-color: rgba(0, 0, 0, 0.5);
}

.logo-img {
  height: 65px;
  width: auto;
}

[data-theme="dark"] .light-logo { display: none !important; }
[data-theme="dark"] .dark-logo { display: block !important; }

/* Navigation */
.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
}

.nav-links a {
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--color-primary);
  transition: width var(--transition-speed);
}

[data-theme="dark"] .nav-links a::after {
  background-color: var(--color-white);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Controls */
.header-controls {
  display: flex;
  align-items: center;
  gap: 15px;
  padding-left: 20px;
  border-left: 1px solid rgba(0,0,0,0.1);
}

[data-theme="dark"] .header-controls {
  border-left-color: rgba(255,255,255,0.1);
}

.lang-switcher button {
  background: none;
  border: none;
  font-family: inherit;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 4px;
  transition: color var(--transition-speed);
}

.lang-switcher button.active, .lang-switcher button:hover {
  color: var(--color-text);
}

.theme-toggle {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
}

/* Hamburger */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}

.hamburger, .hamburger::before, .hamburger::after {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-text);
  position: relative;
  transition: all var(--transition-speed);
}

.hamburger::before { content: ''; top: -8px; }
.hamburger::after { content: ''; top: 8px; }

.menu-toggle.open .hamburger { background-color: transparent; }
.menu-toggle.open .hamburger::before { top: 0; transform: rotate(45deg); }
.menu-toggle.open .hamburger::after { top: 0; transform: rotate(-45deg); }


/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
   /* Team photo */
  background-size: cover;
  background-position: center;
  
  color: white;
  text-align: center;
  padding: 80px 20px;
}

.hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(19, 30, 66, 0.8) 0%, rgba(19, 30, 66, 0.6) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 24px;
  line-height: 1.2;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 40px;
  opacity: 0.9;
}

/* Page Header (Internal Pages) */
.page-header {
  position: relative;
  padding: 140px 20px 80px;
  
  background-size: cover;
  background-position: center;
  
  color: white;
  text-align: center;
}

.page-header-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(19, 30, 66, 0.85);
  z-index: 1;
}

.page-header .container {
  position: relative;
  z-index: 2;
}

/* Partners Logos */
.partner-logo {
  height: 90px;
  max-width: 250px;
  object-fit: contain;
  opacity: 0.9;
  transition: opacity 0.3s, filter 0.3s;
}
.partner-logo:hover {
  opacity: 1;
}

/* Theme visibility toggles for logos */
body[data-theme="dark"] .logo-light-only {
  display: none !important;
}
body:not([data-theme="dark"]) .logo-dark-only {
  display: none !important;
}

.page-header .section-title {
  color: white;
  margin-bottom: 15px;
}

.page-header p {
  color: rgba(255, 255, 255, 0.9);
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.1rem;
}

/* Sections */
.section {
  padding: 80px 0;
}

.bg-light {
  background-color: var(--color-bg-alt);
}

.section-title {
  font-size: 2.2rem;
  color: var(--color-heading);
  margin-bottom: 40px;
  text-align: center;
}

.content-block p {
  margin-bottom: 20px;
  font-size: 1.1rem;
}

/* Blocks styling for Reports/Activities */
.report-card, .activity-card {
  background-color: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  padding: 25px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.report-card:hover, .activity-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.report-card h3, .activity-card h3 {
  color: var(--color-heading);
  margin-bottom: 5px;
}

/* Stats Section */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  text-align: center;
  margin-top: 40px;
}

.stat-item h3 {
  font-size: 3rem;
  color: var(--color-heading);
  margin-bottom: 10px;
}

.stat-item p {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

/* Team Section (Landing) */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.team-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background-color: var(--color-bg-alt);
  transition: all var(--transition-speed);
  padding-top: 25px;
  border: 1px solid var(--color-border);
}

.team-card img {
  width: 200px;
  height: 200px;
  margin: 0 auto;
  display: block;
  border-radius: 24px; /* Заокруглений квадрат */
  object-fit: cover;
  transition: filter var(--transition-speed);
}

.team-card:hover {
  background-color: #f0f0f0; /* Сіра підсвітка при наведенні */
}

[data-theme="dark"] .team-card:hover {
  background-color: #2a3b54;
}

.team-card:hover img {
  filter: grayscale(100%);
}

.team-info {
  padding: 15px;
  text-align: center;
}

.team-info h4 {
  margin-bottom: 5px;
  color: var(--color-heading);
}

.team-popup {
  position: absolute;
  bottom: -100%;
  left: 0;
  width: 100%;
  background-color: var(--color-primary);
  color: white;
  padding: 20px;
  transition: bottom var(--transition-speed);
  opacity: 0;
  z-index: 10;
}

.team-card:hover .team-popup {
  bottom: 0;
  opacity: 1;
}

/* Footer - Option 1 */
.footer {
  background-color: #11182a;
  color: var(--color-white);
  padding: 60px 0 0 0;
}

[data-theme="dark"] .footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-logo {
  height: 90px;
  margin-bottom: 20px;
}

.footer-col h3 {
  color: var(--color-white);
  margin-bottom: 20px;
  font-size: 1.2rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.social-links {
  margin-top: 20px;
  display: flex;
  gap: 15px;
}

.footer-bottom {
  background-color: #11182a;
  color: white;
  padding: 20px 0;
  text-align: center;
  font-size: 0.9rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  
  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background-color: var(--color-bg);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.4s ease;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
  }

  .main-nav.open {
    right: 0;
  }
  
  .nav-links {
    flex-direction: column;
    align-items: center;
    gap: 30px;
  }
  
  .header-controls {
    border-left: none;
    border-top: 1px solid rgba(0,0,0,0.1);
    padding-left: 0;
    padding-top: 20px;
    margin-top: 20px;
  }

  .hero h1 {
    font-size: 2.5rem;
  }
}

/* Hero Slider */
.hero-slider {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 0;
  overflow: hidden;
}
.hero-slide {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}
.hero-slide.active {
  opacity: 1;
}

/* Modern Report Block */
.report-row {
  display: flex;
  background: var(--color-bg-alt);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 30px;
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  transition: transform var(--transition-speed);
}
.report-row:hover {
  transform: translateY(-3px);
}
.report-year-col {
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 30px;
  font-size: 3rem;
  font-weight: 800;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  letter-spacing: 5px;
}
.report-content-col {
  padding: 30px;
  flex: 1;
}
.report-content-col h3 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1.5rem;
  color: var(--color-heading);
}
.report-content-col p {
  margin-bottom: 15px;
  color: var(--color-text);
  line-height: 1.6;
}
.report-links {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 20px;
}
.report-links a {
  font-weight: 600;
}

.team-popup p { font-size: 0.85rem; line-height: 1.3; }


.team-member {
  scroll-margin-top: 120px;
}

/* =======================================
   Animated Waterfall Section
   ======================================= */
.waterfall-frame {
  max-width: 1200px; margin: 0 auto;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 40px 30px;
}

.tabs-header { 
  display: flex; justify-content: center; gap: 40px; margin-bottom: 30px; 
  position: relative; z-index: 10;
}
.tab { 
  font-size: 1.2rem; font-weight: 600; color: var(--color-text-muted); 
  padding-bottom: 8px; border-bottom: 3px solid transparent; transition: all 0.3s ease; 
  text-transform: uppercase; letter-spacing: 1px; cursor: default;
}
.tab.active { 
  color: var(--color-primary); 
  border-bottom-color: var(--color-primary); 
}

/* Square Cards Layout */
.stat-card-square {
  display: flex; flex-direction: column; padding: 15px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  width: 180px; height: 180px;
  box-sizing: border-box;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.stat-card-square .stat-info { 
  display: flex; flex-direction: column; width: 100%; height: 100%;
}
.stat-card-square .stat-num { 
  font-size: 2.4rem; font-weight: 700; line-height: 1; color: var(--color-heading); white-space: nowrap; 
  height: 50%; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 5px;
}
.stat-card-square .stat-desc { 
  font-size: 1.05rem; color: var(--color-primary); line-height: 1.3; text-align: center;
  height: 50%; display: flex; align-items: flex-start; justify-content: center; padding-top: 5px;
}

/* Waterfall Smart Grid */
.waterfall-content {
  display: grid; grid-template-columns: 1fr; align-items: start;
  overflow: hidden; padding-top: 10px; 
}

.wf-layer {
  grid-column: 1; grid-row: 1;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; padding-bottom: 20px;
}

.wf-card { transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); will-change: transform; }
.wf-card.state-above { transform: translateY(-800px); }
.wf-card.state-center { transform: translateY(0); }
.wf-card.state-below { transform: translateY(800px); }



/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--color-bg-alt);
  color: var(--color-text);
  border: 2px solid var(--color-border);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, background-color 0.3s ease, color 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  background-color: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  transform: translateY(-3px);
}
