/* Reset */
* {
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

/* Body */
body {
    font-family: "Antic", sans-serif;
    background: #ECE2D0; 
    color: #5B2037; 
    line-height: 1.55;
    font-size: 18px;
    padding: 0;
}

/* Main, Nav, Footer Background */
main,
nav,
footer {
  background-color: #ECE2D0;
}

/* Images */
img {
    width: 500px;
    max-width: 100%;
    height: auto;
    padding: 10px;
    background-color: #A26769;
    border-radius: 8px; 
    overflow: hidden;
}

/* MAIN container */
main {
    width: min(1600px, 96vw);
    margin: 0 auto;
    padding: 1.5rem;
    padding-top: 2.8rem;
    border-top: 1px solid rgba(109,46,70,0.12);
}

/* Header */
header {
    width: min(1600px, 96vw);
    margin: 1.25rem auto 0;
    padding: 1rem 1.5rem;
    position: relative;
    background: linear-gradient(
        to bottom,
        rgba(109,46,70,0.08),
        rgba(109,46,70,0.02)
    );
}

/* Header Titles */
header h1 {
    font-family: "Ribeye", serif;
    font-size: 2.6rem;
    color: #6D2E46; 
    margin-bottom: 0.25rem;
}

/* Header Divider Accent */
header::after {
    content: "";
    display: block;
    width: 80px;
    height: 4px;
    margin-top: 0.75rem;
    background: #6D2E46;
    border-radius: 6px;
    opacity: 0.85;
}

/* Header Paragraphs */
header p {
    color: #6D2E46; 
    font-size: 1.02rem;
}

/* Hgroup (for subheadings) */
hgroup {
    padding: 1rem 0; 
}

hgroup p {
    font-size: 1.25rem; 
    font-weight: 500;  
    padding: 1rem 0; 
}

/* NAVIGATION */
nav {
    width: 100%;
    display: grid;
    grid-template-columns: 4.5em auto 3.5em;
    grid-template-rows: auto auto;
    grid-template-areas:
        "logo . toggle"
        "navbar navbar navbar";
    padding: 0.5rem 0;
}

nav ul {
    display: flex;
    gap: 0.6rem;
    list-style: none;
    align-items: center;
    margin: 0;
    padding: 0;
}

nav li a {
    display: inline-block;
    padding: 0.55rem 1rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    color: #6D2E46; 
    background: rgba(109,46,70,0.06);
    border: 2px solid rgba(162,103,105,0.14);
    transition: transform .14s ease, box-shadow .14s ease, background-color .14s ease, color .12s ease;
}

nav li a:hover,
nav li a:focus {
    background: #6D2E46; 
    color: #ECE2D0; 
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 22px rgba(109,46,70,0.12);
    outline: none;
}

nav li a:visited {
    background: rgba(213,185,178,0.12);
    color: #A26769; 
}

/* LOGO */
.logo{
    display: flex;
    align-items: center;
    grid-area: logo;
}

.logo img{
    height: 42px;
    width: auto;
    background: none;
    padding: 0;
}

/* Sections & Cards */
section, aside, article {
    margin-top: 1.2rem;
    padding: 1rem;
    border-radius: 10px;
    background: #ECE2D0;
}

/* TEASERS */
#teasers {
    margin-top: 1rem;
    display: block;
}

/* Teaser Card */
.teaser {
    background: #CEBEBE;          
    border-left: 6px solid #D5B9B2; 
    margin: 1rem 0;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(109,46,70,0.03);
}

/* Teaser Content Paragraphs */
.teaser p,
section p,
aside p {
    max-width: 700px;
    margin-top: 0.5rem;
    color: #532333; 
    font-weight: 500; 
    letter-spacing: 0.1px;
}

/* Teaser Headings */
.teaser h3 {
    margin-bottom: 0.5rem;
    font-size: 1.22rem;
    color: #6D2E46; 
    font-weight: 700;
}

/* Teaser + Section Images */
.teaser figure,
section figure {
    margin: 0.6rem 0;
}

.teaser img {
    width: 100%;
    max-width: 420px;     
    height: auto;
    display: block;
    border-radius: 8px;
    margin: 0.45rem 0;
    box-shadow: 0 6px 14px rgba(109,46,70,0.06);
    object-fit: cover;
}

