/* =================
   Google Fonts
   ================= */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;700&display=swap');

/* =================
   General & Layout
   ================= */

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: #f4f7f6;
    color: #333;
    margin: 0;
    padding-top: 80px; /* Space for fixed header */
    transition: background-color 0.3s, color 0.3s;
}

.container {
    position: relative;
    background-color: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    text-align: center;
    width: 95%;
    max-width: 600px;
    margin: 2rem auto;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.page-content {
    text-align: left;
    line-height: 1.8;
}

.page-content h1 {
    text-align: center;
}

main h1 {
    color: #d9534f; /* A more subtle red */
    margin-bottom: 0.5rem;
    font-weight: 700;
    transition: color 0.3s;
}

.subtitle {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: #666;
}

/* ======================
   Header & Navigation
   ====================== */
.site-header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 0 1rem; /* Reduced padding for mobile */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: background-color 0.3s;
}

.site-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-logo {
    font-size: 1.2rem; /* Adjusted for mobile */
    font-weight: 700;
    color: #d9534f;
    text-decoration: none;
}

.site-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1.5rem; /* Adjusted for mobile */
    margin: 0;
    padding: 0;
}

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

.site-nav a:hover {
    color: #d9534f;
}

.lang-btn {
    background-color: #5bc0de;
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}
.lang-btn:hover {
    background-color: #31b0d5;
}

.hamburger {
    display: none; /* Hidden on desktop */
    cursor: pointer;
}

.hamburger .line {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}


/* =================
   Theme Toggle
   ================= */

#theme-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#theme-toggle:hover {
    background-color: #5a6268;
}

/* ========================
   Search & Filters
   ======================== */

.search-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.search-form input {
    flex-grow: 1;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 25px;
    font-size: 1rem;
}

.search-form button {
    background-color: #d9534f;
    color: white;
    border: none;
    padding: 0 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.filter-container {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* Allow buttons to wrap */
    gap: 0.5rem; /* Adjusted gap */
}

.filter-btn {
    background-color: #e9ecef;
    color: #495057;
    border: 1px solid #dee2e6;
    padding: 0.5rem 1rem; /* Adjusted padding */
    font-size: 0.9rem; /* Adjusted font size */
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.filter-btn:hover {
    background-color: #ced4da;
}

.filter-btn.active {
    background-color: #d9534f;
    color: white;
    border-color: #d9534f;
}

/* ======================
   Dinner Suggestion
   ====================== */

#dinner-btn {
    background: linear-gradient(45deg, #d9534f, #f0ad4e);
    color: white;
    border: none;
    padding: 1rem 2rem; /* Adjusted padding */
    font-size: 1.1rem; /* Adjusted font size */
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(217, 83, 79, 0.4);
}

#dinner-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(217, 83, 79, 0.5);
}

#dinner-suggestion-container {
    margin-top: 1rem;
    min-height: 400px; /* Reserve space for the card with recipe */
}

.suggestion-card {
    background-color: #fff;
    border-radius: 15px;
    overflow: hidden;
    text-align: left;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.5s forwards;
    box-shadow: 0 4px 20px rgba(0,0,0,0.07);
    border: 1px solid #eee;
    margin-bottom: 1.5rem;
}

.suggestion-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.suggestion-text {
    padding: 1.5rem;
}

.suggestion-text h3 {
    font-size: 1.5rem; /* Adjusted font size */
    color: #333;
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.suggestion-text p {
    font-size: 0.95rem; /* Adjusted font size */
    line-height: 1.6;
    color: #555;
    margin-bottom: 1.5rem;
}

.recipe-toggle-btn {
    background-color: #5bc0de;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.recipe-content {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
    background-color: #fafafa;
    padding: 1rem;
    border-radius: 8px;
}

.recipe-content h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #d9534f;
    font-size: 1.1rem;
}

.recipe-content ul, .recipe-content ol {
    padding-left: 20px;
    line-height: 1.7;
    font-size: 0.9rem;
}

.recipe-content ul {
    list-style: none;
    padding-left: 0;
}
.recipe-content ul li {
    background-color: #fff;
    padding: 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    border: 1px solid #eee;
}

@keyframes fadeIn { to { opacity: 1; transform: translateY(0); } }

/* =================
   Article & Static Pages
   ================= */

.tip-article {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}
.tip-article:last-child {
    border-bottom: none;
}
.tip-article h2 {
    color: #d9534f;
    font-size: 1.3rem;
}

/* =================
   Contact Form, Ads, Footer
   ================= */

