/* =========================================
   ABOUT PAGE — Dr. Vipin Mathur
   Extends: LMSCourse FSE Child (style.css)
   ========================================= */

/* ─────────────────────────────────────────────────────────
   0. CSS VARIABLES
───────────────────────────────────────────────────────── */

:root {
  

    --radius-card:       16px;
    --row-gap:           40px;
    --section-pad-x:     60px;
    --row-pad:           28px;
}

/* ─────────────────────────────────────────────────────────
   2. PAGE BACKGROUND
───────────────────────────────────────────────────────── */

#achievements-main {
    background-color: var(--color-bg);
    min-height: 100vh;
}


/* ─────────────────────────────────────────────────────────
   3. PAGE HEADER — centred
───────────────────────────────────────────────────────── */

.ach-page-header {
    padding:  25px 2px;
    background-color: var(--color-accent);
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Subtle decorative circle behind heading */
.ach-page-header::before {
    content: '';
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(23, 92, 82, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.ach-page-header__inner {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin: 0 auto;
}

.ach-page-header__eyebrow {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--color-rose);
    margin-bottom: 20px;

    /* animated reveal */
    opacity: 0;
    transform: translateY(16px);
    animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}

.ach-page-header__title {
    font-family: var(--font-serif);
    font-size: clamp(2.8rem, 6vw, 4.4rem);
    font-weight: 300;
    line-height: 1.08;
    color: var(--color-bg);
    margin-bottom: 24px;

    opacity: 0;
    transform: translateY(16px);
    animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.22s forwards;
}

.ach-page-header__title em {
    font-style: italic;
    color: var(--color-bg-alt);
}

.ach-page-header__sub {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--color-bg);
    line-height: 1.8;
    max-width: 520px;
    margin: 0 auto 36px;

    opacity: 0;
    transform: translateY(16px);
    animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.34s forwards;
}

/* Gold divider line */
.ach-page-header__divider {
    width: 56px;
    height: 2px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-gold));
    border-radius: 2px;
    margin: 0 auto;

    opacity: 0;
    transform: scaleX(0);
    animation: lineReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.46s forwards;
}


/* ─────────────────────────────────────────────────────────
   4. ACHIEVEMENT LIST WRAPPER
───────────────────────────────────────────────────────── */

.ach-list {
    padding: 20px var(--section-pad-x) 100px;
    display: flex;
    flex-direction: column;
    gap: var(--row-gap);
    max-width: 1280px;
    margin: 0 auto;
}


/* ─────────────────────────────────────────────────────────
   5. ACHIEVEMENT ROW — two card blocks side by side
   Default: image LEFT, content RIGHT
   Flipped: content LEFT, image RIGHT
───────────────────────────────────────────────────────── */

.ach-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: stretch;

    /* scroll reveal — starts hidden */
    opacity: 0;
    transform: translateY(40px);
    transition:
        opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.ach-row.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Flipped layout: swap column order via order */
.ach-row--flipped .ach-row__image-block { order: 2; }
.ach-row--flipped .ach-row__content-block { order: 1; }


/* ─────────────────────────────────────────────────────────
   6. IMAGE BLOCK — card with border + box-shadow
───────────────────────────────────────────────────────── */

.ach-row__image-block {
    position: relative;
    border-radius: var(--radius-card);
    border: 1px solid var(--color-fg-subtle);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    min-height: 300px;
    max-height: 600px;
    background-color: var(--color-bg-alt);

    transition:
        box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        border-color 0.4s ease,
        transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.ach-row__image-block:hover {
    box-shadow: var(--shadow-card-hover);
    border-color: rgba(23, 92, 82, 0.3);
    transform: translateY(-4px);
}

.ach-row__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.ach-row__image-block:hover .ach-row__img {
    transform: scale(1.06);
}

/* Subtle dark gradient at bottom of image */
.ach-row__image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(18, 18, 16, 0.28) 0%,
        transparent 50%
    );
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.ach-row__image-block:hover .ach-row__image-overlay {
    opacity: 0.6;
}

/* Placeholder when no image */
.ach-row__img-placeholder {
    width: 100%;
    height: 100%;
    min-height: 300px;
    max-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-stone);
}

.ach-row__img-placeholder svg {
    width: 64px;
    height: 64px;
    opacity: 0.3;
}


/* ─────────────────────────────────────────────────────────
   7. CONTENT BLOCK — card with border + box-shadow
───────────────────────────────────────────────────────── */

