:root {
  --mahogany-50: #ffecec;
  --mahogany-100: #ffcece;
  --mahogany-200: #ff9d9d;
  --mahogany-300: #ff6969;
  --mahogany-400: #fe0000;
  --mahogany-500: #cd0000;
  --mahogany-600: #9c0000;
  --mahogany-700: #730000;
  --mahogany-800: #4e0000;
  --mahogany-900: #3f0000;
  --mahogany-1000: #360000;
  --mahogany-1100: #2b0000;
  --negro: #000000;
  --negro-claro: #161a1d;
}


body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, var(--negro-claro) 0%, var(--mahogany-1000) 100%);
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  height: 100vh;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  transition: left 0.3s ease;
  z-index: 1000;
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
}

.sidebar.open {
  left: 0;
}

/* En móviles, ocultar el sidebar por defecto */
@media (max-width: 768px) {
  .sidebar {
    left: -300px;
  }
  
  .sidebar.open {
    left: 0;
  }
}

.sidebar-header {
  padding: 30px 25px;
  background: linear-gradient(135deg, var(--mahogany-500), var(--mahogany-600));
  color: white;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h3 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
}

.sidebar-menu {
  padding: 20px 0;
}

.menu-item {
  padding: 15px 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
  color: #333;
}

.menu-item:hover {
  background-color: var(--mahogany-50);
  border-left-color: var(--mahogany-400);
  color: var(--mahogany-500);
}

.menu-item i {
  margin-right: 12px;
  width: 20px;
  text-align: center;
}

.menu-toggle {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1001;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid var(--mahogany-300);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(156, 0, 0, 0.2);
  transition: all 0.3s ease;
  display: none; /* Ocultar por defecto en desktop */
  color: var(--mahogany-700);
}

.menu-toggle:hover {
  transform: scale(1.1);
  background: var(--mahogany-50);
  border-color: var(--mahogany-500);
}

/* Mostrar el botón solo en móviles */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
}

.main-content {
  padding: 50px 20px 30px;
  max-width: 1200px;
  margin: 0 auto;
  margin-left: 320px; /* Espacio para el sidebar en desktop */
  transition: margin-left 0.3s ease;
}

/* En móviles, quitar el margen del sidebar */
@media (max-width: 768px) {
  .main-content {
    margin-left: 0;
    padding: 50px 20px 30px;
  }
}

.contest-container {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 40px rgba(156, 0, 0, 0.1);
  overflow: hidden;
  border: 1px solid var(--mahogany-100);
}

.contest-header {
  background: linear-gradient(135deg, var(--mahogany-500), var(--mahogany-600));
  color: white;
  padding: 10px;
  text-align: center;
}

.contest-header h1 {
  font-size: 2.5rem;
  margin: 0 0 10px;
  font-weight: 700;
}

.contest-header p {
  font-size: 1.2rem;
  margin: 0;
  opacity: 0.9;
}

.hero-section {
  position: relative;
  min-height: 750px;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: linear-gradient(135deg, var(--mahogany-700), var(--mahogany-900));
  padding: 30px 0;
}

.hero-content {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.hero-image {
  width: 90%;
  max-width: 1400px;
  height: auto;
  object-fit: contain;
  object-position: center center;
  border-radius: 0;
  margin: 0 auto;
  display: block;
}

.hero-overlay {
  position: relative;
  width: 100%;
  background: linear-gradient(135deg, var(--mahogany-600), var(--mahogany-700));
  color: white;
  padding: 40px;
  text-align: center;
  margin-top: 0;
}

.hero-overlay h2 {
  font-size: 2.5rem;
  margin: 0 0 10px;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-overlay p {
  font-size: 1.2rem;
  margin: 0;
  opacity: 0.9;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.contest-body {
  padding: 40px;
}

.bases-section {
  background: var(--mahogany-50);
  border-radius: 15px;
  padding: 30px;
  margin-bottom: 30px;
  border-left: 5px solid var(--mahogany-400);
}

.bases-section h2 {
  color: var(--mahogany-600);
  margin-bottom: 20px;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
}

.bases-section h2 i {
  margin-right: 10px;
  color: var(--mahogany-500);
}

.bases-list {
  list-style: none;
  padding: 0;
}

.bases-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--mahogany-200);
  position: relative;
  padding-left: 30px;
  color: var(--mahogany-600);
}

.bases-list li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--mahogany-400);
  font-weight: bold;
  font-size: 1.2rem;
}

.bases-list li:last-child {
  border-bottom: none;
}

