/* Variables */
:root {
    --primary-blue: #1e5a8b;
    --secondary-blue: #3b82c4;
    --accent-blue: #60a5fa;
    --primary-green: #059669;
    --secondary-green: #10b981;
    --neutral-50: #f8fafc;
    --neutral-100: #f1f5f9;
    --neutral-200: #e2e8f0;
    --neutral-300: #cbd5e1;
    --neutral-400: #94a3b8;
    --neutral-500: #64748b;
    --neutral-600: #475569;
    --neutral-700: #334155;
    --neutral-800: #1e293b;
    --neutral-900: #0f172a;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Base Styles */
#wrapper {
    width: 100%;
    min-height: 100vh;
    background-color: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.hero-section {
    height: 40vh;
    min-height: 300px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-green) 100%);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../../images/main_busan01.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.3;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 800px;
    padding: 0 20px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Search Place Section */
.search-place {
    position: relative;
    min-height: 100vh;
    padding: 0;
    background: #e0f2fe; /* 옅은 하늘색 배경 */
    overflow: hidden;
}

/* Wave Background Animation */
.wave-background {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0.5) 100%
    );
    overflow: hidden;
    z-index: 1;
}

.wave-background::before,
.wave-background::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 200px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,60 C300,100 600,20 900,60 C1050,80 1150,40 1200,60 L1200,120 L0,120 Z' fill='rgba(255,255,255,0.4)'/%3E%3C/svg%3E")
        repeat-x;
    animation: wave 15s linear infinite;
    opacity: 0.6;
}

.wave-background::before {
    bottom: 0;
    animation-delay: 0s;
}

.wave-background::after {
    bottom: -10px;
    animation-delay: -7.5s;
    opacity: 0.4;
}

@keyframes wave {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* SVG Map Styles */
#mapSvg {
    background-color: var(--neutral-50);
    border-radius: 12px;
}

