:root {
    --creme: #FFFBF0;
    --creme-dark: #F5F0E6;
    --bordeaux: #8B4513;
    --bordeaux-light: #A0522D;
    --text-dark: #2C1810;
    --text-light: #5D4037;
    --text-light-60: rgba(93, 64, 55, 0.6);
    --border-light: rgba(139, 69, 19, 0.1);
    --footer-dark: #1A0F08;
}

body {
    background-color: var(--creme);
    color: var(--text-dark);
    font-family: 'Lato', sans-serif;
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

.bg-cream {
    background-color: var(--creme) !important;
}

.text-bordeaux {
    color: var(--bordeaux) !important;
}

.bg-bordeaux {
    background-color: var(--bordeaux) !important;
}

.text-light-60 {
    color: var(--text-light-60) !important;
}

.border-light-20 {
    border-color: var(--border-light) !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6, .display-1, .display-2, .display-3, .display-4 {
    font-family: 'Playfair Display', serif;
    color: var(--bordeaux);
    font-weight: 700;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.1;
}

/* Cards */
.card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(139, 69, 19, 0.15) !important;
}

.card-img-top {
    border-radius: 12px 12px 0 0;
    height: 220px;
    object-fit: cover;
    width: 100%;
}

/* Navigation */
.navbar-brand {
    font-family: 'Playfair Display', serif;
}

.nav-link {
    position: relative;
    transition: color 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--bordeaux) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--bordeaux);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 70%;
}

/* Buttons */
.btn-bordeaux {
    background-color: var(--bordeaux);
    border-color: var(--bordeaux);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-bordeaux:hover {
    background-color: var(--bordeaux-light);
    border-color: var(--bordeaux-light);
    transform: translateY(-2px);
    color: white;
}

.btn-outline-bordeaux {
    border: 2px solid var(--bordeaux);
    color: var(--bordeaux);
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-bordeaux:hover {
    background-color: var(--bordeaux);
    border-color: var(--bordeaux);
    color: white;
    transform: translateY(-2px);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--creme) 0%, var(--creme-dark) 100%);
    position: relative;
    overflow: hidden;
    padding: 6rem 0;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="none"><defs><pattern id="pattern" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="%238B4513" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23pattern)"/></svg>');
    opacity: 0.3;
}

.hero-image {
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(139, 69, 19, 0.2);
    transition: transform 0.3s ease;
}

.hero-image:hover {
    transform: scale(1.02);
}

/* Pagination */
.pagination .page-link {
    color: var(--bordeaux);
    border: 1px solid var(--border-light);
    margin: 0 4px;
    border-radius: 6px;
    padding: 0.5rem 1rem;
}

.pagination .page-link:hover {
    background-color: var(--bordeaux);
    border-color: var(--bordeaux);
    color: white;
}

.pagination .active .page-link {
    background-color: var(--bordeaux);
    border-color: var(--bordeaux);
}

/* Markdown Content */
.markdown-body {
    font-family: 'Lato', sans-serif;
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.8;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.markdown-body h1 {
    font-size: 2.5rem;
    border-bottom: 2px solid var(--border-light);
    padding-bottom: 0.5rem;
}

.markdown-body h2 {
    font-size: 2rem;
    color: var(--bordeaux-light);
}

.markdown-body p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.markdown-body a {
    color: var(--bordeaux);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
    font-weight: 600;
}

.markdown-body a:hover {
    border-bottom-color: var(--bordeaux);
    color: var(--bordeaux-light);
}

.markdown-body ul, .markdown-body ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.markdown-body li {
    margin-bottom: 0.5rem;
}

.markdown-body hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--bordeaux), transparent);
    margin: 3rem 0;
}

/* Footer */
footer {
    background-color: var(--footer-dark) !important;
    margin-top: auto;
}

footer h5, footer h6 {
    color: var(--creme) !important;
    font-family: 'Playfair Display', serif;
}

footer .text-light-60 {
    color: rgba(255, 251, 240, 0.7) !important;
}

footer a:hover {
    color: var(--creme) !important;
}

/* Related Articles */
.related-articles-section {
    background: linear-gradient(135deg, var(--creme-dark) 0%, var(--creme) 100%);
    border-radius: 16px;
    padding: 3rem 2rem;
    margin: 4rem 0;
}

.related-articles-section h3 {
    color: var(--bordeaux);
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.related-articles-section .card {
    border: none;
    box-shadow: 0 4px 20px rgba(139, 69, 19, 0.1);
}

.related-articles-section .card-img-top {
    height: 180px;
}

.related-articles-section .card-title {
    font-size: 1.1rem;
    line-height: 1.4;
}

/* Hover Effects */
.hover-bordeaux:hover {
    color: var(--bordeaux) !important;
    transform: translateY(-2px);
}

.stretched-link::before {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    content: "";
}

/* Image fallbacks */
img {
    max-width: 100%;
    height: auto;
}

.img-fallback {
    background: linear-gradient(135deg, var(--creme-dark) 0%, var(--bordeaux) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.8s ease-in;
}

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

.slide-in {
    animation: slideIn 0.6s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section::before {
        width: 100%;
        opacity: 0.1;
    }

    .hero-section {
        padding: 4rem 0;
        text-align: center;
    }

    .card-img-top {
        height: 200px;
    }

    .markdown-body h1 {
        font-size: 2rem;
    }

    .markdown-body h2 {
        font-size: 1.75rem;
    }

    .related-articles-section {
        padding: 2rem 1rem;
        margin: 3rem 0;
    }

    .navbar-nav {
        text-align: center;
        padding: 1rem 0;
    }

    .nav-link {
        padding: 0.5rem 0;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .btn-bordeaux, .btn-outline-bordeaux {
        width: 100%;
        margin-bottom: 1rem;
    }

    .markdown-body {
        font-size: 1rem;
    }
}

.opacity-10 { opacity: .1 !important; }
