/* Import Google Fonts: Winky Sans (User specified - may not load from Google Fonts) and Afacad (Variable font, weights 400-700) */
@import url('https://fonts.googleapis.com/css2?family=Afacad:wght@400..700&family=Winky+Sans&display=swap'); /* NOTE: 'Winky Sans' may not be found */

/* Basic styles */
body {
    /* Using 'Afacad Flux' as requested, with 'Afacad' fallback */
    font-family: 'Afacad Flux', 'Afacad', sans-serif;
    font-weight: 400; /* Default body weight */
    font-size: 18px; /* Base font size */
    margin: 0; /* Reset default body margin */
    background-color: #f8f8f8; /* Optional: Add a subtle background to body */
    line-height: 1.6; /* Set base line-height for readability */
    color: #333; /* Default text color */
}

/* Page Container */
.page-container {
    max-width: 1140px; /* Sets a maximum width for the content */
    margin-left: auto; /* Centers the container horizontally */
    margin-right: auto; /* Centers the container horizontally */
    background-color: #fff; /* Optional: Give the container a background */
    box-shadow: 0 0 10px rgba(0,0,0,0.05); /* Optional: Add subtle shadow */
    overflow: hidden; /* Prevents margin collapse issues */
}

.card{
	max-width: 400px;
	margin:20px;
	box-shadow: 1px 1px 2px 3px #eee;
	display:inline-block;
	vertical-align:top;
}
.card>*{
	margin:10px;
}
.right{
	margin-left:auto;
	margin-right:20px;
	width:min-content;
}




/* Header and Footer Layout (Using Grid for Centering) */
header,
footer {
    background-color: #eee;
   
  /*
    padding: 10px 20px;
    display: grid; 
    grid-template-columns: 1fr auto 1fr; 
    align-items: center;
    gap: 10px; 
*/

}

footer {
    margin-top: 20px;
}

/* Remove padding from direct children of header/footer grid */
header > *, footer > * {
    padding-left: 0;
    padding-right: 0;
}

/* Position header elements in the grid */
header nav:first-of-type {
    grid-column: 1 / 2;
    justify-self: start;
}

.header-title {
    grid-column: 2 / 3;
    justify-self: center;
    
    font-weight: 400; /* Assuming single weight */
    font-size: 1.8em; /* Relative to body font size */
    color: #111;
    text-align: center;
}

header nav{
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    justify-items: center;
    gap: 10px;
    width: 100%;
}

header nav:last-of-type {
    grid-column: 3 / 4;
    justify-self: end;
}

header nav img{
    height:60px; width:400px;
}

/* Position footer elements in the grid */
footer nav:first-of-type {
    grid-column: 1 / 2;
    justify-self: start;
}

.footer-title {
    grid-column: 2 / 3;
    justify-self: center;
    
    font-weight: 400; /* Assuming single weight */
    font-size: 1.8em; /* Relative to body font size */
    color: #111;
    text-align: center; /* Ensure text itself is centered */
    /* Removed specific padding */
}

footer nav:last-of-type {
    grid-column: 3 / 4;
    justify-self: end;
}


/* Headings Base (h1-h6) */
h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    font-family: "literata-variable", sans-serif;
    font-variation-settings: "opsz" 12, "wght" 600;
    line-height: 1.3;
}

/* Style for the title within grid items */
.grid-item h3 {
    padding: 10px 5px;
    flex-shrink: 0;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.8);
    box-sizing: border-box;
    
    font-weight: 400; /* Assuming single weight */
    font-size: 1.3em; /* Relative to body font size */
    color: #444;
}

/* Navigation Links */
header nav a,
footer nav a {
    margin: 0 10px;
    text-decoration: none;
    color: #0056b3;
    /* Using 'Afacad Flux' as requested, with 'Afacad' fallback */
    font-family: 'Afacad Flux', 'Afacad', sans-serif;
    font-weight: 700; /* Use bold weight */
    font-size: 16px; /* Set explicit size for nav links */
    transition: color 0.2s ease;
}
header nav a:hover,
footer nav a:hover {
    color: #003d80;
    text-decoration: underline;
}


/* Grid Layout */
.grid-container {
    display: flex;
    text-align: center;
    margin-bottom: 30px; /* Increased space between grid rows */
    padding: 0 15px;
    gap: 10px;
    align-items: stretch;
}

.grid-item {
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15); /* Made shadow slightly darker/larger */
}

/* Image Placeholder */
.item-image-placeholder {
    flex-grow: 1;
    width: 100%;
    flex-shrink: 0;
		background-size:cover;
    /*background-size: 200%;
    background-position: 0px -100px;*/
    background-repeat: no-repeat;
    min-height: 50px;
    /* Tripled space below the image placeholder (10px * 3) */
		/*margin-bottom: 30px;*/
		/*clip-path: circle(50% at center); */
}

