/* 
 * exam_prep.css - Premium, Modern theme for Exam Preparation pages 
 * Designed by Ahmad Learning Hub - Enhanced with Glassmorphism & Animations
 */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #10b981;
    --accent: #f59e0b;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --glass: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-premium: 24px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    background-color: #f1f5f9;
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(16, 185, 129, 0.05) 0px, transparent 50%);
}

.main-content {
    padding-top: 120px;
    padding-bottom: 80px;
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
}

/* Premium Header / Hero Section */
.prep-hero {
    background: linear-gradient(135deg, var(--slate-900) 0%, #1e1b4b 100%);
    color: white;
    padding: 80px 40px;
    border-radius: var(--radius-premium);
    margin-bottom: 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.prep-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.prep-hero h1 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
    position: relative;
    z-index: 1;
}

.prep-hero p {
    font-size: 1.2rem;
    opacity: 0.85;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    line-height: 1.6;
}

/* Section Titles */
.section-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    color: var(--slate-900);
    position: relative;
    display: inline-block;
    margin-bottom: 40px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

/* Grid Layouts */
.selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

/* Class & Book Cards */
.prep-card {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 40px 30px;
    border-radius: 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    position: relative;
    z-index: 1;
}

.prep-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 2px;
    background: linear-gradient(135deg, var(--primary-light), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: var(--transition);
}

.prep-card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: transparent;
    box-shadow: 0 20px 40px -15px rgba(99, 102, 241, 0.2);
    background: white;
}

.prep-card:hover::before {
    opacity: 1;
}

.prep-card i {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 25px;
    transition: var(--transition);
}

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

.prep-card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--slate-900);
    margin: 0;
}

.prep-card p {
    font-size: 1rem;
    color: var(--slate-700);
    margin-top: 12px;
    font-weight: 500;
}

/* Exam List Group & Square Cards */
.practice-tests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.test-square-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 30px;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.08), 0 5px 15px -5px rgba(0,0,0,0.03);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    min-height: 290px;
    text-decoration: none !important;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.test-square-card::after {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    transition: transform 0.5s ease;
}

.test-square-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 45px -15px rgba(99, 102, 241, 0.25);
    border-color: rgba(99, 102, 241, 0.2);
    background: #ffffff;
}

.test-square-card:hover::after {
    transform: scale(1.5);
}

.test-square-card .test-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 25px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.1);
}

.test-square-card:hover .test-icon {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.test-square-card .test-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--slate-900);
    margin-bottom: 20px;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.test-square-card:hover .test-title {
    color: var(--primary-dark);
}

.test-square-card .test-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 30px;
    width: 100%;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    background: var(--slate-100);
    color: var(--slate-700);
    transition: all 0.3s ease;
}

.mcq-badge { background: rgba(99, 102, 241, 0.1); color: var(--primary-dark); }
.short-badge { background: rgba(16, 185, 129, 0.1); color: #059669; }
.long-badge { background: rgba(245, 158, 11, 0.1); color: #d97706; }

.test-square-card:hover .mcq-badge { background: var(--primary); color: white; }
.test-square-card:hover .short-badge { background: var(--secondary); color: white; }
.test-square-card:hover .long-badge { background: var(--accent); color: white; }

.start-test-btn {
    background: transparent;
    color: var(--primary) !important;
    padding: 14px 20px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1rem;
    border: 2px solid rgba(99, 102, 241, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 80%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    text-transform: none;
    letter-spacing: normal;
    position: relative;
    z-index: 1;
    overflow: hidden;
    margin-top: auto;
}

.start-test-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    transition: width 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: -1;
}

.test-square-card:hover .start-test-btn {
    color: white !important;
    border-color: transparent;
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}

.test-square-card:hover .start-test-btn::before {
    width: 100%;
}

.start-test-btn i {
    font-size: 1.2rem;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.test-square-card:hover .start-test-btn i {
    transform: translateX(5px);
}

.premium-list-group {
    background: var(--glass);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-premium);
    border: 1px solid var(--glass-border);
}

.premium-list-item {
    padding: 25px 35px;
    border-bottom: 1px solid var(--slate-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

.premium-list-item:last-child { border-bottom: none; }

.premium-list-item:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateX(10px);
    text-decoration: none;
}

.premium-list-item .item-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--slate-900);
}

/* Generator Card */
.generator-card {
    background: white;
    border-radius: 30px;
    padding: 45px;
    box-shadow: var(--shadow-premium);
    border: 1px solid var(--slate-100);
    position: sticky;
    top: 120px;
}

.generator-card h2 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.8rem;
    margin-bottom: 35px;
    color: var(--slate-900);
    display: flex;
    align-items: center;
    gap: 15px;
}

.form-label {
    font-weight: 700;
    color: var(--slate-800);
    margin-bottom: 12px;
    font-size: 1rem;
}

.form-control {
    border-radius: 16px;
    padding: 15px 20px;
    border: 2px solid var(--slate-100);
    transition: var(--transition);
    background-color: var(--slate-50);
}

.form-control:focus {
    border-color: var(--primary);
    background-color: white;
    box-shadow: 0 0 0 5px rgba(99, 102, 241, 0.1);
}

