/* ===================================
   ENVISION - Subject Cards Styles
   =================================== */

/* ===== Subject Cards Grid ===== */
.subjects-section {
    padding: var(--spacing-xl) 0;
}

.subjects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

/* ===== Subject Card ===== */
.subject-card {
    position: relative;
    padding: var(--spacing-xl);
    border-radius: var(--radius-xl);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-normal);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.subject-card::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.15;
    transition: var(--transition-normal);
}

.subject-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    transition: var(--transition-normal);
}

.subject-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.subject-card:hover::before {
    opacity: 0.3;
}

.subject-card:hover::after {
    background: rgba(0, 0, 0, 0.2);
}

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

.subject-card:hover .subject-arrow {
    transform: translateX(5px);
    opacity: 1;
}

/* Subject Card Content */
.subject-card-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.subject-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    transition: var(--transition-normal);
}

.subject-icon svg {
    width: 45px;
    height: 45px;
    fill: white;
}

.subject-name {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: white;
    margin-bottom: var(--spacing-xs);
    letter-spacing: 0.02em;
}

.subject-count {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
}

.subject-arrow {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: var(--spacing-sm);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    opacity: 0;
    transform: translateX(-10px);
    transition: var(--transition-normal);
}

.subject-arrow svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* ===== Subject Specific Colors ===== */
/* Maths - Purple/Blue */
.subject-card.maths::before {
    background: var(--maths-gradient);
}

.subject-card.maths {
    background: linear-gradient(145deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
}

.subject-card.maths:hover {
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
}

/* Science - Green/Cyan */
.subject-card.science::before {
    background: var(--science-gradient);
}

.subject-card.science {
    background: linear-gradient(145deg, rgba(67, 233, 123, 0.2) 0%, rgba(56, 249, 215, 0.2) 100%);
}

.subject-card.science:hover {
    box-shadow: 0 20px 60px rgba(67, 233, 123, 0.3);
}

/* SST - Orange/Yellow */
.subject-card.sst::before {
    background: var(--sst-gradient);
}

.subject-card.sst {
    background: linear-gradient(145deg, rgba(250, 112, 154, 0.2) 0%, rgba(254, 225, 64, 0.2) 100%);
}

.subject-card.sst:hover {
    box-shadow: 0 20px 60px rgba(250, 112, 154, 0.3);
}

/* AI - Blue/Cyan */
.subject-card.ai::before {
    background: var(--ai-gradient);
}

.subject-card.ai {
    background: linear-gradient(145deg, rgba(79, 172, 254, 0.2) 0%, rgba(0, 242, 254, 0.2) 100%);
}

.subject-card.ai:hover {
    box-shadow: 0 20px 60px rgba(79, 172, 254, 0.3);
}

/* English - Pink/Red */
.subject-card.english::before {
    background: var(--english-gradient);
}

.subject-card.english {
    background: linear-gradient(145deg, rgba(240, 147, 251, 0.2) 0%, rgba(245, 87, 108, 0.2) 100%);
}

.subject-card.english:hover {
    box-shadow: 0 20px 60px rgba(240, 147, 251, 0.3);
}

/* Hindi - Pink/Light */
.subject-card.hindi::before {
    background: var(--hindi-gradient);
}

.subject-card.hindi {
    background: linear-gradient(145deg, rgba(255, 154, 158, 0.2) 0%, rgba(254, 207, 239, 0.2) 100%);
}

.subject-card.hindi:hover {
    box-shadow: 0 20px 60px rgba(255, 154, 158, 0.3);
}

/* ===== Floating Elements ===== */
.subject-card .floating-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.floating-shapes span {
    position: absolute;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    animation: float 20s infinite ease-in-out;
}

.floating-shapes span:nth-child(1) {
    width: 80px;
    height: 80px;
    top: -20px;
    right: -20px;
    animation-delay: 0s;
}

.floating-shapes span:nth-child(2) {
    width: 60px;
    height: 60px;
    bottom: 20px;
    left: -20px;
    animation-delay: -5s;
}

.floating-shapes span:nth-child(3) {
    width: 40px;
    height: 40px;
    bottom: -10px;
    right: 30%;
    animation-delay: -10s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    25% {
        transform: translateY(-20px) rotate(90deg);
    }

    50% {
        transform: translateY(0) rotate(180deg);
    }

    75% {
        transform: translateY(20px) rotate(270deg);
    }
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    .subjects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .subjects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }

    .subject-card {
        min-height: 220px;
        padding: var(--spacing-lg);
    }

    .subject-icon {
        width: 60px;
        height: 60px;
    }

    .subject-icon svg {
        width: 35px;
        height: 35px;
    }

    .subject-name {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .subjects-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }

    .subject-card {
        min-height: 180px;
        padding: var(--spacing-md);
    }

    .subject-icon {
        width: 50px;
        height: 50px;
        margin-bottom: var(--spacing-sm);
    }

    .subject-icon svg {
        width: 28px;
        height: 28px;
    }

    .subject-name {
        font-size: 1.2rem;
    }

    .subject-count {
        font-size: 0.8rem;
    }
}