/* ============================================================
   achievements.css — Modern Achievements Page Styles (MIN-CONTENT FIXED)
   ============================================================ */


/* ── 1. CSS VARIABLES ───────────────────────────────────── */
:root {
    --color-primary: #024a26;
    --color-primary-light: #06763e;
    --color-indicator: #18a34a;

    --color-title: #0d1f17;
    --color-desc: #44534c;

    --card-bg: linear-gradient(
        180deg,
        rgba(255,255,255,0.98),
        rgba(245,248,246,0.96)
    );

    --glass-bg: rgba(255,255,255,0.72);

    --shadow-card: 0 10px 25px rgba(2, 74, 38, 0.08);
    --shadow-hover: 0 18px 35px rgba(2, 74, 38, 0.15);

    --radius-card: 18px;
    --radius-inner: 14px;

    --transition: all 0.35s ease;
}


/* ── 2. RESET ───────────────────────────────────────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

img {
    display: block;
    width: 100%;
    max-width: 100%;
}

body {
    font-family: Arial, sans-serif;
    overflow-x: hidden;
    background: #ffffff;
}


/* ── 3. HERO SECTION ────────────────────────────────────── */
.achievements-hero {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.achievements-hero img {
    position: absolute;
    inset: 0;
    width: 130%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
}

.achievements-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(0,0,0,0.55),
        rgba(0,0,0,0.18)
    );
    z-index: 1;
}

.hero-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 7%;
}

.hero-label {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #7dffac;
    margin-bottom: 14px;
}

.hero-h1,
.hero-h2 {
    font-size: clamp(2rem, 5vw, 3.6rem);
    line-height: 1.1;
    font-weight: 800;
}

.hero-h1 { color: #ffffff; }
.hero-h2 { color: #7dffac; }

.hero-desc {
    margin-top: 1.3rem;
    max-width: 600px;
    font-size: 1rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.92);
}

.explore-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    margin-top: 2rem;
    padding: 0.9rem 1.5rem;
    border: none;
    border-radius: 10px;
    background: var(--color-primary);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.explore-btn:hover {
    background: var(--color-primary-light);
    transform: translateY(-3px);
}


/* ── 4. ANALYTICS CARDS ─────────────────────────────────── */
.analytic {
    background-color: white;
}

.analytic-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 276px), 1fr));
    gap: clamp(15px, 2vw, 25px);
    width: 100%;
    padding: clamp(20px, 4vw, 50px) clamp(15px, 6vw, 200px);
    box-sizing: border-box;
    align-items: stretch;
}

.analytic-card {
    width: 100%;
    min-width: 0;
    background: #ffffff;
    padding: clamp(18px, 3vw, 30px);
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
    transition: 0.3s ease;
}

.analytic-card:hover {
    transform: translateY(-5px);
}

.analytic-card-head {
    display: flex;
    align-items: center;
    gap: clamp(10px, 2vw, 15px);
}