/* Figcaption */
figcaption {
    font-size: 0.86rem;
    color: #6D2E46; 
    margin-top: 0.35rem;
    font-style: italic;
    opacity: 0.95;
}

/* LINKS */
a {
    color: #42292D; 
    text-decoration: none;
    border-bottom: 3px solid rgba(162,103,105,0.12);
    transition: color .12s ease, border-color .12s ease;
}

a:visited {
    color: #5B2037; 
    border-bottom-color: rgba(213,185,178,0.30);
    font-weight: 600;
}

a:hover {
    color: #603F39; 
    border-bottom-color: rgba(109,46,70,0.22);
    text-decoration: none;
}

/* Aside */
aside {
    margin-top: 1rem;
    padding: 0.95rem;
    border-radius: 10px;
    background: #EDE3DB; 
}

aside h2 { 
    color: #6D2E46; 
    margin-bottom: .45rem; 
}

ul {
    list-style-position: inside;
    width: 100%;
}

aside ul { 
    list-style: disc;  
    padding-left: 1.1rem; 
}

aside a { 
    color: #42292D; 
}

/* Resources list */
#resources ul { 
    list-style: none; 
    list-style-position: inside; 
    padding-left: 0.6rem; 
}

#resources li { 
    margin: .45rem 0; 
}

/* Footer */
footer {
    text-align: center;
    padding: 1.15rem;
    margin-top: 1.5rem;
    color: rgba(109,46,70,0.78);
    font-size: 0.95rem;
}

/* Accessibility focus */
a:focus, 
button:focus {
    outline: 3px solid rgba(162,103,105,0.18);
    outline-offset: 2px;
}

/* MOBILE-FIRST NAVIGATION */
/*.nav {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    z-index: 100;
}*/

/* Hamburger Button */
.nav-toggle {
    font-size: 1.8rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #6D2E46;
    padding: 0.4rem 0.6rem;
    grid-area: toggle;
    justify-self: end;
}

/* Hide menu by default (mobile) */
.nav-menu {
    display: flex;
    flex-direction: column;
    background: #ECE2D0;
    border-radius: 12px;
    margin-top: 0.5rem;
    padding: 0.5rem;
    width: max-content;
    margin-left: auto;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-25px);
    transition: 
        max-height 0.6s ease,
        opacity 0.35s ease,
        transform 0.4s ease;
    box-shadow: 0 12px 30px rgba(109,46,70,0.18);
    grid-area: navbar;
    justify-self: end;
}

.nav-menu.active {
    max-height: 700px;
    opacity: 1;
    transform: translateY(0);
}

.nav-menu li {
    list-style: none;
    margin: 0.25rem 0;
    text-align: center;
}

.nav-menu a {
    display: block;
    padding: 0.6rem 1rem;
    font-weight: 700;
    width: 10em; 
}

/* DESKTOP NAVIGATION */
@media (min-width: 768px) {
    nav{
        grid-template-columns: auto 1fr;
        grid-template-areas: "logo navbar";
        align-items: center;
    }
    
    .nav-toggle {
        display: none;
    }

    .nav-menu {
        display: flex;
        flex-direction: row;
        background: transparent;
        box-shadow: none;
        margin-top: 0;
        padding: 0;
        gap: 0.6rem;
        max-height: none;
        opacity: 1;
        transform: none;
        justify-self: end;
    }
}
/* IMAGE + TEXT SIDE-BY-SIDE (NON-INDEX PAGES) */
.content-flex {
    display: flex;
    flex-direction: column; /* mobile first */
    gap: 1rem;
}

.content-flex figure {
    margin: 0;
}

.content-flex .text {
    max-width: 600px;
}

/* Desktop layout */
@media (min-width: 768px) {
    .content-flex {
        flex-direction: row;
        align-items: flex-start;
    }

    .content-flex figure {
        flex: 1;
    }

    .content-flex > .text {
        margin-top: 4.5rem;
    }
  
    .content-flex > .text p {
        font-size: 1.15rem;
        line-height: 1.8;
    }
}  