/* Design System Tokens */
:root {
    --primary-color: #1A5CBA;
    --primary-light: #4A89E8;
    --primary-dark: #0D3F8C;
    --bg-white: #FFFFFF;
    --bg-light: #F8FAFC;
    --text-dark: #1E293B;
    --text-muted: #64748B;
    --white: #FFFFFF;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
    --container-width: 1200px;

    /* Typography Tokens */
    --font-main: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
    --font-display: 'Outfit', var(--font-main);
    --letter-spacing-tight: -0.03em;
    --letter-spacing-normal: -0.01em;
}

.hide-temporary {
    display: none !important;
}

/* Reset & Global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    line-height: 1.65;
    letter-spacing: var(--letter-spacing-normal);
    word-break: keep-all;
    overflow-x: hidden;
    background-color: var(--bg-white);
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1,
h2,
h3 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: var(--letter-spacing-tight);
}

.text-center {
    text-align: center;
}

.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 16px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(26, 92, 186, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(26, 92, 186, 0.4);
}

.btn-outline {
    background-color: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
    transform: translateY(-3px);
}

.btn-white {
    background-color: var(--white);
    color: var(--primary-color);
}

.btn-white:hover {
    background-color: var(--bg-light);
    transform: translateY(-3px);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 20px 0;
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: -0.04em;
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.logo span {
    font-family: 'Noto Sans KR', sans-serif;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-social {
    display: flex;
    align-items: center;
    margin-left: 15px;
    gap: 15px;
}

.nav-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.nav-social a:hover {
    transform: translateY(-3px) scale(1.1);
    filter: brightness(1.1);
}

.nav-social a:active {
    transform: translateY(0) scale(0.95);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle .bar {
    height: 3px;
    width: 100%;
    background-color: var(--primary-color);
    border-radius: 10px;
    transition: var(--transition);
}

/* Responsive Navigation */
    /* Hamburger Animation */
    #mobile-menu.active .bar:nth-child(2) {
        opacity: 0;
    }

    #mobile-menu.active .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    #mobile-menu.active .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

/* Hero Section (Clean) */
.hero-clean {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: var(--bg-white);
    padding-top: 70px;
    /* Space for fixed navbar */
}

.hero-bg-only {
    width: 100%;
    height: 100%;
}

.hero-bg-only img {
    width: 100%;
    height: auto;
    display: block;
}

/* Profile Section */
.profile-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: flex-start;
    margin-top: 50px;
}

.profile-image {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.profile-image img {
    width: 100%;
    display: block;
}

.profile-badge {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: var(--primary-color);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 12px;
    font-weight: 700;
}

.profile-group {
    margin-bottom: 32px;
}

.profile-group h3 {
    font-size: 1.5rem;
    color: var(--primary-dark);
    margin-bottom: 16px;
    border-left: 4px solid var(--primary-color);
    padding-left: 12px;
}

.profile-group ul {
    list-style: none;
}

.profile-group li {
    font-size: 1.1rem;
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
}

.profile-group li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.signature-quote {
    margin-top: 40px;
    padding: 35px 45px;
    background: linear-gradient(135deg, rgba(26, 92, 186, 0.03), rgba(26, 92, 186, 0.08));
    border-radius: 30px;
    border-left: 6px solid var(--primary-color);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.signature-quote::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 8rem;
    color: var(--primary-color);
    opacity: 0.05;
    font-family: 'Outfit', sans-serif;
}

.signature-quote .sub-text {
    display: block;
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.signature-quote .main-text {
    font-family: var(--font-main);
    font-weight: 800;
    font-size: 2.8rem;
    color: var(--primary-dark);
    line-height: 1.2;
    margin: 0;
    word-break: keep-all;
    letter-spacing: var(--letter-spacing-tight);
}

.signature-quote .highlight {
    color: var(--primary-color);
    position: relative;
    display: inline-block;
    padding-left: 10px;
}

.signature-quote .highlight::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 10px;
    width: 90%;
    height: 12px;
    background: rgba(26, 92, 186, 0.15);
    z-index: -1;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .signature-quote {
        padding: 25px 30px;
    }

    .signature-quote .main-text {
        font-size: 2.4rem;
    }
}

/* News Section */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.news-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.news-card:hover {
    transform: translateY(-10px);
}

.news-img {
    height: 220px;
    width: 100%;
}

.news-info {
    padding: 24px;
}

.date {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 12px;
    display: block;
}

.news-info h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

.news-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.news-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Gallery Section */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 3/2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Pledge Section */
.pledge-flex-wrapper {
    display: flex;
    gap: 40px;
    align-items: stretch;
    /* Match heights */
    margin-top: 40px;
}

.map-container {
    flex: 1.2;
    position: relative;
    max-width: 650px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--white);
    /* Match pledge card background */
    border: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
}

