/* --- Basic Reset & Global Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #38a169;
    --secondary-color: #6a1a5b;
    --light-color: #f7fafc;
    --dark-color: #1a202c;
    --text-color: #2d3748;
    --border-radius: 8px;
    --spacing: 1.5rem;
    --parchment-bg: #f8f1e6;
    --parchment-text: #4a4a4a;
}

body {
    font-family: 'Merriweather', serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
}

.container {
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--spacing);
}

@media (min-width: 768px) {
    .container {
        max-width: 1000px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1700px;
    }
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

/* --- Header & Navigation --- */
.site-header {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 1rem 0;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.site-header .logo a {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--light-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin-top: 0;
}

.main-nav a {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    color: var(--light-color);
}

.main-nav a:hover {
    color: var(--primary-color);
}

/* --- Main Content and Sidebar Layout --- */
.main-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: var(--spacing);
    margin: var(--spacing) 0;
}

@media (min-width: 768px) {
    .main-content-wrapper {
        flex-direction: row;
    }

    .primary-content {
        flex: 3;
        min-width: 0;
    }

    .sidebar {
        flex: 1;
        min-width: 0;
    }
}

/* --- Hero Section --- */
.hero-section {
    background: white;
    padding: var(--spacing);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: var(--spacing);
}

.site-title {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--dark-color);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.mission-statement {
    font-size: 1.1rem;
    max-width: 100%;
    margin: 0 auto 1.5rem;
    line-height: 1.8;
}

.hero-image-container {
    margin-top: var(--spacing);
    display: flex;
    justify-content: flex-start;
}

.hero-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* --- Links to Other Sites --- */
.link-section {
    padding: var(--spacing) 0;
    text-align: center;
}

.link-section h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--dark-color);
}

.link-grid {
    display: grid;
    gap: var(--spacing);
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .link-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.link-card {
    display: block;
    padding: var(--spacing);
    border-radius: var(--border-radius);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
}

.link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.link-card h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.link-card.style-one {
    background-color: var(--primary-color);
    color: var(--light-color);
}

.link-card.style-one:hover {
    border-color: var(--primary-color);
    background-color: #339160;
}

.link-card.style-two {
    background-color: var(--secondary-color);
    color: var(--light-color);
}

.link-card.style-two:hover {
    border-color: var(--secondary-color);
    background-color: #5c164e;
}

.link-card h3, .link-card p {
    color: var(--light-color);
}

/* --- Featured Articles Grid --- */
.featured-articles {
    padding: var(--spacing) 0;
    margin-bottom: var(--spacing);
}

.featured-articles h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--dark-color);
    text-align: center;
}

.featured-articles-grid {
    display: grid;
    gap: var(--spacing);
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}


/* --- Secondary Articles/Tiles --- */
.secondary-articles {
    padding: var(--spacing) 0;
}

.secondary-articles h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--dark-color);
    text-align: center;
}

.secondary-articles-grid {
    display: grid;
    gap: var(--spacing);
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}


.secondary-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    padding-bottom: var(--spacing);
}

.secondary-card .image-link {
    display: block;
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease;
}

.secondary-card .image-link:hover {
    transform: scale(1.02);
}

.secondary-card h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    padding: var(--spacing) var(--spacing) 0;
}

.secondary-card h3 a {
    color: var(--dark-color);
    transition: color 0.3s ease;
}

.secondary-card h3 a:hover {
    color: var(--secondary-color);
}

.secondary-card p {
    padding: 0 var(--spacing);
    font-size: 0.9rem;
}

/* --- Sidebar Styles --- */
.sidebar {
    background-color: white;
    padding: var(--spacing);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.sidebar-block {
    margin-bottom: var(--spacing);
}

.sidebar-block h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.sidebar-block ul {
    list-style: none;
}

.sidebar-block ul li a {
    display: block;
    padding: 0.5rem 0;
    color: var(--dark-color);
    transition: color 0.3s ease;
}

.sidebar-block ul li a:hover {
    color: var(--secondary-color);
}

.featured-link-card {
    margin-top: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.featured-image-link {
    display: block;
    height: 150px;
    background-size: cover;
    background-position: center;
}

.featured-link-card h4 {
    padding: 1rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
}

.featured-link-card p {
    padding: 0 1rem 1rem;
    font-size: 0.9rem;
}

/* --- Footer --- */
.site-footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 4rem;
}

.site-footer p {
    font-size: 0.9rem;
}

/* --- Page Transition 1: ScaleX Wipe --- */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--dark-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease-in-out;
    z-index: 9999;
}

