/* ================================
   GRAMATICA PAGE STYLES (Cleaned)
   ================================ */


/* Dark mode grammar card */
.dark-mode .grammar-card {
    background: #334155;
    border-color: #475569;
}

.grammar-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.dark-mode .grammar-card::before {
    background: linear-gradient(90deg, #818cf8, #a78bfa);
}

.grammar-card:hover {
    border-color: #4f46e5;
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(79, 70, 229, 0.15);
}

.dark-mode .grammar-card:hover {
    border-color: #818cf8;
    box-shadow: 0 20px 50px rgba(129, 140, 248, 0.2);
}

.grammar-card:hover::before {
    transform: scaleX(1);
}

.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 15px;
    gap: 15px;
}

.card-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
    transition: all 0.3s ease;
}

.dark-mode .card-header h3 {
    color: #f1f5f9;
}



.card-description {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.dark-mode .card-description {
    color: #94a3b8;
}

/* Resources Section */
.resources-section {
    margin-top: 40px;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.resource-category {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 25px;
    transition: all 0.3s ease;
}

.dark-mode .resource-category {
    background: #374151;
    border-color: #4b5563;
}

.resource-category:hover {
    border-color: #cbd5e1;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
}

.dark-mode .resource-category:hover {
    border-color: #6b7280;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.category-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.dark-mode .category-title {
    color: #f9fafb;
    border-bottom-color: #6b7280;
}

.category-title i {
    color: #4f46e5;
    font-size: 1.1rem;
}

.dark-mode .category-title i {
    color: #818cf8;
}

.resource-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.resource-item {
    transition: transform 0.2s ease;
}

.resource-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: #475569;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.dark-mode .resource-link {
    background: #4b5563;
    border-color: #6b7280;
    color: #f3f4f6;
}

.resource-link:hover {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.2);
}

.dark-mode .resource-link:hover {
    background: #6366f1;
    border-color: #6366f1;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.resource-link i {
    font-size: 0.9rem;
    opacity: 0.7;
}

.resource-link:hover i {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .grammar-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .grammar-card {
        padding: 20px;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .card-header h3 {
        font-size: 1.2rem;
    }

    .resources-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .resource-category {
        padding: 20px;
    }

    .category-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .grammar-cards {
        gap: 15px;
    }

    .grammar-card {
        padding: 15px;
    }

    .resource-link {
        padding: 10px 14px;
        font-size: 0.9rem;
    }
}