/* General Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    /* Removed align-items: center to allow full width content */
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    padding-bottom: 50px;
}

/* Header */
header {
    background-color: #4CAF50;
    color: white;
    padding: 20px;
    text-align: center;
    width: 100%;
}

/* Container for Tiles or Content */
.container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 20px auto;
    max-width: 1200px;
    box-sizing: border-box;
    width: 100%;
    grid-auto-flow: dense;
}

/* Special container class for full-width content */
.container-full {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Add this class to the page-content div that contains the iframe */
.page-content {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Style for the post content that contains the iframe */
.post-content {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 10px;
    box-sizing: border-box;
}

/* Make iframe take full width */
iframe {
    width: 100%;
    min-height: 800px;
    border: 2px solid #4CAF50; /* Green border matching header color */
    border-radius: 4px; /* Slightly rounded corners */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    display: block;
    margin: 10px 0; /* Add some vertical spacing */
}

/* Text container for descriptions */
.text-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Simple tiles */
.tile {
    background-color: #f1f1f1;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
    transition: transform 0.2s;
    box-sizing: border-box;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.tile:hover {
    transform: scale(1.05);
}

.tile a {
    color: #333;
    text-decoration: none;
    font-weight: bold;
}

/* Enhanced Tiles with Image + Text */
.enhanced-tile {
    grid-column: 1 / -1; /* Span all columns */
    display: flex;
    flex-direction: row; /* Horizontal layout */
    align-items: center;
    background-color: #f1f1f1;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 0;
    transition: transform 0.2s;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
    margin: 0;
    min-height: 200px; /* Set a minimum height */
}

/* Make the entire enhanced tile a clickable area */
.enhanced-tile a.tile-full-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    opacity: 0;
    cursor: pointer; /* Add pointer cursor to indicate clickability */
}

.enhanced-tile:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.tile-image {
    height: 150px; /* Fixed height for the image section */
    background-color: #f1f1f1; /* Match the tile background */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    width: 30%;
    overflow: hidden; /* Hide overflow for better image containment */
}

.tile-image img {
    max-width: 100%;
    max-height: 150px;
    object-fit: contain;
    display: block;
    margin: 0 auto; /* Center the image */
}

.tile-content {
    flex: 1;
    padding: 15px;
    text-align: left;
    display: flex;
    flex-direction: column;
    background-color: #f1f1f1;
}

.tile-content h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #4CAF50;
}

.tile-content p {
    margin-bottom: 15px;
    color: #555;
    font-size: 0.9em;
    flex-grow: 1; /* Makes the paragraph take up available space */
}

.external-link {
    margin-left: 5px;
    font-size: 0.8em;
}

/* Table */
table {
    border: 1px solid black;
}

/* Site Header Customization */
.site-header {
    position: relative;
    width: 100%;
}

.site-meta {
    font-size: 20px;
    line-height: 56px;
    letter-spacing: -1px;
    margin-bottom: 0;
    text-align: center;
    color: #e8e8e8;
}

.site-nav {
    line-height: 56px;
    border-top: 1px solid #e8e8e8;
    border-bottom: 1px solid #e8e8e8;
    width: 100%;
}

.site-nav .menu-icon {
    display: none;
}

/* Logo specific styling */
.site-nav .logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.site-nav .logo-container img {
    vertical-align: middle;
    margin-right: 15px;
}

/* Ensure the trigger is properly aligned vertically */
.site-nav .trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px; /* NB: has to match the height of the logo in the header */
}

/* Ensure nav-links are aligned vertically */
.site-nav .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    height: 100%;
}

/* Explicitly define the height of the header-placeholder to prevent weird jumping */
#header-placeholder {
    height: 144.5px;
}

/* Updated trigger with better centered organization */
.site-nav .trigger {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Navigation links container */
.site-nav .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.site-nav .page-link {
    color: #e8e8e8;
    line-height: 1.6em;
    margin: 0 10px;
}

.site-nav a {
    text-decoration: none;
}

.site-nav a:hover {
    color: #111;
    text-decoration: none;
}

/* Wrapper for content */
.wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Responsive styles for enhanced tiles */
@media screen and (max-width: 768px) {
    .container {
        grid-template-columns: 1fr; /* Single column on mobile */
    }

    .enhanced-tile {
        flex-direction: column; /* Stack vertically on mobile */
        width: 100%;
    }

    .tile-image {
        width: 100%;
        height: 150px; /* Fixed height on mobile */
    }
}

/* Responsive Navigation */
@media screen and (max-width: 600px) {
    .site-nav {
        position: relative;
        background-color: #f9f9f9;
        border: 1px solid #e8e8e8;
        border-radius: 5px;
        text-align: center;
    }

    .site-nav .menu-icon {
        display: block;
        line-height: 0;
        text-align: center;
    }

    .site-nav .menu-icon > svg {
        width: 18px;
        height: 30px;
    }

    .site-nav .menu-icon > svg path {
        fill: #424242;
    }

    .site-nav .trigger {
        clear: both;
        display: none;
    }

    .site-nav:hover .trigger {
        display: flex; /* Keep the flex display for consistency */
        padding-bottom: 5px;
    }

    .site-nav .page-link {
        display: block;
        padding: 5px 10px;
    }
}
