/* =================================
   Basic Settings & Variables
   ================================= */

/* CSS Variables - Easily change colors here */
:root {
    --primary-color: #000000;      /* Primary color */
    --secondary-color: #0aa03c;    /* Secondary color */
    --text-color: #000000;         /* Text color */
    --text-light: #000000;         /* Light text */
    --bg-color: #ffffff;           /* Background color */
    --bg-secondary: #f9fafb;       /* Secondary background */
    --border-color: #e5e7eb;       /* Border color */
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);  /* Shadow */
}

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

html {
    scroll-behavior: smooth;  /* Smooth scrolling */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-color);
}

/* Container - Used in all sections */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =================================
   Navigation Bar
   ================================= */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: var(--shadow);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo:hover {
    color: var(--secondary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Hamburger menu (for mobile) */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    padding: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: all 0.3s ease;
    border-radius: 3px;
    display: block;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* =================================
   Hero Section
   ================================= */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #00af43 100%);
    color: white;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 700px;
    position: relative; /* 추가 */
    z-index: 1; /* 텍스트를 애니메이션 위로 */
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.highlight {
    color: #ffffff;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.hero-description {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.8;
}

/* 🎆 간단하고 은은한 CSS 폭죽 효과 */
.hero-fireworks::before {
    content: '';
    position: absolute;
    top: 30%;
    left: 30%;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(251,191,36,0.7) 0%, rgba(251,191,36,0.3) 40%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: firework1 3s ease-out infinite;
    z-index: 0;
}

.hero-fireworks::after {
    content: '';
    position: absolute;
    top: 40%;
    left: 70%;
    width: 130px;
    height: 130px;
    background: radial-gradient(circle, rgba(139,92,246,0.7) 0%, rgba(139,92,246,0.3) 40%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: firework2 3.5s ease-out infinite 1s;
    z-index: 0;
}

@keyframes firework1 {
    0% {
        width: 20px;
        height: 20px;
        opacity: 1;
        top: 85%;
        transform: translate(-50%, -50%) scale(1);
    }
    40% {
        width: 30px;
        height: 30px;
        opacity: 1;
        top: 30%;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        width: 150px;
        height: 150px;
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% {
        width: 450px;
        height: 450px;
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.5);
    }
}

@keyframes firework2 {
    0% {
        width: 18px;
        height: 18px;
        opacity: 1;
        top: 90%;
        transform: translate(-50%, -50%) scale(1);
    }
    45% {
        width: 28px;
        height: 28px;
        opacity: 1;
        top: 40%;
        transform: translate(-50%, -50%) scale(1);
    }
    55% {
        width: 130px;
        height: 130px;
        opacity: 0.85;
        transform: translate(-50%, -50%) scale(1.3);
    }
    100% {
        width: 420px;
        height: 420px;
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.6);
    }
}

/* =================================
   Button Styles
   ================================= */

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background-color: var(--primary-color);
    color: white;
    border: 2px solid transparent;
}

.btn-secondary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

/* =================================
   Common Section Styles
   ================================= */

section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    color: var(--text-color);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* =================================
   About Section
   ================================= */

.about {
    background-color: var(--bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-text h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.about-text p {
    margin-bottom: 1rem;
    color: var(--text-light);
    line-height: 1.8;
}

.skills {
    margin-top: 2rem;
}

.skills h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

/* Education Section Styles */
.education {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.education h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.education-item {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background-color: white;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.education-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.education-header h5 {
    font-size: 1.125rem;
    color: var(--text-color);
    margin: 0;
}

.education-date {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 500;
}

.education-degree {
    font-size: 1rem;
    color: var(--text-color);
    font-weight: 500;
    margin: 0.5rem 0 0.25rem 0;
}

.education-details {
    font-size: 0.875rem;
    color: var(--text-light);
    margin: 0.25rem 0;
}

/* Experience Section Styles */
.experience {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.experience h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.experience-item {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background-color: white;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.experience-header h5 {
    font-size: 1.125rem;
    color: var(--text-color);
    margin: 0;
}

.experience-date {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 500;
}

.experience-company {
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 600;
    margin: 0.25rem 0;
}

.experience-details {
    margin: 0.75rem 0 0 1.25rem;
    padding: 0;
}

.experience-details li {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag {
    display: inline-block;
    padding: 6px 16px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.about-image {
    display: flex;
    justify-content: center;
}

.image-placeholder {
    width: 100%;
    max-width: 300px;
    aspect-ratio: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    box-shadow: var(--shadow);
}

.image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

/* =================================
   Projects Section
   ================================= */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.project-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.project-image .image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.project-info p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.project-tags .tag {
    background-color: var(--bg-secondary);
    color: var(--primary-color);
    font-size: 0.75rem;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-links .btn {
    padding: 8px 20px;
    font-size: 0.875rem;
}

/* =================================
   Contact Section
   ================================= */

.contact {
    background-color: var(--bg-secondary);
}

.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-text {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.contact-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 350px;
    border: 2px solid var(--primary-color);
}

.contact-link:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.contact-link .icon {
    font-size: 1.5rem;
}

/* =================================
   Footer
   ================================= */

.footer {
    background-color: var(--text-color);
    color: white;
    text-align: center;
    padding: 2rem 0;
}

.footer p {
    opacity: 0.8;
}

/* =================================
   Responsive Design (Tablet)
   ================================= */

@media (max-width: 768px) {
    /* Mobile Navigation - 뉴모피즘 스타일 */
    .nav-menu {
        position: fixed;
        right: -100%;
        top: 70px;
        flex-direction: column;
        background-color: #ffffff;
        width: 70%;
        max-width: 300px;
        text-align: center;
        transition: right 0.6s ease;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
        padding: 1rem;
        gap: 0.75rem;
        height: calc(100vh - 70px);
    }

    .nav-menu li {
        padding: 0;
        background: #ffffff;
        border-radius: 12px;
        box-shadow: 
            5px 5px 10px rgba(0, 0, 0, 0.1),
            -5px -5px 10px rgba(255, 255, 255, 0.9),
            inset 0 0 0 rgba(0, 0, 0, 0);
        border: 1px solid rgba(220, 220, 220, 0.3);
        transition: all 0.3s ease;
    }

    .nav-menu li:active {
        box-shadow: 
            inset 3px 3px 6px rgba(0, 0, 0, 0.15),
            inset -3px -3px 6px rgba(255, 255, 255, 0.7);
    }
    
    /* 네비게이션 링크 전체 영역 클릭 가능 */
    .nav-link {
        display: block;
        width: 100%;
        padding: 1rem 2rem;
        text-align: center;
        font-weight: 600;
    }

    .nav-menu.active {
        right: 0;
    }

    .hamburger {
        display: flex;
    }

    /* Hero */
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    /* About - 모바일에서 이미지가 먼저 나오도록 */
    .about-content {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
    }
    
    /* 이미지를 제일 위로 */
    .about-image {
        order: -1;
        margin-bottom: 2rem;
    }

    /* Education and Experience on tablet */
    .education-header,
    .experience-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .education-date,
    .experience-date {
        margin-top: 0.25rem;
    }

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

    /* Projects */
    .projects-grid {
        grid-template-columns: 1fr;
    }

    /* Contact */
    .contact-link {
        min-width: 250px;
    }
}

/* =================================
   Responsive Design (Mobile)
   ================================= */

@media (max-width: 480px) {
    /* Adjust container padding */
    .container {
        padding: 0 15px;
    }

    /* Adjust section padding */
    section {
        padding: 60px 0;
    }

    /* Hero */
    .hero {
        padding-top: 60px;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    /* Buttons */
    .btn {
        padding: 10px 24px;
        font-size: 0.875rem;
    }

    /* Section title */
    .section-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }

    /* About image */
    .image-placeholder {
        max-width: 250px;
    }

    /* Education and Experience on mobile */
    .education-item,
    .experience-item {
        padding: 1rem;
    }

    .education-header h5,
    .experience-header h5 {
        font-size: 1rem;
    }

    .education-degree,
    .experience-company {
        font-size: 0.9rem;
    }

    .experience-details {
        margin-left: 1rem;
    }

    .experience-details li {
        font-size: 0.85rem;
    }

    /* Contact */
    .contact-link {
        min-width: 200px;
        padding: 0.875rem 1.5rem;
        font-size: 0.875rem;
    }
}

/* =================================
   Additional Utility Classes
   ================================= */

/* Animation effect */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* =================================
   Resume Section
   ================================= */

.resume {
    background-color: var(--bg-color);
}

.resume-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.resume-text {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

/* PDF View (Default for Desktop/Tablet) */
.resume-pdf-view {
    display: block;
}

.resume-preview {
    width: 100%;
    height: 1200px;
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background-color: #f5f5f5;
    position: relative;
}

.resume-preview iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.resume-fallback {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-secondary);
    padding: 2rem;
    text-align: center;
}

.resume-fallback p {
    font-size: 1.25rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.fallback-text {
    font-size: 1rem !important;
    color: var(--text-light) !important;
}

/* HTML Resume View (Default Hidden) */
.resume-html-view {
    display: none;
    margin-bottom: 2rem;
}

.resume-html-content {
    background-color: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: left;
    max-width: 100%;
}

/* Styles for loaded resume.html content */
.resume-html-content .container {
    max-width: 100%;
}

.resume-html-content .header {
    text-align: center;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 1rem;
}

.resume-html-content .header h1 {
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.resume-html-content .header .title {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.resume-html-content .header .contact {
    font-size: 0.9rem;
    color: var(--text-light);
}

.resume-html-content .section {
    margin-bottom: 1.5rem;
}

.resume-html-content .section-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.resume-html-content .education-item,
.resume-html-content .experience-item,
.resume-html-content .project-item {
    margin-bottom: 1.25rem;
}

.resume-html-content .education-header,
.resume-html-content .experience-header,
.resume-html-content .project-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.resume-html-content .institution,
.resume-html-content .job-title,
.resume-html-content .project-role,
.resume-html-content .organization,
.resume-html-content .project-name {
    font-weight: bold;
    color: var(--text-color);
}

.resume-html-content .date {
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
}

.resume-html-content .degree,
.resume-html-content .tech-stack {
    font-style: italic;
    margin-bottom: 0.5rem;
}

.resume-html-content .details,
.resume-html-content .achievements {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

.resume-html-content ul {
    list-style-type: disc;
}

.resume-html-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.resume-html-content .skills-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
}

.resume-html-content .skills-table td {
    padding: 0.25rem 0.5rem;
    vertical-align: top;
}

.resume-html-content .skills-table td:first-child {
    font-weight: bold;
    width: 30%;
    color: var(--text-color);
}

.resume-html-content .skills-table td:last-child {
    color: var(--text-light);
}

.resume-html-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.resume-html-content a:hover {
    text-decoration: underline;
}

/* Show fallback if iframe fails to load (mobile devices) */
@supports not (display: block) {
    .resume-preview iframe {
        display: none;
    }
    .resume-fallback {
        display: flex;
    }
}

/* Responsive Resume Preview */
@media (max-width: 768px) {
    .resume-preview {
        height: 500px;
    }
    
    /* Hide PDF, Show HTML on Tablet */
    .resume-pdf-view {
        display: none;
    }
    
    .resume-html-view {
        display: block;
    }
    
    .resume-html-content {
        padding: 2rem;
    }
    
    .resume-html-content .header h1 {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .resume-preview {
        height: 400px;
    }
    
    /* On mobile, hide iframe and show download message */
    .resume-preview iframe {
        display: none;
    }
    
    .resume-fallback {
        display: flex;
    }
    
    /* Ensure HTML view is shown on mobile */
    .resume-pdf-view {
        display: none;
    }
    
    .resume-html-view {
        display: block;
    }
    
    .resume-html-content {
        padding: 1.5rem;
    }
    
    .resume-html-content .header h1 {
        font-size: 1.5rem;
    }
    
    .resume-html-content .header .title {
        font-size: 1.1rem;
    }
    
    .resume-html-content .header .contact {
        font-size: 0.85rem;
    }
    
    .resume-html-content .section-title {
        font-size: 1.2rem;
    }
    
    .resume-html-content .education-header,
    .resume-html-content .experience-header,
    .resume-html-content .project-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .resume-html-content .date {
        margin-top: 0.25rem;
    }
    
    .resume-html-content .skills-table td:first-child {
        width: 35%;
    }
}

/* =================================
   Modal Styles
   ================================= */

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background-color: var(--bg-color);
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease-out;
}

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

.modal-close {
    color: var(--text-light);
    float: right;
    font-size: 2rem;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    padding: 20px 25px;
    transition: color 0.3s ease;
}

.modal-close:hover,
.modal-close:focus {
    color: var(--text-color);
}

#modalBody {
    padding: 20px 40px 40px;
}

#modalBody h2 {
    color: var(--text-color);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    margin-top: 0;
}

#modalBody h3 {
    color: var(--text-color);
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.modal-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    margin-bottom: 2rem;
    border-radius: 8px;
}

.modal-image .image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-section {
    margin-bottom: 2rem;
}

.modal-section p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.modal-section ul {
    list-style: none;
    padding: 0;
}

.modal-section ul li {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
}

.modal-section ul li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.modal-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.modal-duration {
    color: #666;
    font-size: 0.95em;
    font-style: italic;
    margin: -10px 0 20px 0;
}

/* Pr
/* Disabled button style */
.btn-disabled {
    background-color: #cccccc !important;
    color: #666666 !important;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-disabled:hover {
    background-color: #cccccc !important;
    transform: none !important;
}

/* =================================
   Responsive Modal (Tablet)
   ================================= */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
        max-height: 80vh;
    }

    #modalBody {
        padding: 15px 25px 30px;
    }

    #modalBody h2 {
        font-size: 1.5rem;
    }

    #modalBody h3 {
        font-size: 1.25rem;
    }

    .modal-image {
        height: 200px;
    }

    .modal-close {
        padding: 15px 20px;
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
    }

    #modalBody {
        padding: 10px 20px 25px;
    }

    .modal-links {
        flex-direction: column;
    }

    .modal-links .btn {
        width: 100%;
        text-align: center;
    }
}

/* --- 모달 이미지 슬라이더 스타일 --- */
.modal-image-container {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
    background: #000; /* 이미지가 비는 곳은 검은색 처리 */
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-slider-img {
    width: 100%;
    height: auto;       /* 높이 자동 조절 (비율 유지) */
    max-height: 500px;  /* 너무 길어지는 것 방지 (원하는 대로 조절) */
    object-fit: contain; /* ★중요: 이미지가 잘리지 않고 다 들어옴 */
    display: none;      /* 기본적으로 숨김 */
}

.modal-slider-img.active {
    display: block;     /* 활성화된 이미지만 보임 */
}

/* 좌우 화살표 버튼 */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 18px;
    border-radius: 50%;
    user-select: none;
    transition: 0.3s;
}

.slider-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.prev-btn { left: 10px; }
.next-btn { right: 10px; }

/* 이미지 카운터 (1/3) */
.slider-counter {
    position: absolute;
    bottom: 10px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
}