@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;700&display=swap');

/* 기본 스타일 초기화 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 광고 섹션 스타일 */
.ad-section {
    margin: 2rem 0;
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.ad-section ins {
    display: block;
    margin: 0 auto;
}

/* MBTI 유형 그리드 스타일 */
.mbti-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.mbti-type-category {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.mbti-type-category h3 {
    color: #007bff;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    border-bottom: 2px solid #007bff;
    padding-bottom: 0.5rem;
}

.mbti-type-category ul {
    list-style: none;
    padding: 0;
}

.mbti-type-category li {
    margin-bottom: 0.8rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.mbti-type-category li:last-child {
    border-bottom: none;
}

/* MBTI 활용 섹션 스타일 */
.mbti-usage {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.usage-item {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-left: 4px solid #007bff;
}

.usage-item h3 {
    color: #007bff;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.usage-item p {
    color: #666;
    line-height: 1.6;
}

/* 테스트 진행 방법 스타일 */
.test-process {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.process-step {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    border: 1px solid #e9ecef;
}

.process-step h3 {
    color: #007bff;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.process-step p {
    color: #666;
    line-height: 1.6;
}

.test-note {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 1rem;
    border-radius: 8px;
    margin: 2rem 0;
    font-style: italic;
    text-align: center;
}

/* 결과 페이지 추가 콘텐츠 스타일 */
.growth-advice,
.daily-application,
.additional-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.advice-item,
.application-item,
.info-item {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-left: 4px solid #007bff;
}

.advice-item h4,
.application-item h4,
.info-item h4 {
    color: #007bff;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.advice-item p,
.application-item p,
.info-item p {
    color: #666;
    line-height: 1.6;
}

/* 궁합 페이지 추가 콘텐츠 스타일 */
.compatibility-science,
.relationship-tips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.science-item,
.tip-item {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-left: 4px solid #007bff;
}

.science-item h4,
.tip-item h4 {
    color: #007bff;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.science-item p,
.tip-item p {
    color: #666;
    line-height: 1.6;
}

/* 공부법 페이지 추가 콘텐츠 스타일 */
.learning-environment,
.motivation-strategies {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.environment-item,
.strategy-item {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-left: 4px solid #007bff;
}

.environment-item h4,
.strategy-item h4 {
    color: #007bff;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.environment-item p,
.strategy-item p {
    color: #666;
    line-height: 1.6;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
    color: #333;
    text-align: center;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    width: 100%;
    max-width: none;
    margin: 0;
    position: relative;
    left: 0;
    top: 0;
    text-align: center;
    padding: 2rem 1rem;
    background-color: #fff;
    border-bottom: 1px solid #eee;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    box-sizing: border-box;
}

header h1 a {
    font-size: 2rem;
    color: #333;
    text-decoration: none;
    font-weight: 700;
}

header .nav-links {
    display: flex;
    gap: 1.5rem;
    margin: 0.5rem 0;
}

header .nav-links a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.3s;
}

header .nav-links a:hover {
    color: #007bff;
}

header .description {
    font-size: 1.1rem;
    color: #666;
}

/* Language Selector */
.language-selector {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.language-selector .lang-btn {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.language-selector .lang-btn:hover {
    background-color: #e0e0e0;
    border-color: #ccc;
}

.language-selector .lang-btn.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
    font-weight: bold;
}

.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    padding: 2rem;
    box-sizing: border-box;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.description {
    font-size: 1.2rem;
    color: #666;
}

.intro-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 800px;
    padding: 0 1rem;
}

.intro-section {
    max-width: 800px;
    width: 100%;
    margin: 2rem 0;
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.intro-section h2 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    text-align: left;
}

.intro-section p {
    font-size: 1.05rem;
    line-height: 1.7;
    text-align: left;
    margin-bottom: 1rem;
}

.intro-section ul {
    text-align: left;
    list-style-position: inside;
    padding-left: 0.5rem;
    margin-bottom: 1rem;
}

.intro-section li {
    margin-bottom: 0.8rem;
}

.intro-section p:last-child {
    margin-bottom: 0;
}

.start-card {
    background: #fff;
    padding: 3rem 4rem;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 100%;
    margin-bottom: 2rem;
}

.start-card h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.start-btn {
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    border: none;
    padding: 1rem 3rem;
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.start-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.primary-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 1rem;
}

.primary-btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

footer {
    width: 100%;
    padding: 2rem 0 1rem 0;
    font-size: 0.9rem;
    color: #888;
    margin-top: auto;
    border-top: 1px solid #eee;
}

.footer-links {
    margin-bottom: 1rem;
}

.footer-links a {
    color: #555;
    text-decoration: none;
    margin: 0 1rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #007bff;
}

.result-main {
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
}

.result-box {
    background: #fff;
    padding: 3rem 4rem;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 100%;
}

.question-text {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.choice-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.choice-btn {
    background-color: #f8f9fa;
    color: #333;
    border: 2px solid #dee2e6;
    padding: 1rem;
    font-size: 1.1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s, transform 0.2s;
    text-align: center;
}

.choice-btn:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-2px);
}

.result-type-box {
    background-color: #007bff;
    color: white;
    border-radius: 50%;
    width: 150px;
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem auto;
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.4);
}

.result-type {
    font-size: 3rem;
    font-weight: 700;
}

.result-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin: 1rem 0 0.5rem 0;
}

.result-description {
    text-align: left;
    white-space: pre-wrap;
    line-height: 1.8;
    color: #444;
}

.result-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.result-section:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.result-section h2, .result-section h3 {
    margin-bottom: 1rem;
    font-weight: 700;
}

.result-section ul {
    list-style-position: inside;
    padding-left: 1rem;
}

.result-section li {
    margin-bottom: 0.5rem;
}

.compatibility {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.compatibility > div {
    flex: 1;
    padding: 1.5rem;
    border-radius: 10px;
}

.compatibility .good {
    background-color: #e0f7fa;
    border: 1px solid #b2ebf2;
}

.compatibility .bad {
    background-color: #ffebee;
    border: 1px solid #ffcdd2;
}

.compatibility h4 {
    margin-bottom: 0.5rem;
    font-weight: 700;
}

/* 반응형 디자인을 위한 미디어 쿼리 */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    header {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    .description {
        font-size: 1rem;
    }

    .start-card, .question-box, .result-box, .intro-section {
        padding: 1.5rem;
    }

    .result-type-box {
        width: 120px;
        height: 120px;
    }

    .result-type {
        font-size: 2.5rem;
    }

    .primary-btn, .choice-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    .compatibility {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        margin-bottom: 1rem;
    }
}

@media (min-width: 768px) {
    header {
        flex-direction: row;
        justify-content: space-between;
        padding: 1.5rem 2rem;
    }

    header h1 {
        margin: 0;
    }

    .nav-links {
        order: 2;
    }

    .language-selector {
        order: 3;
    }

    header .description {
        display: none; /* 넓은 화면에서는 설명 숨기기 */
    }
}

/* 애니메이션 효과 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out forwards;
}

.fade-out {
    animation: fadeOut 0.5s ease-in-out forwards;
}

.article-main {
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.article-main h2 {
    color: var(--primary-color);
}

/* 네비게이션 메인/서브 메뉴 스타일 */
.nav-main {
    display: flex;
    gap: 2rem;
    align-items: center;
    position: relative;
    z-index: 10;
}

.nav-item {
    position: relative;
    display: block;
    min-width: 120px;
    z-index: 11;
}

.nav-main > a,
.nav-item > a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    position: relative;
    z-index: 2;
}

.nav-main > a:hover,
.nav-item > a:hover,
.nav-main > a.active,
.nav-item > a.active {
    background: linear-gradient(45deg, #007bff22, #e3f0ff);
    color: #007bff;
}

.nav-sub {
    list-style: none;
    display: none;
    position: absolute;
    top: 110%;
    left: 0;
    min-width: 180px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
    border-radius: 12px;
    padding: 0.5rem 0;
    flex-direction: column;
    gap: 0;
    z-index: 10;
    animation: fadeIn 0.2s;
}

.nav-item:hover .nav-sub,
.nav-item:focus-within .nav-sub {
    display: flex;
}

.nav-sub li {
    width: 100%;
}

.nav-sub a {
    display: block;
    width: 100%;
    padding: 0.7rem 1.5rem;
    color: #444;
    text-decoration: none;
    font-size: 1rem;
    border-radius: 0;
    transition: background 0.2s, color 0.2s;
}

.nav-sub a:hover,
.nav-sub a.active {
    background: #f0f6ff;
    color: #007bff;
}

@media (max-width: 768px) {
    .nav-main {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    .nav-item {
        width: 100%;
    }
    .nav-main > a,
    .nav-item > a {
        width: 100%;
        text-align: left;
        padding-left: 1rem;
    }
    .nav-sub {
        left: 0;
        min-width: 140px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.10);
    }
    .nav-sub a {
        padding: 0.7rem 1rem;
    }

    /* 모바일에서 그리드 레이아웃 조정 */
    .mbti-types-grid,
    .mbti-usage,
    .test-process {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .mbti-type-category,
    .usage-item,
    .process-step {
        padding: 1rem;
    }

    .test-note {
        margin: 1rem 0;
        padding: 0.8rem;
    }

    /* 결과 페이지 추가 콘텐츠 모바일 조정 */
    .growth-advice,
    .daily-application,
    .additional-info {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .advice-item,
    .application-item,
    .info-item {
        padding: 1rem;
    }

    /* 궁합 페이지 추가 콘텐츠 모바일 조정 */
    .compatibility-science,
    .relationship-tips {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .science-item,
    .tip-item {
        padding: 1rem;
    }

    /* 공부법 페이지 추가 콘텐츠 모바일 조정 */
    .learning-environment,
    .motivation-strategies {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .environment-item,
    .strategy-item {
        padding: 1rem;
    }
} 