﻿:root {
    --primary-red: #fd321b;
    --primary-green: #019d5e;
    --primary-black: #0d0d0d;
    --background: #ffffff;
    --border: #e5e7eb;
    --shadow: 0 2px 10px rgba(15,23,42,0.03);
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    background: var(--background);
    font-family: 'Chakra Petch', 'Lato', sans-serif;
    height: 100vh;
    overflow: hidden;
}

.app {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    width: 100%;
    height: 45px;
    background: var(--background);
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
    background: rgba(255,255,255,0.85);
}

.header-left {
    display: flex;
    gap: 24px;
    margin-left: 15px;
    align-items: center;
}

.logo {
    display: block;
}

.logo-icon {
    height: 38px;
    display: block;
    cursor: pointer;
}

.search {
    display: flex;
    align-items: center;
    width: 450px;
    height: 35px;
    background: #ededed;
    border-radius: 9px;
    position: relative;
}

    .search input {
        flex: 1;
        min-width: 0;
        padding: 0 15px;
        border: none;
        outline: none;
        background: transparent;
        font-size: 13px;
    }

    .search .menu-toggle {
        display: none;
        flex-direction: column;
        gap: 4px;
        padding: 0 8px;
        flex-shrink: 0;
    }

.search-btn {
    width: 35px;
    height: 100%;
    border: none;
    background: var(--primary-red);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
}

.search-results {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    overflow-y: auto;
    max-height: 350px;
    z-index: 1000;
}

.search-result-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eeeeee;
}

    .search-result-item:hover {
        background: #f5f5f5;
    }

.search-result-title {
    font-size: 14px;
    font-weight: 600;
    color: #222;
}

.search-result-address {
    margin-top: 4px;
    font-size: 12px;
    color: #888;
}

.header-right {
    display: flex;
    gap: 25px;
    align-items: center;
    padding-right: 12px;
}

    .header-right a {
        font-size: 14px;
        color: #383838;
        font-weight: bold;
        position: relative;
        cursor: pointer;
    }

    .header-right .active {
        color: var(--primary-red);
    }

        .header-right .active::after {
            content: "";
            position: absolute;
            bottom: -8px;
            left: 0;
            width: 100%;
            height: 2px;
            background: var(--primary-red);
        }

.login-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-right: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    color: #383838;
    margin-left: 8px;
}

.login-icon {
    width: 22px;
    height: 22px;
}

main {
    flex: 1;
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
    position: relative;
    z-index: 0;
}

    main::-webkit-scrollbar {
        display: none;
    }

.footer {
    width: 100%;
    padding: 1px 0;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
    background: rgba(255,255,255,0.85);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    font-size: 13px;
    color: #6b7280;
}

.footer-left {
    display: flex;
    gap: 20px;
}

    .footer-left a {
        cursor: pointer;
        transition: 0.2s;
    }

        .footer-left a:hover {
            color: var(--primary-red);
        }

        .footer-left a.active {
            color: var(--primary-red);
        }

.footer-right {
    display: flex;
    gap: 12px;
}

.social-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .social-icon svg,
    .social-icon img {
        width: 16px;
        height: 16px;
    }

.menu-toggle {
    display: none;
}

    .menu-toggle span {
        width: 20px;
        height: 2px;
        background: #374151;
    }

.mobile-menu {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
}

    .mobile-menu.open {
        opacity: 1;
        pointer-events: auto;
    }

.mobile-menu-inner {
    width: 260px;
    height: 100%;
    background: var(--background);
    padding: 24px;
    transform: translateX(-100%);
    transition: 0.3s;
}

    .mobile-menu-inner a {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 12px 0;
        font-size: 16px;
        color: #383838;
        text-decoration: none;
        white-space: nowrap;
        transition: 0.2s;
    }

    .mobile-menu-inner .icon {
        width: 20px;
        text-align: center;
        flex-shrink: 0;
    }

.mobile-menu-group {
    margin-top: 24px;
}

.mobile-menu-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #666;
    margin-bottom: 12px;
}

.mobile-menu-group a {
    display: block;
    padding: 10px 0;
    font-size: 15px;
    color: #333;
    text-decoration: none;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e5e7eb;
}

    .mobile-menu-header span {
        font-size: 20px;
        font-weight: bold;
        color: #383838;
    }

