:root {
  --primary: #ff3e3e; /* Roșu Backyard */
  --primary-faded: #ff7878;
  --bg-body: #ffffff; /* Alb principal */
  --bg-alt: #e2e2e2; /* Gri deschis pentru secțiuni */
  --text-dark: #111111; /* Negru titluri */
  --text-dim: #444444; /* Gri text secundar */
  --border: #eeeeee; /* Linii subtile */
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --event-gap: 10px;
}

/* ====================== RESET & BASE ====================== */

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

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  background-color: var(--bg-body);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  border-top: 1px solid var(--border);
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 50px 0;
}

.center {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* ====================== HEADER & NAV ====================== */

header {
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 5vw;
}

.logo a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo img {
  height: 70px;
}

.main-nav a {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  margin-left: 20px;
  transition: var(--transition);
}

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

.fb-btn {
  background: #1877f2;
  color: #fff !important;
  padding: 10px 20px !important;
  font-weight: 900;
  letter-spacing: 1px;
  text-decoration: none;
}

/* ====================== HERO ====================== */

.hero {
  height: calc(85vh + 1px);
  background:
    linear-gradient(rgba(111, 111, 111, 0.5), var(--bg-body)),
    url("images/hero.jpg");
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.badge {
  background: #000;
  color: #fff;
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 900;
  margin-bottom: 30px;
  display: inline-block;
  letter-spacing: 2px;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 4.5rem);
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap; /* ← This keeps it on ONE line */
  margin-bottom: 25px;
}

.highlight {
  color: var(--primary);
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 40px;
  color: var(--text-dim);
}

/* ====================== BUTTONS ====================== */

.btn-primary,
.btn-secondary,
.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 18px 40px;
  font-weight: 900;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  border-radius: 2px;
}

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

.btn-primary:hover {
  background: #000;
  transform: translateY(-3px);
}

.btn-secondary {
  background: var(--text-dim);
  color: #fff;
  font-weight: 500;
}

.btn-secondary:hover {
  background: #000;
  transform: translateY(-3px);
}

.btn-download {
  background: #000;
  color: #fff;
  padding: 12px 20px;
  font-size: 0.8rem;
  letter-spacing: 1px;
}

.btn-download:hover {
  background: var(--primary);
  transform: translateY(-2px);
}

/* ====================== ABOUT ====================== */

.about-content {
  max-width: 900px;
  text-align: left;
}

.about-lead {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 25px;
  color: var(--text-dark);
}

.about-content p {
  font-size: 1.1rem;
  color: var(--text-dim);
  margin-bottom: 20px;
}

.why-join-box {
  margin: 40px 0;
  padding: 30px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.why-join-box h3 {
  font-size: 0.9rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.why-join-list {
  list-style: none;
}

.why-join-list li {
  font-size: 1.1rem;
  margin-bottom: 12px;
  padding-left: 25px;
  position: relative;
}

.why-join-list li .highlight {
  position: absolute;
  left: 0;
  font-weight: 900;
}

/* ====================== CARDS & GRID ====================== */

.section-title {
  font-size: 2.5rem;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 40px;
}

.dot {
  color: var(--primary);
}

.projects-grid,
.runners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    calc(calc(100% - (3 * var(--event-gap))) / 4)
  );
  gap: var(--event-gap);
  overflow: hidden;
  max-height: 45vh;
  padding-top: 10px;
}

.events-grid.expanded {
  max-height: 10000px; /* Large enough to fit all content */
}

.events-grid h3 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 1rem;
}

