:root {
    --primary-color: #1B2A41;
    --secondary-color: #2F6B4F;
    --accent-color: #D4A12C;
    --accent2-color: #B0473B;
    --background-color: #F7F1E3;
    --surface-color: #FFFFFF;
    --text-color: #1F1F1F;
    --muted-text: #6B7280;
    --border-color: #E5E7EB;
    --shadow: 0 4px 12px rgba(27, 42, 65, 0.08);
    --radius: 12px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.6;
    padding-top: 76px; /* For fixed navbar */
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    color: var(--primary-color);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

/* Typography */
.section-title {
    position: relative;
    padding-bottom: 15px;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--secondary-color));
    border-radius: 2px;
}

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

/* Navigation */
.menu-header {
    background: var(--surface-color);
    box-shadow: 0 2px 20px rgba(27, 42, 65, 0.1);
    z-index: 1000;
}

.navbar-brand {
    font-family: 'Playfair Display', serif;
    padding: 10px 0;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    font-weight: 500;
    padding: 10px 15px !important;
    border-radius: 6px;
    margin: 0 2px;
    position: relative;
}

.nav-link:hover {
    background-color: rgba(27, 42, 65, 0.05);
}

.nav-link:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15px;
    right: 15px;
    height: 2px;
    background-color: var(--secondary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-link:hover:after {
    transform: scaleX(1);
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 10px 24px;
    font-weight: 500;
    border-radius: 8px;
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: #152235;
    border-color: #152235;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    border-width: 2px;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-secondary {
    color: var(--secondary-color);
    border-color: var(--secondary-color);
    border-width: 2px;
}

.btn-outline-secondary:hover {
    background-color: var(--secondary-color);
    color: white;
}

/* Badges */
.section-badge {
    display: inline-block;
    padding: 6px 16px;
    background-color: rgba(27, 42, 65, 0.1);
    color: var(--primary-color);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-badge.secondary {
    background-color: rgba(47, 107, 79, 0.1);
    color: var(--secondary-color);
}

.section-badge.accent {
    background-color: rgba(212, 161, 44, 0.1);
    color: var(--accent-color);
}

.heritage-badge {
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
}

.category-badge {
    display: inline-block;
    padding: 4px 12px;
    background-color: rgba(27, 42, 65, 0.08);
    color: var(--primary-color);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.category-badge.history {
    background-color: rgba(176, 71, 59, 0.1);
    color: var(--accent2-color);
}

.category-badge.nature {
    background-color: rgba(47, 107, 79, 0.1);
    color: var(--secondary-color);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgba(247, 241, 227, 0.9) 0%, rgba(255, 255, 255, 0.9) 100%);
    position: relative;
    overflow: hidden;
}

.hero-section:before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(45deg, rgba(27, 42, 65, 0.03) 0%, transparent 100%);
    z-index: 0;
}

.min-vh-70 {
    min-height: 70vh;
}

.hero-image-wrapper {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transform: perspective(1000px) rotateY(-5deg);
    transition: var(--transition);
}

.hero-image-wrapper:hover {
    transform: perspective(1000px) rotateY(0deg);
}

.hero-image-placeholder {
    height: 400px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    position: relative;
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 20px;
    color: white;
}

/* Cards */
.attraction-card {
    background: var(--surface-color);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
}

.attraction-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(27, 42, 65, 0.15);
}

