/*
Theme: Philidor1847
Description: Modern, minimalistisch WordPress theme voor Philidor1847.
*/

/* -----------------------------------
   Body and typography
----------------------------------- */
body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #222;
    background-color: #ffffff;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Georgia', serif;
    color: #111;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

a {
    color: #003366;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    width: clamp(90%, 92vw, 1200px);
    margin: 0 auto;
}

header, footer {
    text-align: center;
    padding: 1em 0;
    background-color: #f9f9f9;
}

/* -----------------------------------
   Main navigation
----------------------------------- */
.main-navigation .menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 2em;
}

.main-navigation .menu li {
    position: relative;
}

.main-navigation .menu li a {
    color: #003366;
    text-decoration: none;
    font-weight: bold;
    padding: 0.3em 0.5em;
    display: block;
}

.main-navigation .menu li a:hover {
    text-decoration: underline;
}

/* Dropdown menus */
.main-navigation .menu li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fafafa;
    list-style: none;
    padding: 0.5em 0;
    margin: 0;
    border: 1px solid #e0e0e0;
    min-width: 180px;
    z-index: 9999;
    border-radius: 4px;
}

.main-navigation .menu li:hover > ul {
    display: block;
}

.main-navigation .menu li ul li {
    padding: 0;
    width: 100%;
}

.main-navigation .menu li ul li a {
    padding: 0.5em 1em;
    color: #003366;
    font-weight: normal;
}

.main-navigation .menu li ul li a:hover {
    background-color: #eaeaea;
}

/* Hamburger / mobile menu */
.menu-toggle {
    display: none;
    background-color: #003366;
    color: #fff;
    border: none;
    padding: 0.5em 1em;
    font-size: 1.2em;
    cursor: pointer;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .main-navigation {
        width: 100%;
        overflow: hidden;
        max-height: 0;
        transition: max-height 0.3s ease-out;
    }

    .main-navigation.active {
        max-height: 1000px;
        transition: max-height 0.5s ease-in;
    }

    .main-navigation .menu {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .main-navigation .menu li ul {
        position: static;
        border: none;
        display: none;
        padding-left: 1em;
    }

    .main-navigation .menu li.open > ul {
        display: block;
    }

    .menu-toggle {
        display: block;
        margin: 1em auto;
    }
}

/* -----------------------------------
   Homepage layout (vertical posts + sidebar)
----------------------------------- */
.homepage-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2em;
    margin-top: 2em;
}

.main-content {
    flex: 3;
    display: flex;
    flex-direction: column;
    gap: 2em;
}

.sidebar {
    flex: 1;
    background-color: #fafafa;
    padding: 1em;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

/* Individual homepage post */
.homepage-post {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5em;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Min-height only for posts with featured image */
.homepage-post.has-thumbnail {
    min-height: 350px;
}

/* Posts without featured image collapse naturally */
.homepage-post:not(.has-thumbnail) {
    min-height: auto;
}

/* Post title above featured image */
.homepage-post h3.post-title {
    margin-top: 0;
    margin-bottom: 0.5em;
    font-size: 1.4em;
    color: #003366;
}

/* Featured image */
.homepage-post.has-thumbnail .post-thumbnail {
    margin-bottom: 1em;
}

.homepage-post.has-thumbnail .post-thumbnail img {
    display: block;
    width: 100%;
    max-width: 400px;
    height: auto;
    aspect-ratio: 2 / 1;
    object-fit: cover;
    border-radius: 4px;
}

/* Post meta & excerpt */
.post-date {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 0.8em;
}

.read-more {
    display: inline-block;
    margin-top: 0.8em;
    color: #003366;
    font-weight: bold;
}

.read-more:hover {
    text-decoration: underline;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 1em;
    margin: 2em 0;
}

.pagination a {
    background-color: #003366;
    color: #fff;
    padding: 0.5em 1em;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.2s;
}

.pagination a:hover {
    background-color: #002244;
}

/* Desktop layout: sidebar right */
@media (min-width: 900px) {
    .homepage-wrapper {
        flex-direction: row;
        align-items: flex-start;
    }

    .main-content {
        margin-right: 2em;
    }
}

/* Mobile layout: sidebar below posts */
@media (max-width: 900px) {
    .homepage-wrapper {
        flex-direction: column;
    }

    .sidebar {
        margin-top: 2em;
    }
}

/* -------------------------------
   Footer Widgets & Layout
--------------------------------- */
.site-footer {
    background-color: #111;
    color: #fff;
    padding: 2em 1em 1em 1em;
    font-size: 0.95em;
}

/* Footer blocks container */
.footer-widgets {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    margin-bottom: 1em;
}

/* Each footer block shares width evenly */
.footer-widgets .footer-block {
    flex: 1 1 calc(100% / var(--footer-blocks, 4) - 1em);
    padding: 1em;
    box-sizing: border-box;
    border-radius: 4px;
    color: #fff;
}

/* Alternating colors */
.footer-widgets .footer-block:nth-child(odd) {
    background-color: #2a2a2a;
}

.footer-widgets .footer-block:nth-child(even) {
    background-color: #444;
}

/* Responsive: tablets */
@media (max-width: 1024px) {
    .footer-widgets .footer-block {
        flex: 1 1 calc(50% - 1em);
    }
}

/* Responsive: mobile */
@media (max-width: 600px) {
    .footer-widgets .footer-block {
        flex: 1 1 100%;
    }
}

/* Footer copyright */
.footer-copyright {
    text-align: center;
    font-size: 0.85em;
    color: #bbb;
}

/* -------------------------------
   Sidebar Widgets
--------------------------------- */
.widget {
    background-color: #fff;
    padding: 1em;
    margin-bottom: 1.5em;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.widget-title {
    font-size: 1.2em;
    margin-bottom: 0.5em;
}

/* -------------------------------
   Iframe Plugin
--------------------------------- */
.iframe-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 2em 0;
}

.iframe-wrapper iframe {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow: auto;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

/* -------------------------------
   Admin Bar Fix
--------------------------------- */
#wpadminbar {
    z-index: 9999;
}

/* -------------------------------
   Misc
--------------------------------- */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}


.header-banner-fullwidth {
    width: 100%;
    overflow: hidden;
}

.header-banner-fullwidth .banner-image {
    width: 100%;
    height: auto; /* maintain aspect ratio */
    display: block;
}


.site-banner img {
    width: 100%;   /* fits the container width */
    height: auto;
    display: block;
    margin-bottom: 20px; /* optional spacing below banner */
}




.site-footer {
    background: #f5f5f5;
    padding: 40px 0 20px;
}

.footer-widgets {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.footer-block {
    flex: 1;
}

.footer-copyright {
    text-align: center;
    font-size: 14px;
    color: #666;
}

@media (max-width: 768px) {
    .footer-widgets {
        flex-direction: column;
    }
}





