/*
|--------------------------------------------------------------------------
| SharpLync Cyber Glossary
| Version: v1.2
|--------------------------------------------------------------------------
| Notes:
| - Extends sharplync.css (do not redefine brand colours/fonts)
| - Tool-specific layout and components only
|--------------------------------------------------------------------------
*/

/* Wrapper */
.cyber-glossary {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: auto;
}

.tool-wrapper.cyber-glossary {
    padding-bottom: 80px; /* breathing room */
}

/* Header */
.cyber-glossary .tool-header {
    color: #FFFFFF;
    margin-bottom: 40px;
}

.cyber-glossary .tool-header h1 {
    margin-bottom: 10px;
}

.cyber-glossary .tool-intro {
    font-size: 1.05rem;
    opacity: 0.85;
}

/* Grid */
.glossary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Card accent */
.glossary-card::before {
    content: "";
    display: block;
    height: 4px;
    width: 36px;
    background: #2CBFAE; /* SharpLync teal */
    border-radius: 4px;
    margin-bottom: 10px;
    transition: width 0.25s ease;
}

/* Expand accent when card is active */
.glossary-card.active::before {
    width: 500px;
}


/* Card */
.glossary-card {
    background: #ffffff;
    color: #0A2A4D; /* SharpLync navy */
    border-radius: 12px;
    padding: 22px 24px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

/* Typography */
.glossary-card h3 {
    color: #0A2A4D;
    font-weight: 600;
    margin-bottom: 6px;
}

.glossary-card p {
    color: #425B76; /* softer navy-grey */
    line-height: 1.45;
    margin: 0;
}

/* Hover (only when not in focus mode) */
.glossary-card:not(.active):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
}

/* ===============================
   Focus Mode (single card view)
   =============================== */

/* Active card becomes full-width */
.glossary-card.active {
    grid-column: 1 / -1;
    transform: none;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

/* Hide all other cards completely */
.glossary-grid:has(.glossary-card.active) .glossary-card:not(.active) {
    display: none;
}

/* ===============================
   Placeholder state
   =============================== */

.glossary-card.placeholder h3 {
    opacity: 0.9;
}

.glossary-card.placeholder p {
    opacity: 0.6;
    font-style: italic;
}

/* ===============================
   Expandable glossary behaviour
   =============================== */

.term-summary {
    margin-bottom: 10px;
}

.term-toggle {
    background: none;
    border: none;
    color: #2CBFAE; /* SharpLync teal */
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.term-toggle:hover {
    text-decoration: underline;
}

/* Expanded content */
.term-details {
    margin-top: 14px;
    animation: expandFade 0.25s ease;
}

.term-details p {
    margin-bottom: 10px;
}

/* Analogy & Why blocks */
.term-analogy,
.term-why {
    background: #f5f8fb;
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 0.95rem;
}

/* Expansion animation */
@keyframes expandFade {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer CTA */
.glossary-footer-cta {
    color: #FFFFFF;
    margin-top: 50px;
    text-align: center;
}

/* ===============================
   Mobile behaviour
   =============================== */

@media (max-width: 768px) {

    .glossary-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    /* Full-width still applies naturally */
    .glossary-card.active {
        grid-column: auto;
    }

    /* Tighter padding on small screens */
    .glossary-card {
        padding: 18px 20px;
    }
    
    /* Keep the accent subtle on mobile */
    .glossary-card::before {
        width: 28px;
    }

    .glossary-card.active::before {
        width: 150px;
    }
}