/* 
 * 현대인의 신종 질병 - Refined Stamp Design
 */

@import url('https://fonts.googleapis.com/css2?family=Black+Han+Sans&family=Do+Hyeon&family=Jua&family=Noto+Sans+KR:wght@400;500;700&display=swap');

:root {
    --bg-sky: #B3E5FC;

    /* Text Colors */
    --txt-sky-blue: #4FC3F7;
    /* Brighter Sky Blue for Title */
    --txt-dark-gray: #455A64;
    /* Dark Gray for 'New Diseases' */

    --txt-title-card: #0277BD;
    /* Card Internal Title Blue */

    --txt-dark: #263238;
    --txt-white: #FFFFFF;

    /* Badges (All Blue/Sky tones, NO ORANGE) */
    --badge-def: #29B6F6;
    --badge-cause: #4FC3F7;
    --badge-sym: #81D4FA;
    --badge-prev: #B3E5FC;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-sky);
    background-image: radial-gradient(#81D4FA 15%, transparent 16%);
    background-size: 20px 20px;
    font-family: 'Noto Sans KR', sans-serif;
    color: var(--txt-dark);
}

/* Header */
header {
    background-color: #fff;
    padding: 2rem 0;
    text-align: center;
    border-bottom: 8px solid #0288D1;
    margin-bottom: 2rem;
    width: 100%;
    box-sizing: border-box;
}

.header-sub,
.header-team {
    color: #546E7A;
    font-family: 'Jua';
    margin-top: 10px;
    font-size: 1.1rem;
}

/* Main Poster Title */
.poster-title {
    font-family: 'Black Han Sans', sans-serif;
    font-size: 4.5rem;
    margin: 0;
    line-height: 1.2;
    /* Thin White Stroke logic */
    -webkit-text-stroke: 0.1px white;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
    word-break: keep-all;
}

.t-sky {
    color: var(--txt-sky-blue);
}

.t-gray {
    color: var(--txt-dark-gray);
}


/* Main Grid */
.container {
    max-width: 1300px;
    margin: 0 auto 50px auto;
    padding: 0 40px;
    display: grid;
    /* Force 3 columns on desktop as requested */
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* 
 * STAMP CARD - Improved to prevent clipping
 */
.stamp-card {
    background: white;
    padding: 25px 20px;
    position: relative;
    filter: drop-shadow(5px 5px 10px rgba(0, 0, 0, 0.15));

    display: flex;
    flex-direction: column;

    /* Removed strict aspect-ratio 1/1 to prevent content clipping. 
       min-height ensures it still looks like a square if content is short. */
    min-height: 480px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    /* overflow: visible; Allow content to dictate size */

    /* Perforated Edge Background */
    background:
        linear-gradient(#fff, #fff) 50% 50% / calc(100% - 20px) calc(100% - 20px) no-repeat,
        radial-gradient(circle at 10px 10px, transparent 9px, white 10px) 0 0 / 20px 20px repeat;
}

/* Card Titles */
.card-title {
    font-family: 'Black Han Sans', sans-serif;
    font-size: 2.2rem;
    color: var(--txt-title-card);
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 3px dashed #B3E5FC;
    /* Thin white stroke for card titles too if requested, but usually 'poster titles' means main header. 
       Let's add a very subtle white stroke to card titles just in case, for consistency. */
    -webkit-text-stroke: 0.1px white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Content Layout to fit Square */
.info-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* Tighter gap */
    font-size: 0.85rem;
    /* Smaller font for density */
    flex: 1;
    justify-content: space-between;
    /* Distribute vertically */
    overflow: hidden;
    /* Safety */
}

/* Info Rows */
.info-row {
    display: flex;
    gap: 10px;
}

.info-col {
    flex: 1;
    background: #F1F9FF;
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Badges */
.badge {
    display: inline-block;
    width: 100%;
    text-align: center;
    border-radius: 12px;
    color: white;
    font-family: 'Jua', sans-serif;
    font-size: 0.9rem;
    padding: 2px 0;
    margin-bottom: 4px;
}

.bg-def {
    background-color: var(--badge-def);
}

.bg-cause {
    background-color: var(--badge-cause);
}

.bg-sym {
    background-color: var(--badge-sym);
    color: #fff;
}

.bg-prev {
    background-color: var(--badge-prev);
    color: #0277BD;
}

/* Text Lists */
.info-text {
    line-height: 1.35;
    word-break: keep-all;
    font-size: 0.82rem;
}

.info-text ul {
    padding-left: 14px;
    margin: 0;
    list-style-type: disc;
}

.info-text li {
    margin-bottom: 1px;
}

/* Intro Card Specifics */
.intro-content {
    text-align: center;
    font-size: 1rem;
    background: #E1F5FE;
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.circle-grid {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 10px;
    flex-wrap: wrap;
}

.circle-item {
    background: white;
    border: 2px solid #29B6F6;
    color: #0277BD;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: 'Jua';
    font-size: 0.85rem;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

/* Responsive */
@media (max-width: 1200px) {
    .container {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .stamp-card {
        min-height: 450px;
    }
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }

    .poster-title {
        font-size: 3rem;
        line-height: 1.2;
    }

    .stamp-card {
        min-height: auto;
        /* Allow content to fit naturally */
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .poster-title {
        font-size: 2.2rem;
    }

    .stamp-card {
        padding: 20px 15px;
    }
}

/* Floating Back Button */
.back-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-family: 'Jua', sans-serif;
    font-size: 1.1rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.back-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 30px rgba(102, 126, 234, 0.4);
    color: white;
}

@media (max-width: 768px) {
    .back-btn {
        bottom: 20px;
        right: 20px;
        padding: 12px 20px;
        font-size: 1rem;
    }
}