/* ============================================
   Arbres pel Territori - Design System
   ============================================ */

@font-face {
  font-family: 'The Northern Block';
  src: url('../fonts/The Northern Block - Toroka Condensed Bold.otf') format('opentype');
  font-weight: bold;
  font-style: normal;
}

:root {
  /* Colors from branding */
  --primary: #2E8B8B;
  /* Teal */
  --primary-dark: #247070;
  --secondary: #264734;
  /* Dark green */
  --accent: #E57A2D;
  /* Orange */
  --accent-light: #F5923D;
  --olive: #8B9A5E;
  --olive-light: #A8B87A;
  --background: #F5F3ED;
  /* Cream */
  --background-alt: #EBE9E3;
  --text: #333333;
  --text-light: #666666;
  --white: #FFFFFF;

  /* Typography */
  --font-main: 'Outfit', sans-serif;

  /* Spacing */
  --section-padding: 5rem 2rem;
  --container-max: 1200px;

  /* Animations */
  --transition: 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--background);
  color: var(--text);
  line-height: 1.7;
  font-size: 1.1rem;
}

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

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

a:hover {
  color: var(--accent);
}

/* ============================================
   Typography
   ============================================ */
h1,
h2,
h3,
h4 {
  font-family: 'The Northern Block', sans-serif;
  line-height: 1.2;
  font-weight: bold;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--secondary);
}

h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--secondary);
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.4rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1rem;
}

/* ============================================
   Layout
   ============================================ */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: var(--section-padding);
}

section:nth-child(even) {
  background-color: var(--background-alt);
}

/* ============================================
   Navigation
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 1rem 0;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-logo img {
  height: 50px;
  width: auto;
}

.nav-logo span {
  font-family: 'The Northern Block', sans-serif;
  font-weight: bold;
  font-size: 1.2rem;
  color: var(--secondary);
}

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

.nav-links a {
  color: var(--text);
  font-weight: 500;
  position: relative;
}

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

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

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background: var(--secondary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 2rem 4rem;
  background: linear-gradient(135deg, var(--background) 0%, var(--background-alt) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: url('/images/landscape.webp') center/cover;
  opacity: 0.4;
  filter: blur(1px);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-logo {
  width: clamp(150px, 30vw, 400px);
  margin: 0 auto 2rem;
  animation: float 6s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 40px rgba(255, 255, 255, 0.6));
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-15px);
  }
}

.hero h1 {
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(46, 139, 139, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(46, 139, 139, 0.4);
  color: var(--white);
}

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

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

/* ============================================
   Section Styling
   ============================================ */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
}

/* ============================================
   Cards
   ============================================ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* Special layout for Que fem section on wide screens */
@media (min-width: 992px) {
  #quefem .cards-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
  }

  #quefem .cards-grid .card:nth-child(1) {
    grid-row: 1;
  }

  #quefem .cards-grid .card:nth-child(2) {
    grid-row: 2;
  }

  #quefem .cards-grid .card:nth-child(3) {
    grid-row: 1 / 3;
    grid-column: 2;
  }
}

.card {
  background: var(--white);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.card-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--olive) 100%);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.card h3 {
  color: var(--secondary);
}

.card p {
  color: var(--text-light);
  margin-bottom: 0;
}

/* ============================================
   Partners Section
   ============================================ */
.partners-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.partner {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.5rem;
  background: var(--white);
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.partner-badge {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 1.2rem;
}

.partner-content h3 {
  margin-bottom: 0.5rem;
}

.partner-content p {
  color: var(--text-light);
  margin-bottom: 0;
}

.collaborators {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--white);
  border-radius: 15px;
  border-left: 4px solid var(--olive);
}

/* ============================================
   Impact Section
   ============================================ */
.impact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.impact-text {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.impact-highlight {
  padding: 2rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--white);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.impact-highlight h3 {
  color: var(--white);
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

.impact-highlight p {
  opacity: 0.95;
  margin-bottom: 0;
}

/* ============================================
   Results Section
   ============================================ */
.results-content {
  text-align: center;
}

.results-content>p {
  max-width: 700px;
  margin: 0 auto 2rem;
  color: var(--text-light);
}

/* ============================================
   Gallery Section
   ============================================ */
.gallery-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.gallery-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: var(--white);
  border-radius: 50px;
  color: var(--primary);
  font-weight: 500;
  border: 2px solid var(--primary);
  transition: var(--transition);
}

.gallery-link:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

.gallery-link svg {
  width: 20px;
  height: 20px;
}

/* ============================================
   Participate Section
   ============================================ */
.participate {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  color: var(--white);
  text-align: center;
}

.participate h2 {
  color: var(--white);
}

.participate h2::after {
  background: var(--accent);
}

.participate-heading {
  font-family: 'The Northern Block', sans-serif;
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 1rem;
  color: var(--white);
}

.participate p {
  max-width: 700px;
  margin: 0 auto 2rem;
  opacity: 0.95;
}

.participate .btn-primary {
  background: var(--accent);
  box-shadow: 0 4px 20px rgba(229, 122, 45, 0.4);
}

.participate .btn-primary:hover {
  background: var(--accent-light);
  box-shadow: 0 8px 30px rgba(229, 122, 45, 0.5);
}

/* ============================================
   Contact Section
   ============================================ */
.contact {
  text-align: center;
}

.contact-heading {
  font-family: 'The Northern Block', sans-serif;
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 1rem;
  color: var(--primary);
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.contact-card {
  background: var(--white);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.05);
  text-align: center;
}

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.contact-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--olive) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
}

.contact-card h4 {
  font-family: 'The Northern Block', sans-serif;
  font-size: 1.3rem;
  color: var(--secondary);
  margin-bottom: 1rem;
}

.contact-description {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.contact-email {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(46, 139, 139, 0.3);
  transition: var(--transition);
}

.contact-email:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(46, 139, 139, 0.4);
  color: var(--white);
}

/* ============================================
   Footer
   ============================================ */
.footer {
  background: var(--secondary);
  color: var(--white);
  text-align: center;
  padding: 3rem 2rem 2rem;
}

.footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.footer-organizers,
.footer-supporters {
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  width: 100%;
}

.footer-supporters {
  margin-bottom: 2rem;
}

.footer-supporters:last-of-type {
  border-bottom: none;
}

.organizers-label,
.supporters-label {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-bottom: 1rem;
}

.organizer-logos,
.supporter-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.organizer-logos img,
.supporter-logos img {
  height: 60px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.9;
  transition: var(--transition);
}

.organizer-logos img:hover,
.supporter-logos img:hover {
  opacity: 1;
}

.footer p:last-child {
  opacity: 0.8;
  margin-bottom: 0;
}

.footer-copyright {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin-top: 1rem;
}

.footer-copyright p {
  opacity: 0.8;
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .footer .container {
    flex-direction: row;
    justify-content: space-around;
    align-items: flex-start;
  }

  .footer-organizers,
  .footer-supporters {
    width: auto;
    padding-bottom: 0;
    border-bottom: none;
    margin-bottom: 0;
  }

  .footer-organizers {
    text-align: left;
  }

  .footer-supporters {
    text-align: left;
  }

  .organizer-logos {
    justify-content: flex-start;
  }

  .supporter-logos {
    justify-content: flex-start;
  }
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 992px) {
  .impact-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 4rem 1.5rem;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--white);
    padding: 1.5rem;
    gap: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding: 7rem 1.5rem 3rem;
    min-height: auto;
  }

  .hero-logo {
    width: 150px;
  }

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

  .partner {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 1rem;
  }

  .gallery-links {
    flex-direction: column;
  }

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