/* General Body and Font Styles */
body {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.5; /* Reduced for more compact text */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Make the main content area grow to push the footer down */
body > .container {
    flex-grow: 1;
}

h1, h2 {
    color: #343a40;
}

/* Style for section headings */
.section h2 {
    margin-top: 0;
    padding-bottom: 8px;  /* Reduced padding */
    margin-bottom: 15px; /* Reduced margin */
    border-bottom: 2px solid #dee2e6;
}

/* Header and Navigation */
.site-header {
    background-color: #343a40;
    padding: 10px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* The container inside the header needs its padding adjusted */
.site-header .container {
    padding-top: 0;
    padding-bottom: 0;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-menu-wrapper {
    display: flex;
    align-items: center;
}

.main-nav .logo {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

.main-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
}

.main-nav ul li {
    margin-left: 20px;
}

.main-nav ul li a {
    color: #f8f9fa;
    text-decoration: none;
    font-size: 1rem;
    padding: 15px 10px;
    display: block;
    transition: background-color 0.3s ease;
}

.main-nav ul li a:hover,
.main-nav ul li.active a {
    background-color: #495057;
    border-radius: 5px;
}

/* Add an extra visual cue to the active item to distinguish it from hover */
.main-nav ul li.active a {
    font-weight: bold;
}

/* Language Selector Styles */
.language-selector {
    list-style: none;
    margin: 0 0 0 20px;
    padding: 0 0 0 20px;
    display: flex;
    border-left: 1px solid #495057; /* Separator */
}

.language-selector li {
    margin-left: 5px;
}

.language-selector li a {
    color: #adb5bd;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: bold;
    padding: 5px 8px;
    display: block;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.language-selector li.active a,
.language-selector li a:hover {
    color: #ffffff;
    background-color: #495057;
}

/* Main Footer */
.site-footer-main {
    background-color: #343a40;
    color: #f8f9fa;
    padding: 15px 0;
    text-align: center;
    flex-shrink: 0; /* Prevent footer from shrinking on flex containers */
}

.site-footer-main .container {
    padding-top: 0;
    padding-bottom: 0;
}

.site-footer-main p {
    margin: 0;
    font-size: 0.8rem; /* Reduced font size */
}

/* Row container for sections */
main {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px; /* Gutter compensation */
}

/* Default section styling */
.section {
    box-sizing: border-box;
    padding: 15px; /* Reduced padding */
    margin: 10px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* New style for sections with a leading image */
.section-with-image {
    display: flex;
    align-items: flex-start; /* Vertically align image and text to the top */
    gap: 25px; /* Creates space between the image and the text */
}

.section-with-image .section-image {
    flex-shrink: 0; /* Prevents the image from shrinking */
    width: 150px;
    height: 150px;
    object-fit: cover; /* Ensures the image fills its container without distortion */
    border-radius: 8px;
}

.section-with-image .section-content {
    /* This container will hold the text and grow to fill the remaining space */
    flex-grow: 1;
}


/* Section width classes for desktop */
.section.full-width {
    flex: 1 1 100%;
}

.section.two-thirds {
    flex: 1 1 calc(66.666% - 20px);
}

.section.one-third {
    flex: 1 1 calc(33.333% - 20px);
}

/* Responsive styles for mobile */
@media (max-width: 768px) {
    .nav-menu-wrapper {
        flex-grow: 1;
        justify-content: flex-end;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on touch devices */
        scrollbar-width: none; /* Hide scrollbar for Firefox */
    }

    .nav-menu-wrapper::-webkit-scrollbar {
        display: none; /* Hide scrollbar for Chrome/Safari/Opera */
    }

    .language-selector { flex-shrink: 0; }

    .main-nav ul li {
        flex-shrink: 0; /* Prevent nav items from shrinking */
    }

    main {
        flex-direction: column;
    }

    .section.two-thirds,
    .section.one-third {
        flex-basis: 100%; /* All sections become full width */

    }
}

@media (max-width: 480px) {
    .section-with-image {
        flex-direction: column; /* Stack image on top of text on very small screens */
        align-items: center; /* Center the image and text block horizontally */
        text-align: center;
    }
}