/* 기본 스타일 */
:root {
    --viewport-height: 100vh;
}

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

body {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    background-color: #f8f9fa;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* 페이지 공통 레이아웃 */
.page-container {
    padding-top: 100px;
    min-height: var(--viewport-height);
    display: flex;
    flex-direction: column;
}

.page-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-top: 20px;
    margin-bottom: 50px;
    padding: 0 20px;
}

.content-wrapper {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* 헤더 및 네비게이션 */
header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo a {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

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

.nav-links a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #666;
}

/* 모바일 메뉴 버튼 */
.menu-toggle {
    display: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: 0.3s;
}

/* 헤로 섹션 */
.hero {
    padding: 6rem 2rem 2rem;
    text-align: center;
    background-image: url('../img/banner.png');
    background-size: cover;
    background-position: center;
    color: white;
    position: relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 0;
}

.hero h1 {
    position: relative;
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
    position: relative;
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.cta-buttons {
    position: relative;
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s;
    font-size: 1.1rem;
}

.cta-button:hover {
    background-color: rgba(0, 0, 0, 0.9);
    transform: translateY(-2px);
}

.cta-button.secondary {
    background-color: transparent;
    border: 2px solid rgba(255, 255, 255, 0.7);
}

.cta-button.secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: white;
}

/* 소개 섹션 */
.about {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.about h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.about-content {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.about-image {
    flex: 1;
    min-width: 300px;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

.about-text {
    flex: 1;
}

.main-desc {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.desc-details {
    margin-bottom: 1.5rem;
}

.desc-details p {
    margin-bottom: 0.5rem;
}

.about-info p {
    margin-bottom: 0.5rem;
}

.about-info .business-hours {
    font-size: 20px;
    margin-bottom: 15px;
}

.about-info .business-hours .closed {
    color: #ff0000;
    margin: 0 10px;
}

.about-info .address {
    font-size: 18px;
}

.about-info .reservation-link {
    display: inline-block;
    margin-top: 15px;
    padding: 0.8rem 2rem;
    background-color: #00c471;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s;
    width: 100%;
    text-align: center;
}

.about-info .reservation-link:hover {
    background-color: #009d5d;
}

/* 갤러리 섹션 */
.gallery {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.gallery.visible {
    opacity: 1;
    transform: translateY(0);
}

.gallery h2 {
    margin-bottom: 2rem;
    font-size: 2rem;
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.gallery h2.visible {
    opacity: 1;
    transform: translateX(0);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.gallery-grid.visible {
    opacity: 1;
    transform: translateX(0);
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    cursor: pointer;
    opacity: 0;
    transform: scale(0.9);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.gallery-item.visible {
    opacity: 1;
    transform: scale(1);
}

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

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.view-more {
    margin-top: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.view-more.visible {
    opacity: 1;
    transform: translateY(0);
}

.view-more-btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: #333;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s, transform 0.3s;
}

.view-more-btn:hover {
    background-color: #555;
    transform: translateY(-2px);
}

/* 이미지 뷰어 */
.image-viewer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.image-viewer.active {
    display: flex;
}

.image-viewer img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
    width: 40px;
    height: 40px;
    line-height: 35px;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .page-container {
        padding-top: 80px;
    }

    .page-title {
        font-size: 24px;
        margin-bottom: 30px;
    }

    .content-wrapper {
        padding: 1rem;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: #fff;
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        transition: 0.3s;
        z-index: 999;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        margin: 1rem 0;
    }

    .nav-links a {
        font-size: 1.1rem;
    }

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

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

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

    .hero {
        padding-top: 4rem;
        height: auto;
        min-height: 84vh;
        margin-top: 0;
        background-position: 40% center;
    }

    .hero h1 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
        padding: 0 1rem;
    }

    .hero p {
        font-size: 1.1rem;
        margin-bottom: 2rem;
        padding: 0 1rem;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        padding: 0 1rem;
    }

    .cta-button {
        width: 100%;
        text-align: center;
        font-size: 1rem;
        padding: 0.8rem 2rem;
    }

    .about {
        padding: 2rem 1rem;
    }

    .about h2 {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }

    .about-content {
        flex-direction: column;
    }

    .about-image {
        width: 100%;
        min-width: auto;
        margin-bottom: 1.5rem;
    }

    .about-text {
        width: 100%;
    }

    .main-desc {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .desc-details p {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }

    .about-info p {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }

    .about-info h2 {
        font-size: 24px;
    }

    .about-info .phone {
        font-size: 28px;
    }

    .about-info .business-hours,
    .about-info .address {
        font-size: 16px;
    }

    .gallery {
        padding: 2rem 1rem;
    }

    .gallery h2 {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }

    .gallery-description p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .gallery-item img {
        height: 150px;
    }

    .modal {
        padding: 1rem;
    }

    .modal-content-wrapper {
        width: 100%;
        height: auto;
    }

    .modal-content {
        max-width: 100%;
        height: auto;
    }

    .modal-caption {
        font-size: 0.9rem;
        padding: 0.5rem;
    }

    .modal-nav button {
        font-size: 1.2rem;
        padding: 0.5rem 1rem;
    }

    .reservation-page {
        padding: 2rem 1rem;
    }

    .reservation-page h1 {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }

    .reservation-page h2 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }

    .reservation-page p {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }

    .reservation-form {
        padding: 1rem;
    }

    .reservation-form label {
        font-size: 0.95rem;
    }

    .reservation-form input {
        font-size: 0.95rem;
        padding: 0.5rem;
    }

    .menu-container {
        padding: 2rem 1rem;
    }

    .menu-container h1 {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }

    .menu-category h2 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }

    .menu-item h3 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .menu-item .price {
        font-size: 0.95rem;
    }

    .menu-description {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .menu-images {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .menu-images img {
        height: 150px;
    }

    .nav-btn {
        font-size: 1.5rem;
        width: 32px;
        height: 32px;
        line-height: 28px;
        padding: 0;
    }
}

/* 푸터 */
footer {
    text-align: center;
    padding: 2rem;
    background-color: #333;
    color: #fff;
}

footer p {
    margin-bottom: 0.5rem;
}

.sns-link {
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: opacity 0.3s;
}

.sns-link:hover, .sns-link:visited {
    color: #fff;
    opacity: 0.8;
}

.sns-link img {
    width: 28px;
    vertical-align: middle;
    margin-right: 5px;
}

.hero-content {
    text-align: center;
    color: #fff;
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* 지도 섹션 스타일 */
.map-section {
    padding: 4rem 2rem;
    text-align: center;
}

.map-section h2 {
    margin-bottom: 2rem;
    font-size: 2rem;
}

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

/* 카카오맵 스타일 */
.root_daum_roughmap {
    width: 100% !important;
}

.root_daum_roughmap .wrap_controllers {
    display: none !important;
}

/* 카카오맵 주소 정보 숨기기 */
.root_daum_roughmap .section_address,
.root_daum_roughmap .cont .section,
.root_daum_roughmap .cont {
    display: none !important;
}

@media screen and (max-width: 768px) {
    .map-section {
        padding: 2rem 1rem;
    }
    
    .map-container {
        padding: 0;
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    opacity: 0.8;
    animation: bounce 2s infinite;
    cursor: pointer;
}

.scroll-indicator span {
    font-size: 14px;
    margin-bottom: 8px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.scroll-indicator .arrow {
    width: 20px;
    height: 20px;
    border-right: 3px solid white;
    border-bottom: 3px solid white;
    transform: rotate(45deg);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-10px) translateX(-50%);
    }
    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.slide-in-left.visible,
.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* 애니메이션 컨테이너 제어 */
.slide-in-left,
.slide-in-right,
.fade-in {
    overflow: hidden;
    width: 100%;
}

@media (max-width: 768px) {
    body {
        overflow-x: hidden;
        width: 100vw;
    }

    .hero-content,
    .about-content,
    .gallery,
    .map-section {
        max-width: 100vw;
        overflow-x: hidden;
    }

    .slide-in-left,
    .slide-in-right {
        width: 100%;
        position: relative;
    }
}

/* 카페 특징 */
.cafe-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(0, 196, 113, 0.1);
    padding: 0.8rem 1.2rem;
    border-radius: 6px;
    transition: transform 0.3s, background-color 0.3s;
}

.feature-item:hover {
    transform: translateY(-2px);
    background-color: rgba(0, 196, 113, 0.2);
}

.feature-icon {
    font-size: 1.5rem;
}

.feature-text {
    font-size: 1rem;
    font-weight: 500;
}

/* 중간 화면 크기일 때 특징 아이템 3열 배치 */
@media (max-width: 1200px) and (min-width: 769px) {
    .cafe-features {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .feature-item {
        width: 100%;
    }
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .cafe-features {
        flex-direction: column;
        gap: 1rem;
    }
    
    .feature-item {
        width: 100%;
    }
}