.contact-form-section { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid #eee; }
.contact-form-section h2 { color: #d9534f; margin-bottom: 1.5rem; text-align: center; transition: color 0.3s; }
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.contact-form label { text-align: left; font-weight: bold; margin-bottom: -0.5rem; }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form textarea { padding: 0.8rem; border: 1px solid #ddd; border-radius: 8px; font-size: 1rem; transition: border-color 0.3s, background-color 0.3s, color 0.3s; }
.contact-form input[type="text"]:focus, .contact-form input[type="email"]:focus, .contact-form textarea:focus { border-color: #d9534f; outline: none; }
.contact-form button[type="submit"] { background-color: #5cb85c; color: white; border: none; padding: 1rem; font-size: 1rem; border-radius: 8px; cursor: pointer; transition: background-color 0.3s; margin-top: 1rem; }
.contact-form button[type="submit"]:hover { background-color: #4cae4c; }

.ad-unit { margin: 2rem 0; text-align: center; min-height: 100px; background-color: #f8f8f8; border: 1px dashed #ccc; padding: 1rem; display: flex; justify-content: center; align-items: center; font-size: 0.9rem; color: #666; }

.site-footer-bottom { text-align: center; padding: 2rem; margin-top: 2rem; color: #777; border-top: 1px solid #eee; }
.site-footer-bottom a { color: #555; text-decoration: none; transition: color 0.3s; }
.site-footer-bottom a:hover { color: #d9534f; }

/* ============
   Dark Mode
   ============ */

body.dark-mode { background-color: #1a202c; color: #e2e8f0; }
body.dark-mode .container { background-color: #2d3748; }
body.dark-mode main h1, body.dark-mode .contact-form-section h2, body.dark-mode .tip-article h2 { color: #f0ad4e; }
body.dark-mode .subtitle { color: #a0aec0; }
body.dark-mode .site-header { background-color: #2d3748; box-shadow: 0 2px 5px rgba(0,0,0,0.4); }
body.dark-mode .site-nav a { color: #e2e8f0; }
body.dark-mode .site-nav a:hover, body.dark-mode .nav-logo { color: #f0ad4e; }
body.dark-mode .lang-btn { background-color: #718096; color: #e2e8f0; }
body.dark-mode .lang-btn:hover { background-color: #4a5568; }
body.dark-mode #theme-toggle { background-color: #4a5568; }
body.dark-mode #theme-toggle:hover { background-color: #718096; }
body.dark-mode .search-form input { background-color: #1a202c; border-color: #4a5568; color: #e2e8f0; }
body.dark-mode .search-form button { background-color: #f0ad4e; }
body.dark-mode .filter-btn { background-color: #4a5568; color: #e2e8f0; border-color: #718096; }
body.dark-mode .filter-btn:hover { background-color: #718096; }
body.dark-mode .filter-btn.active { background-color: #f0ad4e; color: #1a202c; border-color: #f0ad4e; }
body.dark-mode .suggestion-card { background-color: #4a5568; border-color: #2d3748; }
body.dark-mode .suggestion-text h3 { color: #e2e8f0; }
body.dark-mode .suggestion-text p { color: #cbd5e0; }
body.dark-mode .recipe-toggle-btn { background-color: #f0ad4e; color: #1a202c;}
body.dark-mode .recipe-content { background-color: #2d3748; border-top-color: #4a5568; }
body.dark-mode .recipe-content ul li { background-color: #1a202c; border-color: #4a5568; }
body.dark-mode .recipe-content h4 { color: #f0ad4e; }
body.dark-mode .contact-form-section, body.dark-mode .site-footer-bottom, body.dark-mode .tip-article { border-top-color: #4a5568; }
body.dark-mode .contact-form label { color: #e2e8f0; }
body.dark-mode .contact-form input[type="text"], body.dark-mode .contact-form input[type="email"], body.dark-mode .contact-form textarea { background-color: #1a202c; border-color: #4a5568; color: #e2e8f0; }
body.dark-mode .contact-form input[type="text"]:focus, body.dark-mode .contact-form input[type="email"]:focus, body.dark-mode .contact-form textarea:focus { border-color: #f0ad4e; }
body.dark-mode .contact-form button[type="submit"] { background-color: #38a169; }
body.dark-mode .contact-form button[type="submit"]:hover { background-color: #2f855a; }
body.dark-mode .ad-unit { background-color: #2d3748; border-color: #4a5568; color: #a0aec0; }
body.dark-mode .site-footer-bottom { color: #a0aec0; }
body.dark-mode .site-footer-bottom a { color: #cbd5e0; }
body.dark-mode .hamburger .line { background-color: #e2e8f0; }

/* ============
   Media Queries
   ============ */
@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
    .site-header {
        padding: 0 1rem;
    }
    .site-nav ul {
        position: fixed;
        top: 70px;
        left: -100%; /* Initially hidden */
        width: 100%;
        height: calc(100vh - 70px);
        background-color: #fff;
        flex-direction: column;
        justify-content: center;
        gap: 2.5rem;
        transition: left 0.3s ease-in-out;
    }
    .site-nav ul.nav-active {
        left: 0;
    }
    .hamburger {
        display: block;
        z-index: 1001;
    }
    .hamburger.active .line:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active .line:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger.active .line:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    body.dark-mode .site-nav ul {
        background-color: #2d3748;
    }

    .container {
        padding: 1.5rem;
        margin: 1rem auto;
    }
    main h1 {
        font-size: 1.8rem;
    }
    .subtitle {
        font-size: 1rem;
    }
    #dinner-btn {
        padding: 0.8rem 1.8rem;
        font-size: 1rem;
    }
    .suggestion-card img {
        height: 180px;
    }
    .suggestion-text h3 {
        font-size: 1.3rem;
    }
    .suggestion-text p, .recipe-content ul, .recipe-content ol {
        font-size: 0.9rem;
    }
}