.cls-3 {
    fill: var(--neutral-100);
    stroke: var(--neutral-400);
    stroke-width: 1.5;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cls-3:hover {
    fill: var(--neutral-200);
}

.cls-5 {
    fill: none;
    stroke: var(--neutral-600);
    stroke-width: 1;
}

.cls-16,
.cls-19,
.cls-20,
.cls-25,
.cls-28 {
    /* fill: var(--neutral-700);
    stroke: var(--neutral-50); */
    fill: var(--neutral-50);
    stroke: var(--neutral-700);
    font-family: 'Pretendard Variable', sans-serif;
    font-size: 12px;
    font-weight: 600;
    pointer-events: none;
}

.cls-19,
.cls-20,
.cls-28 {
    fill: transparent;
    stroke: transparent;
}

/* .cls-25 {
    stroke: #121212;
    fill: #ffffff;
    font-size: 10px;
    font-weight: 400;
} */

/* .cls-19 {
    font-size: 12px;
} */

.cls-28 {
    font-size: 13px;
    fill: transparent;
    stroke: transparent;
}

.cls-34 {
    opacity: 1;
}

.c-click {
    cursor: pointer;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.c-click.selected {
    fill: var(--primary-green);
    stroke: var(--secondary-green);
    stroke-width: 3;
    filter: drop-shadow(0 4px 8px rgba(5, 150, 105, 0.3));
}

.c-click:hover {
    fill: var(--accent-blue);
    stroke: var(--secondary-blue);
    stroke-width: 2.5;
    filter: drop-shadow(0 4px 8px rgba(96, 165, 250, 0.3));
}

.c-click.selected:hover {
    fill: var(--secondary-green);
    filter: drop-shadow(0 4px 8px rgba(16, 185, 129, 0.4));
}

/* Control Panel Compact (in list header) */
.control-panel-compact {
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.control-toggle-compact {
    padding: 0;
}

.toggle-button-compact {
    width: 100%;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.toggle-button-compact:hover {
    background: rgba(255, 255, 255, 0.3);
}

.toggle-text-compact {
    font-size: 0.75rem;
    font-weight: 600;
}

.toggle-icon-compact {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.toggle-button-compact.active .toggle-icon-compact {
    transform: rotate(180deg);
}

.control-content-compact {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0;
}

.control-content-compact.active {
    max-height: 200px;
    opacity: 1;
    padding: 8px;
}

.control-description-compact {
    margin-bottom: 8px;
}

#selection-info {
    font-size: 0.7rem;
    color: white;
    line-height: 1.3;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    margin: 0;
    text-align: center;
}

.control-buttons-compact {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.control-button-compact {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 80px;
}

.btn-primary-compact {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.btn-primary-compact:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.btn-secondary-compact {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary-compact:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Map Fullscreen Section */
.map-fullscreen {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0f2fe;
}

#map-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 2;
}

#mapSvg {
    width: 100%;
    height: 100%;
    max-width: 1400px;
    max-height: 100%;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

/* List Section Sticky */
.list-section-sticky {
    position: fixed;
    top: 110px;
    right: 20px;
    width: 500px;
    /* max-height: calc(100vh - 120px); */
    z-index: 10;
    display: flex;
    align-items: stretch;
    transition:
        transform 0.3s ease,
        top 0.15s ease-out;
}

.list-section-sticky.hidden {
    transform: translateX(calc(100% - 40px));
}

.list-card {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    border: 1px solid var(--neutral-200);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 120px);
}

.list-header {
    padding: 15px;
    background: linear-gradient(135deg, var(--secondary-blue) 0%, var(--accent-blue) 100%);
    color: white;
    flex-shrink: 0;
}

.list-header p {
    font-size: 0.85rem;
    margin: 0 0 10px 0;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.list-content {
    padding: 15px;
    width: 450px;
    overflow-y: auto;
    flex: 1;
}

/* List Toggle Button */
.list-toggle-btn {
    width: 40px;
    min-width: 40px;
    height: 60px;
    margin-top: 20px;
    background: linear-gradient(135deg, var(--secondary-blue) 0%, var(--accent-blue) 100%);
    border: none;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.list-toggle-btn:hover {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    box-shadow: -2px 0 12px rgba(0, 0, 0, 0.2);
}

.list-toggle-btn:active {
    transform: scale(0.95);
}

.toggle-arrow {
    transition: transform 0.3s ease;
}

.list-section-sticky.hidden .toggle-arrow {
    transform: rotate(180deg);
}

.list-item {
    /* max-height: 70vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--neutral-300) var(--neutral-100);
    margin: 0;
    padding: 0;
    list-style: none; */
    display: flex;
    /* grid-template-columns: 1fr 1fr; */
    flex-wrap: wrap;

    gap: 15px;
}

/* .list-item::-webkit-scrollbar {
    width: 8px;
} */

.list-item::-webkit-scrollbar-track {
    background: var(--neutral-100);
    border-radius: 4px;
}

.list-item::-webkit-scrollbar-thumb {
    background: var(--neutral-300);
    border-radius: 4px;
}

.list-item::-webkit-scrollbar-thumb:hover {
    background: var(--neutral-400);
}

/* List Component Overrides */
.list-item .list-wrap {
    display: contents; /* 그리드 레이아웃을 상속받도록 */
}

.list-item .item {
    width: 48%;
    background-color: #fff;
    border: 1px solid var(--neutral-200);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.list-item .item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--neutral-300);
}

.list-item .item-photo img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.list-item .item-info {
    padding: 15px;
}

.list-item .item-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--neutral-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-item .item-description {
    font-size: 0.85rem;
    color: var(--neutral-600);
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.list-item .hash-tag {
    font-size: 0.8rem;
    color: var(--primary-blue);
    font-weight: 500;
}

.list-item .likeBtn {
    width: 32px;
    height: 32px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.list-item .likeBtn:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 2.5rem;
    }

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

    .list-section-sticky {
        width: 350px;
        top: 15px;
        right: 15px;
    }

    .list-header {
        padding: 12px;
    }

    .list-header p {
        font-size: 0.8rem;
    }

    #map-container {
        padding: 15px;
    }

    .list-content {
        padding: 12px;
    }
}

@media (max-width: 768px) {
    .hero-section {
        height: 30vh;
        min-height: 250px;
    }

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

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

    .list-section-sticky {
        width: 300px;
        top: 10px;
        right: 10px;
    }

    .list-header {
        padding: 10px;
    }

    .list-header p {
        font-size: 0.75rem;
    }

    .toggle-button-compact {
        padding: 6px 10px;
        font-size: 0.7rem;
    }

    .control-content-compact.active {
        padding: 6px;
    }

    #selection-info {
        font-size: 0.65rem;
        padding: 5px 8px;
    }

    .control-button-compact {
        padding: 5px 10px;
        font-size: 0.65rem;
    }

    #map-container {
        padding: 10px;
    }

    .list-content {
        padding: 10px;
    }

    .cls-16,
    .cls-19,
    .cls-20,
    .cls-25,
    .cls-28 {
        font-size: 10px;
    }

    .cls-25 {
        font-size: 8px;
    }

    .cls-28 {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }

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

    .list-section-sticky {
        width: calc(100% - 20px);
        right: 10px;
        left: 10px;
        top: 10px;
    }

    .list-header {
        padding: 8px;
    }

    .list-header p {
        font-size: 0.7rem;
    }

    .list-toggle-btn {
        width: 35px;
        height: 50px;
        left: -35px;
        font-size: 1rem;
    }

    .toggle-button-compact {
        padding: 5px 8px;
        font-size: 0.65rem;
    }

    .toggle-text-compact {
        font-size: 0.65rem;
    }

    .toggle-icon-compact {
        font-size: 0.6rem;
    }

    .control-content-compact.active {
        padding: 5px;
    }

    #selection-info {
        font-size: 0.6rem;
        padding: 4px 6px;
    }

    .control-button-compact {
        padding: 4px 8px;
        font-size: 0.6rem;
    }

    .list-card {
        border-radius: 12px;
    }

    #map-container {
        padding: 8px;
    }

    .list-content {
        padding: 8px;
    }

    .list-item {
        gap: 10px;
    }

    .list-item .item {
        width: 100%;
    }

    .list-item .item-photo img {
        height: 150px;
    }

    .list-item .item-info {
        padding: 10px;
    }

    .list-item .item-title {
        font-size: 0.85rem;
    }

    .list-item .item-description {
        font-size: 0.75rem;
    }
}