.close-menu {
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    color: #383838;
    transition: 0.2s;
}

    .close-menu:hover {
        color: var(--primary-red);
    }

    .mobile-menu-inner a:hover {
        color: var(--primary-red);
    }

.mobile-menu.open .mobile-menu-inner {
    transform: translateX(0);
}

.mobile-footer {
    display: none;
}

.mobile-menu-tablet {
    display: none;
}

.mobile-menu-mobile {
    display: none;
}

#app-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

    #app-modal.show {
        opacity: 1;
        pointer-events: auto;
    }

        #app-modal.show #app-modal-container {
            transform: scale(1);
            opacity: 1;
        }

#app-modal-container {
    position: relative;
    width: 900px;
    height: 600px;
    max-width: 95vw;
    max-height: 95vh;
    background: #000;
    border-radius: 18px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.18);
    box-shadow: 0 0 6px white;
    transform: scale(0.92);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

#app-modal-close {
    position: absolute;
    top: 0;
    right: 0;
    width: 30px;
    height: 30px;
    border: none;
    border-bottom-left-radius: 14px;
    background: var(--primary-green);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 27px;
    font-weight: 500;
    cursor: pointer;
    z-index: 20;
    transition: all 0.2s ease;
}

    #app-modal-close:hover {
        background: #00b36b;
    }

#app-modal-content {
    width: 100%;
    height: 100%;
}

.video-modal {
    width: min(95vw, 1000px) !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
}

#map-container {
    position: fixed;
    inset: 0;
    z-index: 1;
}

#map-overlay {
    position: fixed;
    inset: 0;
    z-index: 5;
    pointer-events: none;
}

#app-modal-container.share-modal {
    background: #fff;
}

#global-map {
    width: 100%;
    height: 100%;
}

.mapboxgl-popup-content {
    width: 235px;
    box-sizing: border-box;
    background: var(--background);
    color: var(--primary-black);
}

    .mapboxgl-popup-content h3 {
        margin: 8px 0 3px;
        font-size: 12px;
        font-weight: 600;
        text-align: justify;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
    }

    .mapboxgl-popup-content div {
        margin: 0;
        text-align: justify;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 5;
        overflow: hidden;
    }

.mapboxgl-popup-close-button {
    color: var(--primary-green);
    font-size: 18px;
    font-weight: bold;
    border-radius: 0 !important;
}

    .mapboxgl-popup-close-button:focus {
        outline: none;
    }

.popup-model-button {
    width: 100%;
    margin-top: 5px;
    padding: 0;
    border: 1px solid #a9a9a9;
    border-radius: 5px;
    background: var(--background);
    color: var(--primary-green);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-family: 'Chakra Petch', 'Lato', sans-serif;
    font-size: 12px;
    font-weight: 600;
    transition: all .2s ease;
}

    .popup-model-button:focus {
        outline: none;
    }

    .popup-model-button img {
        width: 25px;
        height: 25px;
        object-fit: contain;
        flex-shrink: 0;
    }

@media (max-width: 1200px) {
    .search {
        width: 350px;
    }
}

@media (max-width: 992px) {
    .header-left {
        flex: 1;
        margin-left: 15px;
        margin-right: 15px;
    }

    .search {
        flex: 1;
        width: auto;
        max-width: 450px;
    }
        .search .menu-toggle {
            display: flex;
        }

    .header-right a {
        display: none;
    }

    .mobile-menu-tablet {
        display: block;
    }
}

@media (max-width: 768px) {
    .logo {
        display: none;
    }

    .header {
        padding: 0 12px;
    }

    .search {
        width: 100%;
    }

    .login-box span {
        display: none;
    }

    .footer {
        display: none;
    }

    .mobile-footer {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 70px;
        background: var(--background);
        border-top: 1px solid #e5e7eb;
        z-index: 100;
    }

    .mobile-footer-inner {
        display: flex;
        justify-content: space-around;
        align-items: center;
        height: 100%;
    }

    .footer-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        font-size: 11px;
        color: #6b7280;
    }

        .footer-item span:first-child {
            font-size: 18px;
        }

        .footer-item.active {
            color: var(--primary-red);
        }

    main {
        padding-bottom: 80px;
    }

    .mobile-menu-tablet {
        display: none;
    }

    .mobile-menu-mobile {
        display: block;
    }
}