.map-header {
    padding: 20px 24px;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
}

.map-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--primary-dark);
}

.gangwon-svg-map {
    padding: 20px;
    flex-grow: 1;
}

.pledge-content-area {
    flex: 1;
}

.pledge-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.pledge-card {
    background: var(--white);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.pledge-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow);
}

.pledge-icon {
    width: 50px;
    height: 50px;
    background: rgba(26, 92, 186, 0.1);
    color: var(--primary-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

/* Support Form Section */
.bg-blue {
    background: var(--primary-color);
}

.text-white {
    color: var(--white);
}

.form-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 100px;
    align-items: center;
}

.form-info h2 {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 24px;
}

.form-info p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.support-form {
    background: var(--white);
    padding: 40px;
    border-radius: 24px;
    color: var(--text-dark);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(26, 92, 186, 0.1);
}

/* Animations */
.animate-up {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.animate-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-text h1 {
        font-size: 3rem;
    }

    .form-wrapper {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .news-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .hero-clean {
        height: auto;
        min-width: unset;
        padding-top: 80px;
    }

    .hero-bg-only {
        height: auto;
    }

    .profile-content {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 2rem;
    }

    .pledge-flex-wrapper {
        flex-direction: column;
        gap: 30px;
    }

    .map-container {
        max-width: 600px;
        margin: 0 auto;
    }

    .news-grid,
    .gallery-grid,
    .pledge-grid {
        grid-template-columns: 1fr;
    }

    .navbar {
        padding: 15px 0;
    }
}

/* Footer */
.footer {
    padding: 40px 0;
    border-top: 1px solid #eee;
    text-align: center;
    color: var(--text-muted);
}

/* ===== Interactive Map Markers ===== */
.map-container {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    background: var(--bg-light);
}

/* 마커 기본 스타일 */
.marker-dot {
    fill: var(--primary-color);
    stroke: var(--white);
    stroke-width: 2;
    cursor: pointer;
    transition: all 0.3s ease;
}

.marker-pulse {
    fill: var(--primary-light);
    opacity: 0.4;
    cursor: pointer;
    animation: marker-pulse-anim 2s ease-in-out infinite;
}

/* 호버 시 마커 확대 + 글로우 */
.marker-group:hover .marker-dot {
    r: 9;
    fill: var(--primary-dark);
    filter: drop-shadow(0 0 6px rgba(26, 92, 186, 0.6));
}

.marker-group:hover .marker-pulse {
    opacity: 0.6;
    r: 18;
}

/* 활성(클릭) 상태 마커 */
.marker-group.active .marker-dot {
    r: 10;
    fill: #E53E3E;
    stroke: var(--white);
    stroke-width: 3;
    filter: drop-shadow(0 0 8px rgba(229, 62, 62, 0.7));
}

.marker-group.active .marker-pulse {
    fill: #E53E3E;
    opacity: 0.3;
    r: 22;
    animation: marker-active-pulse 1.5s ease-in-out infinite;
}

/* 펄스 애니메이션 (기본) */
@keyframes marker-pulse-anim {
    0% {
        opacity: 0.4;
        r: 10;
    }

    50% {
        opacity: 0.15;
        r: 16;
    }

    100% {
        opacity: 0.4;
        r: 10;
    }
}

/* 펄스 애니메이션 (선택 시) */
@keyframes marker-active-pulse {
    0% {
        opacity: 0.3;
        r: 18;
    }

    50% {
        opacity: 0.1;
        r: 28;
    }

    100% {
        opacity: 0.3;
        r: 18;
    }
}

/* 초기 안내 메시지 */
.pledge-placeholder {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.pledge-placeholder .placeholder-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

/* ===== Modal Styles ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    overflow-y: auto;
}

.modal-content {
    background-color: var(--white);
    margin: 10% auto;
    padding: 0;
    border-radius: 24px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    animation: modal-open 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes modal-open {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    color: var(--text-muted);
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
}

.close-modal:hover {
    color: var(--primary-color);
}

#modal-region-header {
    background: var(--primary-dark);
    color: white;
    padding: 30px 40px;
}

#modal-region-title {
    margin: 0;
    font-size: 1.8rem;
}

#modal-pledge-list {
    padding: 40px;
}

/* SNS Section */
.sns-feed-container {
    padding: 40px;
    background: white;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

/* Gallery Lightbox Modal */
#gallery-modal .modal-content {
    max-width: 1000px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.gallery-modal-body {
    display: flex;
    flex-direction: column;
}

.gallery-modal-img-container {
    width: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    max-height: 70vh;
    overflow: hidden;
}

.gallery-modal-img-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    animation: zoom-in 0.5s ease;
}

@keyframes zoom-in {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.gallery-modal-info {
    padding: 30px 40px;
    background: white;
}

.gallery-modal-desc {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.gallery-modal-date {
    font-size: 0.9rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .gallery-modal-info {
        padding: 20px;
    }

    .gallery-modal-desc {
        font-size: 1.1rem;
    }
}

/* News Modal Styling (Aligned with Gallery) */
#news-modal .modal-content {
    max-width: 1000px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.news-modal-body {
    display: flex;
    flex-direction: column;
}

.news-modal-img-container {
    width: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    max-height: 60vh;
    overflow: hidden;
}

.news-modal-img-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.news-modal-info {
    padding: 30px 40px;
    background: white;
}

.news-modal-info .date {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.news-modal-info h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 20px;
    line-height: 1.4;
}

.news-modal-text {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-dark);
    white-space: pre-wrap;
    margin-bottom: 30px;
}

.news-modal-footer {
    border-top: 1px solid #eee;
    padding-top: 20px;
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .news-modal-info {
        padding: 25px;
    }
    .news-modal-info h2 {
        font-size: 1.3rem;
    }
}
/* Mobile Navigation Overrides (Force) */
@media (max-width: 992px) {
    .menu-toggle {
        display: flex !important;
    }

    .nav-links {
        display: flex !important;
        position: fixed !important;
        right: -100% !important;
        top: 0 !important;
        left: auto !important;
        flex-direction: column !important;
        background: rgba(255, 255, 255, 0.99) !important;
        width: 100% !important;
        height: 100vh !important;
        height: 100dvh !important; /* Use dynamic viewport height */
        text-align: center !important;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        padding: 80px 0 !important;
        gap: 15px !important;
        z-index: 9999 !important;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1) !important;
        visibility: hidden !important; /* Hidden when closed */
        pointer-events: none !important; /* Ignore touches when closed */
        overflow-y: auto !important; /* Allow scrolling menu content if it overflows */
        -webkit-overflow-scrolling: touch;
    }

    .nav-links.active {
        right: 0 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    .nav-links li {
        margin: 10px 0 !important;
        display: block !important;
        width: 100%;
    }

    .nav-links a {
        font-size: 1.8rem !important;
        font-weight: 800 !important;
        color: var(--primary-dark) !important;
        padding: 10px 0 !important;
        display: block !important;
        width: 100%;
    }

    .nav-social {
        margin-left: 0 !important;
        justify-content: center !important;
        margin-top: 20px !important;
        display: flex !important;
    }
}
