/* ==================== ESTILOS COMUNIDAD EDUCATIVA ==================== */
/* Diseño Premium con enfoque en recursos y comunidad - Mejores prácticas UI/UX */

/* Hero Section - Premium y Atractivo */
.hero-comunidad {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 6rem 0 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-comunidad::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: float 20s ease-in-out infinite;
}

.hero-comunidad::after {
  content: "";
  position: absolute;
  bottom: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
  animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  50% {
    transform: translate(30px, 30px) rotate(180deg);
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero-comunidad h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s ease;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  line-height: 1.2;
}

.hero-comunidad p {
  font-size: 1.5rem;
  font-weight: 300;
  opacity: 0.95;
  margin-bottom: 2rem;
  line-height: 1.7;
  animation: fadeInUp 0.8s ease 0.2s both;
}

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

/* Sección de Recursos */
.seccion-recursos {
  padding: 5rem 0;
  background: #f8f9fa;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Grid de Recursos - Premium Design */
.recursos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 5rem;
}

.recurso-card {
  background: white;
  border-radius: 1.5rem;
  padding: 2.5rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  border: 2px solid transparent;
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.recurso-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.recurso-card:hover::before {
  transform: scaleX(1);
}

.recurso-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 20px 60px rgba(46, 125, 50, 0.2);
  border-color: var(--primary);
}

.recurso-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 25px rgba(46, 125, 50, 0.3);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.recurso-icon::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(30px, 30px);
  }
}

.recurso-card:hover .recurso-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 12px 35px rgba(46, 125, 50, 0.4);
}

.recurso-icon svg {
  width: 64px !important;
  height: 64px !important;
  min-width: 64px !important;
  min-height: 64px !important;
  max-width: 64px !important;
  max-height: 64px !important;
  color: white;
  position: relative;
  z-index: 1;
}

.recurso-card h3 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1rem;
  line-height: 1.3;
  transition: color 0.3s ease;
}

.recurso-card:hover h3 {
  color: var(--primary);
}

.recurso-card p {
  font-size: 1rem;
  color: var(--gray-700);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  flex: 1;
}

.lista-recursos {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
}

.lista-recursos li {
  padding: 0.75rem 0 0.75rem 1.75rem;
  position: relative;
  color: var(--gray-700);
  line-height: 1.7;
  font-size: 0.938rem;
}

.lista-recursos li::before {
  content: "✓";
  position: absolute;
  left: 0;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(46, 125, 50, 0.3);
}

.btn-recurso {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-radius: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
  width: fit-content;
  margin-top: auto;
  position: relative;
  overflow: hidden;
}

.btn-recurso::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-recurso:hover::before {
  width: 300px;
  height: 300px;
}

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

.btn-recurso:active {
  transform: translateY(-1px);
}

.btn-recurso::after {
  content: "→";
  font-size: 1.25rem;
  transition: transform 0.3s ease;
}

.btn-recurso:hover::after {
  transform: translateX(4px);
}

/* Sección de Calendarios */
.seccion-calendarios {
  margin-top: 5rem;
}

.seccion-calendarios h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--gray-900);
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  padding-bottom: 1rem;
}

.seccion-calendarios h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 5px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  border-radius: 3px;
}

.calendarios-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.calendario-card {
  background: white;
  border-radius: 1.5rem;
  padding: 2.5rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  border: 2px solid transparent;
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.calendario-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.calendario-card:hover::before {
  transform: scaleX(1);
}

.calendario-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(46, 125, 50, 0.2);
  border-color: var(--primary);
}

.calendario-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
  transition: all 0.3s ease;
}

.calendario-card:hover .calendario-icon {
  transform: scale(1.1) rotate(5deg);
}

.calendario-icon svg {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  min-height: 48px !important;
  max-width: 48px !important;
  max-height: 48px !important;
  color: white;
}

.calendario-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1rem;
  line-height: 1.4;
  transition: color 0.3s ease;
}

.calendario-card:hover h3 {
  color: var(--primary);
}

.calendario-card p {
  font-size: 1rem;
  color: var(--gray-700);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  flex: 1;
}

.btn-calendario {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-radius: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
  width: fit-content;
  margin-top: auto;
  position: relative;
  overflow: hidden;
}

.btn-calendario::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-calendario:hover::before {
  width: 300px;
  height: 300px;
}

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

.btn-calendario:active {
  transform: translateY(-1px);
}

.btn-calendario::after {
  content: "→";
  font-size: 1.25rem;
  transition: transform 0.3s ease;
}

.btn-calendario:hover::after {
  transform: translateX(4px);
}

/* Responsive Design */
@media (max-width: 1600px) {
  .container {
    max-width: 1200px;
  }
}

@media (max-width: 1200px) {
  .recursos-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .calendarios-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 992px) {
  .hero-comunidad {
    padding: 5rem 0 4rem;
  }

  .hero-comunidad h1 {
    font-size: 2.75rem;
  }

  .hero-comunidad p {
    font-size: 1.25rem;
  }

  .seccion-recursos {
    padding: 4rem 0;
  }

  .seccion-calendarios h2 {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .hero-comunidad {
    padding: 4rem 0 3rem;
  }

  .hero-comunidad h1 {
    font-size: 2.25rem;
  }

  .hero-comunidad p {
    font-size: 1.125rem;
  }

  .recursos-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .recurso-card {
    padding: 2rem;
    border-radius: 1.25rem;
  }

  .recurso-icon {
    width: 70px;
    height: 70px;
  }

  .recurso-icon svg {
    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
    min-height: 56px !important;
    max-width: 56px !important;
    max-height: 56px !important;
  }

  .recurso-card h3 {
    font-size: 1.5rem;
  }

  .calendario-card {
    padding: 2rem;
  }

  .calendario-icon {
    width: 56px;
    height: 56px;
  }

  .calendario-icon svg {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
  }

  .calendario-card h3 {
    font-size: 1.375rem;
  }

  .seccion-calendarios h2 {
    font-size: 1.75rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .hero-comunidad h1 {
    font-size: 1.875rem;
  }

  .hero-comunidad p {
    font-size: 1rem;
  }

  .recurso-card {
    padding: 1.5rem;
  }

  .recurso-card h3 {
    font-size: 1.25rem;
  }

  .recurso-card p {
    font-size: 0.938rem;
  }

  .lista-recursos li {
    font-size: 0.875rem;
  }

  .btn-recurso {
    padding: 0.875rem 1.5rem;
    font-size: 0.938rem;
    width: 100%;
  }

  .calendario-card {
    padding: 1.5rem;
  }

  .calendario-card h3 {
    font-size: 1.25rem;
  }

  .calendario-card p {
    font-size: 0.938rem;
  }

  .btn-calendario {
    padding: 0.875rem 1.5rem;
    font-size: 0.938rem;
    width: 100%;
  }

  .seccion-calendarios h2 {
    font-size: 1.5rem;
  }
}
