/* Modern CSS for Mexico Handball Tournament Website */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  /* Green-focused theme with complementary colors */
  --primary: #2E7D32; /* Forest Green */
  --primary-light: #4CAF50; /* Lighter Green */
  --primary-dark: #1B5E20; /* Darker Green */
  --secondary: #2E7D32; /* Use green instead of burgundy for consistency */
  --accent: #F8BBD9; /* Soft Pink */
  --accent-orange: #FFCC80; /* Soft Peach/Orange */
  --text-light: #f8f9fa;
  --text-dark: #212529;
  --background: #ffffff;
  --card-bg: rgba(46, 125, 50, 0.6); /* Green with transparency */
  --card-hover: rgba(46, 125, 50, 0.75); /* Darker green on hover */
  --gradient-overlay: linear-gradient(to bottom, rgba(46, 125, 50, 0.5), rgba(76, 175, 80, 0.7)); /* Green gradient */
}

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

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--background);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
  padding-top: 0; /* Remove padding-top - header will float over content */
}



/* Top Bar Section */
.top-bar {
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  padding: 8px 0;
}

.container {
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
}

/* Updated Language Selector */


.btn-sm {
  padding: 0.5rem 1.5rem;
  font-size: 0.6rem;
}


@media (max-width: 992px) {

  .btn-sm {
    width: 100%;
    display: block;
  }
}

.btn {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(46, 125, 50, 0.4);
}

.btn-secondary {
  background-color: var(--accent);
  color: var(--text-dark);
  box-shadow: 0 4px 15px rgba(248, 187, 217, 0.3);
}

.btn-secondary:hover {
  background-color: #F48FB1; /* Slightly darker pink */
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(248, 187, 217, 0.4);
}

/* Scroll down indicator */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-light);
  animation: bounce 2s infinite;
  cursor: pointer;
}

.scroll-indicator i {
  font-size: 2rem;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.scroll-text {
  font-size: 0.9rem;
  margin-top: 0.5rem;
  font-weight: 500;
}

/* News info box styles - redesigned to be more subtle and thin */
.news-info-box {
  background: rgba(85, 83, 83, 0.95);
  border-radius: 15px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  margin: 1.5rem auto;
  max-width: 1200px;
  overflow: hidden;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-info-box.thin {
  background: rgba(83, 80, 80, 0.85);
  border-radius: 30px;
  max-width: 90%;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.news-info-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.news-info-box.thin:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.announcement-content {
  padding: 1.5rem;
}

.news-info-box.thin .announcement-content {
  padding: 0.8rem 1.5rem;
}

.announcement-item {
  display: none;
}

.announcement-item[data-lang="en"] {
  display: block;
}

/* Show Spanish announcement when the language is Spanish */
html[lang="es"] .announcement-item[data-lang="en"] {
  display: none;
}

html[lang="es"] .announcement-item[data-lang="es"] {
  display: block;
}

.announcement-item h3 {
  color: var(--primary);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.announcement-item p {
  color: var(--text-light);
  margin-bottom: 0;
  font-size: 0.95rem;
  text-align: center;
}

.announcement-highlight {
  color: var(--primary);
  font-weight: 600;
}

/* Thin button styling for the tournament rules link */
.thin-button {
  display: inline-block;
  padding: 4px 12px;
  margin-left: 8px;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  border-radius: 20px;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.thin-button:hover {
  background-color: rgba(255, 255, 255, 0.35);
  color: var(--primary-dark);
  transform: translateY(-1px);
}

.announcement-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.announcement-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .news-info-box {
    max-width: 95%;
  }
  
  .news-info-box.thin .announcement-content {
    padding: 0.7rem 1.2rem;
  }
  
  .announcement-item p {
    font-size: 0.9rem;
  }
}

/* Page Header - For subpages */
.page-header-wrapper {
  position: relative;
  height: 50vh;
  min-height: 300px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 0;
}

.page-header-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: var(--gradient-overlay), url('./public/fondo2.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  z-index: -1;
  filter: brightness(0.7);
}

.page-header-content {
  max-width: 1200px;
  width: 90%;
  margin: 0 auto;
  color: var(--text-light);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 80px; /* Space for header */
  animation: fadeInUp 1s ease;
}

.page-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--primary);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 0.8s ease;
}

.page-subtitle {
  font-size: 1.2rem;
  font-weight: 400;
  max-width: 800px;
  margin-bottom: 2rem;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 0.8s ease 0.2s;
  animation-fill-mode: both;
}

.page-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  animation: fadeInUp 0.8s ease 0.4s;
  animation-fill-mode: both;
}

@media (max-width: 992px) {
  .page-header-wrapper {
    height: 40vh;
    min-height: 350px;

  }
  
  .page-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;

  }
  
  .page-subtitle {
    font-size: 1rem;
    margin-bottom: 1rem;

  }
}

