/* Gourmemory - Modern Gourmet Site Design */
/* Based on UIUX設計.md specification */

/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Zen+Kaku+Gothic+New:wght@300;400;500;700;900&family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

/* CSS Reset & Variables */
:root {
    --color-red-600: #DC2626;
    --color-red-700: #B91C1C;
    --color-orange-300: #FDB76D;
    --color-orange-600: #EA580C;
    --color-amber-500: #F59E0B;
    --color-green-600: #16A34A;
    --color-pink-500: #EC4899;
    --color-gray-50: #F9FAFB;
    --color-gray-400: #9CA3AF;
    --color-gray-500: #6B7280;
    --color-gray-600: #4B5563;
    --color-gray-700: #374151;
    --color-gray-800: #1F2937;
    --color-white: #FFFFFF;
    --color-black: #000000;

    --font-family-primary: 'Zen Kaku Gothic New', 'Noto Sans JP', sans-serif;
    --font-family-secondary: 'Poppins', sans-serif;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

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

body {
    font-family: var(--font-family-primary);
    background-color: #F8F9FA;
    color: var(--color-gray-800);
    line-height: 1.6;
    overflow-x: hidden;
}

body.menu-open {
    overflow: hidden;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    transition: all 0.3s ease;
}

.header.scrolled {
    background-color: rgba(31, 41, 55, 0.9);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(12px);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-white);
    font-family: var(--font-family-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo:hover {
    color: var(--color-orange-300);
}

.nav {
    display: none;
    align-items: center;
    gap: 1.5rem;
}

.nav a {
    color: var(--color-white);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.nav a:hover {
    color: var(--color-orange-300);
}

.menu-toggle {
    display: block;
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
    z-index: 60;
    position: relative;
    padding: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background-color: var(--color-white);
    transition: all 0.3s ease;
    border-radius: 1px;
}

.menu-toggle:hover {
    transform: scale(1.1);
}

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

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

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

@media (min-width: 768px) {
    .nav {
        display: flex;
    }

    .menu-toggle {
        display: none;
    }
}

/* Hero Section */
.hero {
    position: relative;
    height: 80vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.2));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--color-white);
    padding: 1rem;
    max-width: 800px;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.hero-subtitle {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
}

.hero-search {
    width: 100%;
    max-width: 48rem;
    padding: 1.5rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: center;
}

.search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.2);
    color: var(--color-white);
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 2px var(--color-red-600);
}

.search-btn {
    width: 100%;
    background: var(--color-red-600);
    color: var(--color-white);
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: var(--color-red-700);
    transform: scale(1.05);
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 4rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .search-form {
        grid-template-columns: 1fr 1fr auto;
    }
}

/* Main Content */
.main-content {
    padding: 3rem 0;
}

@media (min-width: 768px) {
    .main-content {
        padding: 5rem 0;
    }
}

/* Mood Tags Section */
.mood-section {
    margin-bottom: 4rem;
    text-align: center;
}

.mood-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-family: var(--font-family-secondary);
}

.mood-subtitle {
    color: var(--color-gray-600);
    margin-bottom: 2rem;
    font-size: 1rem;
}

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

.mood-tag {
    display: block;
    text-align: center;
    padding: 1rem;
    background: var(--color-white);
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.mood-tag:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px);
    text-decoration: none;
    color: var(--color-red-600);
}

.mood-emoji {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.mood-text {
    font-weight: 600;
    color: var(--color-gray-700);
    transition: color 0.3s ease;
}

.mood-tag:hover .mood-text {
    color: var(--color-red-600);
}

@media (min-width: 768px) {
    .mood-title {
        font-size: 2.5rem;
    }

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

@media (min-width: 1024px) {
    .mood-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .mood-section {
        margin-bottom: 6rem;
    }
}

/* Featured Articles Section */
.featured-section {
    margin-bottom: 3rem;
}

.featured-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
}

.featured-title {
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-family-secondary);
    margin-bottom: 0.25rem;
}

.featured-subtitle {
    color: var(--color-gray-600);
    font-size: 0.875rem;
}

.featured-more {
    color: var(--color-red-600);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.875rem;
    transition: text-decoration 0.3s ease;
}

.featured-more:hover {
    text-decoration: underline;
    color: var(--color-red-600);
}

.articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .featured-title {
        font-size: 2.5rem;
    }

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

    .featured-section {
        margin-bottom: 5rem;
    }
}

@media (min-width: 1024px) {
    .articles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .article-title {
        font-size: 1.125rem;
        min-height: 3rem;
        max-height: 4rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
}

/* Article Cards */
.article-card {
    background: var(--color-white);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
    text-decoration: none;
    color: inherit;
}

.article-image {
    position: relative;
    width: 100%;
    height: 14rem;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.article-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: var(--color-white);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

.category-area {
    background: var(--color-orange-600);
}

.category-solo {
    background: var(--color-amber-500);
}

.category-lunch {
    background: var(--color-green-600);
}

.category-cafe {
    background: var(--color-pink-500);
}

.article-content {
    padding: 1.5rem;
}

.article-area {
    font-size: 0.875rem;
    color: var(--color-gray-500);
    margin-bottom: 0.25rem;
}

.article-title {
    font-weight: 600;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    line-height: 1.5;
    min-height: 3.75rem;
    max-height: 4.5rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    word-wrap: break-word;
    hyphens: auto;
}

.article-date {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: var(--color-gray-600);
}

.article-date svg {
    width: 1rem;
    height: 1rem;
    margin-right: 0.25rem;
}

/* Footer */
.footer {
    background: var(--color-gray-800);
    color: var(--color-white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    font-family: var(--font-family-secondary);
    margin-bottom: 1rem;
}

.footer-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.footer-section h4 {
    font-size: 1rem;
    font-weight: 600;
}

.footer-section p {
    color: var(--color-gray-400);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--color-gray-400);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--color-white);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--color-gray-700);
    text-align: center;
    color: var(--color-gray-500);
    font-size: 0.875rem;
}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Mobile Navigation */
@media (max-width: 767px) {
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--color-gray-800);
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        transition: right 0.3s ease;
        z-index: 40;
    }

    .nav.nav-open {
        right: 0;
    }

    .nav a {
        padding: 1rem 0;
        border-bottom: 1px solid var(--color-gray-700);
        font-size: 1.125rem;
    }
}

/* Loading states */
.loading {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid var(--color-red-600);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Toast notifications */
.toast {
    font-family: var(--font-family-primary);
    font-weight: 500;
    box-shadow: var(--shadow-lg);
}

/* Image lazy loading */
img.lazy {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img.lazy.loaded {
    opacity: 1;
}

/* Focus styles improvements */
.search-input:focus,
.form-input:focus {
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 2px var(--color-red-600);
    transform: scale(1.02);
}

/* Enhanced hover effects */
.mood-tag:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px) scale(1.02);
}

.area-card:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-2xl);
}

/* Improved responsive typography */
@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .mood-title {
        font-size: 1.75rem;
    }

    .featured-title {
        font-size: 1.75rem;
    }

    .search-title {
        font-size: 1.75rem;
    }
}

/* Performance optimizations */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
video {
    max-width: 100%;
    height: auto;
}

/* Print styles */
@media print {

    .header,
    .hero,
    .footer,
    .search-form-section {
        display: none !important;
    }

    .article-card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
}