/* 여의도맛집 - Main Stylesheet */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: rgba(33, 33, 33, 1);
    background-color: rgba(255, 255, 255, 1);
    line-height: 1.6;
    min-height: 100vh;
}

/* Typography */
h1 {
    color: rgba(34, 110, 147, 1);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 300;
    letter-spacing: 0.5px;
    line-height: 1.2;
    margin-top: 30px;
}

h2 {
    color: rgba(34, 110, 147, 1);
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 400;
    line-height: 1.4;
    margin-top: 20px;
}

h3 {
    color: rgba(33, 33, 33, 1);
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    font-weight: 500;
    line-height: 1.25;
    margin-top: 0;
}

p {
    color: rgba(33, 33, 33, 1);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    margin-top: 8px;
}

a {
    color: rgba(0, 101, 128, 1);
    text-decoration: none;
}

a:hover {
    color: rgba(0, 122, 147, 1);
}

/* ========================================
   Header
   ======================================== */
.top-header {
    background-color: rgba(95, 189, 220, 1);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px 20px;
}

.site-logo {
    flex-shrink: 0;
}

.site-logo a {
    color: rgba(33, 33, 33, 1);
    text-decoration: none;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.site-logo a:hover {
    color: rgba(0, 0, 0, 1);
}

/* Navigation */
.navigation {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
    min-width: 0;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin: 0;
}

.nav-link {
    display: block;
    padding: 6px 12px;
    color: rgba(33, 33, 33, 0.9);
    text-decoration: none;
    font-size: clamp(0.8rem, 2vw, 0.95rem);
    font-weight: 500;
    line-height: 1.4;
    border-radius: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-link:hover {
    color: rgba(0, 0, 0, 1);
    background-color: rgba(255, 255, 255, 0.3);
}

.nav-link.active {
    color: rgba(0, 0, 0, 1);
    background-color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
}

/* Search Box */
.search-container {
    flex-shrink: 0;
    width: 180px;
}

.search-input {
    width: 100%;
    padding: 8px 14px;
    background-color: rgba(255, 255, 255, 0.7);
    border: none;
    border-radius: 8px;
    color: rgba(33, 33, 33, 1);
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.search-input::placeholder {
    color: rgba(33, 33, 33, 0.5);
}

.search-input:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.4);
}

/* ========================================
   Banner Image
   ======================================== */
.banner-image {
    width: 100%;
    max-height: 400px;
    overflow: hidden;
}

.banner-image img {
    width: 100%;
    height: 100%;
    max-height: 400px;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* ========================================
   Page Header (category pages)
   ======================================== */
.page-header {
    background-color: rgba(34, 110, 147, 1);
    padding: clamp(24px, 5vw, 48px) clamp(16px, 4vw, 48px);
    text-align: center;
    color: rgba(255, 255, 255, 1);
}

.page-title {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 300;
    color: rgba(255, 255, 255, 1);
    margin: 0 0 8px 0;
}

.page-subtitle {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

/* ========================================
   Main Content
   ======================================== */
.main-content {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: clamp(24px, 4vw, 48px) clamp(16px, 4vw, 48px);
}

.category-toolbar {
    position: relative;
    margin-bottom: clamp(24px, 4vw, 40px);
}

.category-header {
    text-align: center;
    margin-bottom: 0;
}

.category-header h2 {
    margin-top: 0;
}

.category-header p {
    margin-top: 8px;
}

.sort-controls {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    display: flex;
}

.sort-select {
    min-width: 170px;
    padding: 8px 36px 8px 14px;
    border: 1px solid rgba(33, 33, 33, 0.15);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 1);
    
    /* Custom Arrow */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23333%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 10px;

    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(33, 33, 33, 1);
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.sort-select:hover {
    border-color: rgba(33, 33, 33, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.sort-select:focus {
    outline: none;
    border-color: rgba(34, 110, 147, 0.6);
    box-shadow: 0 0 0 3px rgba(34, 110, 147, 0.15);
}

@media only screen and (max-width: 767px) {
    .sort-controls {
        position: static;
        transform: none;
        width: 100%;
        margin-top: 12px;
        justify-content: flex-start;
    }

    .sort-select {
        width: 100%;
        min-width: 0;
    }
}

/* ========================================
   Restaurant Grid
   ======================================== */
.restaurant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: clamp(16px, 3vw, 28px);
    margin-top: clamp(20px, 3vw, 32px);
}

.restaurant-card {
    background: rgba(255, 255, 255, 1);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.restaurant-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.restaurant-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    object-position: center;
    display: block;
    background-color: #f0f0f0;
}

.restaurant-info {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.restaurant-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: rgba(33, 33, 33, 1);
    margin: 0 0 6px 0;
}

.restaurant-description {
    font-size: 0.875rem;
    color: rgba(33, 33, 33, 0.7);
    margin: 0 0 10px 0;
    line-height: 1.5;
    flex: 1;
}

.restaurant-dish {
    font-size: 0.9rem;
    color: rgba(34, 110, 147, 1);
    font-weight: 600;
    margin: 0 0 12px 0;
}

.map-link {
    display: inline-block;
    padding: 10px 18px;
    background-color: rgba(30, 108, 147, 1);
    color: rgba(255, 255, 255, 1);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
    text-align: center;
    align-self: flex-start;
}

.map-link:hover {
    background-color: rgba(0, 122, 147, 1);
    color: rgba(255, 255, 255, 1);
}

/* ========================================
   Map Section
   ======================================== */
.map-section {
    margin-top: clamp(40px, 6vw, 60px);
}

.map-section h2 {
    color: rgba(0, 0, 0, 1);
    margin-bottom: 8px;
}

.map-section p {
    color: rgba(102, 102, 102, 1);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.map-container {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.map-container iframe {
    display: block;
    width: 100%;
    height: clamp(300px, 50vw, 480px);
    border: none;
}

/* ========================================
   Instagram Section
   ======================================== */
.instagram-section {
    padding: clamp(32px, 5vw, 48px) 20px;
    background-color: rgba(248, 248, 248, 1);
    border-radius: 12px;
    margin-top: clamp(40px, 6vw, 60px);
    text-align: center;
}

.instagram-section h2 {
    color: rgba(33, 33, 33, 1);
    margin: 0 0 8px 0;
}

.instagram-section p {
    color: rgba(102, 102, 102, 1);
    font-size: 0.95rem;
    margin: 0 0 20px 0;
}

.instagram-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: rgb(95, 99, 104);
    border-radius: 8px;
    text-decoration: none;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.instagram-btn:hover {
    transform: scale(1.1);
    background-color: rgb(75, 79, 84);
}

.instagram-btn img {
    width: 24px;
    height: 24px;
    display: block;
}

/* ========================================
   Footer
   ======================================== */
.site-footer {
    background-color: rgba(255, 255, 255, 1);
    color: rgba(33, 33, 33, 1);
    padding: clamp(24px, 4vw, 40px) clamp(16px, 4vw, 48px);
    margin-top: clamp(40px, 6vw, 60px);
    text-align: center;
    border-top: 1px solid rgba(238, 238, 238, 1);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-links {
    font-size: 0.9rem;
    margin: 0 0 8px 0;
}

.footer-links a {
    color: rgba(0, 101, 128, 1);
}

.footer-links .separator {
    margin: 0 12px;
    color: rgba(180, 180, 180, 1);
}

.copyright {
    color: rgba(120, 120, 120, 1);
    font-size: 0.85rem;
    margin: 0;
}

/* ========================================
   Responsive - Mobile First
   ======================================== */

/* Small phones */
@media only screen and (max-width: 479px) {
    .header-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 10px 16px;
    }

    .site-logo {
        text-align: center;
    }

    .navigation {
        width: 100%;
        justify-content: center;
    }

    .nav-menu {
        justify-content: center;
        gap: 2px;
    }

    .nav-link {
        padding: 6px 8px;
        font-size: 0.75rem;
    }

    .search-container {
        width: 100%;
    }

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

    .restaurant-image {
        height: 200px;
    }
}

/* Tablets */
@media only screen and (min-width: 480px) and (max-width: 767px) {
    .header-inner {
        flex-wrap: wrap;
        padding: 12px 16px;
    }

    .site-logo {
        flex: 0 0 auto;
    }

    .navigation {
        order: 3;
        flex: 1 1 100%;
        margin-top: 8px;
    }

    .search-container {
        width: 160px;
    }

    .restaurant-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Small desktops */
@media only screen and (min-width: 768px) and (max-width: 1023px) {
    .restaurant-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

/* Large desktops */
@media only screen and (min-width: 1024px) {
    .restaurant-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

/* ========================================
   Utilities
   ======================================== */
.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-40 {
    margin-bottom: 40px;
}

.mt-20 {
    margin-top: 20px;
}

.mt-40 {
    margin-top: 40px;
}
