/* Real-World Deployment Patterns Explorer
 * =======================================
 * Three clickable pattern cards; selecting one reveals a case-study summary,
 * a vis-network mini dependency graph, and a reveal-on-click validation answer.
 * Cards stack vertically below 700px. Overlays are siblings of #network.
 */

/* ===========================================
   RESET & BASE
   =========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: aliceblue;
    color: #212529;
}

.container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding: 10px 12px 16px 12px;
}

/* ===========================================
   TITLE
   =========================================== */
.title {
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    color: black;
    margin-bottom: 12px;
}

/* ===========================================
   PATTERN CARDS
   =========================================== */
.cards {
    display: flex;
    flex-direction: row;
    gap: 12px;
    width: 100%;
}

.card {
    flex: 1 1 33%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 10px;
    border: 3px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    color: white;
    text-align: center;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    font-family: inherit;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.22);
}

.card-icon {
    font-size: 34px;
    line-height: 1;
}

.card-name {
    font-size: 16px;
    font-weight: bold;
}

.card-hint {
    font-size: 11px;
    opacity: 0.9;
}

/* Pattern colors */
.card-corporate     { background-color: #4a5a8a; }  /* slate blue */
.card-courseware    { background-color: #2f855a; }  /* green */
.card-certification { background-color: #b7791f; }  /* gold */

/* Selected card gets a highlighted border + subtle lift */
.card.selected {
    border-color: #1a202c;
    box-shadow: 0 0 0 3px rgba(26,32,44,0.15), 0 6px 12px rgba(0,0,0,0.25);
    transform: translateY(-2px);
}

.card.selected .card-hint {
    visibility: hidden;
}

/* ===========================================
   PRE-PROMPT (before selection)
   =========================================== */
.pre-prompt {
    margin-top: 16px;
    padding: 18px 20px;
    background-color: rgba(255,255,255,0.9);
    border: 1px dashed #adb5bd;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
    color: #495057;
    text-align: center;
}

/* ===========================================
   DETAIL AREA
   =========================================== */
.detail {
    margin-top: 14px;
}

.summary {
    padding: 12px 16px;
    background-color: rgba(255,255,255,0.96);
    border-left: 5px solid #4a5a8a;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.55;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    margin-bottom: 12px;
}

.detail-body {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: stretch;
}

/* vis-network mini graph */
.mini-network {
    flex: 1 1 62%;
    height: 300px;
    background-color: #fbfdff;
    border: 1px solid #cfd8e3;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

/* ===========================================
   VALIDATION BOX
   =========================================== */
.validate-box {
    flex: 1 1 38%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    background-color: rgba(255,255,255,0.96);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.validate-q {
    font-size: 14px;
    font-weight: bold;
    line-height: 1.4;
    color: #1a202c;
}

.validate-a {
    font-size: 13px;
    line-height: 1.5;
    color: #1a4731;
    background-color: #f0fff4;
    border: 1px solid #9ae6b4;
    border-radius: 6px;
    padding: 10px 12px;
}

/* ===========================================
   BUTTONS
   =========================================== */
.btn {
    padding: 9px 16px;
    font-size: 13px;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-reveal {
    background-color: #2f855a;
    color: white;
    align-self: flex-start;
}

.btn-reveal:hover {
    background-color: #276749;
}

/* ===========================================
   RESPONSIVE: stack cards + detail-body < 700px
   =========================================== */
@media (max-width: 700px) {
    .cards {
        flex-direction: column;
    }

    .detail-body {
        flex-direction: column;
    }

    .mini-network {
        height: 260px;
    }

    .card-hint {
        font-size: 10px;
    }

    .title {
        font-size: 17px;
    }
}
