/* ===== 공통 스타일 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #333;
    background: #f5f5f5;
    line-height: 1.6;
}

/* ===== 헤더 ===== */
header {
    background: white;
    padding: 15px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
}

.logo a {
    text-decoration: none;  /* 밑줄 제거 */
    color: #0066cc;
    transition: opacity 0.3s ease;
}

.logo a:hover {
    opacity: 0.8;
}

nav {
    display: flex;
    gap: 30px;
}

/* 햄버거 메뉴 */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px 10px;
    font-size: 24px;
    line-height: 1;
    color: #333;
    transition: all 0.3s;
}

.hamburger.active {
    transform: rotate(90deg);
}

.navbar {
    display: flex;
    gap: 30px;
    margin-left: auto;
}

nav a {
    text-decoration: none;
    color: #333;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: #0066cc;
}

/* ===== 푸터 ===== */
footer {
    background: #2d3748;
    color: white;
    padding: 50px 20px;
    margin-top: 80px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.footer-section h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #fff;
}

.footer-section p {
    font-size: 12px;
    color: #ccc;
    margin-bottom: 8px;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    font-size: 12px;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #fff;
}

/* ===== 검색 섹션 ===== */
.search-section {
    background: #0066cc;
    padding: 30px 20px;
    margin-bottom: 0px;
}

.search-section form {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
}

.search-section input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
}

.search-section button {
    background: #0099ff;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.3s;
}

.search-section button:hover {
    background: #0077cc;
}

.search-section a {
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-size: 13px;
    transition: background 0.3s;
}

.search-section a:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ===== LIST PAGE ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.sort-bar {
    background: white;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 0px;
}

.result-count {
    font-size: 13px;
    color: #666;
}

.hotel-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.hotel-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 20px;
    padding: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.hotel-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.hotel-image {
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, #e0e7ff 0%, #f3e8ff 100%);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    position: relative;
}

