/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --font-heading: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Playfair Display', ui-serif, Georgia, Cambria, 'Times New Roman', serif;
}

body {
  font-family: var(--font-heading);
  line-height: 1.6;
  color: #ffffff;
  background-color: #0a0a0a;
  overflow-x: hidden;
}

/* Flame Animation Background */
.flame-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  /* added overflow hidden to prevent flame elements from causing scrollbars */
  overflow: hidden;
  background: linear-gradient(180deg, #0a0a0a 0%, #1a0a0a 50%, #0a0a0a 100%);
}

.flame {
  position: absolute;
  bottom: -50px;
  width: 150px;
  height: 200px;
  background: radial-gradient(
    ellipse at center bottom,
    rgba(220, 38, 38, 0.15) 0%,
    rgba(239, 68, 68, 0.1) 25%,
    rgba(185, 28, 28, 0.05) 50%,
    transparent 75%
  );
  border-radius: 50% 50% 0 0;
  filter: blur(20px);
  animation: flicker 3s ease-in-out infinite;
  opacity: 0.5;
}

.flame-1 {
  left: 10%;
  animation-delay: 0s;
  animation-duration: 4s;
}

.flame-2 {
  left: 30%;
  animation-delay: 1s;
  animation-duration: 3.5s;
}

.flame-3 {
  left: 50%;
  animation-delay: 0.5s;
  animation-duration: 4.5s;
}

.flame-4 {
  left: 70%;
  animation-delay: 1.5s;
  animation-duration: 3.8s;
}

.flame-5 {
  left: 90%;
  animation-delay: 0.8s;
  animation-duration: 4.2s;
}

@keyframes flicker {
  0%,
  100% {
    transform: translateY(0) scaleY(1);
    opacity: 0.4;
  }
  25% {
    transform: translateY(-30px) scaleY(1.1);
    opacity: 0.6;
  }
  50% {
    transform: translateY(-20px) scaleY(0.95);
    opacity: 0.5;
  }
  75% {
    transform: translateY(-40px) scaleY(1.05);
    opacity: 0.55;
  }
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid rgba(220, 38, 38, 0.2);
  /* added overflow-x hidden to prevent horizontal scrolling */
  overflow-x: hidden;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Changed logo to use flexbox alignment matching nav-links */
.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #dc2626;
  letter-spacing: 2px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
}

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

.nav-links a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #dc2626;
}

/* Added styles for language toggle button */
.lang-toggle {
  background: transparent;
  border: 2px solid #dc2626;
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
}

.lang-toggle:hover {
  background: #dc2626;
  color: #ffffff;
  transform: translateY(-2px);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 8rem 2rem 4rem;
  position: relative;
}

.hero-content {
  max-width: 900px;
  z-index: 1;
}

.hero-logo {
  max-width: 500px;
  width: 100%;
  height: auto;
  margin-bottom: 2rem;
  filter: drop-shadow(0 10px 30px rgba(220, 38, 38, 0.4));
  animation: logo-glow 3s ease-in-out infinite;
}

@keyframes logo-glow {
  0%,
  100% {
    filter: drop-shadow(0 10px 30px rgba(220, 38, 38, 0.4));
  }
  50% {
    filter: drop-shadow(0 15px 40px rgba(220, 38, 38, 0.6));
  }
}

