/* Import Fonts */
@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Montserrat:wght@400;500&family=Lato:wght@400;700&family=Roboto+Slab:wght@700&family=Space+Mono:wght@400;700&display=swap");

:root {
    --primary-color: #a88d74;
    --dark-color: #3d3530;
    --light-color: #f9f6f2;
    --bg-color: #ffffff;
    --text-color: #333;
    --text-color-light: #f1f1f1;
    --header-bg: #ffffff;
    --font-headline: "Playfair Display", serif;
    --font-body: "Montserrat", sans-serif;
    --list-marker: "✔ ";
    --link-hover-color: #8c7360;
    --box-shadow-color: rgba(0, 0, 0, 0.07);
}

html {
    scroll-behavior: smooth;
}
body {
    font-family: var(--font-body);
    margin: 0;
    color: var(--text-color);
    background-color: var(--light-color);
    line-height: 1.7;
}
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
.header {
    background: var(--header-bg);
    box-shadow: 0 2px 5px var(--box-shadow-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-family: var(--font-headline);
    font-size: 1.8rem;
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 700;
    display: flex;
    align-items: center;
}
.logo img {
    max-height: 50px;
    margin-right: 10px;
    border-radius: 8px;
}
.main-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
}
.main-nav ul li {
    margin-left: 25px;
}
.main-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 1rem;
    padding-bottom: 5px;
    transition:
        color 0.3s,
        border-bottom-color 0.3s;
    border-bottom: 2px solid transparent;
}
.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Hero Section */
.hero {
    position: relative;
    background-color: var(--dark-color);
    background-size: cover;
    background-position: center;
    color: white;
    padding: 5rem 0;
    text-align: center;
}
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
}
.hero .container {
    position: relative;
}
.hero h1 {
    font-family: var(--font-headline);
    font-size: 3.5rem;
    margin: 0;
    color: white;
}

/* Main Content Area */
.content {
    padding: 4rem 0;
}
.article-content {
    background: var(--bg-color);
    padding: 2.5rem;
    border-radius: 5px;
}
.article-content h1,
.article-content h2,
.article-content h3 {
    font-family: var(--font-headline);
    color: var(--dark-color);
}
.article-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}
.article-content a:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
}
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}
.article-content ul {
    list-style: none;
    padding-left: 1.5em;
}
.article-content ul li::before {
    content: var(--list-marker);
    color: var(--primary-color);
    display: inline-block;
    width: 1.5em;
    margin-left: -1.5em;
}
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
    box-shadow: 0 0 10px var(--box-shadow-color);
    border-radius: 8px;
    overflow: hidden;
}
.article-content th,
.article-content td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}
.article-content th {
    background-color: var(--primary-color);
    color: var(--text-color-light);
    font-family: var(--font-headline);
    font-weight: 700;
}
.article-content tr:nth-of-type(even) {
    background-color: var(--light-color);
}
.article-content tr:last-of-type td {
    border-bottom: none;
}
.article-content tr:hover {
    background-color: #e9e9e9;
}

/* Slideshow - FINAL - Handles different image sizes */
.slideshow-container {
    position: relative;
    width: 100%;
    border-radius: 8px;
    overflow: hidden; /* Key to only show one slide */
    margin: 1.5rem 0;
    aspect-ratio: 16 / 9; /* Enforces a fixed aspect ratio (e.g., 16:9) */
}
.slideshow-track {
    display: flex;
    height: 100%; /* Track fills the container's height */
    transition: transform 0.5s ease-in-out;
}
.mySlides {
    min-width: 100%;
    height: 100%; /* Slide also fills the container's height */
    flex-shrink: 0;
    box-sizing: border-box;
}
.mySlides img {
    margin: 0px;
    width: 100%;
    height: 100%; /* Image fills the entire slide */
    display: block;
    object-fit: cover; /* This is the magic! Scales and crops the image to fit */
    object-position: center; /* Ensures the crop is centered */
}
.prev,
.next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: 0.3s ease;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 10;
    text-decoration: none !important;
}
.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}
.prev {
    left: 0;
    border-radius: 0 3px 3px 0;
}
.prev:hover,
.next:hover {
    background-color: rgba(0, 0, 0, 0.7);
    text-decoration: none !important;
}

