/* 고운향기펜션 - 모바일 우선 */
:root {
    --color-bg: #faf8f5;
    --color-surface: #fff;
    --color-primary: #000;
    --color-primary-light: #222;
    --color-accent: #333;
    --color-text: #000;
    --color-text-muted: #444;
    --color-border: #e0e0e0;
    --font-sans: 'Noto Sans KR', sans-serif;
    --header-h: 56px;
    --container-pad: 1rem;
    --section-pad: 2.5rem 0;
    --radius: 12px;
    --shadow: 0 2px 12px rgba(0,0,0,.06);
    --shadow-hover: 0 8px 24px rgba(0,0,0,.08);
}

* {
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--header-h);
    background: #000;
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255,255,255,.15);
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-pad);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    text-decoration: none;
}
.nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 1px;
    transition: transform .2s, opacity .2s;
}
.nav-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}
.nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    padding: 1rem;
    background: #000;
    border-bottom: 1px solid rgba(255,255,255,.15);
    flex-direction: column;
    gap: 0.5rem;
}
.nav.is-open { display: flex; }
.nav a {
    padding: .6rem 0;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
}
.nav a:hover { color: rgba(255,255,255,.8); }
.nav-booking {
    color: #fff !important;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-pad);
}

/* Hero */
.hero {
    position: relative;
    min-height: 70vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--header-h) + 2rem) 1.5rem 2rem;
    text-align: center;
    background-color: #fff;
}
.hero-bg {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 2560px;
    background-size: cover;
    background-position: center bottom;
    background-color: #fff;
}
.hero-mesh {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 2560px;
    pointer-events: none;
    opacity: 0.3;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpattern id='p' width='8' height='8' patternUnits='userSpaceOnUse'%3E%3Ccircle cx='4' cy='4' r='1.5' fill='%23000'/%3E%3C/pattern%3E%3Crect width='100' height='100' fill='url(%23p)'/%3E%3C/svg%3E");
    background-size: 8px 8px;
}
.hero-overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 2560px;
    background: linear-gradient(180deg, rgba(0,0,0,.4) 0%, rgba(0,0,0,.65) 100%);
}
.hero-inner {
    position: relative;
    z-index: 1;
    color: #fff;
    transform: translateY(-10vh);
}

/* Hero thumbnail slide */
.hero-thumbs {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(0deg, rgba(0,0,0,.7) 0%, transparent 100%);
}
.hero-thumbs-prev,
.hero-thumbs-next {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    background: rgba(255,255,255,.2);
    color: #fff;
    font-size: 1.25rem;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    transition: background .2s;
}
.hero-thumbs-prev:hover,
.hero-thumbs-next:hover {
    background: rgba(255,255,255,.35);
}
.hero-thumbs-track-wrap {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.hero-thumbs-track {
    display: flex;
    gap: 0.5rem;
    margin: 0 auto;
    transition: transform .3s ease-out;
    will-change: transform;
}
.hero-thumbs-item {
    flex-shrink: 0;
    width: 200px;
    height: 133px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,.4);
    opacity: 0.8;
}
.hero-thumbs-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hero-title {
    margin: 0 0 .5rem;
    font-size: clamp(1.75rem, 6vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.hero-title-img {
    width: 600px;
    max-width: 100%;
    height: auto;
    display: block;
}
.hero-desc {
    margin: 0 0 1.5rem;
    font-size: 1rem;
    opacity: .95;
}
.btn {
    display: inline-block;
    padding: .85rem 1.75rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 999px;
    transition: background .2s, color .2s, box-shadow .2s;
    cursor: pointer;
    border: 2px solid transparent;
}
.btn-primary {
    background: var(--color-primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--color-primary-light);
    box-shadow: var(--shadow-hover);
}
.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}
/* Bootstrap 호환: 블록 버튼 (d-grid gap-2) */
.d-grid {
    display: grid;
}
.gap-2 {
    gap: 0.5rem;
}
.d-grid .btn {
    width: 100%;
    text-align: center;
    border-radius: 0;
}
.btn-outline:hover {
    background: var(--color-primary);
    color: #fff;
}

/* Hero scroll down */
.hero-scroll-down {
    margin-top: 2.5rem;
    text-align: center;
}
.hero-scroll-down a {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255,255,255,.9);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    transition: color .2s, opacity .2s;
}
.hero-scroll-down a:hover {
    color: #fff;
    opacity: 1;
}
.scroll-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 2px solid currentColor;
    border-radius: 50%;
    animation: scroll-slide 2s ease-in-out infinite;
}
.scroll-arrow::after {
    content: '';
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(1px);
}
@keyframes scroll-slide {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

/* Sections */
.section-title {
    margin: 0 0 .5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    text-align: center;
}
.section-desc {
    margin: 0 0 1.5rem;
    font-size: .9rem;
    color: var(--color-text-muted);
    text-align: center;
}

/* Intro */
.intro {
    padding: var(--section-pad);
    background: var(--color-surface);
}
.intro-text {
    margin: 0;
    text-align: center;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    color: var(--color-text-muted);
}
/* 모바일에서만 줄바꿈: 데스크톱에서는 br 숨김 */
@media (min-width: 768px) {
    .br-mobile {
        display: none;
    }
}

/* Rooms */
.rooms {
    padding: var(--section-pad);
}
.room-grid {
    display: grid;
    gap: 1.25rem;
}
.room-card {
    background: var(--color-surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: box-shadow .2s;
    cursor: default;
}
.room-card:hover { box-shadow: var(--shadow-hover); }
.room-img-wrap {
    aspect-ratio: 4/3;
    background: var(--color-border);
    overflow: hidden;
    cursor: default;
}
.room-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: default;
}
.room-body {
    padding: 1.25rem;
}
.room-name {
    margin: 0 0 .35rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-primary);
}
.room-cap, .room-tags {
    margin: 0 0 .25rem;
    font-size: .9rem;
    color: var(--color-text-muted);
}
.room-price {
    margin: .5rem 0 .75rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
}
.room-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}
.room-actions .d-grid {
    flex: 1 1 100%;
    min-width: 0;
}
.room-actions .btn {
    flex: 1;
    min-width: 0;
    text-align: center;
}