.card-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.card-image.heritage {
    background: linear-gradient(45deg, #8B7355, #D4A12C);
}

.card-image.napoleon {
    background: linear-gradient(45deg, #B0473B, #D4A12C);
}

.card-image.nature {
    background: linear-gradient(45deg, #2F6B4F, #4CAF7D);
}

.card-body {
    padding: 24px;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--primary-color);
}

.card-link {
    color: var(--secondary-color);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.card-link:hover {
    color: var(--primary-color);
    gap: 10px;
}

/* Route Cards */
.route-card {
    background: var(--surface-color);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    height: 100%;
    border-left: 4px solid var(--secondary-color);
    transition: var(--transition);
}

.route-card:hover {
    transform: translateX(8px);
}

.route-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    gap: 15px;
}

.route-icon {
    width: 50px;
    height: 50px;
    background: var(--secondary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.route-meta {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.route-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--muted-text);
    font-size: 0.9rem;
}

/* Event Cards */
.event-card {
    display: flex;
    gap: 20px;
    background: var(--surface-color);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.event-card:hover {
    transform: translateY(-5px);
}

.event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    padding: 10px;
}

.event-day {
    font-size: 1.8rem;
    font-weight: bold;
    line-height: 1;
}

.event-month {
    font-size: 0.9rem;
    opacity: 0.9;
}

.event-category {
    display: inline-block;
    padding: 4px 12px;
    background-color: rgba(212, 161, 44, 0.1);
    color: var(--accent-color);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.event-category.history {
    background-color: rgba(176, 71, 59, 0.1);
    color: var(--accent2-color);
}

.event-link {
    color: var(--secondary-color);
    font-weight: 500;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Heritage Section */
.heritage-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.heritage-icon {
    width: 50px;
    height: 50px;
    background: rgba(212, 161, 44, 0.1);
    color: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.heritage-image {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    height: 300px;
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

.image-quote {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: var(--radius);
    margin: 20px;
    box-shadow: var(--shadow);
}

.image-quote blockquote {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-style: italic;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.image-quote cite {
    color: var(--muted-text);
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: white;
}

.footer h5, .footer h6 {
    color: white;
}

.footer .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
}

.footer a:hover {
    color: white;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--accent-color);
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* Pagination Styles */
.pagination {
    justify-content: center;
    margin: 40px 0 20px;
}

.page-link {
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    margin: 0 4px;
    border-radius: 6px !important;
    padding: 8px 16px;
    font-weight: 500;
    transition: var(--transition);
}

.page-link:hover {
    background-color: rgba(27, 42, 65, 0.05);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.page-item.disabled .page-link {
    color: var(--muted-text);
    background-color: rgba(107, 114, 128, 0.05);
}

/* Markdown Content */
.markdown-body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.7;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.markdown-body p {
    margin-bottom: 1em;
}

.markdown-body a {
    color: var(--secondary-color);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.markdown-body a:hover {
    color: var(--primary-color);
}

.markdown-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1em 0;
}

.markdown-body code {
    background-color: rgba(27, 42, 65, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

.markdown-body pre {
    background-color: var(--primary-color);
    color: white;
    padding: 1em;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1em 0;
}

.markdown-body blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 1em;
    margin: 1em 0;
    color: var(--muted-text);
    font-style: italic;
}

/* Utility Classes */
.bg-surface {
    background-color: var(--surface-color);
}

.bg-light {
    background-color: rgba(247, 241, 227, 0.5) !important;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding-top: 66px;
    }

    .hero-section .display-4 {
        font-size: 2.5rem;
    }

    .event-card {
        flex-direction: column;
        text-align: center;
    }

    .event-date {
        align-self: center;
    }

    .route-stats {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 576px) {
    .hero-image-wrapper {
        transform: none;
        margin-top: 30px;
    }

    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* List Page Specific */
.list-card {
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.list-card:hover {
    border-color: var(--secondary-color);
    transform: translateY(-5px);
}

.card-img-wrapper {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.list-card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent-color);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Blog Specific */
.blog-card {
    border: none;
}

.blog-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

.post-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.featured-post {
    background: linear-gradient(135deg, var(--surface-color), #f8f9fa);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.featured-image {
    height: 300px;
    overflow: hidden;
}

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

.featured-post:hover .featured-image img {
    transform: scale(1.03);
}

.newsletter-card {
    background: var(--surface-color);
    border: 2px dashed var(--border-color);
}

/* Single Page Specific */
.single-hero .hero-container {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.single-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-meta span {
    background: rgba(27, 42, 65, 0.05);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
}

.author-box {
    background: rgba(212, 161, 44, 0.05);
    border-left: 4px solid var(--accent-color);
}

.author-avatar {
    width: 60px;
    height: 60px;
    background: rgba(27, 42, 65, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Related Articles */
.related-card {
    border: 1px solid transparent;
    transition: var(--transition);
}

.related-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 8px 25px rgba(212, 161, 44, 0.15);
}

.related-card .img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), transparent);
}

.related-card .card-img-top {
    height: 150px;
    object-fit: cover;
}

/* Table of Contents */
#TableOfContents {
    font-size: 0.9rem;
}

#TableOfContents ul {
    list-style: none;
    padding-left: 0;
}

#TableOfContents li {
    margin-bottom: 8px;
}

#TableOfContents a {
    color: var(--muted-text);
    text-decoration: none;
    padding: 4px 0;
    display: block;
    border-left: 3px solid transparent;
    padding-left: 10px;
    transition: var(--transition);
}

#TableOfContents a:hover,
#TableOfContents a.active {
    color: var(--primary-color);
    border-left-color: var(--secondary-color);
    background: rgba(47, 107, 79, 0.05);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-color);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Print Styles */
@media print {
    .menu-header,
    .footer,
    .related-articles,
    .btn,
    .breadcrumb,
    .sticky-top {
        display: none !important;
    }

    body {
        padding-top: 0 !important;
        background: white !important;
        color: black !important;
    }

    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }

    a {
        color: black !important;
        text-decoration: none !important;
    }
}

.hero-image-placeholder {
    height: 400px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}