.ach-row__content-block {
    border-radius: var(--radius-card);
    border: 1px solid var(--color-fg-subtle);
    box-shadow: var(--shadow-card);
    background-color: var(--color-white);
    padding: var(--row-pad);

    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;

    transition:
        box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        border-color 0.4s ease,
        transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.ach-row__content-block:hover {
    box-shadow: var(--shadow-card-hover);
    border-color: rgba(23, 92, 82, 0.25);
    transform: translateY(-4px);
}

/* Alternate rows get a warm off-white */
.ach-row--flipped .ach-row__content-block {
    background-color: #faf9f6;
}


/* ─────────────────────────────────────────────────────────
   8. CONTENT TYPOGRAPHY
───────────────────────────────────────────────────────── */

/* Eyebrow */
.ach-row__eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 16px;
}

.ach-row__eyebrow::before {
    content: '';
    display: inline-block;
    width: 28px;
    height: 2px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-gold));
    border-radius: 2px;
    flex-shrink: 0;
    transition: width 0.3s ease;
}

.ach-row__content-block:hover .ach-row__eyebrow::before {
    width: 44px;
}

/* Title */
.ach-row__title {
    font-family: var(--font-serif);
    font-size: clamp(1.7rem, 2.6vw, 2.5rem);
    font-weight: 400;
    line-height: 1.15;
    color: var(--color-fg);
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

.ach-row__content-block:hover .ach-row__title {
    color: var(--color-accent-dark);
}

/* Body */
.ach-row__body {
    font-family: var(--font-sans);
    font-size: 0.92rem;
    font-weight: 00;
    color: var(--color-fg);
    line-height: 1.85;
    margin-bottom: 32px;
}


/* ─────────────────────────────────────────────────────────
   9. META CHIPS — displayed as blocks in a row
───────────────────────────────────────────────────────── */

.ach-row__meta {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ach-row__meta-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    background-color: var(--color-bg);
    border: 1px solid var(--color-fg-subtle);
    border-radius: 10px;
    padding: 10px 16px;
    min-width: 100px;

    transition:
        background-color 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.ach-row__meta-item:hover {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--color-accent-glow);
}

.ach-row__meta-label {
    font-family: var(--font-sans);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-rose-dark);
    transition: color 0.25s ease;
}

.ach-row__meta-item:hover .ach-row__meta-label {
    color: rgba(255, 255, 255, 0.65);
}

.ach-row__meta-value {
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--color-fg);
    transition: color 0.25s ease;
}

.ach-row__meta-item:hover .ach-row__meta-value {
    color: #ffffff;
}


/* ─────────────────────────────────────────────────────────
   10. SCROLL REVEAL — staggered blocks within each row
───────────────────────────────────────────────────────── */

.ach-row .ach-row__image-block,
.ach-row .ach-row__content-block {
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        border-color 0.4s ease;
}

.ach-row.is-visible .ach-row__image-block {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.05s;
}

.ach-row.is-visible .ach-row__content-block {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s;
}

/* For flipped rows: content animates first */
.ach-row--flipped.is-visible .ach-row__content-block {
    transition-delay: 0.05s;
}

.ach-row--flipped.is-visible .ach-row__image-block {
    transition-delay: 0.2s;
}


/* ─────────────────────────────────────────────────────────
   11. KEYFRAME ANIMATIONS
───────────────────────────────────────────────────────── */

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes lineReveal {
    to {
        opacity: 1;
        transform: scaleX(1);
    }
}


/* ─────────────────────────────────────────────────────────
   12. RESPONSIVE — Tablet (max 960px)
───────────────────────────────────────────────────────── */

@media (max-width: 960px) {
    :root {
        --section-pad-x: 32px;
        --row-pad:        36px;
        --row-gap:        44px;
    }

    .ach-page-header {
        padding: 72px var(--section-pad-x) 56px;
    }
}


/* ─────────────────────────────────────────────────────────
   13. RESPONSIVE — Mobile (max 680px)
───────────────────────────────────────────────────────── */