.custom-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 18px 30px;
    border-radius: 18px;
    font-weight: 700;
    font-size: 1.1rem;
    border: none;
    transition: var(--transition);
    width: 100%;
    margin-top: 20px;
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
}

.custom-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 25px -5px rgba(99, 102, 241, 0.4);
    color: white;
}

/* Blog Layout SEO Section */
.seo-blog-section {
    background: white;
    border-radius: 32px;
    padding: 60px;
    box-shadow: var(--shadow-premium);
    margin-top: 80px;
}

.blog-container {
    max-width: 900px;
    margin: 0 auto;
}

.blog-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--slate-900);
    margin-bottom: 25px;
    line-height: 1.2;
}

.blog-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    font-size: 0.9rem;
    color: var(--slate-500);
}

.blog-meta .category {
    background: var(--primary-light);
    color: white;
    padding: 4px 12px;
    border-radius: 100px;
    font-weight: 600;
}

.blog-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--slate-700);
}

.blog-content h2, .blog-content h3 {
    color: var(--slate-900);
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    margin: 40px 0 20px;
}

.blog-content p {
    margin-bottom: 25px;
}

.blog-featured-box {
    background: var(--slate-50);
    border-left: 5px solid var(--primary);
    padding: 30px;
    border-radius: 0 20px 20px 0;
    margin: 40px 0;
}

.blog-cta-box {
    background: linear-gradient(135deg, var(--slate-900) 0%, #1e1b4b 100%);
    color: white;
    padding: 50px;
    border-radius: 24px;
    text-align: center;
    margin-top: 60px;
}

.blog-cta-box h3 {
    color: white;
    font-size: 2rem;
    margin-bottom: 15px;
}

/* Responsive Fixes */
@media (max-width: 991px) {
    .generator-card {
        position: static;
        margin-top: 40px;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding-top: 100px;
    }
    .prep-hero {
        padding: 50px 25px;
    }
    .prep-hero h1 {
        font-size: 2.2rem;
    }
    .selection-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
    .prep-card {
        padding: 25px 15px;
        min-height: 160px;
    }
    .prep-card i {
        font-size: 2.2rem;
        margin-bottom: 15px;
    }
    .prep-card h3 {
        font-size: 1.2rem;
    }
    .seo-blog-section {
        padding: 40px 20px;
    }
    .blog-title {
        font-size: 1.8rem;
    }
    
    /* Practice Tests Mobile Refinement */
    .practice-tests-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 20px;
    }
    .test-square-card {
        padding: 25px 20px;
        min-height: 250px;
        border-radius: 20px;
    }
    .test-square-card .test-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        margin-bottom: 15px;
        border-radius: 14px;
    }
    .test-square-card .test-title {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }
    .test-square-card .test-stats {
        margin-bottom: 20px;
        gap: 6px;
    }
    .stat-badge {
        font-size: 0.75rem;
        padding: 5px 10px;
        border-radius: 10px;
    }
    .start-test-btn {
        padding: 12px 16px;
        font-size: 0.95rem;
        border-radius: 12px;
    }
    .start-test-btn i {
        font-size: 1.1rem;
    }
}

/* Extra Small Mobile Devices */
@media (max-width: 480px) {
    .practice-tests-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .test-square-card {
        padding: 20px 15px;
        min-height: 220px;
    }
    .test-square-card .test-icon {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
        margin-bottom: 12px;
    }
    .test-square-card .test-title {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
    .test-square-card .test-stats {
        margin-bottom: 15px;
        gap: 5px;
    }
    .stat-badge {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
    .start-test-btn {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
}

/* Navigation Buttons */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: white;
    color: var(--slate-900);
    padding: 16px 35px;
    border-radius: 20px;
    font-weight: 700;
    text-decoration: none !important;
    border: 1px solid var(--slate-200);
    transition: var(--transition);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.back-btn:hover {
    background: var(--slate-900);
    color: white !important;
    transform: translateX(-8px);
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.2);
}

.back-btn i {
    transition: var(--transition);
    font-size: 0.9rem;
}

.back-btn:hover i {
    transform: translateX(-4px);
}

@media (max-width: 768px) {
    .back-btn {
        padding: 12px 25px;
        font-size: 0.95rem;
    }
}

/* Back Grid Button - Horizontal professional style */
.back-grid-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: white;
    color: var(--slate-900);
    padding: 16px 35px;
    border-radius: 20px;
    font-weight: 700;
    text-decoration: none !important;
    border: 2px solid var(--slate-200);
    transition: var(--transition);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    margin: 30px auto;
    width: fit-content;
    display: flex; /* Override inline-flex to work with margin auto */
}

.back-grid-button:hover {
    background: var(--slate-900);
    color: white !important;
    transform: translateX(-8px);
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.2);
}

.back-grid-button i {
    transition: var(--transition);
    font-size: 0.9rem;
}

.back-grid-button:hover i {
    transform: translateX(-4px);
}

@media (max-width: 768px) {
    .back-grid-button {
        padding: 12px 25px;
        font-size: 0.95rem;
        margin: 20px auto;
    }
}