.pdf-viewer {
  background: white;
  border-radius: 15px;
  padding: 20px;
  margin: 30px 0;
  box-shadow: 0 5px 15px rgba(156, 0, 0, 0.1);
  max-width: 100%;
  border: 1px solid var(--mahogany-100);
}

.pdf-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--mahogany-100);
}

.pdf-header h3 {
  margin: 0;
  color: var(--mahogany-600);
  font-size: 1.5rem;
}

.pdf-controls {
  display: flex;
  gap: 10px;
}

.pdf-btn {
  background: linear-gradient(135deg, var(--mahogany-400), var(--mahogany-500));
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pdf-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(156, 0, 0, 0.3);
  color: white;
  text-decoration: none;
  background: linear-gradient(135deg, var(--mahogany-300), var(--mahogany-400));
}

.download-btn {
  background: linear-gradient(135deg, var(--mahogany-300), var(--mahogany-400));
}

.download-btn:hover {
  box-shadow: 0 5px 15px rgba(254, 0, 0, 0.3);
  background: linear-gradient(135deg, var(--mahogany-200), var(--mahogany-300));
}

.pdf-container {
  position: relative;
  background: var(--mahogany-50);
  border-radius: 10px;
  overflow: hidden;
  min-height: 70vh;
  max-height: 80vh;
  border: 1px solid var(--mahogany-200);
}

.pdf-container iframe {
  width: 100%;
  height: 70vh;
  max-height: 80vh;
  border: none;
  border-radius: 10px;
  background: white;
}

.pdf-placeholder {
  color: #6c757d;
  text-align: center;
  padding: 40px;
}

.pdf-placeholder i {
  font-size: 4rem;
  margin-bottom: 20px;
  color: #dc3545;
}

.participate-section {
  text-align: center;
  padding: 40px;
  background: linear-gradient(135deg, var(--mahogany-500), var(--mahogany-600));
  color: white;
  margin-top: 30px;
  border-radius: 15px;
}

.participate-btn {
  background: linear-gradient(135deg, var(--mahogany-300), var(--mahogany-400));
  color: white;
  border: none;
  padding: 15px 40px;
  font-size: 1.3rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  margin-top: 20px;
  box-shadow: 0 8px 25px rgba(254, 0, 0, 0.2);
}

.participate-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(254, 0, 0, 0.3);
  color: white;
  text-decoration: none;
  background: linear-gradient(135deg, var(--mahogany-200), var(--mahogany-300));
}

.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.info-card {
  background: white;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: all 0.3s ease;
}

.info-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.info-card i {
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: var(--mahogany-400);
}

.info-card h3 {
  margin: 0 0 10px;
  color: var(--mahogany-600);
}

.info-card p {
  margin: 0;
  color: var(--mahogany-500);
  font-size: 0.95rem;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  display: none; /* Ocultar por defecto en desktop */
}

.overlay.show {
  opacity: 1;
  visibility: visible;
}

/* Mostrar overlay solo en móviles */
@media (max-width: 768px) {
  .overlay {
    display: block;
  }
}

/* Ajustes para pantallas grandes */
@media (min-width: 769px) {
  .hero-section {
    min-height: 800px;
    padding: 40px 0;
  }
  
  .hero-image {
    width: 85%;
    max-width: 1400px;
  }
  
  .hero-overlay {
    padding: 50px;
  }
}

/* Ajustes para pantallas muy grandes */
@media (min-width: 1200px) {
  .hero-section {
    min-height: 850px;
    padding: 50px 0;
  }
  
  .hero-image {
    width: 80%;
    max-width: 1500px;
  }
  
  .hero-overlay {
    padding: 60px;
  }
}



@media (max-width: 768px) {
  .contest-header h1 {
    font-size: 2rem;
  }

  .contest-header p {
    font-size: 1rem;
  }

  .hero-section {
    min-height: 550px;
    padding: 20px 0;
  }
  
  .hero-image {
    width: 95%;
    max-width: 100%;
  }

  .hero-overlay h2 {
    font-size: 1.5rem;
  }

  .hero-overlay p {
    font-size: 0.9rem;
  }

  .hero-overlay {
    padding: 25px 20px;
  }

  .contest-body {
    padding: 20px;
  }

  .participate-section {
    padding: 30px 20px;
  }

  .pdf-viewer {
    padding: 15px;
    margin: 20px 0;
  }

  .pdf-header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .pdf-controls {
    justify-content: center;
    flex-wrap: wrap;
  }

  .pdf-btn {
    font-size: 0.8rem;
    padding: 8px 16px;
  }

  .pdf-container {
    min-height: 50vh;
    max-height: 60vh;
  }

  .pdf-container iframe {
    height: 50vh;
    max-height: 60vh;
  }
}