@media (max-width: 680px) {
    :root {
        --section-pad-x: 20px;
        --row-pad:        18px;
        --row-gap:        24px;
    }

    .ach-page-header {
        padding: 56px var(--section-pad-x) 44px;
    }

    /* All rows stack: image on top, content below */
    .ach-row,
    .ach-row--flipped {
        grid-template-columns: 1fr;
    }

    /* Reset order on mobile */
    .ach-row--flipped .ach-row__image-block,
    .ach-row--flipped .ach-row__content-block {
        order: unset;
    }

    .ach-row__image-block {
        min-height: 260px;
    }

    .ach-row__meta {
        gap: 8px;
    }

    .ach-row__meta-item {
        flex: 1 1 calc(50% - 4px);
        min-width: unset;
    }
}


/* ─────────────────────────────────────────────────────────
   14. REDUCED-MOTION
───────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .ach-row,
    .ach-row .ach-row__image-block,
    .ach-row .ach-row__content-block {
        opacity: 1;
        transform: none;
        transition: box-shadow 0.3s ease, border-color 0.3s ease;
        animation: none;
    }

    .ach-page-header__eyebrow,
    .ach-page-header__title,
    .ach-page-header__sub,
    .ach-page-header__divider {
        opacity: 1;
        transform: none;
        animation: none;
    }

    .ach-row__img {
        transition: none;
    }

    .ach-row__image-block:hover,
    .ach-row__content-block:hover {
        transform: none;
    }
}

/* ─────────────────────────────────────────────────────────
   15. PAGINATION
   Append this block to your achievements stylesheet.
───────────────────────────────────────────────────────── */

.ach-pagination {
    max-width: 1280px;
    margin: 0 auto 80px;
    padding: 0 var(--section-pad-x);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* "Showing 1–5 of 18" counter */
.ach-pagination__info {
    font-family: var(--font-sans);
    font-size: 0.82rem;
    color: var(--color-stone);
    letter-spacing: 0.02em;
}

.ach-pagination__info strong {
    color: var(--color-fg);
    font-weight: 600;
}

/* Row that holds Prev · pages · Next */
.ach-pagination__controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ── Prev / Next buttons ── */
.ach-pagination__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--color-fg);
    background-color: var(--color-white);
    border: 1px solid var(--color-fg-subtle);
    border-radius: 10px;
    padding: 9px 18px;
    text-decoration: none;
    cursor: pointer;
    transition:
        background-color 0.25s ease,
        border-color     0.25s ease,
        color            0.25s ease,
        box-shadow       0.25s ease,
        transform        0.25s ease;
}

.ach-pagination__btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.ach-pagination__btn:hover {
    background-color: var(--color-accent);
    border-color:     var(--color-accent);
    color:            #ffffff;
    box-shadow:       0 4px 14px var(--color-accent-glow);
    transform:        translateY(-2px);
}

.ach-pagination__btn--disabled {
    opacity: 0.38;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Numbered page list ── */
.ach-pagination__pages {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ach-pagination__page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 6px;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-fg);
    background-color: var(--color-white);
    border: 1px solid var(--color-fg-subtle);
    border-radius: 10px;
    text-decoration: none;
    transition:
        background-color 0.22s ease,
        border-color     0.22s ease,
        color            0.22s ease,
        box-shadow       0.22s ease,
        transform        0.22s ease;
}

.ach-pagination__page:hover {
    background-color: var(--color-bg-alt);
    border-color:     var(--color-accent);
    color:            var(--color-accent);
    transform:        translateY(-2px);
    box-shadow:       0 4px 10px rgba(23, 92, 82, 0.1);
}

/* Active / current page */
.ach-pagination__page--current {
    background-color: var(--color-accent);
    border-color:     var(--color-accent);
    color:            #ffffff;
    cursor:           default;
    pointer-events:   none;
    box-shadow:       0 4px 14px var(--color-accent-glow);
}

/* Ellipsis dots */
.ach-pagination__ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 40px;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--color-stone);
    user-select: none;
}

/* Empty-state message */
.ach-empty {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--color-stone);
    text-align: center;
    padding: 60px 0;
}


/* ── Responsive tweaks ─────────────────────────────────── */

@media (max-width: 680px) {
    .ach-pagination {
        gap: 16px;
        margin-bottom: 56px;
    }

    .ach-pagination__btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    .ach-pagination__page {
        min-width: 36px;
        height: 36px;
        font-size: 0.8rem;
    }
}


/* ── Reduced motion ────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .ach-pagination__btn,
    .ach-pagination__page {
        transition: background-color 0.2s ease, color 0.2s ease;
    }

    .ach-pagination__btn:hover,
    .ach-pagination__page:hover {
        transform: none;
    }
}