/* Custom Frontpage Styles for CA Sri Lanka eEXAM System */

/* Exams Section Styling */
.custom-exams-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    color: white;
    position: relative;
    overflow: hidden;
    margin-bottom: 40px;
}

/* Background pattern */
.custom-exams-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.3;
}

/* Header Section */
.section-header {
    position: relative;
    z-index: 1;
    margin-bottom: 50px;
}

.main-title {
    font-size: 42px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.sub-title {
    font-size: 24px;
    color: #4fc3f7;
    font-weight: 300;
    letter-spacing: 1px;
    background: rgba(0, 0, 0, 0.2);
    display: inline-block;
    padding: 12px 35px;
    border-radius: 30px;
    border: 1px solid rgba(79, 195, 247, 0.3);
    text-transform: uppercase;
}

/* Exams Container */
.exams-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    padding: 0 20px;
}

/* Individual Exam Card */
.exam-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    border-top: 5px solid #c02424;
}

.exam-card:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 0 20px 40px rgba(192, 36, 36, 0.3);
}

/* Card Number Badge */
.exam-card::before {
    content: attr(data-number);
    position: absolute;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #c02424, #f00000);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Card Image */
.exam-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.exam-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.exam-card:hover .exam-image img {
    transform: scale(1.1);
}

/* Image Overlay */
.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.7) 100%);
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.exam-card:hover .image-overlay {
    opacity: 0.9;
}

/* Exam Content */
.exam-content {
    padding: 25px 20px;
    text-align: center;
    background: white;
}

.exam-category {
    font-size: 16px;
    font-weight: 600;
    color: #c02424;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.exam-category::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: linear-gradient(to right, #c02424, #f00000);
}

.exam-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin: 15px 0 25px 0;
    min-height: 60px;
    line-height: 1.3;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Button Styling */
.exam-actions {
    margin-top: 10px;
}

.exam-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #c02424, #f00000);
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(192, 36, 36, 0.3);
}

.exam-btn:hover {
    background: linear-gradient(135deg, #a61e1e, #d40000);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(192, 36, 36, 0.4);
    color: white;
    text-decoration: none;
}

.exam-btn i {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.exam-btn:hover i {
    transform: translateX(5px);
}

/* Animation */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.exam-card {
    animation: slideUp 0.6s ease forwards;
    opacity: 0;
}

.exam-card:nth-child(1) { 
    animation-delay: 0.1s; 
}
.exam-card:nth-child(1)::before { content: '01'; }

.exam-card:nth-child(2) { 
    animation-delay: 0.2s; 
}
.exam-card:nth-child(2)::before { content: '02'; }

.exam-card:nth-child(3) { 
    animation-delay: 0.3s; 
}
.exam-card:nth-child(3)::before { content: '03'; }

.exam-card:nth-child(4) { 
    animation-delay: 0.4s; 
}
.exam-card:nth-child(4)::before { content: '04'; }

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

@media (max-width: 768px) {
    .exams-container {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
    
    .main-title {
        font-size: 32px;
    }
    
    .sub-title {
        font-size: 20px;
        padding: 10px 25px;
    }
    
    .exam-title {
        font-size: 20px;
        min-height: 50px;
    }
}

@media (max-width: 576px) {
    .custom-exams-section {
        padding: 40px 0;
    }
    
    .main-title {
        font-size: 28px;
    }
    
    .sub-title {
        font-size: 18px;
        padding: 8px 20px;
    }
    
    .exam-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}
