/* 
 * Home Page Styles (Main Hub)
 */

@import url('https://fonts.googleapis.com/css2?family=Jua&family=Noto+Sans+KR:wght@400;700&display=swap');

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: #f5f7fa;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header / Hero */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.site-title {
    font-family: 'Jua', sans-serif;
    font-size: 3.5rem;
    margin: 0 0 20px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    word-break: keep-all;
    /* Keep meaningful words together if possible */
    line-height: 1.2;
}

@media (max-width: 600px) {
    .site-title {
        font-size: 2.2rem;
        /* Reduce for mobile */
    }

    .hero {
        padding: 60px 20px;
    }
}

.site-desc {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    word-break: keep-all;
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 20px 80px 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* Tab Navigation */
.tabs-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: -35px;
    margin-bottom: 30px;
    position: relative;
    z-index: 10;
    padding: 0 20px;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 18px 40px;
    font-family: 'Jua', sans-serif;
    font-size: 1.3rem;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: #555;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(118, 75, 162, 0.4);
    border: none;
}

.tab-btn:hover:not(.active) {
    background: white;
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    color: #667eea;
}

/* Tab Content Visibility */
.tab-content {
    display: none;
    width: 100%;
}

.tab-content.active {
    display: block;
    animation: slideUpFade 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Campaign Grid (Buttons) */
.campaign-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Force 3 columns */
    gap: 30px;
    width: 100%;
    max-width: 1200px;
    /* Provide enough space for 3 items */
}

.single-item-grid {
    display: flex;
    justify-content: center;
}

.single-item-grid .campaign-card {
    max-width: 400px;
    width: 100%;
}

@media (max-width: 1024px) {
    .campaign-grid {
        grid-template-columns: 1fr;
        /* Stack on mobile/tablet portrait */
    }

    .tabs-nav {
        flex-direction: column;
        align-items: stretch;
        margin-top: -60px;
        gap: 12px;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

    .tab-btn {
        padding: 15px 25px;
        font-size: 1.1rem;
        text-align: center;
    }
}

/* Campaign Card/Button */
.campaign-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    text-decoration: none;
    color: #333;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: auto;
    /* Allow height to grow if content wraps */
    min-height: 250px;
    cursor: pointer;
    max-width: 100%;
    box-sizing: border-box;
}

.campaign-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: #764ba2;
}

.icon-box {
    font-size: 4rem;
    margin-bottom: 20px;
}

.card-title {
    font-family: 'Jua', sans-serif;
    font-size: 2rem;
    margin: 0;
    color: #444;
    word-break: keep-all;
    /* Prevent awkward word breaks */
    line-height: 1.3;
}

.card-desc {
    margin-top: 10px;
    color: #888;
    font-size: 0.95rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px;
    color: #888;
    font-size: 0.9rem;
}