@media (max-width: 768px) {
  .page-header-wrapper {
    height: 35vh;
    min-height: 350px;
  }
  
  .page-title {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;

  }
  
  .page-subtitle {
    font-size: 0.8rem;
    margin-bottom: 1rem;

  }
  
  .page-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
  }
}

/* Content styling for subpages */
.content-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.rich-text {
  margin-bottom: 3rem;
  line-height: 1.7;
}

.rich-text h2 {
  font-size: 2rem;
  color: var(--primary-dark);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #eaeaea;
}

.rich-text h3 {
  font-size: 1.5rem;
  color: var(--primary);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.rich-text p {
  margin-bottom: 1.3rem;
  font-size: 1.05rem;
}

.rich-text ul, .rich-text ol {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

.rich-text li {
  margin-bottom: 0.7rem;
}

.elements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.element-card {
  background-color: #f8f9fa;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

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

.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.gallery-item {
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  position: relative;
}

.gallery-img {
  width: 100%;
  display: block;
  transition: all 0.5s ease;
}

.gallery-item:hover .gallery-img {
  transform: scale(1.05);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: white;
  font-size: 0.9rem;
}

.quote-box {
  background-color: rgba(255,105,0,0.03);
  border-left: 5px solid var(--primary);
  padding: 2rem;
  margin: 3rem 0;
  border-radius: 0 15px 15px 0;
  position: relative;
}

.quote-box:before {
  content: '"';
  position: absolute;
  top: -25px;
  left: 20px;
  font-size: 5rem;
  font-family: Georgia, serif;
  color: var(--primary);
  opacity: 0.2;
  line-height: 1;
}

.quote-box blockquote {
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.quote-box cite {
  display: block;
  font-weight: 600;
  text-align: right;
  color: var(--primary-dark);
}

.cta-section {
  background-color: var(--secondary);
  padding: 3rem;
  border-radius: 15px;
  margin: 3rem 0;
  color: white;
  position: relative;
  overflow: hidden;
}

.cta-section:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1));
  z-index: 1;
}

.cta-content {
  position: relative;
  z-index: 2;
}

.cta-content h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

.cta-content p {
  margin-bottom: 2rem;
  font-size: 1.1rem;
  max-width: 800px;
}

@media (max-width: 768px) {
  .elements-grid {
    grid-template-columns: 1fr;
  }
  
  .image-gallery {
    grid-template-columns: 1fr;
  }
  
  .quote-box {
    padding: 1.5rem;
  }
  
  .quote-box blockquote {
    font-size: 1.1rem;
  }
  
  .cta-section {
    padding: 2rem;
  }
  
  .cta-content h2 {
    font-size: 1.7rem;
  }
}

/* Info Cards Section */
.info-section {
  padding: 4rem 0;
  background-color: var(--background);
  overflow: hidden;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 4rem;
  color: var(--primary-dark);
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background-color: var(--primary);
}

.info-card-icon {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 3rem;
  opacity: 0.2;
  color: white;
}


.fa-chevron-down {
  transition: transform 0.3s ease;
}


.card-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
}

/* Video Section */
.video-section {
  padding: 7rem 0;
  background-color: var(--background);
  text-align: center;
}

.video-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
}

.responsive-iframe {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.responsive-iframe iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 20px;
}


/* Info links styling */
.info-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
  margin-top: 0.5rem;
}

.info-link:hover {
  color: white;
  transform: translateX(5px);
}


@media (max-width: 576px) {
  .explore-image {
    height: 250px;
  }
  
  .explore-overlay {
    padding: 1.5rem;
  }
  
  .explore-text {
    padding: 1.5rem;
  }
}



/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0) translateX(-50%);
  }
  40% {
    transform: translateY(-15px) translateX(-50%);
  }
  60% {
    transform: translateY(-7px) translateX(-50%);
  }
}

/* Scroll to top button */
.scroll-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.scroll-top-btn.show {
  opacity: 1;
  visibility: visible;
}

.scroll-top-btn:hover {
  background-color: var(--primary-dark);
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

/* Preloader */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--secondary);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 5px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.preloader.fade-out {
  opacity: 0;
}

/* Media Queries */
@media (max-width: 992px) {

  
  .section-title {
    font-size: 1.8rem;
  }

}

@media (max-width: 768px) {
  .section-title {
    font-size: 1.6rem;
  }
}

@media (max-width: 576px) {
  
  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
  
  
}