/* ============================================================
   CENTRO EDUCATIVO NONOGASTA
   Estilo Institucional 2025 - Versión Mejorada
   Autor: ChatGPT (Optimizado para CEN)
============================================================ */

/* RESET GLOBAL */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background: radial-gradient(circle at top left, #1a0d00 0%, #3b1e00 50%, #a67c52 100%);
  color: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* ============================================================
   🔸 NAVBAR
============================================================ */
nav {
  position: relative;
  width: 100%;
  padding: 15px 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(59, 30, 0, 0.9);
  border-bottom: 2px solid #f8e27f;
  z-index: 1000;
  transition: background 0.4s ease;
}

nav .logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #f8e27f;
  font-weight: 700;
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

nav .logo img {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2px solid #f8e27f;
  box-shadow: 0 0 10px rgba(248, 226, 127, 0.5);
}

nav ul {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 25px;
  transition: all 0.4s ease;
}

/* 🔸 BOTONES DE NAVEGACIÓN */
.nav-button {
  font-size: 17px;
  padding: 10px 22px;
  color: #f8e27f;
  border: 2px solid #f8e27f;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
}

.nav-button:hover {
  background: #f8e27f;
  color: #3b1e00;
  transform: translateY(-2px);
  box-shadow: 0 0 12px rgba(248, 226, 127, 0.6);
}

/* 🔸 BOTÓN DESTACADO */
.special-button {
  background: linear-gradient(90deg, #f8e27f, #ffe48a);
  color: #3b1e00;
  font-weight: 700;
  padding: 12px 32px;
  border: none;
  border-radius: 10px;
  box-shadow: 0 0 16px rgba(248, 226, 127, 0.6);
  animation: pulse 2.5s infinite ease-in-out;
  transition: all 0.3s ease;
}

.special-button:hover {
  background: #fff8c2;
  transform: scale(1.05);
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 10px rgba(248, 226, 127, 0.4); }
  50% { box-shadow: 0 0 25px rgba(248, 226, 127, 0.8); }
}

/* 🔸 MENÚ HAMBURGUESA */
#menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  cursor: pointer;
}

#menu-toggle span {
  height: 3px;
  width: 100%;
  background: #f8e27f;
  border-radius: 3px;
  transition: all 0.4s ease;
}

#menu-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}
#menu-toggle.open span:nth-child(2) {
  opacity: 0;
}
#menu-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* ============================================================
   🔹 CONTENIDO PRINCIPAL
============================================================ */
.main-content {
  padding: 60px 20px;
  width: 100%;
}

.cards-section {
  display: flex;
  flex-direction: column;
  gap: 100px;
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  align-items: center;
}

/* ============================================================
   🔹 TARJETAS INFORMATIVAS
============================================================ */
.large-card {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.4);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
  opacity: 0;
  transform: translateY(60px);
  animation: fadeInUp 1.2s forwards;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(60px); }
  to { opacity: 1; transform: translateY(0); }
}

.large-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 55px rgba(0, 0, 0, 0.6);
}

.card-image {
  flex: 1;
  overflow: hidden;
  min-height: 400px;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.large-card:hover .card-image img {
  transform: scale(1.08);
}

.card-content {
  flex: 1.2;
  padding: 60px;
  background: rgba(59, 30, 0, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: justify;
}

.card-title {
  font-size: 2.2rem;
  margin-bottom: 20px;
  color: #f8e27f;
  position: relative;
  text-align: center;
}

.card-title::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: #f8e27f;
  border-radius: 2px;
}

.card-text {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #fff8e1;
  margin-top: 15px;
}

.card-list {
  margin-top: 15px;
  padding-left: 20px;
  list-style: disc;
}

.card-list li {
  margin-bottom: 10px;
}

.card-button {
  margin-top: 25px;
  align-self: center;
  padding: 12px 35px;
  background: #f8e27f;
  color: #3b1e00;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.card-button:hover {
  background: #fff4b0;
  transform: scale(1.05);
}

/* ============================================================
   🔹 EVENTOS DESTACADOS
============================================================ */
.events-card {
  margin-top: 80px;
  padding: 50px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
  text-align: center;
  max-width: 1300px;
  margin-inline: auto;
}

.events-title {
  font-size: 2.3rem;
  color: #f8e27f;
  margin-bottom: 40px;
  position: relative;
}

.events-title::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: #f8e27f;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.event-item {
  background: rgba(59, 30, 0, 0.85);
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease;
}

.event-item:hover {
  transform: translateY(-5px);
}

.event-date {
  font-size: 1rem;
  color: #ffe48a;
  font-weight: 600;
}

.event-title {
  font-size: 1.4rem;
  color: #f8e27f;
  margin: 10px 0;
}

.event-description {
  font-size: 1rem;
  color: #fff8e1;
  line-height: 1.6;
}

/* ============================================================
   🔹 FOOTER
============================================================ */
footer {
  background: #1a0d00;
  padding: 60px 50px 30px;
  text-align: center;
  border-top: 2px solid #f8e27f;
  color: #f8e27f;
}

.footer-cards {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.social-card {
  width: 190px;
  height: 190px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-weight: 600;
  transition: all 0.3s ease;
}

.social-card i {
  font-size: 42px;
}

/* ICON COLORS */
.facebook {
  background: #1877f2;
}
.instagram {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}
.campus {
  background: #f8e27f;
  color: #3b1e00;
}

.social-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.6);
}

.copyright {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 12px;
}

/* ============================================================
   🔹 EFECTO DE PARTÍCULAS
============================================================ */
#particles {
  position: fixed;
  inset: 0;
  z-index: -1;
}

/* ============================================================
   🔹 RESPONSIVE DESIGN
============================================================ */
@media (max-width: 1024px) {
  .large-card {
    flex-direction: column;
  }
  .card-content {
    padding: 40px 30px;
  }
  .card-title {
    font-size: 1.9rem;
  }
  .card-image {
    height: 300px;
  }
}

@media (max-width: 900px) {
  nav ul {
    position: fixed;
    top: 80px;
    right: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    flex-direction: column;
    background: rgba(59, 30, 0, 0.97);
    justify-content: center;
    gap: 30px;
    transition: right 0.4s ease;
  }

  nav ul.active {
    right: 0;
  }

  #menu-toggle {
    display: flex;
  }

  .nav-button,
  .special-button {
    width: 80%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .card-title {
    font-size: 1.6rem;
  }
  .card-text {
    font-size: 0.95rem;
  }
  .card-button {
    padding: 10px 25px;
  }
}