.project-card,
.route-card,
.runner-card,
.event-card {
  background: var(--bg-body);
  padding: 25px;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.project-card:hover,
.route-card:hover,
.runner-card:hover,
.event-card {
  transform: translateY(-5px);
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.event-partener h3 {
  text-align: center;
  font-size: 1.5em;
}

.runner-card {
  padding: 0;
  overflow: hidden;
  cursor: zoom-in;
  line-height: 0;
  background: #fff;
}

.runner-card img,
.event-card img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

.runner-card:hover img,
.event-card:hover img {
  transform: scale(1.05);
}

.card-tag {
  color: var(--primary);
  font-weight: 900;
  font-size: 0.75rem;
  margin-bottom: 15px;
  display: block;
}

.card-date {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--primary-faded);
  font-weight: 900;
  font-size: 0.9rem;
  display: block;
}

.event-partener .card-date {
  color: var(--primary);
}

.btn-text {
  font-weight: 900;
  color: var(--primary);
  margin-top: 25px;
  display: block;
}

.card-footer {
  margin-top: auto;
  padding-top: 25px;
}
.event-card {
  gap: 10px;
  padding: 13px;
}

.card-top {
  height: max(min(14vw, 6vh), 60px);
  gap: 5px;
  display: grid;
}

.event-partener .card-top {
  gap: 0;
}

.event-partener {
  border-width: 8px;
  border-style: groove;
  animation-name: borderAnimation;
  animation-duration: 2s;
  animation-iteration-count: infinite;
  padding: 5px;
}

/* ====================== SLIDER ====================== */

.slider-container {
  position: relative;
  height: 750px;
  overflow: hidden;
  background: #000;
}

.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  z-index: 1;
  pointer-events: none;
  cursor: zoom-in;
}

.slide.active {
  opacity: 1;
  z-index: 2;
  pointer-events: auto;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  color: #fff;
  border: none;
  width: 50px;
  height: 50px;
  cursor: pointer;
  z-index: 10;
  font-size: 20px;
}

.prev-btn {
  left: 0;
}
.next-btn {
  right: 0;
}

/* ====================== CONTACT & PARTNERS ====================== */

.highfive-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
}

.contact-simple {
  text-align: center;
  background: var(--bg-body);
  padding: 60px 20px;
  border-radius: 4px;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
}

.contact-email {
  font-size: 1.5rem;
  font-weight: 700;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 5px;
}

.parteneri-zona {
  padding: 60px 0;
  background: var(--bg-body);
}

.parteneri-grid {
  display: flex;
  gap: 50px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  padding: 20px 0;
}

.parteneri-label {
  text-align: center;
  font-weight: 800;
  font-size: 0.8rem;
  color: #bbb;
  margin-bottom: 30px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.p-link {
  display: block;
  transition: var(--transition);
  text-decoration: none;
}

.p-link:link,
.p-link:visited {
  color: var(--text-dark);
}

.p-link img {
  height: 5vmin;
  width: auto;
  display: block;
}

.p-link:hover {
  transform: translateY(-3px);
}

/* ====================== FAQ ====================== */

.subpage {
  background: var(--bg-body);
}

.faq-item {
  background: #fff;
  padding: 25px;
  margin-bottom: 25px;
  border-left: 4px solid var(--primary);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}

/* ====================== FOOTER ====================== */

footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  background: #fff;
  text-align: center;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
}

/* ====================== MODAL ====================== */

.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.9);
  cursor: zoom-out;
  padding-top: 50px;
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 85vh;
  object-fit: contain;
  border: 3px solid #fff;
  animation: zoomIn 0.3s;
}

#caption {
  margin: auto;
  display: block;
  width: 80%;
  text-align: center;
  color: #fff;
  padding: 15px 0;
  font-weight: 700;
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}
/*trasee*/
/* Stiluri specifice pentru galeria din cardul de traseu */
.route-gallery {
  position: relative;
  width: 100%;
  height: 250px;
  overflow: hidden;
  border-radius: 4px;
  margin-bottom: 20px;
  background: #eee;
}
.route-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}
.route-slide.active {
  display: block;
}
.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  padding: 10px;
  cursor: pointer;
  z-index: 5;
}
.prev-arrow {
  left: 0;
}
.next-arrow {
  right: 0;
}

