/* Front Grades Page Styles */
.grades-hero {
    background: linear-gradient(
            135deg,
            rgba(0, 70, 80, 0.9),
            rgba(188, 95, 66, 0.9)
        ),
        url("/assets/img/grades-bg.jpg");
    background-size: cover;
    background-position: center;
    min-height: 400px;
    display: flex;
    align-items: center;
    color: #fff;
    padding-top: 80px;
}

.grades-header {
    text-align: center;
    margin-bottom: 50px;
}

.grades-header h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 15px;
}

.grades-header p {
    font-size: 18px;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
}

.grades-container {
    padding: 80px 0;
    background-color: #f9f9f9;
    position: relative;
    overflow: hidden;
}

.grades-shape {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: linear-gradient(
        45deg,
        rgba(0, 70, 80, 0.1),
        rgba(188, 95, 66, 0.1)
    );
    filter: blur(40px);
    z-index: 0;
}

.grades-shape-1 {
    top: -150px;
    left: -150px;
}

.grades-shape-2 {
    bottom: -100px;
    right: -100px;
}

.grades-shape-3 {
    top: 50%;
    left: 30%;
    transform: translateY(-50%);
}

.grades-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    position: relative;
    z-index: 1;
}

.grade-card {
    background-color: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.5s ease;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.grade-card:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.grade-image {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.grade-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.grade-card:hover .grade-image img {
    transform: scale(1.1);
}

.grade-image::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}

.grade-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary-color);
    z-index: 2;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.grade-card:hover .grade-icon {
    transform: rotate(360deg);
}

.grade-content {
    padding: 25px;
    position: relative;
}

.grade-content h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.grade-content p {
    font-size: 15px;
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.6;
}

.grade-stats {
    display: flex;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid #eee;
    color: var(--text-light);
    font-size: 14px;
}

.grade-stat {
    display: flex;
    align-items: center;
    gap: 5px;
}

.grade-link {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 20px;
    background: linear-gradient(
        90deg,
        var(--primary-color),
        var(--secondary-color)
    );
    color: #fff;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: center;
}

.grade-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.grade-badge {
    position: absolute;
    top: -15px;
    left: 25px;
    padding: 5px 15px;
    background: linear-gradient(
        90deg,
        var(--primary-color),
        var(--secondary-color)
    );
    color: #fff;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Animation classes */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-up.active {
    opacity: 1;
    transform: translateY(0);
}

/* Dark mode styles */
:root.dark-theme .grades-container {
    background-color: var(--background);
}

:root.dark-theme .grade-card {
    background-color: var(--card-bg);
}

:root.dark-theme .grade-content h3 {
    color: #ffffff;
}

:root.dark-theme .grade-content p {
    color: var(--text-color);
}

:root.dark-theme .grade-stats {
    color: var(--text-light);
    border-top-color: var(--border-color);
}

:root.dark-theme .grade-icon {
    background: rgba(42, 42, 60, 0.9);
    color: var(--secondary-color);
}

:root.dark-theme .grades-hero {
    background: linear-gradient(
            135deg,
            rgba(0, 70, 80, 0.9),
            rgba(188, 95, 66, 0.9)
        ),
        url("/assets/img/dark-grades-bg.jpg");
}

:root.dark-theme .grades-shape {
    background: linear-gradient(
        45deg,
        rgba(0, 162, 184, 0.1),
        rgba(255, 119, 85, 0.1)
    );
}

/* Responsive styles */
@media (max-width: 768px) {
    .grades-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .grades-header h1 {
        font-size: 36px;
    }
}
