:root {
  --bg-dark: #050505;
  --bg-darker: #000000;
  --primary-red: #D50000;
  --primary-red-glow: rgba(213, 0, 0, 0.4);
  --accent-silver: #E0E0E0;
  --text-main: #FFFFFF;
  --text-muted: #A3A3A3;
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Outfit', 'Inter', sans-serif;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  overflow-x: hidden;
  scroll-behavior: smooth;
}

section {
  scroll-margin-top: 180px;
}

/* Typography */
h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 3.5rem;
  line-height: 1.1;
  background: linear-gradient(135deg, #FFFFFF, var(--accent-silver));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  text-align: center;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

p {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 1.1rem;
}

/* Animations */
@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 var(--primary-red-glow); }
  50% { transform: scale(1.02); box-shadow: 0 0 20px 10px var(--primary-red-glow); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 var(--primary-red-glow); }
}

@keyframes ekg {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

/* Utilities */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px var(--primary-red-glow);
  border-color: rgba(213, 0, 0, 0.3);
}

.btn-primary {
  display: inline-block;
  background: linear-gradient(45deg, var(--primary-red), #FF1744);
  color: white;
  padding: 1rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  cursor: pointer;
  animation: pulse 3s infinite;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: linear-gradient(45deg, #FF1744, var(--primary-red));
  transform: translateY(-2px);
  box-shadow: 0 5px 20px var(--primary-red-glow);
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.5rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  background: rgba(5, 5, 5, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
}

.nav-logo {
  height: 60px;
  display: flex;
  align-items: center;
}

.nav-logo a {
  display: flex;
  height: 100%;
  align-items: center;
}

.nav-logo img {
  height: 100%;
  max-height: 50px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--text-main);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5%;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at center, transparent 30%, var(--bg-dark) 80%),
    linear-gradient(to bottom, rgba(5,5,5,0.8) 0%, rgba(5,5,5,0.2) 50%, var(--bg-dark) 100%),
    url('./assets/hero_bg.png');
  background-size: 150%;
  background-position: center 20%;
  background-repeat: no-repeat;
  background-color: var(--bg-dark);
  opacity: 0.8;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-tag {
  color: var(--primary-red);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.heart-ekg-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  height: 80px;
  margin: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ekg-line-svg {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.ekg-track {
  fill: none;
  stroke: rgba(213, 0, 0, 0.2);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ekg-animated {
  fill: none;
  stroke: var(--primary-red);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px var(--primary-red));
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: drawEkg 5s linear infinite;
}

@keyframes drawEkg {
  0% { stroke-dashoffset: 1200; }
  100% { stroke-dashoffset: -1200; }
}

.heart-icon-wrapper {
  position: absolute;
  left: 0;
  transform: translate(-15px, 0);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.glowing-heart {
  fill: var(--primary-red);
  stroke: var(--primary-red);
  filter: drop-shadow(0 0 15px var(--primary-red));
  animation: heartbeatPulse 1.25s ease-in-out infinite;
}

@keyframes heartbeatPulse {
  0% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 0 10px var(--primary-red)); }
  15% { transform: scale(1.15) rotate(5deg); filter: drop-shadow(0 0 25px var(--primary-red)); }
  30% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 0 10px var(--primary-red)); }
  45% { transform: scale(1.15) rotate(-5deg); filter: drop-shadow(0 0 25px var(--primary-red)); }
  60% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 0 10px var(--primary-red)); }
  100% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 0 10px var(--primary-red)); }
}

/* Section Common */
section {
  padding: 8rem 5%;
  position: relative;
}

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

/* Pillars Section */
#filary {
  position: relative;
  background-image: linear-gradient(to bottom, rgba(5,5,5,0.9) 0%, rgba(5,5,5,0.5) 50%, rgba(5,5,5,1) 100%), url('./assets/pedestrian_bg.png');
  background-size: cover;
  background-position: center;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}

.pillars-grid .pillar-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.pillars-grid .pillar-card .zoomable-img {
  margin-top: auto !important;
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.five-pillars-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 4rem;
}

.five-pillars-grid .pillar-card {
  width: calc(33.333% - 1.35rem);
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.seven-pillars-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 4rem;
}

.seven-pillars-grid .pillar-card {
  width: calc(33.333% - 1.35rem);
  aspect-ratio: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  padding: 2rem;
}

@media (max-width: 900px) {
  .five-pillars-grid .pillar-card {
    width: calc(50% - 1rem);
    aspect-ratio: auto;
    padding: 2rem;
  }
  .seven-pillars-grid .pillar-card {
    width: calc(50% - 1rem);
  }
}

@media (max-width: 600px) {
  .five-pillars-grid .pillar-card {
    width: 100%;
  }
  .seven-pillars-grid .pillar-card {
    width: 100%;
  }
}

.pillar-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pillar-icon {
  width: 64px;
  height: 64px;
  background: rgba(213, 0, 0, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--primary-red);
  animation: float 6s ease-in-out infinite;
}

/* Immersive Section */
.immersive-section {
  background: linear-gradient(to bottom, var(--bg-dark), #0a0000, var(--bg-dark));
}

.immersive-content {
  display: flex;
  align-items: center;
  gap: 4rem;
}

.immersive-text {
  flex: 1;
}

.immersive-visual {
  flex: 1;
  position: relative;
  height: 400px;
}

.immersive-visual .glass-panel {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  border-color: rgba(213, 0, 0, 0.2);
  background: rgba(20, 0, 0, 0.4);
  overflow: hidden;
  cursor: crosshair;
}

.immersive-visual .glass-panel::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.8)), url('./assets/vr_cpr_anim.png');
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.2);
  transition: opacity 0.6s ease, transform 0.6s ease-out;
  z-index: 0;
}

