@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Lora:ital,wght@0,400..700;1,400..700&display=swap');

/* Style Variables */
:root {
    --bg-color: #ffffff;
    --bg-alt: #f8f9fa;
    --text-color: #212529;
    --text-muted: #6c757d;
    --primary-color: #d21f3c; /* Royal Red */
    --secondary-color: #f09a1a; /* Warm Orange-Yellow */
    --accent-color: #111111; /* Pitch Black */
    --light-border: #e9ecef;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03);
    --card-shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.08), 0 4px 6px rgba(0, 0, 0, 0.04);
    --font-heading: 'Lora', serif;
    --font-body: 'Inter', sans-serif;
    --container-width: 1200px;
    --read-width: 760px;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease;
}

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

/* Header & Banner */
.macedonian-stripe {
    height: 6px;
    width: 100%;
    display: flex;
}
.macedonian-stripe span {
    flex: 1;
    height: 100%;
}
.macedonian-stripe .red { background-color: var(--primary-color); }
.macedonian-stripe .yellow { background-color: var(--secondary-color); }
.macedonian-stripe .black { background-color: var(--accent-color); }

header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--light-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.header-container {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo-container a {
    display: flex;
    flex-direction: column;
    color: var(--accent-color);
}

.logo-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.logo-title span {
    color: var(--primary-color);
}

.logo-subtitle {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.nav-menu a:hover,
.nav-menu .active a {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* Mobile Toggle */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--accent-color);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #fffcf6 0%, #fff7ea 100%);
    padding: 5rem 2rem;
    text-align: center;
    border-bottom: 1px solid var(--light-border);
    position: relative;
    overflow: hidden;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background-color: var(--primary-color);
}

.hero-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    line-height: 1.15;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.hero-title span {
    color: var(--primary-color);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Main Layout Grid */
.main-container {
    max-width: var(--container-width);
    margin: 3rem auto;
    padding: 0 2rem;
}

.content-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.content-layout > * {
    min-width: 0;
}

@media (min-width: 992px) {
    .content-layout {
        grid-template-columns: 8fr 4fr;
    }
    
    .content-layout.full-width {
        grid-template-columns: 1fr;
    }
}

/* Articles and Biographies Grid */
.cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .cards-grid.three-cols {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Article Card */
.article-card {
    background: #ffffff;
    border: 1px solid var(--light-border);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.card-img-wrapper {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background-color: var(--bg-alt);
    overflow: hidden;
}

.card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .card-img {
    transform: scale(1.03);
}

.card-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: flex;
    gap: 1rem;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.card-title a {
    color: var(--accent-color);
}

.card-title a:hover {
    color: var(--primary-color);
}

.card-excerpt {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.5;
    flex-grow: 1;
}

.card-link {
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Biography Card */
.bio-card {
    background: #ffffff;
    border: 1px solid var(--light-border);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bio-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-shadow-hover);
}

.bio-letter-badge {
    align-self: flex-start;
    width: 36px;
    height: 36px;
    background-color: #fff3f3;
    border: 1px solid #ffe3e3;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 50%;
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

.bio-card-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.bio-card-title a {
    color: var(--accent-color);
}

.bio-card-title a:hover {
    color: var(--primary-color);
}

.bio-card-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.5;
    flex-grow: 1;
}

/* Filters and Search */
.archive-controls {
    margin-bottom: 2.5rem;
    background-color: var(--bg-alt);
    border: 1px solid var(--light-border);
    border-radius: 8px;
    padding: 1.5rem;
}

.search-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-input {
    width: 100%;
    padding: 0.8rem 1.2rem 0.8rem 2.8rem;
    font-family: var(--font-body);
    font-size: 1rem;
    border: 1px solid var(--light-border);
    border-radius: 6px;
    background-color: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(210, 31, 60, 0.1);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.filters-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-label {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-color);
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    background-color: #ffffff;
    border: 1px solid var(--light-border);
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.filter-btn.active {
    background-color: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

.alphabet-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.alphabet-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    border: 1px solid var(--light-border);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.alphabet-btn.active {
    background-color: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

/* Article Template Styling */
.article-header {
    margin-bottom: 2rem;
}

.article-category {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: inline-block;
}

.article-title-main {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    line-height: 1.15;
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-weight: 700;
}

.article-meta-main {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--light-border);
    padding-bottom: 1.5rem;
}

.article-featured-image {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 2.5rem;
    border: 1px solid var(--light-border);
}

.article-lead-box {
    background-color: #fffdf9;
    border-left: 4px solid var(--secondary-color);
    border-right: 1px solid #fae6c3;
    border-top: 1px solid #fae6c3;
    border-bottom: 1px solid #fae6c3;
    border-radius: 0 6px 6px 0;
    padding: 1.5rem;
    margin-bottom: 2.5rem;
}

.lead-text {
    font-size: 1.15rem;
    line-height: 1.6;
    color: #333333;
    font-weight: 500;
}

/* Table of Contents */
.toc-box {
    background-color: var(--bg-alt);
    border: 1px solid var(--light-border);
    border-radius: 6px;
    padding: 1.5rem;
    margin-bottom: 2.5rem;
}

.toc-title {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toc-list {
    list-style: none;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toc-list a {
    font-size: 0.92rem;
    color: var(--text-color);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.toc-list a:hover {
    color: var(--primary-color);
}

/* Reading Content Elements */
.reading-content {
    max-width: var(--read-width);
    margin: 0 auto;
}

.reading-content p {
    margin-bottom: 1.5rem;
    color: #2b303a;
    font-size: 1.05rem;
    text-align: justify;
}

.reading-content h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin: 2.5rem 0 1.25rem 0;
    color: var(--accent-color);
    font-weight: 700;
    border-bottom: 1px solid var(--light-border);
    padding-bottom: 0.5rem;
}

.reading-content h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin: 2rem 0 1rem 0;
    color: var(--accent-color);
    font-weight: 600;
}

.reading-content ul, 
.reading-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.reading-content li {
    margin-bottom: 0.5rem;
}

.reading-content strong {
    color: var(--accent-color);
}

.reading-content blockquote {
    background-color: var(--bg-alt);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    border-radius: 0 6px 6px 0;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: #495057;
}

/* Tables in Content */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 2.5rem 0;
    border: 1px solid var(--light-border);
    border-radius: 6px;
}

.reading-content table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    margin: 0;
    font-size: 0.95rem;
}

.reading-content th {
    background-color: var(--accent-color);
    color: #ffffff;
    text-align: left;
    padding: 0.75rem 1rem;
    font-weight: 600;
}

.reading-content td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--light-border);
}

.reading-content tr:nth-child(even) {
    background-color: var(--bg-alt);
}

/* Alert blocks in Markdown */
.alert-box {
    padding: 1.25rem;
    border-radius: 6px;
    margin: 2rem 0;
    display: flex;
    gap: 1rem;
    font-size: 0.95rem;
}

.alert-box.note {
    background-color: #e8f4fd;
    border-left: 4px solid #2b8a3e;
    color: #1b5e20;
}

.alert-icon {
    font-size: 1.2rem;
    margin-top: 0.1rem;
}

/* Sidebar and Widgets */
.sidebar-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.sidebar-widget {
    background-color: #ffffff;
    border: 1px solid var(--light-border);
    border-radius: 8px;
    padding: 1.5rem;
}

.sidebar-widget-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.4rem;
    color: var(--accent-color);
}

.sidebar-menu-list {
    list-style: none;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sidebar-menu-list a {
    color: var(--text-color);
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.sidebar-menu-list a:hover {
    color: var(--primary-color);
}

.sidebar-menu-list i {
    font-size: 0.8rem;
    color: var(--primary-color);
}

.sponsor-links-list {
    list-style: none;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sponsor-links-list a {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.sponsor-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--accent-color);
}

.sponsor-url {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.sponsor-links-list a:hover .sponsor-label {
    color: var(--primary-color);
}

/* FAQS Widget */
.faqs-section {
    margin-top: 3.5rem;
    border-top: 1px solid var(--light-border);
    padding-top: 2.5rem;
}

.faqs-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
}

.faq-item {
    margin-bottom: 1.5rem;
    background-color: var(--bg-alt);
    border: 1px solid var(--light-border);
    border-radius: 6px;
    padding: 1.25rem;
}

.faq-question {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.faq-question i {
    color: var(--primary-color);
    margin-top: 0.25rem;
}

.faq-answer {
    font-size: 0.95rem;
    color: #495057;
    padding-left: 1.5rem;
}

/* Footer Section */
footer {
    background-color: #111111;
    color: #ffffff;
    padding: 4rem 2rem 2rem 2rem;
    margin-top: 5rem;
    border-top: 5px solid var(--primary-color);
}

.footer-container {
    max-width: var(--container-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 768px) {
    .footer-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

.footer-col-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 1.25rem;
    color: #ffffff;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-col-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 35px;
    height: 2px;
    background-color: var(--secondary-color);
}

.footer-text {
    font-size: 0.9rem;
    color: #adb5bd;
    line-height: 1.6;
}

.footer-links {
    list-style: none;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: #adb5bd;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-bottom {
    max-width: var(--container-width);
    margin: 3rem auto 0 auto;
    padding-top: 1.5rem;
    border-top: 1px solid #222222;
    text-align: center;
    font-size: 0.85rem;
    color: #6c757d;
}

/* Pagination / Post Navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin: 3rem 0;
    border-top: 1px solid var(--light-border);
    padding-top: 1.5rem;
}

.post-nav-btn {
    display: inline-flex;
    flex-direction: column;
    max-width: 48%;
}

.post-nav-label {
    font-size: 0.80rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.post-nav-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--accent-color);
}

.post-nav-btn:hover .post-nav-title {
    color: var(--primary-color);
}

/* Home Section Layout */
.section-title-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--light-border);
    padding-bottom: 0.5rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent-color);
}

.section-more-link {
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Utilities */
.text-center { text-align: center; }
.my-5 { margin-top: 3rem; margin-bottom: 3rem; }
.mb-4 { margin-bottom: 1.5rem; }

/* Responsive adjustments */
@media (max-width: 767px) {
    body {
        font-size: 1rem;
    }

    .header-container {
        padding: 1rem 1rem;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
    }
    
    .logo-container {
        max-width: 80%;
    }

    .logo-title {
        font-size: 1.4rem;
    }
    
    .logo-subtitle {
        font-size: 0.65rem;
        letter-spacing: 1px;
    }

    .mobile-nav-toggle {
        display: block;
        padding: 0.5rem;
        font-size: 1.3rem;
        order: 2;
    }
    
    nav {
        width: 100%;
        order: 3;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 0.25rem;
        padding: 0.75rem 0 0.25rem 0;
        border-top: 1px solid var(--light-border);
        margin-top: 0.75rem;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-menu a {
        display: block;
        width: 100%;
        padding: 0.6rem 0.5rem;
        border-bottom: 2px solid transparent;
    }
    
    .nav-menu a:hover,
    .nav-menu .active a {
        border-bottom: 2px solid transparent;
        background-color: var(--bg-alt);
        border-left: 3px solid var(--primary-color);
        padding-left: 0.75rem;
    }

    .hero-section {
        padding: 3rem 1rem;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.05rem;
    }
    
    .main-container {
        margin: 1.5rem auto;
        padding: 0 1rem;
    }
    
    .article-title-main {
        font-size: 1.85rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .article-meta-main {
        gap: 0.75rem;
        font-size: 0.85rem;
    }
    
    .article-featured-image {
        margin-bottom: 1.5rem;
    }
    
    .article-lead-box {
        padding: 1.25rem;
        margin-bottom: 1.5rem;
    }
    
    .lead-text {
        font-size: 1.05rem;
    }
    
    .reading-content p {
        font-size: 1rem;
        text-align: left;
    }
    
    .reading-content h2 {
        font-size: 1.45rem;
        margin: 2rem 0 1rem 0;
    }
    
    .reading-content h3 {
        font-size: 1.2rem;
    }
    
    .post-navigation {
        flex-direction: column;
        gap: 1.25rem;
        margin: 2rem 0;
    }
    
    .post-nav-btn {
        max-width: 100%;
        width: 100%;
    }
    
    .post-nav-btn[style*="text-align: right"] {
        text-align: left !important;
        align-items: flex-start !important;
    }

    .section-title-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding-bottom: 0.75rem;
    }
    
    .section-title {
        font-size: 1.45rem;
    }
    
    .section-more-link {
        font-size: 0.85rem;
        margin-top: 0.25rem;
    }
}