/* Room detail modal */
.room-detail-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, visibility .25s;
}
.room-detail-modal.is-open {
    opacity: 1;
    visibility: visible;
}
.room-detail-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.75);
}
.room-detail-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    background: #fff;
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: 0 20px 60px rgba(0,0,0,.4);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.room-detail-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    background: #f0f0f0;
    color: #333;
    font-size: 1.4rem;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2;
}
.room-detail-close:hover {
    background: #e0e0e0;
}
.room-detail-header {
    margin-bottom: 1rem;
    padding-right: 2.5rem;
}
.room-detail-title {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
}
.room-detail-breadcrumb {
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}
.room-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.room-detail-visual {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 0;
}
.room-detail-main-img-wrap {
    aspect-ratio: 4/3;
    background: var(--color-border);
    border-radius: 8px;
    overflow: hidden;
}
.room-detail-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.room-detail-thumbs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
}
.room-detail-thumb {
    aspect-ratio: 4/3;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
}
.room-detail-thumb:hover,
.room-detail-thumb:focus {
    border-color: var(--color-primary);
}
.room-detail-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.room-detail-info {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-y: auto;
}
.room-detail-overview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--color-text);
}
.room-detail-ov-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.room-detail-ov-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #1a1a1a;
    opacity: 0.9;
}
.room-detail-ov-icon .bi {
    font-size: 1.125rem;
}
.room-detail-accommodation {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}
.room-detail-acc-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}
.room-detail-acc-row {
    margin: 0 0 0.35rem;
    font-size: 0.9rem;
    color: var(--color-text);
}
.room-detail-acc-price {
    margin: 0.35rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
}
.room-detail-acc-cancel {
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}
.room-detail-basic {
    margin-bottom: 1rem;
}
.room-detail-basic-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 0.35rem;
}
.room-detail-basic-text {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--color-text);
}
.room-detail-facilities {
    margin-bottom: 1rem;
}
.room-detail-fac-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}
.room-detail-fac-block {
    margin-bottom: 0.6rem;
}
.room-detail-fac-head {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}
.room-detail-fac-list {
    margin: 0;
    padding-left: 0;
    list-style: none;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #666;
}
.room-detail-fac-list li {
    color: #666;
}
.room-detail-footer {
    margin-top: auto;
    padding-top: 1rem;
}
.room-detail-book {
    width: 100%;
    text-align: center;
}
@media (max-width: 767px) {
    .hero-title-img {
        width: 70%;
        margin-left: auto;
        margin-right: auto;
    }
    .hero-inner .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    .hero-thumbs {
        display: none;
    }
    .room-detail-content {
        grid-template-columns: 1fr;
    }
    .room-detail-thumbs {
        grid-template-columns: repeat(3, 1fr);
    }
    .pop-page .room-detail-content {
        grid-template-columns: 1fr !important;
    }
    .pop-page .room-detail-visual {
        order: 2 !important;
    }
    .pop-page .room-detail-info {
        order: 1 !important;
    }
}