.immersive-visual .glass-panel > * {
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

.immersive-visual .glass-panel:hover {
  border-color: var(--primary-red);
  box-shadow: 0 0 30px rgba(213, 0, 0, 0.4);
}

.immersive-visual .glass-panel:hover::before {
  opacity: 1;
  transform: scale(1);
}

.immersive-visual .glass-panel:hover i {
  color: #fff;
  filter: drop-shadow(0 0 15px var(--primary-red));
  transform: scale(1.2);
  opacity: 0.8;
}

.immersive-visual .glass-panel:hover p {
  opacity: 0;
  transform: translateY(20px);
}

.immersive-visual .glass-panel i {
  color: var(--primary-red);
  filter: drop-shadow(0 0 10px var(--primary-red));
  transition: all 0.4s ease;
}

/* Founder Section */
.founder-section {
  padding: 6rem 5%;
  background: var(--bg-darker);
  position: relative;
  overflow: hidden;
}

.founder-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  gap: 4rem;
}

.founder-image {
  flex: 1;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(213, 0, 0, 0.15);
}

.founder-image img {
  width: 100%;
  height: auto;
  display: block;
}

.founder-content {
  flex: 1.5;
}

.founder-content .hero-tag {
  margin-bottom: 1rem;
}

.founder-content h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.founder-content p {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

.founder-achievements {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.achievement-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  background: rgba(255, 255, 255, 0.03);
  padding: 15px 20px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
}

.achievement-item:hover {
  border-color: rgba(213, 0, 0, 0.3);
  transform: translateX(10px);
  background: rgba(213, 0, 0, 0.05);
}

.achievement-icon {
  color: var(--primary-red);
  flex-shrink: 0;
  margin-top: 2px;
}

.founder-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .founder-container {
    flex-direction: column-reverse;
    gap: 2rem;
  }
}

/* Footer */
footer {
  padding: 4rem 5%;
  text-align: center;
  border-top: 1px solid var(--glass-border);
  background: var(--bg-darker);
}

footer .logo {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

footer .logo span {
  color: var(--primary-red);
}

@media (max-width: 768px) {
  h1 { font-size: 2.5rem; }
  .immersive-content { flex-direction: column; }
  .nav-links { display: none; }
}

/* Oferta / Timeline Styles */
.timeline {
  position: relative;
  max-width: 1000px;
  margin: 4rem auto;
}
.timeline::after {
  content: '';
  position: absolute;
  width: 4px;
  background-color: rgba(213, 0, 0, 0.5);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -2px;
}
.timeline-item {
  padding: 20px 40px;
  position: relative;
  width: 50%;
  box-sizing: border-box;
}
.timeline-item.left { left: 0; text-align: right; }
.timeline-item.right { left: 50%; }
.timeline-item::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: var(--bg-dark);
  border: 4px solid var(--primary-red);
  top: 30px;
  border-radius: 50%;
  z-index: 1;
  box-shadow: 0 0 10px var(--primary-red);
}
.timeline-item.left::after { right: -10px; }
.timeline-item.right::after { left: -10px; }
.timeline-content {
  padding: 1.5rem;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  transition: transform 0.3s;
  text-align: left;
}
.timeline-content:hover {
  transform: scale(1.02);
  border-color: rgba(213, 0, 0, 0.4);
}
.timeline-content h3 { color: var(--text-main); margin-bottom: 0.5rem; font-size: 1.4rem; }
.timeline-content p { font-size: 1rem; }

@media screen and (max-width: 768px) {
  .timeline::after { left: 31px; }
  .timeline-item { width: 100%; padding-left: 70px; padding-right: 20px; text-align: left; }
  .timeline-item.right { left: 0%; }
  .timeline-item.left { left: 0%; }
  .timeline-item.left::after, .timeline-item.right::after { left: 21px; right: auto; }
}

/* Modals for Privacy Policy and Regulations */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-content {
  background-color: #0c0c0c;
  border: 1px solid var(--glass-border);
  margin: 5% auto;
  padding: 2.5rem;
  width: 90%;
  max-width: 750px;
  border-radius: 16px;
  position: relative;
  color: var(--text-main);
  font-size: 0.9rem; /* mniejsza czcionka zgodnie z wytycznymi */
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
  max-height: 80vh;
  overflow-y: auto;
}

.modal-content h2 {
  font-size: 1.8rem;
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: white;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.5rem;
}

.modal-content h3 {
  font-size: 1.2rem;
  color: white;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.modal-content p, .modal-content li {
  color: var(--text-muted);
  line-height: 1.6;
}

.modal-content ul {
  padding-left: 20px;
  margin-bottom: 1rem;
}

.close-modal {
  color: var(--text-muted);
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  top: 15px;
  right: 25px;
  transition: color 0.2s;
  line-height: 1;
}

.close-modal:hover {
  color: var(--primary-red);
}

/* Zoomable Images */
.zoomable-img {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: zoom-in;
  display: block;
  margin: 1.5rem auto 0 auto;
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  position: relative;
  z-index: 1;
}

.zoomable-img.zoomed {
  transform: scale(1.5);
  cursor: zoom-out;
  z-index: 100;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(213, 0, 0, 0.4);
  border-color: rgba(213, 0, 0, 0.5);
}

/* Read Aloud floating button */
.read-aloud-trigger {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 999;
  background: var(--primary-red);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(213, 0, 0, 0.4);
  transition: transform 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
}

.read-aloud-trigger:hover {
  transform: scale(1.05);
  background: #ff1744;
}

.read-aloud-trigger i {
  width: 18px;
  height: 18px;
}
