/* Core Reset and Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-main: #ffffff;
    --bg-card: #ffffff;
    --bg-subtle: #f7f7f7;
    --border-color: #ebebeb;
    --border-hover: #222222;
    --text-main: #222222;
    --text-muted: #717171;
    --accent-red: #ff385c;
    /* Classic Airbnb Coral/Red */
    --accent-glow: rgba(255, 56, 92, 0.12);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.08);
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Layout Container */
.max-w-4xl {
    max-width: 64rem;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

/* Navigation Header (Airbnb Floating Header style) */
nav {
    position: sticky;
    top: 0;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 50;
    width: 100%;
}

.nav-container {
    max-width: 64rem;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
}

.brand-logo {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--accent-red);
    text-decoration: none;
}

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

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    transition: background-color 0.2s ease;
}

.nav-links a:hover {
    background-color: var(--bg-subtle);
}

/* Main Content Wrapper */
main {
    padding: 3rem 2rem;
    flex: 1;
}

header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

header p {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 38rem;
    margin-bottom: 2.5rem;
}

/* Category Filters (Pill Carousel style) */
.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.category-btn {
    background-color: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 0.6rem 1.25rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-btn:hover {
    border-color: var(--border-hover);
    color: var(--text-main);
    transform: translateY(-1px);
}

.category-btn.active {
    background-color: var(--text-main);
    color: #ffffff;
    border-color: var(--text-main);
    box-shadow: var(--shadow-sm);
}

/* Articles Card Grid (Airbnb Property Card style) */
#articles-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.75rem;
}

.article-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-tag {
    background-color: var(--bg-subtle);
    color: var(--text-main);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.card-date {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
}

.article-card h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    line-height: 1.4;
}

.article-card p {
    color: var(--text-muted);
    font-size: 0.875rem;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Article Reader View Elements */
article {
    max-width: 46rem;
    margin: 0 auto;
}

article h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

article p {
    color: #484848;
    font-size: 1.05rem;
    margin-bottom: 1.25rem;
    line-height: 1.7;
}

article ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    color: #484848;
}

article li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

article strong {
    color: var(--text-main);
}

/* Professional Footer */
footer {
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-subtle);
    padding: 2.5rem 0;
    margin-top: auto;
    width: 100%;
}

.footer-container {
    max-width: 64rem;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.footer-brand {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.footer-socials {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.footer-socials a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-socials a:hover {
    color: var(--accent-red);
}

/* Responsive Scaling */
@media (max-width: 640px) {

    .footer-container,
    .nav-container {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    #articles-container {
        grid-template-columns: 1fr;
    }
}

/* Expanded Navigation Elements */
.nav-center-links {
    display: flex;
    gap: 0.5rem;
    background-color: var(--bg-subtle);
    padding: 0.3rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
}

.nav-center-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    transition: all 0.2s ease;
}

.nav-center-links a:hover,
.nav-center-links a.active-nav {
    color: var(--text-main);
    background-color: #ffffff;
    box-shadow: var(--shadow-sm);
}

.nav-cta-btn {
    background-color: var(--text-main);
    color: #ffffff !important;
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    font-weight: 600;
    transition: opacity 0.2s ease !important;
}

.nav-cta-btn:hover {
    opacity: 0.85;
    background-color: var(--text-main) !important;
}

@media (max-width: 768px) {
    .nav-center-links {
        display: none;
        /* Hides center pill menu on smaller mobile screens for layout balance */
    }
}