.page-transition.is-active {
    transform: scaleX(1);
    transform-origin: left;
    animation: transition-out 0.5s forwards;
}

@keyframes transition-out {
    0% { transform: scaleX(0); }
    100% { transform: scaleX(1); }
}

/* --- Page Transition 2: Fade Out --- */
.page-transition-2 {
    position: fixed;
    top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: var(--dark-color);
opacity: 0;
visibility: hidden;
transition: opacity 0.5s ease-in-out;
z-index: 9998;
}

.page-transition-2.is-active {
    opacity: 1;
    visibility: visible;
    animation: transition-out-2 0.5s forwards;
}

@keyframes transition-out-2 {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* --- Article Page Specific Styles --- */
.page-content {
    max-width: 1400px;
    margin: var(--spacing) auto;
}

.article-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: var(--spacing);
    margin: var(--spacing) 0;
}

@media (min-width: 768px) {
    .article-content-wrapper {
        flex-direction: row;
    }

    .article-main-content {
        flex: 3;
        min-width: 0;
    }

    .article-sidebar {
        flex: 1;
        min-width: 0;
    }
}

.long-form-article {
    background-color: var(--parchment-bg);
    color: var(--parchment-text);
    padding: 4rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    line-height: 1.8;
}

.long-form-article p {
    margin-bottom: 1.5rem;
}

.long-form-article h1.article-title {
    font-family: 'Merriweather', serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    text-align: left;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.article-meta {
    text-align: left;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 2rem;
}

.article-image-float {
    margin: 0 0 1rem var(--spacing);
    float: right;
    width: 40%;
    max-width: 350px;
}

.constrained-image {
    max-width: 100%;
    height: auto;
    display: block;
    border: 2px solid var(--parchment-text);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    margin-bottom: 0.5rem;
}

.article-image-float figcaption {
    font-family: 'Merriweather', serif;
    font-style: italic;
    font-size: 0.85rem;
    text-align: left;
    color: #666;
}

@media (max-width: 768px) {
    .article-image-float {
        float: none;
        width: 100%;
        margin: 1rem 0;
    }
}

/* --- Article Page Sidebar Styles --- */
.article-sidebar {
    background-color: white;
    padding: var(--spacing);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.article-sidebar h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.article-sidebar ul {
    list-style: none;
}

.article-sidebar ul li a {
    display: block;
    padding: 0.5rem 0;
    color: var(--dark-color);
    transition: color 0.3s ease;
}

.article-sidebar ul li a:hover {
    color: var(--secondary-color);
}

.featured-link-card {
    margin-top: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.featured-image-link {
    display: block;
    height: 150px;
    background-size: cover;
    background-position: center;
}

.featured-link-card h4 {
    padding: 1rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
}

.featured-link-card p {
    padding: 0 1rem 1rem;
    font-size: 0.9rem;
}

/* --- Contact Form Styles --- */
.contact-form {
    margin-top: 2rem;
    border: 2px solid black;
    padding: 2rem;
    background-color: white;
}

.form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: black;
    text-transform: uppercase;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid black;
    border-radius: 0;
    font-family: 'Merriweather', serif;
    font-size: 1rem;
    color: black;
    background-color: white;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: 2px solid #555;
    border-color: #555;
    box-shadow: none;
}

.contact-form textarea {
    height: 15rem; /* Large message box as requested */
    resize: vertical;
}

.submit-button {
    background-color: black;
    color: white;
    border: 2px solid black;
    padding: 1rem 2rem;
    border-radius: 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.submit-button:hover {
    background-color: white;
    color: black;
}

/* Honeytrap field to hide from human users */
.honeypot {
    position: absolute;
    left: -9999px;
    visibility: hidden;
}

/* Thank you message styles */
#thank-you-message {
    border: 2px solid black;
    padding: 2rem;
    background-color: white;
    text-align: center;
    margin-top: 2rem;
}

.thank-you-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: black;
    line-height: 1.6;
}
/* This is the corrected style for the article images in the sidebar */
.nav-image {
    width: 92%;
    height: auto; /* Ensures the image is not stretched */
    display: block;
    border-radius: var(--border-radius);
    margin: 0 auto 1rem; /* Centers the image and adds bottom margin */
}

.nav-card-link {
    background-size: cover;
    background-position: center;
}