/* ======== Variables y Reset ======== */
:root {
  --color-primary: #008000;
  --color-secondary: #3c763d;
  --color-accent: #5a2ca0;
  --color-light: #f0f5f3;
  --color-dark: #333;
  --color-white: #fff;
  --shadow: 0 4px 8px rgba(0,0,0,0.1);
  --shadow-hover: 0 6px 12px rgba(0,0,0,0.15);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: var(--color-light);
  color: var(--color-dark);
  line-height: 1.6;
}

/* ======== Contenedor ======== */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* ======== Header ======== */
header {
  background: linear-gradient(to right, var(--color-primary), var(--color-secondary));
  color: var(--color-white);
  padding: 15px 0;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.site-title {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--color-white);
  text-align: center;
  flex: 1;
  min-width: 200px;
}

.regresar-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background-color: var(--color-white);
  color: var(--color-primary);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.regresar-btn:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-2px);
}

/* ======== Hero ======== */
.hero {
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
    url('../Imagenes/atlautla3.JPG');
  background-size: cover;
  background-position: center;
  color: var(--color-white);
  text-align: center;
  padding: 100px 20px;
  margin-bottom: 40px;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.6);
}

.hero p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto;
}

/* ======== Tarjetas ======== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  padding: 20px 0 40px;
}

.card {
  background: var(--color-white);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%; /* Asegura que todas las tarjetas tengan la misma altura base */
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.card-image img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.card-content {
  padding: 25px;
  display: flex;
  flex-direction: column;
  flex: 1; /* Hace que el contenido ocupe todo el espacio disponible */
}

.card h2 {
  color: var(--color-primary);
  font-size: 1.6rem;
  margin-bottom: 15px;
  border-bottom: 2px solid var(--color-light);
  padding-bottom: 8px;
}

.event-date {
  font-weight: 600;
  color: var(--color-accent);
  display: block;
  margin-bottom: 5px;
}

.event {
  flex: 1; /* El contenido del evento ocupa el espacio disponible */
  margin-bottom: 15px; /* Espacio consistente antes del botón */
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  background: var(--color-secondary);
  color: var(--color-white);
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  text-align: center;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  align-self: flex-start;
  margin-top: auto; /* Empuja el botón hacia la parte inferior */
}

.btn:hover {
  background: var(--color-primary);
}

/* ======== Modales ======== */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  animation: fadeIn 0.3s;
  overflow-y: auto;
  padding: 20px 0;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background-color: var(--color-white);
  margin: 2% auto;
  padding: 0;
  border-radius: 15px;
  width: 90%;
  max-width: 900px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.4s ease-out;
  overflow: hidden;
  position: relative;
}