.analytic-card-head-img {
    width: clamp(42px, 5vw, 50px);
    height: clamp(42px, 5vw, 50px);
    padding: 8px;
    background: linear-gradient(135deg, #17904B, #62BE56);
    border-radius: 50%;
    flex-shrink: 0;
}

.analytic-card-head h3 {
    font-size: clamp(26px, 4vw, 35px);
    margin-top: 10px;
    color: #04502B;
}

.analytic-card-head h4 {
    font-size: clamp(16px, 2vw, 20px);
    margin-top: 5px;
    color: #000000;
}

.analytic-card p {
    margin-top: 18px;
    color: #000000;
    font-size: clamp(14px, 1.8vw, 16px);
    font-weight: 500;
    line-height: 1.8;
    letter-spacing: 0.5px;
}


/* ── Analytics Responsive ─────────────────────────────────── */
@media (max-width: 1200px) {
    .analytic-cards-container {
        grid-template-columns: repeat(auto-fit, minmax(276px, 1fr));
        gap: 20px;
        padding: 40px 60px;
    }
}

@media (max-width: 768px) {
    .analytic-cards-container {
        grid-template-columns: 1fr;
        padding: 30px 20px;
    }

    .analytic-card         { padding: 25px; }
    .analytic-card-head h3 { font-size: 28px; }
    .analytic-card-head h4 { font-size: 18px; }
    .analytic-card p       { font-size: 15px; line-height: 1.7; }
}

@media (max-width: 480px) {
    .analytic-cards-container  { padding: 20px 15px; }
    .analytic-card             { padding: 20px; }
    .analytic-card-head        { gap: 10px; }
    .analytic-card-head-img    { width: 42px; height: 42px; }
    .analytic-card-head h3     { font-size: 24px; }
    .analytic-card-head h4     { font-size: 16px; }
    .analytic-card p           { font-size: 14px; }
}


/* ── 5. ACHIEVEMENTS SECTION ───────────────────────────── */
.achievements {
    width: 100%;
    padding: clamp(40px, 5vw, 70px) 20px;
}

.achievements-heading {
    text-align: center;
    text-transform: uppercase;
    color: var(--color-primary);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.achievements-heading + h3 {
    text-align: center;
    font-size: clamp(2rem, 4vw, 3rem);
    color: #111;
    margin-bottom: 50px;
}


/* ── GRID ─────────────────────────────────────────────── */
.achievements-list {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, 350px);
    gap: 30px;
    justify-content: center;
}


/* ── CARD (MIN-CONTENT FIX) ───────────────────────────── */
.achievement-item {
    width: 350px;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 18px;
    border: 1px solid #ececec;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.35s ease;
}

.achievement-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 35px rgba(0,0,0,0.10);
}


/* ── IMAGE ─────────────────────────────────────────────── */
.achievement-photo {
    width: 100%;
    height: 200px;
    flex-shrink: 0;
}

.achievement-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* ── TEXT AREA ─────────────────────────────────────────── */
.achievement-text {
    display: flex;
    flex-direction: column;
    padding: 18px 20px;
}


/* ── TYPE ──────────────────────────────────────────────── */
.type {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #2f8d46;
    margin-bottom: 10px;
}

.type i {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e9f7ee;
    font-size: 10px;
}


/* ── TITLE ─────────────────────────────────────────────── */
.achievement-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}


/* ── DESCRIPTION (COLLAPSED) ───────────────────────────── */
.achievement-desc {
    font-size: 0.96rem;
    line-height: 1.7;
    color: #5f5f5f;
    position: relative;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Collapsed state modifier via internal layout structure */
.achievement-desc.collapsed .desc-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Expanded state modifier */
.achievement-item.expanded .achievement-desc,
.achievement-desc.expanded .desc-text {
    -webkit-line-clamp: unset;
    display: block;
}


/* ── BUTTON ────────────────────────────────────────────── */
.toggle-desc-btn {
    margin-top: 10px;
    margin-left: 6px;
    background: transparent;
    border: none;
    color: #208345;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.95rem;
    transition: var(--transition);
}

.toggle-desc-btn:hover {
    color: #0f6b30;
}


/* ── VIEW MORE ─────────────────────────────────────────── */
.view-more-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.view-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    min-width: 260px;
    border: none;
    border-radius: 12px;
    background: var(--color-primary);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-more-btn:hover {
    transform: translateY(-3px);
}


/* ── UTILITIES & DYNAMIC STATE REVEALS ─────────────────── */
.hidden-achievement {
    display: none;
    opacity: 0;
    transform: translateY(20px);
}

/* Dynamic reveal controlled via JS */
.hidden-achievement.show {
    display: flex;
    animation: cardReveal 0.6s ease forwards;
}

@keyframes cardReveal {
    from {
        opacity: 0;
        transform: translateY(25px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ── RESPONSIVE LIST BREAKPOINTS ──────────────────────── */
@media (max-width: 768px) {
    .achievements-list {
        grid-template-columns: 1fr;
    }

    .achievement-item {
        width: 100%;
    }
}