/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:wght@400;700&family=Merriweather:wght@400;700&family=Playfair+Display:wght@400;700&display=swap');

/* ---------- Reset ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ---------- Full height for sticky footer ---------- */
html, body {
    height: 100%;
}

/* ---------- Body ---------- */
body {
    font-family: 'Merriweather', serif; /* Main body text */
    line-height: 1.6;
    background-color: #fdfcf6; /* light cream background */
    color: #3b2f2f; /* dark brown text */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* push footer to bottom */
}

/* Make main grow to fill space */
main {
    flex: 1;
}

/* ---------- Header ---------- */
header {
    font-family: 'Playfair Display', serif; /* Antiquated header font */
    background-color: #6c4a2f; /* darker brown */
    color: #fff8dc;
    padding: 1rem;
    text-align: center;
    border-bottom: 4px solid #a63d2a; /* deep red accent */
}

/* ---------- Navigation ---------- */
nav {
    background-color: #e8e2d9; /* light beige */
    border-bottom: 2px solid #6c4a2f;
    padding: 0.5rem;
}
nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1rem;
}
nav li a {
    font-family: 'Libre Baskerville', serif; /* formal nav links */
    color: #3b2f2f;
    text-decoration: none;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
}
nav li a:hover {
    color: #a63d2a;
    text-decoration: underline;
}

/* ---------- Hero section ---------- */
.hero {
    text-align: center;
    padding: 3rem 1rem;
    background-color: #f5f1e6;
    border: 2px solid #d4c6b0;
    border-radius: 8px;
    max-width: 900px;
    margin: 2rem auto;
    font-family: 'Merriweather', serif;
}
.hero h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: #6c4a2f;
    margin-bottom: 1rem;
}
.hero p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: #3b2f2f;
}

/* ---------- Footer ---------- */
footer {
    font-family: 'Libre Baskerville', serif;
    background-color: #6c4a2f;
    color: #fff8dc;
    padding: 1rem;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

/* ---------- Results wrapper ---------- */
.results-wrapper {
    display: flex;
    gap: 1rem;
    max-width: 1200px;
    margin: 2rem auto;
    font-family: 'Merriweather', serif;
}

/* ---------- Type buttons ---------- */
.type-buttons {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem 0;
}
.type-buttons button {
    flex: 1;
    padding: 0.75rem 1rem;
    background-color: #fffdf7; /* soft cream */
    color: #3b2f2f;
    border: 2px solid #d4c6b0;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    transition: all 0.2s ease-in-out;
}
.type-buttons button:hover {
    background-color: #f5f1e6;
    border-color: #a63d2a;
}
.type-buttons button.active {
    background-color: #a63d2a;
    color: #fff8dc;
    border-color: #862f22;
}

/* ---------- Articles box ---------- */
.articles-box {
    border: 2px solid #d4c6b0;
    border-radius: 8px;
    padding: 1rem;
    background-color: #fffdf7;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-family: 'Merriweather', serif;
}

/* ---------- Empty message ---------- */
#empty {
    max-width: 900px;
    margin: 2rem auto;
    padding: 1.5rem;
    background-color: #f5f1e6;
    border: 2px solid #d4c6b0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-family: 'Merriweather', serif;
}

/* ---------- Search action ---------- */
.search-action label {
    font-weight: bold;
    color: #6c4a2f;
    margin-bottom: 0.25rem;
    font-family: 'Libre Baskerville', serif;
}
.search-action input,
.search-action select {
    padding: 0.5rem;
    border: 1px solid #b49a7d;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    width: 100%;
    font-family: 'Merriweather', serif;
}
.search-action button {
    padding: 0.75rem;
    background-color: #a63d2a;
    color: #fff8dc;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    font-family: 'Playfair Display', serif;
}
.search-action button:hover {
    background-color: #862f22;
}

/* ---------- Primary button ---------- */
.btn-primary {
    background-color: #a63d2a;
    color: #fff8dc;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    font-family: 'Playfair Display', serif;
}
.btn-primary:hover {
    background-color: #862f22;
}