@keyframes slideIn {
  from { transform: translateY(-30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 25px;
  color: var(--color-primary);
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
  z-index: 10;
  background: var(--color-white);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.close-modal:hover {
  background: var(--color-primary);
  color: var(--color-white);
  transform: scale(1.1);
}

.modal-header {
  background: var(--color-white);
  padding: 35px 40px 20px;
  position: relative;
  border-bottom: 3px solid var(--color-light);
}

.modal-header h2 {
  color: var(--color-primary);
  font-size: 2.4rem;
  margin: 0;
  font-weight: 700;
  text-align: center;
}

.modal-date-container {
  text-align: center;
  margin-top: 15px;
}

.modal-date {
  display: inline-block;
  background: var(--color-accent);
  color: var(--color-white);
  padding: 10px 25px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 4px 15px rgba(90, 44, 160, 0.3);
}

.modal-body {
  display: flex;
  flex-direction: column;
}

.modal-image {
  width: 100%;
  height: 380px;
  overflow: hidden;
}

.modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.modal-image:hover img {
  transform: scale(1.03);
}

.modal-text-content {
  padding: 35px 40px;
}

.modal-description {
  font-size: 1.15rem;
  line-height: 1.7;
  color: #444;
  margin-bottom: 30px;
  text-align: justify;
  font-weight: 500;
}

.modal-features {
  background: linear-gradient(135deg, #f8fdf8, #e8f4e8);
  border-radius: 12px;
  padding: 30px 35px;
  margin: 25px 0;
  border: 2px solid #e0f0e0;
  box-shadow: 0 5px 20px rgba(0, 100, 0, 0.1);
}

.modal-features h3 {
  color: var(--color-primary);
  font-size: 1.4rem;
  margin-bottom: 20px;
  font-weight: 700;
  text-align: center;
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: 10px;
}

.modal-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.modal-features li {
  padding: 12px 0 12px 45px;
  margin-bottom: 12px;
  position: relative;
  font-size: 1.1rem;
  line-height: 1.6;
  color: #444;
  font-weight: 500;
  border-bottom: 1px solid #e8f4e8;
}

.modal-features li:last-child {
  border-bottom: none;
}

.modal-features li:before {
  content: "●";
  position: absolute;
  left: 0;
  top: 12px;
  width: 32px;
  height: 32px;
  background: var(--color-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: bold;
}

.modal-conclusion {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border-radius: 12px;
  padding: 30px 35px;
  margin-top: 25px;
  color: var(--color-white);
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 100, 0, 0.2);
}

.modal-conclusion p {
  font-size: 1.15rem;
  line-height: 1.7;
  margin: 0;
  font-weight: 500;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* ======== Footer ======== */
footer {
  background: linear-gradient(to right, var(--color-primary), var(--color-secondary));
  color: var(--color-white);
  text-align: center;
  padding: 20px 0;
  margin-top: 40px;
}

footer p {
  margin: 5px 0;
}

/* ======== RESPONSIVE ======== */
@media (max-width: 1024px) {
  .hero h1 { font-size: 2.5rem; }
  .hero p { font-size: 1.1rem; }
}

@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 12px;
  }

  .site-title {
    font-size: 1.4rem;
  }

  .hero {
    padding: 70px 15px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .card h2 {
    font-size: 1.3rem;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .modal {
    padding: 10px 0;
  }
  
  .modal-content {
    width: 95%;
    margin: 5% auto;
  }
  
  .modal-header {
    padding: 25px 20px 15px;
  }
  
  .modal-header h2 {
    font-size: 1.9rem;
  }
  
  .close-modal {
    top: 15px;
    right: 20px;
    font-size: 28px;
    width: 40px;
    height: 40px;
  }
  
  .modal-image {
    height: 280px;
  }
  
  .modal-text-content {
    padding: 25px;
  }
  
  .modal-features,
  .modal-conclusion {
    padding: 25px;
  }
  
  .modal-features li {
    padding-left: 40px;
    font-size: 1.05rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 60px 10px;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .hero p {
    font-size: 0.95rem;
  }

  .card-image img {
    height: 180px;
  }

  .card-content {
    padding: 18px;
  }

  .card h2 {
    font-size: 1.2rem;
  }

  .modal-header {
    padding: 20px 15px 12px;
  }
  
  .modal-header h2 {
    font-size: 1.6rem;
  }
  
  .modal-date {
    font-size: 1rem;
    padding: 8px 20px;
  }
  
  .modal-image {
    height: 220px;
  }
  
  .modal-text-content {
    padding: 20px;
  }
  
  .modal-description {
    font-size: 1.05rem;
  }
  
  .modal-features h3 {
    font-size: 1.25rem;
  }
  
  .modal-features,
  .modal-conclusion {
    padding: 20px;
  }
  
  .modal-features li {
    padding-left: 35px;
    font-size: 1rem;
  }
  
  .modal-features li:before {
    width: 28px;
    height: 28px;
    top: 10px;
    font-size: 1.1rem;
  }
  
  .modal-conclusion p {
    font-size: 1.05rem;
  }
}
@import "mobile.css";
