/* ============================================
   CivPrepMaster – Past Questions Stylesheet
   Applied to: /Resources/Past-Questions
   Color Palette: Green (#2E7D32) · White · Black
   ============================================ */

/* ──────────────── CSS Variables ──────────────── */
:root {
    --green-900: #1B5E20;
    --green-800: #2E7D32;
    --green-700: #388E3C;
    --green-600: #43A047;
    --green-500: #4CAF50;
    --green-400: #66BB6A;
    --green-300: #81C784;
    --green-200: #A5D6A7;
    --green-100: #C8E6C9;
    --green-50: #E8F5E9;
    --black-900: #0a0a0a;
    --black-800: #171717;
    --black-700: #262626;
    --black-600: #404040;
    --black-500: #525252;
    --black-400: #737373;
    --black-300: #a3a3a3;
    --black-200: #d4d4d4;
    --black-100: #e5e5e5;
    --black-50: #f5f5f5;
    --white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 24px rgba(46, 125, 50, 0.14);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 50px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-body: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-heading: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --max-width: 900px;
    --max-width-wide: 1200px;
}

/* ──────────────── Reset & Base ──────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 16.5px;
    line-height: 1.75;
    color: var(--black-800);
    background-color: var(--black-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: var(--green-800);
    color: var(--white);
}

/* ──────────────── Page Header ──────────────── */
.page-header {
    background: linear-gradient(160deg, var(--green-900) 0%, var(--green-800) 50%, var(--green-700) 100%);
    color: var(--white);
    text-align: center;
    padding: 64px 24px 56px;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -60%;
    left: -40%;
    width: 180%;
    height: 180%;
    background: radial-gradient(circle at 25% 35%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 75% 65%, rgba(255, 255, 255, 0.03) 0%, transparent 40%);
    animation: headerFloat 10s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes headerFloat {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-1.5%, -1%); }
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--green-400), var(--green-300), var(--green-400));
}

.page-header h1 {
    font-family: var(--font-heading);
     color: var(--white);
    font-size: clamp(1.6rem, 4.5vw, 2.5rem);
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
    letter-spacing: -0.3px;
}

.page-header p {
    font-size: clamp(1rem, 2.2vw, 1.15rem);
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.88);
    max-width: 680px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.page-header p strong {
    color: var(--white);
    font-weight: 700;
}

/* ──────────────── Breadcrumb ──────────────── */
.breadcrumb {
    max-width: var(--max-width-wide);
    margin: 0 auto;
    padding: 14px 24px;
    background: var(--white);
    border-bottom: 1px solid var(--black-100);
}

.breadcrumb ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0;
}

.breadcrumb ol li {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.86rem;
    color: var(--black-400);
}

.breadcrumb ol li:not(:last-child)::after {
    content: '/';
    color: var(--black-200);
    margin-left: 2px;
    font-weight: 300;
}

.breadcrumb ol li a {
    color: var(--green-800);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.breadcrumb ol li a:hover {
    color: var(--green-900);
    text-decoration: underline;
}

.breadcrumb ol li:last-child {
    color: var(--black-600);
    font-weight: 600;
}

/* ──────────────── Card Container Grid ──────────────── */
.card-container {
    max-width: var(--max-width-wide);
    margin: 0 auto;
    padding: 36px 24px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

/* ──────────────── Section Cards ──────────────── */
.section {
    background: var(--white);
    border: 1px solid var(--black-100);
    border-radius: var(--radius-lg);
    padding: 36px 28px 32px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--green-800), var(--green-500), var(--green-800));
    opacity: 0;
    transition: var(--transition);
}

.section::after {
    content: '';
    position: absolute;
    bottom: -60px;
    right: -60px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, var(--green-50) 0%, transparent 70%);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
    border-radius: 50%;
}

.section:hover {
    border-color: var(--green-800);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    transform: translateY(-4px);
}

.section:hover::before {
    opacity: 1;
}

.section:hover::after {
    opacity: 1;
}

/* ──────────────── Semester Badge ──────────────── */
.semester-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--green-50);
    color: var(--green-900);
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 16px;
    border-radius: var(--radius-full);
    letter-spacing: 1px;
    text-transform: uppercase;
    border: 1px solid var(--green-200);
    transition: var(--transition);
    line-height: 1.6;
}

.section:hover .semester-badge {
    background: var(--green-800);
    color: var(--white);
    border-color: var(--green-800);
    box-shadow: 0 2px 10px rgba(46, 125, 50, 0.25);
}

/* ──────────────── Subject Heading ──────────────── */
.section h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.08rem, 2.8vw, 1.25rem);
    font-weight: 700;
    color: var(--black-800);
    line-height: 1.45;
    margin-top: 2px;
    margin-bottom: 2px;
    transition: var(--transition);
}

.section:hover h2 {
    color: var(--green-900);
}

/* ──────────────── CTA Button ──────────────── */
.section .cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    background: var(--green-800);
    color: var(--white);
    font-weight: 600;
    font-size: 0.92rem;
    padding: 12px 30px;
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 3px 12px rgba(46, 125, 50, 0.2);
    margin-top: auto;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.2px;
}

.section .cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
    transition: left 0.5s ease;
}

