.pm-evidya-container {
    background: linear-gradient(135deg, rgba(240, 238, 237, 0.7), rgba(224, 195, 210, 0.5)), url('{% static "images/pm_evidya_bg.jpg" %}');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax effect */
    padding: 50px 25px;
    max-width: 1200px;
    margin: 0 auto;
    color: #222;
    font-family: 'Poppins', sans-serif;
    min-height: 90vh;
    border-radius: 25px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.pm-evidya-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    animation: rotateGlow 20s linear infinite;
    z-index: 0;
    opacity: 0.5;
}

@keyframes rotateGlow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.pm-evidya-title {
    font-size: 3.5em;
    color: #e15a2a;
    text-align: center;
    text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.pm-evidya-nav {
    color: #fff;
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
    font-size: 1.2em;
}

.pm-evidya-nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 20px;
    transition: background 0.3s ease, color 0.3s ease;
}

.pm-evidya-nav a:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #e15a2a;
}

.pm-evidya-description {
    color: #333;
    text-align: center;
    margin-bottom: 40px;
    padding: 0 30px;
    font-size: 1.2em;
    line-height: 1.8;
    position: relative;
    z-index: 1;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    animation: slideIn 1.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pm-evidya-card-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
    perspective: 1000px; /* For 3D effects */
}

.pm-evidya-card {
    text-decoration: none;
    text-align: center;
    margin: 20px;
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    width: 200px;
    transform-style: preserve-3d;
}

.pm-evidya-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 4px solid #e15a2a;
    transition: transform 0.5s ease;
}

.pm-evidya-card span {
    display: block;
    padding: 15px;
    font-size: 1.1em;
    color: #333;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.95);
}

.pm-evidya-card:hover {
    transform: rotateY(10deg) rotateX(5deg) scale(1.1);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
}

.pm-evidya-card:hover img {
    transform: scale(1.1) rotate(-2deg);
}

.pm-evidya-card::after {
    content: attr(data-tooltip); /* Assume HTML has data-tooltip attribute for interactivity */
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 8px 15px;
    border-radius: 10px;
    font-size: 0.9em;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease, bottom 0.3s ease;
    pointer-events: none;
}

.pm-evidya-card:hover::after {
    opacity: 1;
    bottom: 110%;
}

.pm-evidya-link-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.pm-evidya-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 20px 40px;
    background: linear-gradient(45deg, #69b4ff, #14a5ff);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    margin: 20px;
    text-align: center;
    width: 45%;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.4s ease;
    font-weight: 700;
    font-size: 1.2em;
    position: relative;
    overflow: hidden;
}

.pm-evidya-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transform: skewX(-20deg);
    transition: left 0.5s ease;
}

.pm-evidya-link:hover::before {
    left: 100%;
}

.pm-evidya-link:hover {
    background: linear-gradient(45deg, #ff1493, #ff69b4);
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
  .pm-evidya-title {
    font-size: 2.8em;
  }

  .pm-evidya-description {
    padding: 15px;
    font-size: 1.1em;
  }

  .pm-evidya-link {
    width: 85%;
    padding: 18px 30px;
  }

  .pm-evidya-card {
    width: 180px;
  }

  .pm-evidya-card img {
    height: 180px;
  }
}

@media (max-width: 480px) {
  .pm-evidya-title {
    font-size: 2.2em;
  }

  .pm-evidya-description {
    font-size: 1em;
  }

  .pm-evidya-link {
    width: 100%;
    padding: 15px 25px;
    font-size: 1.1em;
  }

  .pm-evidya-card {
    width: 160px;
  }

  .pm-evidya-card img {
    height: 160px;
  }
}