/* Content Area Styling */
.content-area {
    padding: 30px 40px;
    margin: 20px 0;
}

.content-area h1 {
    font-size: 2.5em; /* Relative to body font size */
    margin-bottom: 5px;
    text-align: center;
    color: #111;
    
}

.content-area h2 {
     
     font-weight: 400;
     margin-bottom: 20px;
     font-size: 1.6em; /* Relative to body font size */
     text-align: center;
     color: #555;
}

.content-area h2 em {
     /* Using 'Afacad Flux' as requested, with 'Afacad' fallback */
    font-family: 'Afacad Flux', 'Afacad', sans-serif;
    font-style: italic;
    font-weight: 400;
    font-size: 0.9em; /* Relative to parent h2 size */
    color: #666;
    display: block;
    margin-top: -15px;
    margin-bottom: 25px;
}

.content-area h3 {
    font-size: 1.8em; /* Relative to body font size */
    margin-top: 30px;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    text-align: left;
    
}

.content-area div { /* This includes .list-content */
    margin-bottom: 1.5em;
     /* Using 'Afacad Flux' as requested, with 'Afacad' fallback */
    font-family: 'Afacad Flux', 'Afacad', sans-serif;
    font-weight: 400;
    color: #444;
    text-align: left;
    font-size: 20px; /* Increased font size for content divs */
}

.content-area .list-content {
    /* margin-bottom: 1.5em; */ /* Already handled by .content-area div */
    line-height: 1.8; /* Increase line height for lists */
    /* text-align: left; */ /* Already handled by .content-area div */
    /* font-size is inherited from .content-area div */
}

.content-area .social-links {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 20px;
}

.content-area .social-links a {
     /* Using 'Afacad Flux' as requested, with 'Afacad' fallback */
    font-family: 'Afacad Flux', 'Afacad', sans-serif;
    font-weight: 700; /* Use bold weight */
    font-size: 16px; /* Set explicit size for social links */
    text-decoration: none;
    color: #0056b3;
    margin: 0 15px;
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s ease;
}
.content-area .social-links a:hover {
    background-color: #0056b3;
    color: #fff;
    border-color: #0056b3;
}

.content-area h4 {
     /* Using 'Afacad Flux' as requested, with 'Afacad' fallback */
    font-family: 'Afacad Flux', 'Afacad', sans-serif;
    font-weight: 400;
    font-style: italic;
    text-align: center;
    margin-top: 30px;
    font-size: 0.9em; /* Relative to body font size (18px) */
    color: #777;
}


/* Media Query for smaller screens */
@media (max-width: 768px) {
    body {
        font-size: 17px; /* Slightly smaller base on mobile */
    }

    header,
    footer {
        display: flex; /* Revert to Flexbox for stacking */
        flex-direction: column;
        text-align: center;
        padding: 10px; /* Adjust padding */
        gap: 5px; /* Reduce gap for column layout */
    }

    /* Remove grid properties from children on mobile */
    header nav:first-of-type,
    .header-title,
    header nav:last-of-type,
    footer nav:first-of-type,
    .footer-title,
    footer nav:last-of-type {
        grid-column: auto;
        justify-self: auto;
    }

     /* Ensure nav links stack okay */
     header nav, footer nav {
        margin-top: 5px;
     }


    .content-area {
        padding: 20px; /* Reduce padding on mobile */
    }

    /* Adjust content div font size on mobile */
    .content-area div {
        font-size: 19px; /* Slightly smaller than desktop, but larger than base mobile */
    }


    .grid-container {
        flex-direction: column;
        align-items: stretch;
        padding: 0 20px;
        gap: 15px;
        margin-bottom: 25px; /* Adjust row spacing for mobile */
    }

    .grid-item {
        flex: 1 1 auto;
        aspect-ratio: 1 / 1; /* Keep items square on mobile */
        box-shadow: 0 2px 4px rgba(0,0,0,0.15); /* Adjust shadow for mobile if needed */
    }

    .item-image-placeholder {
         min-height: 150px;
         margin-bottom: 15px; /* Tripled space below image for mobile (5px * 3) */
    }

    /* Adjust title/heading sizes for mobile (using ems relative to new body size) */
    .header-title, .footer-title { font-size: 1.6em; } /* Adjust relative size */
    .grid-item h3 { font-size: 1.3em; }
    .content-area h1 { font-size: 2.2em; }
    .content-area h2 { font-size: 1.5em; }
    .content-area h2 em { font-size: 0.9em; margin-top: -10px; }
    .content-area h3 { font-size: 1.6em; }
    .content-area h4 { font-size: 0.9em; } /* Keep relative size */


    .content-area .social-links a {
        margin: 5px 10px; /* Adjust spacing */
        display: inline-block; /* Ensure they wrap nicely */
        font-size: 15px; /* Slightly smaller on mobile */
    }

     header nav a,
     footer nav a {
        font-size: 15px; /* Slightly smaller on mobile */
     }
}
