/* Base Styles */
* {
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
    text-align: justify;
    text-justify: inter-word;
}

body {
    margin: 10px auto;
    max-width: 980px;
    line-height: 1.6;
    font-size: 16px;
    color: #444;
    padding: 0 10px;
}

h1, h2, h3, h4, h5 {
    text-align: center; 
    line-height: 1.2;
}

img {
    max-width: 100%;
    height: auto;
	display: block;
}

.grid-container img {
  width: 100%;
  height: auto;
  /* Ensures images fill their cells without stretching */
  object-fit: cover; 
}
	

/* Navigation */
.topnav {
    background-color: #333;
    display: flex; 
    /* Allows items to stay on one line and shrink */
    flex-wrap: nowrap; 
    justify-content: center; 
    width: 100%;
}

.topnav a {
	/* flex-grow: 0 (don't force equal width) */
    /* flex-shrink: 1 (allow shrinking when cramped) */
    /* flex-basis: auto (base width on text content) */
    flex: 0 1 auto;     
    display: block;
    color: #f2f2f2;
    text-align: center;
    text-decoration: none;   
    /* Keeps buttons on one line and allows shrinking */
    white-space: nowrap; 
    min-width: 0;    
    /* Fluid typography so the text shrinks with the screen */
    font-size: clamp(10px, 1.8vw, 20px);   
    /* Using percentage or smaller fixed padding for the sides */
    padding: 14px 1.5vw;
}

/* Media Query for Mobile Devices */
@media screen and (max-width: 600px) {
    .topnav {
        /* Changes the layout from horizontal to vertical */
        flex-direction: column;
        /* Ensures the container takes up the full width */
        align-items: stretch;
    }

    .topnav a {
        /* Removes the shrinking logic for mobile */
        flex: 1 1 auto;
        /* Centers the text for a cleaner stacked look */
        text-align: center;
        /* Increases the font size for easier tapping on touchscreens */
        font-size: 18px;
        /* Adds a subtle border between buttons */
        border-bottom: 1px solid #444;
        padding: 15px 0;
		/* Reduced top and bottom padding makes the button shorter */
        padding-top: 8px;
        padding-bottom: 8px;
		/* Setting a tight line-height prevents extra height from the font itself */
        line-height: 1.2;
    }
    
    .topnav a:last-child {
        border-bottom: none;
    }
}

.topnav a:hover {
    background-color: #ffd700;
    color: #000;
}

/* Layout Components */
.content {
    background-color: #ddd;
    padding: 10px;
}

.footer {
    background-color: #f1f1f1;
    padding: 10px;
}

.bottombar {
    display: flex;
    justify-content: center;
	background-color: #333;
	color: #f2f2f2;
    font-size: 10px;
}

/* Media & Iframes */
.container {
    position: relative;
    overflow: hidden;
    width: 100%;
}

iframe {
    margin: auto;
    display: block;
} 

.responsive-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}