@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap');

*, *::before, *::after {
    box-sizing: border-box;
}

/* CSS Variables for Theme Colors and Font */
:root {
    --primary-green: #0F6E56;
    --light-green: #1D9E75;
    --gold-orange: #EF9F27;
    --dark-green: #085041;

    --text-color-dark: #333;
    --text-color-medium: #555;
    --text-color-light: #666;
    --bg-light-neutral: #f4f7f6;
    --bg-white: #fff;
    --border-light: #e0e0e0;
    --border-medium: #ddd;
    --shadow-light: rgba(0,0,0,0.05);
    --shadow-medium: rgba(0,0,0,0.1);

    --font-family-primary: 'Nunito', sans-serif;
}

/* General Body and Container Styles */
body {
    font-family: var(--font-family-primary);
    margin: 0;
    padding: 0;
    background-color: var(--bg-light-neutral);
    color: var(--text-color-dark);
    line-height: 1.6;
    /* Content Protection: Disable text selection */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Prevent print screen/printing of content */
@media print {
    body { display: none !important; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 15px;
}

.btn-primary {
    background-color: var(--light-green);
    color: var(--bg-white);
}

.btn-primary:hover {
    background-color: var(--dark-green);
}

.btn-secondary {
    background-color: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-large {
    padding: 12px 25px;
    font-size: 17px;
}

.btn.disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* Main Content Area */
.main-content {
    padding: 30px 0;
}

/* Breadcrumbs */
.breadcrumbs {
    margin-bottom: 20px;
    font-size: 14px;
    color: #777;
}

.breadcrumbs a {
    text-decoration: none;
    color: var(--light-green);
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

/* Section Cards / General grid card styles */
.section-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.section-card h3 {
    color: var(--primary-green);
    margin-bottom: 10px;
}

.section-card p {
    color: var(--text-color-light);
}

/* Responsive adjustments for general layouts */
@media (max-width: 480px) {
    .btn {
        padding: 8px 15px;
        font-size: 14px;
    }
}

/* Exam Detail Hero */
.exam-detail-hero {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--dark-green) 100%);
    color: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    margin-bottom: 40px;
    text-align: center;
}

.exam-detail-hero h1 {
    font-size: 42px;
    margin: 0 0 15px 0;
}

.exam-detail-hero .exam-description {
    font-size: 18px;
    max-width: 800px;
    margin: 0 auto 25px auto;
    opacity: 0.9;
    line-height: 1.7;
}

.exam-detail-hero .exam-meta {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    font-size: 15px;
    opacity: 0.9;
}

.exam-detail-hero .exam-meta i {
    margin-right: 8px;
}

/* Exam Info Grid */
.exam-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

/* Year Selector Component */
.year-selector {
    background-color: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 25px;
    margin-top: 10px;
}

.year-selector h3 {
    margin: 0 0 18px 0;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.year-selector h3 i {
    margin-right: 8px;
    color: var(--gold-orange);
}

.year-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.year-buttons .btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 160px;
    justify-content: center;
    font-size: 16px;
    padding: 12px 24px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.year-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.year-buttons .btn-primary {
    background: var(--gold-orange);
    color: #1a1a1a;
    font-weight: 700;
}

.year-buttons .btn-primary:hover {
    background: #f5b042;
}

.year-buttons .btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.year-buttons .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Badge for "Latest" */
.badge-new {
    background: #ff4757;
    color: #fff;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    animation: badgePulse 2s ease-in-out infinite;
}

/* Position the badge inline next to the text for responsive support and to prevent overlapping */
.year-buttons .btn .badge-new {
    margin-left: 4px;
}

@keyframes badgePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Responsive Year Selector */
@media (max-width: 768px) {
    .exam-detail-hero {
        padding: 25px 15px;
    }

    .exam-detail-hero h1 {
        font-size: 24px;
    }

    .exam-detail-hero .exam-meta {
        flex-direction: column;
        gap: 10px;
    }

    .year-selector {
        padding: 15px;
    }

    .year-selector h3 {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .year-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .year-buttons .btn {
        min-width: auto;
        width: 100%;
        padding: 10px 16px;
        font-size: 14px;
    }
}

/* Scroll to Top Floating Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--primary-green);
    color: var(--bg-white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.scroll-to-top:hover {
    background-color: var(--light-green);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Spacing and size adjustments for mobile devices */
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}