/* Stil pentru Load More Text */
.description-container {
  position: relative;
  margin-bottom: 15px;
}
.long-description {
  height: 60px;
  overflow: hidden;
  transition: height 0.3s ease;
  color: var(--text-dim);
}
.long-description.expanded {
  height: auto;
}
.btn-load-more {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  font-size: 0.9rem;
  margin-top: 5px;
}

/* Grid ajustat pentru Trasee */
.routes-container {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    calc(calc(100% - (3 * var(--event-gap))) / 4)
  );
  gap: var(--event-gap);
}

/* Autism24h */

.cause-header {
  background:
    linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
    url("https://images.unsplash.com/photo-1552674605-db6ffd4facb5?auto=format&fit=crop&q=80&w=1500");
  background-size: cover;
  background-position: center;
  color: white;
  text-align: center;
  padding: 80px 0 80px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 40px;
}
.stat-box {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.stat-box h2 {
  color: var(--primary);
  font-size: 2.5rem;
  margin-bottom: 5px;
}

.donation-card {
  background: var(--bg-alt);
  padding: 40px;
  border-radius: 4px;
  border-left: 8px solid var(--primary);
  margin-top: 40px;
}
.km-logic {
  background: #fff;
  padding: 20px;
  border-radius: 4px;
  margin: 20px 0;
  display: inline-block;
  border: 1px dashed var(--primary);
}
.progress-bar-container {
  background: #ddd;
  height: 25px;
  border-radius: 15px;
  margin: 20px 0;
  overflow: hidden;
  position: relative;
}
.progress-fill {
  background: var(--primary);
  height: 100%;
  width: 20%;
  transition: width 2s ease-out;
}
.progress-text {
  position: absolute;
  width: 100%;
  text-align: center;
  top: 0;
  line-height: 25px;
  color: #000;
  font-weight: 900;
  font-size: 0.8rem;
}

/*Animations*/

@keyframes zoomIn {
  from {
    transform: scale(0.7);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes borderAnimation {
  0% {
    border-color: #ffc2c2;
    background-color: var(--bg-body);
  }
  50% {
    border-color: var(--primary);
    background-color: #ffefb1;
  }
  100% {
    border-color: #ffc2c2;
    background-color: var(--bg-body);
  }
}

/* ====================== HAMBURGER & MOBILE NAV ====================== */

.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  z-index: 1100;
  padding: 10px;
}

.hamburger span {
  display: block;
  width: 28px;
  height: 3px;
  background-color: var(--text-dark);
  transition: all 0.3s ease;
}

.mobile-break {
  display: none;
}

/* ====================== RESPONSIVE ====================== */

@media (max-width: 1000px) {
  .routes-container {
    grid-template-columns: repeat(
      auto-fit,
      calc(calc(100% - (2 * var(--event-gap))) / 3)
    );
  }

  .events-grid {
    grid-template-columns: repeat(
      auto-fit,
      calc(calc(100% - (2 * var(--event-gap))) / 3)
    );
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 80px;
    gap: 15px;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1050;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
  }

  .main-nav a {
    width: 100%;
    text-align: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 1.1rem;
  }

  .main-nav.active {
    right: 0;
  }

  .hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }
  .hamburger {
    display: flex;
  }

  .slider-container {
    height: 450px;
  }

  .hero h1 {
    white-space: normal;
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {

  .events-grid {
    grid-template-columns: repeat(
      auto-fit,
      calc(calc(100% - var(--event-gap)) / 2)
    );
  }

  .slider-container {
    height: 250px;
  }

  .about-lead,
  .about-content p {
    font-size: 1rem;
  }

  .contact-email {
    font-size: 1rem;
  }

  .footer-grid {
    flex-direction: column;
    gap: 20px;
  }

  .mobile-break {
    display: block;
  }

  .parteneri-grid {
    gap: 30px;
  }

  .p-link img {
    height: 35px;
  }

  .btn-download{
    font-size:0.6rem;
  }
}

@media (max-width: 400px) {
    .routes-container {
    grid-template-columns: repeat(auto-fit, 100%);
  }
  .events-grid {
    grid-template-columns: repeat(auto-fit, 100%);
  }
}