/* Room popup modal (iframe: pop_1~9.php) */
.room-popup-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, visibility .25s;
    overflow: hidden;
    touch-action: none;
    overscroll-behavior: contain;
}
.room-popup-modal.is-open {
    opacity: 1;
    visibility: visible;
}
.room-popup-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.75);
    touch-action: none;
}
.room-popup-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 95vw;
    max-height: 95vh;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0,0,0,.4);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.room-popup-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    background: #f0f0f0;
    color: #333;
    font-size: 1.4rem;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2;
}
.room-popup-close:hover {
    background: #e0e0e0;
}
.room-popup-iframe {
    width: 100%;
    height: 85vh;
    min-height: 400px;
    border: 0;
    display: block;
}
@media (max-width: 767px) {
    .room-popup-modal {
        padding: 0.75rem;
    }
    .room-popup-inner {
        width: 90%;
        max-width: 90%;
        max-height: 90vh;
    }
    .room-popup-iframe {
        height: 75vh;
        min-height: 320px;
    }
}
.room-popup-trigger {
    float: right;
    font-size: 0.85rem;
    color: #666;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.room-popup-trigger:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

/* Pop page (pop_1~9.php 공통) */
.pop-page {
    width: 100%;
    min-width: 600px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.25rem;
    background: #fff;
    min-height: 100vh;
}
@media (max-width: 767px) {
    .pop-page {
        width: 100%;
        min-width: 0;
        max-width: none;
        padding: 0.75rem;
        box-sizing: border-box;
    }
}

/* Facilities */
.facilities {
    padding: var(--section-pad);
    background: var(--color-surface);
}
.facility-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
.facility-item {
    padding: 1.25rem 1rem;
    text-align: center;
    background: var(--color-bg);
    border-radius: var(--radius);
}
.facility-icon {
    font-size: 2rem;
    margin-bottom: .5rem;
}
.facility-item h4 {
    margin: 0 0 .35rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary);
}
.facility-item p {
    margin: 0;
    font-size: .85rem;
    color: var(--color-text-muted);
}

/* Location */
.location {
    padding: var(--section-pad);
}
.location-map-wrap {
    width: 100%;
    height: 400px;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1.25rem;
    background: var(--color-border);
}
.location-address, .location-tel {
    margin: 0 0 .5rem;
    text-align: center;
    color: var(--color-text-muted);
}
.location-tel a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}
.location-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    justify-content: center;
    margin-top: 1.25rem;
}

/* Footer */
.footer {
    padding: 1.5rem var(--container-pad);
    background: var(--color-primary);
    color: rgba(255,255,255,.9);
    text-align: center;
}
.footer-name {
    margin: 0 0 .35rem;
    font-weight: 600;
}
.footer-addr {
    margin: 0;
    font-size: .9rem;
    opacity: .85;
}

/* PC */
@media (min-width: 768px) {
    .nav-toggle { display: none; }
    .nav {
        display: flex;
        position: static;
        flex-direction: row;
        align-items: center;
        padding: 0;
        border: 0;
        background: none;
        gap: 1.5rem;
    }
    .nav a { padding: 0; }
    .room-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    .facility-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
}
@media (min-width: 1024px) {
    .room-grid { grid-template-columns: repeat(3, 1fr); }
    .facility-grid { grid-template-columns: repeat(6, 1fr); }
    .section-title { font-size: 1.75rem; }
    .section-pad { padding: 3.5rem 0; }
}

/* Room gallery modal */
.room-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, visibility .25s;
}
.room-modal.is-open {
    opacity: 1;
    visibility: visible;
}
.room-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.75);
}
.room-modal-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    background: #111;
    border-radius: var(--radius);
    padding: 1rem 1rem 1.25rem;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.room-modal-close {
    position: absolute;
    top: .75rem;
    right: .75rem;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    background: rgba(255,255,255,.1);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2;
    transition: background .2s;
}
.room-modal-close:hover {
    background: rgba(255,255,255,.2);
}
.room-modal-title {
    margin: 0 0 1rem;
    padding-right: 48px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}
.room-modal-slider {
    display: flex;
    align-items: center;
    gap: .75rem;
}
.room-modal-prev,
.room-modal-next {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: rgba(255,255,255,.15);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    transition: background .2s;
}
.room-modal-prev:hover,
.room-modal-next:hover {
    background: rgba(255,255,255,.25);
}
.room-modal-img-wrap {
    flex: 1;
    min-height: 200px;
    max-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
}
.room-modal-img {
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    transition: opacity .2s;
}
.room-modal-counter {
    margin: 1rem 0 0;
    text-align: center;
    color: rgba(255,255,255,.7);
    font-size: .9rem;
}
