/* --- Google Font Imports --- */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400..700;1,400..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap');

/* --- CSS Variables for easy theming --- */
:root {
    --background-color: #f8f8f4;
    --text-color: #333333;
    --accent-color: #005f73;
    --border-color: #e0e0e0;
    --card-background: #ffffff;
    --font-heading: 'Lora', serif;
    --font-body: 'Source Sans 3', sans-serif;
}

/* --- Base Styles --- */
body {
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.8;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem 1.5rem;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: #000;
}

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

a:hover {
    text-decoration: underline;
}

/* --- Header & Footer --- */
.site-header {
    text-align: center;
    padding: 2rem 0;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
}

.site-header h1 a {
    font-size: 2.5rem;
    font-weight: 400;
    color: var(--text-color);
    text-decoration: none;
}

.site-footer {
    text-align: center;
    margin-top: 5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: #888;
}

/* --- Homepage: Category & Article Cards --- */
.category-block {
    margin-bottom: 4rem;
}

.category-title {
    font-size: 2.2rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
}

.article-list-cards {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.article-list-cards .card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    transition: box-shadow 0.2s ease-in-out;
}

.article-list-cards .card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.article-list-cards .card-title a {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-color);
    text-decoration: none;
}

/* --- Single Article Page --- */
.single-article h1 {
    font-size: 3.2rem;
    margin-bottom: 1.5rem;
}

.article-content p {
    margin-bottom: 1.5em;
}

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

/* --- Image Wrapping Classes --- */
.article-content .align-left {
    float: left;
    margin-right: 1.5em;
    margin-bottom: 0.5em;
    max-width: 50%;
}

.article-content .align-right {
    float: right;
    margin-left: 1.5em;
    margin-bottom: 0.5em;
    max-width: 50%;
}

/* --- Article Category Header --- */
.article-category-header {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.article-category-header a {
    color: var(--accent-color);
    text-decoration: none;
}


/* Ensure floats apply when class is on the image element */
.article-content img.align-left {
  float: left;
  margin-right: 1.5em;
  margin-bottom: 0.5em;
  max-width: 50%;
}
.article-content img.align-right {
  float: right;
  margin-left: 1.5em;
  margin-bottom: 0.5em;
  max-width: 50%;
}


/* --- Carousel Styles (Splide) --- */
.article-content .gow3b-carousel {
    margin: 2em 0;
    /* Add a border and rounding to the whole carousel container */
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.gow3b-carousel .splide__slide {
    /* THIS IS THE FIX: Constrain the height of the slide */
    max-height: 450px;
    overflow: hidden;
    background: #f0f0f0; /* A light background for any letterboxing */
}

.gow3b-carousel .splide__slide img,
.gow3b-carousel .splide__slide video {
    /* Make the media fill the container */
    width: 100%;
    height: 450px; /* Match the max-height */
    object-fit: cover; /* This 'zooms' the image to fit, no distortion */
    display: block;
}

/* Style arrows and pagination to match theme accent color */
.gow3b-carousel .splide__arrow {
    background: var(--accent-color);
    opacity: 0.8;
}
.gow3b-carousel .splide__arrow:hover {
    opacity: 1;
}
.gow3b-carousel .splide__arrow svg {
    fill: var(--background-color);
}

.gow3b-carousel .splide__pagination__page {
    background: #ccc;
    opacity: 0.9;
}
.gow3b-carousel .splide__pagination__page.is-active {
    background: var(--accent-color);
    transform: scale(1.2);
    opacity: 1;
}

/* --- Lightbox / Carousel Interactivity --- */
.splide__slide--image {
    cursor: zoom-in;
}

/* Ensure the lightbox link fills the slide */
.splide__slide--image a {
    display: block;
    width: 100%;
    height: 100%;
}