.section .cta-button::after {
    content: '→';
    font-size: 1.1rem;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.section .cta-button:hover {
    background: var(--green-900);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(27, 94, 32, 0.3);
}

.section .cta-button:hover::before {
    left: 100%;
}

.section .cta-button:hover::after {
    transform: translateX(4px);
}

.section .cta-button i {
    font-size: 0.88rem;
    flex-shrink: 0;
}

/* ──────────────── SEO Content Section ──────────────── */
.seo-content {
    max-width: var(--max-width);
    margin: 28px auto 48px;
    padding: 0 24px;
    text-align: center;
}

.seo-content h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 3vw, 1.4rem);
    font-weight: 700;
    color: var(--black-800);
    margin-bottom: 14px;
    margin-top: 40px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--green-100);
    line-height: 1.4;
    position: relative;
}

.seo-content h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: var(--green-800);
    border-radius: 2px;
}

.seo-content h2:first-child {
    margin-top: 0;
}

.seo-content p {
    color: var(--black-500);
    font-size: 1rem;
    line-height: 1.85;
    margin-bottom: 10px;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.seo-content p strong {
    color: var(--black-700);
    font-weight: 600;
}

/* ──────────────── Scrollbar ──────────────── */
::-webkit-scrollbar {
    width: 7px;
}

::-webkit-scrollbar-track {
    background: var(--black-50);
}

::-webkit-scrollbar-thumb {
    background: var(--black-200);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--black-400);
}

/* ──────────────── Accessibility ──────────────── */
a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--green-500);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

.section:focus-within {
    border-color: var(--green-800);
    box-shadow: var(--shadow-md), 0 0 0 3px rgba(46, 125, 50, 0.1);
}

/* ──────────────── Responsive – Tablet ──────────────── */
@media (max-width: 1024px) {
    .card-container {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
        padding: 30px 20px 16px;
    }
}

/* ──────────────── Responsive – Mobile Large ──────────────── */
@media (max-width: 768px) {
    .page-header {
        padding: 48px 18px 40px;
    }

    .page-header h1 {
        font-size: clamp(1.35rem, 5vw, 1.85rem);
    }

    .card-container {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 24px 16px 14px;
    }

    .section {
        padding: 28px 22px 26px;
        border-radius: var(--radius-md);
    }

    .section h2 {
        font-size: 1.12rem;
    }

    .seo-content {
        padding: 0 16px;
        margin: 20px auto 36px;
    }

    .seo-content h2 {
        font-size: 1.15rem;
        margin-top: 32px;
    }

    .seo-content p {
        font-size: 0.95rem;
    }

    .breadcrumb {
        padding: 12px 16px;
    }
}

/* ──────────────── Responsive – Mobile Small ──────────────── */
@media (max-width: 480px) {
    body {
        font-size: 15.5px;
    }

    .page-header {
        padding: 38px 14px 32px;
    }

    .page-header h1 {
        font-size: 1.3rem;
    }

    .page-header p {
        font-size: 0.92rem;
    }

    .card-container {
        padding: 18px 12px 10px;
        gap: 14px;
    }

    .section {
        padding: 24px 16px 22px;
    }

    .section h2 {
        font-size: 1.02rem;
    }

    .section .cta-button {
        padding: 11px 24px;
        font-size: 0.88rem;
        width: 100%;
    }

    .semester-badge {
        font-size: 0.66rem;
        padding: 3px 12px;
    }

    .seo-content {
        padding: 0 12px;
    }

    .seo-content h2 {
        font-size: 1.08rem;
    }

    .seo-content p {
        font-size: 0.91rem;
        line-height: 1.75;
    }

    .breadcrumb {
        padding: 10px 12px;
    }

    .breadcrumb ol li {
        font-size: 0.8rem;
    }
}

/* ──────────────── Responsive – Ultra Small ──────────────── */
@media (max-width: 360px) {
    .page-header {
        padding: 32px 12px 26px;
    }

    .page-header h1 {
        font-size: 1.15rem;
    }

    .section {
        padding: 20px 14px 18px;
    }

    .section h2 {
        font-size: 0.96rem;
    }

    .section .cta-button {
        padding: 10px 18px;
        font-size: 0.84rem;
        gap: 6px;
    }
}

/* ──────────────── Print Styles ──────────────── */
@media print {
    .page-header {
        background: none;
        color: var(--black-900);
        padding: 20px 0;
    }

    .page-header::before,
    .page-header::after {
        display: none;
    }

    .page-header h1 {
        color: var(--black-900);
    }

    .page-header p {
        color: var(--black-600);
    }

    .section .cta-button,
    #navbar,
    #footer,
    #social-section,
    .breadcrumb,
    #container-d950250f5a43c6c3f4942d50c5cb9461 {
        display: none;
    }

    .card-container {
        display: block;
        padding: 10px 0;
    }

    .section {
        box-shadow: none;
        border: 1px solid var(--black-300);
        break-inside: avoid;
        page-break-inside: avoid;
        margin-bottom: 12px;
        border-radius: 0;
    }

    .section::before,
    .section::after {
        display: none;
    }

    .section h2 {
        color: var(--black-900);
    }

    .semester-badge {
        border: 1px solid var(--black-400);
        background: var(--black-50);
        color: var(--black-800);
    }

    .seo-content h2 {
        border-bottom-color: var(--black-300);
    }

    .seo-content h2::after {
        background: var(--black-600);
    }

    .seo-content p {
        color: var(--black-700);
    }
}

/* ──────────────── Reduced Motion ──────────────── */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .section,
    .section::before,
    .section::after,
    .section h2,
    .section .cta-button,
    .section .cta-button::before,
    .section .cta-button::after,
    .semester-badge,
    .breadcrumb ol li a {
        transition: none;
    }

    .page-header::before {
        animation: none;
    }

    .section:hover {
        transform: none;
    }

    .section .cta-button:hover {
        transform: none;
    }

    .section .cta-button:hover::after {
        transform: none;
    }
   }