.hero-subtitle {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: #ef4444;
  margin-bottom: 1.5rem;
  font-weight: 300;
  letter-spacing: 1px;
  /* increased min-height to accommodate both languages */
  min-height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-description {
  font-size: 1.1rem;
  color: #d1d5db;
  margin-bottom: 3rem;
  line-height: 1.8;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  /* increased min-height to accommodate longer spanish text */
  min-height: 10rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 1rem 2.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-primary {
  background: #dc2626;
  color: #ffffff;
  border: 2px solid #dc2626;
}

.btn-primary:hover {
  background: #b91c1c;
  border-color: #b91c1c;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(220, 38, 38, 0.3);
}

.btn-secondary {
  background: transparent;
  color: #ffffff;
  border: 2px solid #ffffff;
}

.btn-secondary:hover {
  background: #ffffff;
  color: #0a0a0a;
  transform: translateY(-2px);
}

/* Replaced scroll indicator styles with simple down arrow */
.scroll-arrow-container {
  position: absolute;
  bottom: 3rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.down-arrow {
  color: #dc2626;
  animation: arrow-bounce 2s ease-in-out infinite;
}

@keyframes arrow-bounce {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.6;
  }
  50% {
    transform: translateY(10px);
    opacity: 1;
  }
}

/* Section Styles */
section {
  padding: 6rem 0;
  position: relative;
}

.section-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
  text-align: center;
  color: #ffffff;
  letter-spacing: 2px;
}

.section-subtitle {
  text-align: center;
  color: #9ca3af;
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto 4rem;
  /* added min-height to prevent subtitle resizing */
  min-height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* About Section */
.about {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

.about-content {
  display: grid;
  gap: 4rem;
  text-align: justify;
}

.about-text {
  max-width: 900px;
  margin: 0 auto;
}

.about-text .lead {
  font-size: 1.3rem;
  color: #dc2626;
  font-weight: 500;
  margin-bottom: 2rem;
  line-height: 1.8;
  /* increased min-height and added word-wrap for overflow prevention */
  min-height: 7rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.about-text p {
  color: #d1d5db;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  line-height: 1.8;
  /* added min-height for consistent paragraph height */
  min-height: 10rem;
}

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

.feature-card {
  background: rgba(220, 38, 38, 0.05);
  border: 1px solid rgba(220, 38, 38, 0.2);
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  transition: all 0.3s ease;
  /* increased min-height to prevent resizing with longer spanish text */
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.feature-card:hover {
  transform: translateY(-5px);
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.4);
  box-shadow: 0 10px 30px rgba(220, 38, 38, 0.2);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  color: #ffffff;
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
  /* increased min-height to accommodate both languages */
  min-height: 3.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-card p {
  color: #9ca3af;
  line-height: 1.6;
  /* increased min-height to accommodate longer spanish descriptions */
  min-height: 7rem;
}

/* Events Section */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.event-card {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.3s ease;
  /* increased min-height to prevent resizing with spanish text */
  min-height: 420px;
  display: flex;
  flex-direction: column;
}

.event-card:hover {
  transform: translateY(-5px);
  border-color: #dc2626;
  box-shadow: 0 15px 40px rgba(220, 38, 38, 0.3);
}

.event-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.event-type {
  background: #dc2626;
  color: #ffffff;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.event-date {
  color: #9ca3af;
  font-size: 0.875rem;
  font-weight: 500;
}

.event-title {
  font-size: 1.5rem;
  color: #ffffff;
  margin-bottom: 1rem;
  font-weight: 700;
  /* increased min-height for longer spanish titles */
  min-height: 4rem;
  display: flex;
  align-items: center;
}

.event-description {
  color: #d1d5db;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  /* increased min-height for longer spanish descriptions */
  min-height: 10rem;
  flex-grow: 0;
}

.event-link {
  color: #dc2626;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  transition: all 0.3s ease;
}

.event-link:hover {
  color: #ef4444;
  transform: translateX(5px);
}

/* Community Section */
.community {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, rgba(10, 10, 10, 0.8) 100%);
  border-top: 1px solid rgba(220, 38, 38, 0.2);
  border-bottom: 1px solid rgba(220, 38, 38, 0.2);
}

.community-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.community-text {
  color: #d1d5db;
  font-size: 1.1rem;
  margin-bottom: 3rem;
  line-height: 1.8;
  /* added min-height for consistent community text height */
  min-height: 8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.social-btn {
  padding: 1rem 2rem;
  background: rgba(220, 38, 38, 0.1);
  border: 2px solid rgba(220, 38, 38, 0.3);
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.social-btn:hover {
  background: #dc2626;
  border-color: #dc2626;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(220, 38, 38, 0.3);
}

/* Contact Section */
.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-top: 3rem;
}

.contact-item {
  text-align: center;
  padding: 2rem;
  background: rgba(220, 38, 38, 0.05);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: 12px;
  /* increased min-height to accommodate spanish text */
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-item h3 {
  color: #dc2626;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  font-weight: 700;
  /* increased min-height for consistent heading height */
  min-height: 2rem;
}

.contact-item p {
  color: #d1d5db;
  font-size: 1rem;
  /* added min-height for consistent contact text height */
  min-height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Footer */
.footer {
  background: rgba(0, 0, 0, 0.8);
  border-top: 1px solid rgba(220, 38, 38, 0.2);
  padding: 4rem 0 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-section h3 {
  color: #dc2626;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.footer-section h4 {
  color: #ffffff;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-section p {
  color: #9ca3af;
  line-height: 1.8;
  /* added min-height for consistent footer text height */
  min-height: 6rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.75rem;
}

.footer-section ul li a {
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section ul li a:hover {
  color: #dc2626;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(220, 38, 38, 0.1);
  color: #6b7280;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-links {
    gap: 1rem;
    font-size: 0.9rem;
  }

  /* Adjusted language toggle for mobile */
  .lang-toggle {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }

  .hero {
    padding: 6rem 1rem 3rem;
  }

  .hero-logo {
    max-width: 300px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  section {
    padding: 4rem 0;
  }

  .about-features,
  .events-grid,
  .contact-info {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .logo {
    font-size: 1.2rem;
  }

  .hero-logo {
    max-width: 250px;
  }
}