/* Sidebar Layout & Footer */
.sidebar-layout {
    display: flex;
}
.page-wrapper {
    display: flex;
    width: 100%;
}
.sidebar {
    width: 280px;
    background: var(--header-bg);
    box-shadow: 2px 0 5px var(--box-shadow-color);
    display: flex;
    flex-direction: column;
    padding: 2rem;
    position: fixed;
    height: 100vh;
    z-index: 1100;
}
.sidebar .logo {
    margin-bottom: 3rem;
}
.sidebar .main-nav ul {
    flex-direction: column;
}
.sidebar .main-nav ul li {
    margin-left: 0;
    margin-bottom: 1rem;
}
.main-content {
    flex-grow: 1;
    margin-left: 280px;
}
.sidebar-footer {
    margin-top: auto;
    font-size: 0.85rem;
    line-height: 1.6;
}
.sidebar-footer .footer-section {
    margin-bottom: 1rem;
}
.sidebar-footer .footer-social-links a {
    margin-right: 12px;
    display: inline-block;
}
.sidebar-footer .footer-legal p {
    margin-bottom: 2rem;
    line-height: 1.5;
}
.sidebar-footer a {
    color: var(--primary-color);
    text-decoration: none;
}
.sidebar-footer a:hover {
    text-decoration: underline;
}
.footer {
    background: var(--header-bg);
    color: #ccc;
    padding: 2rem 0;
    font-size: 0.9rem;
    text-align: center;
}
.footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.footer .footer-links a {
    margin: 0 8px;
}
.footer .footer-legal p {
    margin: 0;
    color: var(--text-color);
}
.footer a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}
.footer a:hover {
    text-decoration: underline;
}

/* Scroll-to-Top, Reveal */
#scrollTopBtn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    border: none;
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    width: 45px;
    height: 45px;
    border-radius: 8px;
    font-size: 24px;
    justify-content: center;
    align-items: center;
    transition:
        background-color 0.3s,
        opacity 0.3s;
}
#scrollTopBtn:hover {
    background-color: var(--link-hover-color);
}
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 0.6s ease-out,
        transform 0.6s ease-out;
}
.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Mobile & Responsive Styles --- */
.nav-toggle {
    display: none;
    z-index: 1200;
}

@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .sidebar-layout .nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 25px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        position: fixed;
        top: 25px;
        right: 20px;
    }
    .sidebar-layout .nav-toggle span {
        width: 30px;
        height: 3px;
        background: var(--text-color);
        border-radius: 10px;
        transition: all 0.3s linear;
        transform-origin: 1px;
    }
    .sidebar-layout .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg);
    }
    .sidebar-layout .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .sidebar-layout .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg);
    }
}

@media (max-width: 768px) {
    /* Simple Layout Mobile Dropdown Menu */
    body:not(.sidebar-layout) .header .container {
        position: relative;
    }
    body:not(.sidebar-layout) .main-nav {
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        background-color: var(--header-bg);
        border-radius: 8px;
        box-shadow: 0 4px 15px var(--box-shadow-color);
        width: 250px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition:
            opacity 0.2s ease,
            transform 0.2s ease,
            visibility 0.2s;
    }
    body:not(.sidebar-layout) .main-nav.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    body:not(.sidebar-layout) .main-nav ul {
        flex-direction: column;
        padding: 10px 0;
    }
    body:not(.sidebar-layout) .main-nav li {
        margin: 0;
    }
    body:not(.sidebar-layout) .main-nav a {
        display: block;
        padding: 0.75rem 1.5rem;
        border-bottom: none;
    }
    body:not(.sidebar-layout) .main-nav a:hover,
    body:not(.sidebar-layout) .main-nav a.active {
        background-color: var(--light-color);
        color: var(--primary-color);
    }

    /* Hamburger Menu for Simple Layout */
    body:not(.sidebar-layout) .nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 25px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
    }
    body:not(.sidebar-layout) .nav-toggle span {
        width: 30px;
        height: 3px;
        background: var(--text-color);
        border-radius: 10px;
        transition: all 0.3s linear;
        transform-origin: 1px;
    }
    body:not(.sidebar-layout) .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg);
    }
    body:not(.sidebar-layout) .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    body:not(.sidebar-layout) .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg);
    }

    /* Footer mobile stacking */
    .footer {
        padding: 1.5rem 0;
    }
    .footer .container {
        gap: 0.8rem;
    }
}