.image-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ff6b6b;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.hotel-details {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hotel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.hotel-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.hotel-location {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.hotel-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 10px;
}

.stars {
    color: #ffc107;
}

.hotel-description {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hotel-facilities {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}

.facility-tag {
    display: inline-block;
    background: #f0f0f0;
    padding: 3px 8px;
    border-radius: 3px;
    margin-right: 6px;
    margin-bottom: 4px;
}

/* ===== 페이지네이션 ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    min-width: 36px;
    height: 36px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    border: 1px solid #ddd;
    color: #666;
    transition: all 0.3s;
    white-space: nowrap;
}

.pagination a:hover {
    border-color: #0066cc;
    color: #0066cc;
    background: #f0f7ff;
}

.pagination .active {
    background: #0066cc;
    color: white;
    border-color: #0066cc;
}

.pagination .disabled {
    color: #ccc;
    cursor: not-allowed;
}

/* ===== VIEW PAGE ===== */
.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    margin-bottom: 80px;
}

.sidebar-left {
    display: none;
}

.main-content {
    grid-column: 1;
}

.hotel-hero {
    width: 100%;
    height: 350px;
    background: linear-gradient(135deg, #e0e7ff 0%, #f3e8ff 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 100px;
    margin-bottom: 30px;
}

.hotel-body {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hero-title {
    font-size: 32px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.hero-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 14px;
}

.hero-location {
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

.section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.section-description {
    color: #666;
    line-height: 1.8;
    font-size: 14px;
}

.facilities-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.facility-item {
    padding: 8px;
    background: #f5f5f5;
    border-radius: 6px;
    text-align: center;
}

.facility-icon {
    font-size: 16px;
    margin-bottom: 4px;
}

.facility-name {
    font-size: 10px;
    color: #666;
    word-break: break-word;
    line-height: 1.2;
}

/* ===== 우측 사이드바 ===== */
.sidebar-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.reservation-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.price-display {
    font-size: 24px;
    font-weight: 600;
    color: #0066cc;
    margin-bottom: 15px;
}

.price-display small {
    font-size: 12px;
    color: #999;
    font-weight: normal;
}

.contact-info {
    font-size: 12px;
    color: #666;
}

.contact-label {
    font-weight: 600;
    color: #333;
}

.contact-value {
    color: #666;
}

.map-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.map-header {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.map-placeholder {
    width: 100%;
    height: 200px;
    background: #f0f0f0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 48px;
    margin-bottom: 15px;
}

.recommended-hotels {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.recommended-hotels h3 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.recommended-hotels-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-card {
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.sidebar-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-image {
    width: 100%;
    height: 80px;
    background: linear-gradient(135deg, #e0e7ff 0%, #f3e8ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    position: relative;
}

.card-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ff6b6b;
    color: white;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
}

.card-content {
    padding: 10px;
    text-align: center;
}

.card-price {
    font-size: 14px;
    font-weight: 600;
    color: #0066cc;
    margin-bottom: 5px;
}

.card-name {
    font-size: 12px;
    color: #333;
    font-weight: 500;
}

/* ===== CTA 바 ===== */
.ptn-cta-spacer {
    height: 60px;
}

.ptn-cta-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #4a85f7 0%, #356bd1 100%);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 -8px 22px rgba(74, 133, 247, 0.32);
    font-size: 15px;
    line-height: 1.25;
    animation: ptnPulseAyo 2.2s ease-in-out infinite;
    border-radius: 0;
}

.ptn-cta-bar:hover,
.ptn-cta-bar:active,
.ptn-cta-bar:visited {
    color: #fff;
    text-decoration: none;
}

.ptn-cta-icon {
    font-size: 22px;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.ptn-cta-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.ptn-cta-text strong {
    font-weight: 800;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ptn-cta-text span {
    font-size: 13px;
    font-weight: 600;
    opacity: 0.95;
}

.ptn-cta-arrow {
    flex-shrink: 0;
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    animation: ptnArrow 1.4s ease-in-out infinite;
}

@keyframes ptnPulseAyo {
    0%, 100% {
        box-shadow: 0 -8px 22px rgba(74, 133, 247, 0.32);
    }
    50% {
        box-shadow: 0 -8px 30px rgba(74, 133, 247, 0.65);
    }
}

@keyframes ptnPulseAyoStatic {
    0%, 100% {
        box-shadow: 0 10px 20px rgba(74, 133, 247, 0.28);
    }
    50% {
        box-shadow: 0 10px 30px rgba(74, 133, 247, 0.55);
    }
}

@keyframes ptnArrow {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(4px);
    }
}

/* ===== 모바일 반응형 ===== */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .navbar {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        width: 100%;
        background: white;
        flex-direction: row;
        gap: 0;
        padding: 0;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
        max-height: 60;
    overflow-y: hidden;
    overflow-x: auto;     
        -webkit-overflow-scrolling: touch;
        transition: max-height 0.3s ease;
        z-index: 999;
        border-bottom: 1px solid #f0f0f0;
        display: flex;
        margin-left: 0;
    }

    .navbar.active {
        max-height: 0px;
    overflow: hidden;     
    }

    .navbar a {
        padding: 10px 20px;
        border-bottom: none;
        display: inline-block;
        white-space: nowrap;
        flex-shrink: 0;
        border-right: 1px solid #f0f0f0;
        gap: 0;
    }

    .header-container {
        flex-wrap: wrap;
    }

    /* 모바일 검색 섹션 */
    .search-section {
        margin-top: 50px;
        margin-bottom: 0px;
        padding: 15px 10px;
    transition: margin-top 0.3s ease;  ← 부드러운 애니메이션 추가
    }

/* navbar가 닫혀있을 때 */
body:has(.navbar.active) .search-section {
    margin-top: 0;      ← 0으로 변경! ✅
}
    .search-section form {
        flex-wrap: nowrap;
        gap: 8px;
    }

    .search-section input {
        flex: 1;
        margin-bottom: 0;
        font-size: 13px;
        padding: 10px 12px;
    }

    .search-section button {
        flex: 0 0 auto;
        padding: 10px 15px;
        font-size: 12px;
    }

    /* 모바일 여백 최적화 */
    .search-section {
        margin-bottom: 0px;
    }

    .container {
        padding: 10px 20px;
        gap: 5px;
    }

    .sort-bar {
       padding: 10px 20px;
       margin-bottom: 10px;
    }

    .hotel-list {
        gap: 10px;
    }

    /* 모바일 페이징 */
    .pagination {
        gap: 4px;
        flex-wrap: wrap;
    }

    .pagination a,
    .pagination span {
        padding: 0 6px;
        min-width: 28px;
        height: 28px;
        font-size: 11px;
    }

    nav {
        gap: 15px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-section h4 {
        font-size: 12px;
    }

    .footer-section p {
        font-size: 12px;
    }

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

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

    .sidebar-right {
        grid-column: 1;
    }

    .hotel-hero {
        height: 200px;
    }

    .hero-title {
        font-size: 24px;
    }

    .facilities-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .hotel-item {
        grid-template-columns: 1fr;
    }

    .hotel-image {
        height: 180px;
    }

    .sort-bar {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

@media (min-width: 769px) {
    .ptn-cta-spacer {
        display: none;
    }

    .ptn-cta-bar {
        position: fixed;
        left: 50%;
        right: auto;
        bottom: 150px;
        transform: translateX(-50%);
        margin: 0;
        max-width: 420px;
        border-radius: 999px;
        padding: 14px 26px;
        font-size: 15px;
        justify-content: center;
        gap: 12px;
        box-shadow: 0 10px 28px rgba(74, 133, 247, 0.42);
        animation: ptnPulseAyoStatic 2.4s ease-in-out infinite;
    }

    .ptn-cta-bar:hover {
        transform: translateX(-50%) translateY(-2px);
        transition: transform 0.15s, box-shadow 0.15s;
        box-shadow: 0 14px 32px rgba(74, 133, 247, 0.55);
    }

    .ptn-cta-text {
        flex: 0 0 auto;
        flex-direction: row;
        align-items: baseline;
        gap: 8px;
    }

    .ptn-cta-text strong {
        font-size: 15px;
    }

    .ptn-cta-text span {
        font-size: 14px;
    }

    .ptn-cta-icon {
        font-size: 22px;
    }
}