@import url('./default-theme-style.css');
@import url('./theme-variables.css');
@import url('./theme-fonts.css');
@import url('./theme-text-styling.css');

/** Main Site Structure **/

body {
    background-color: var(--background);
}

/** Links */
a { color: var(--link); text-decoration: underline; }
a:visited { color: var(--link_visited); }
a:hover { color: var(--accent1); text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {

    a { color: var(--text); text-decoration: none; }
    a:visited { color: var(--text);}
    a:hover { color: var(--text); text-decoration: underline;}

}

/** Site header */

.site-header { 
    padding: 30px 0px;
    margin-bottom: 50px;
    min-height: 50px; 
    position: relative; 
    align-content: center;
}

.site-title { 
    font-family: 'reglo';
    text-transform: uppercase;
    font-size: 26px; 
    line-height: 56px; 
    letter-spacing: -1px; 
    margin-bottom: 0; 
    float: left; 
    text-decoration: none;
    white-space: nowrap;
}

.site-title, .site-title:visited { color: var(--text); }

.site-title:hover { text-decoration: none; }

.header-icon {
    height: 50px;
    width: auto;
    margin: 0.5em;
}

.site-nav { float: right; line-height: 70px; }
.site-nav .menu-icon { display: none; }
.site-nav .page-link { color: var(--text); line-height: 1; font-family: 'reglo'; text-transform: uppercase; text-decoration: none;}
.site-nav .page-link:not(:first-child) { margin-left: 20px; }
@media screen and (max-width: 649px) {
    .site-nav { position: absolute; top: 9px; right: 30px; background-color: #fdfdfd; border: 1px solid #e8e8e8; border-radius: 5px; text-align: right; }
    .site-nav .menu-icon { display: block; float: right; width: 36px; height: 26px; line-height: 0; padding-top: 10px; text-align: center; }
    .site-nav .menu-icon > svg { width: 18px; height: 15px; }
    .site-nav .menu-icon > svg path { fill: #424242; }
    .site-nav .trigger { clear: both; display: none; }
    .site-nav:hover .trigger { display: block; padding-bottom: 5px; }
    .site-nav .page-link { display: block; padding: 5px 10px; } 
    .site-title { font-size: 20px; }
    .header-icon { height: 30px; width: auto; }
}

.page-link:hover {
    text-decoration: underline;
}

/* width-styling */
.wrapper > * { 
	--width-max: var(--width-content);
    margin-inline: auto;
    max-inline-size: min(calc(100% - var(--width-site-gutter) * 2), var(--width-max));

}

.wrapper > .medium-width-content {
    --width-max: var(--width-content-medium);
}

.wrapper > .large-width-content {
    --width-max: var(--width-content-large);
}

.wrapper > .full-width-content {
    max-inline-size: none;
}

/** Page content */
.page-content { padding: inherit;}

.page-heading { font-size: 20px; }

.post-list { margin-left: 0; list-style: none; }
.post-list > li { margin-bottom: 30px; }

.post-meta { font-size: 17.5px; color: #828282; }

.post-link { display: block; font-size: 24px; }


/** Images */

/** Default image width is the same as text width */

img { width: var(--width-content); height: auto; vertical-align: middle; }

.image-link-expand {
    display: none;
}

/** Buttons and Bits **/

.button {
    background-color: var(--ec-yellow);
    padding: 0.5em 1em;
    margin-bottom: 0;
    border-radius: 0;
    width: fit-content;
    height: auto;
    font-family: 'reglo';
    line-height: 1;
    text-decoration: none;
    color: var(--ec-black);
}

.button a { text-decoration: none; color: var(--ec-black); text-transform: uppercase; }

.button:hover { background-color: var(--text); }
.button:hover a { color: var(--background); }

/** Form Fields **/

input {
    font-family: 'baskervville';
}

input[type=text] {
    padding: 1em;
    margin: 1em 0em;
}

input[type=submit] {
    padding: 1em;
    border-radius: 0%;
    background-color: var(--ec-yellow);
    border: none;
}

/** Homepage Styling **/

.homepage-overview {
    display: grid;
	grid-template-columns: 100%;
	flex-wrap: wrap;
	gap: 20px;
	align-items: start;
	padding-top: .5em;
	padding-bottom: 2em;
	max-width: 100%;
    padding-left: 2em;
    padding-right: 2em;
}

.homepage-featured {
    display: grid;
    gap: 1em;
    grid-template-columns: 40% auto;
    align-items: center;
}

.featured-title {
    font-family: var(--reglo);
    font-size: var(--h1-size);
    padding: 0;
    margin: 0;
}

.featured-summary {
    font-family: var(--baskervville);
    text-transform: capitalize;
    font-size: var(--h5-size);
    padding: 0;
    margin: 0;
}

.hpf-text {
    display: grid;
    gap: 1em;
}

.hpf-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    text-align: center;
}

.homepage-recent {
    display: grid;
    grid-template-columns: 33.33% auto auto ;
    gap: 1em;
}

.post-preview {
    padding: 0.5em;
    border: var(--ec-black) 0px solid;
    align-items: start;
}

.post-preview-title {
    font-size: var(--h4-size);
    margin: 0;
}

.post-preview-image {
    height: 250px;
    width: 100%;
    object-fit: cover;
}

/* Homepage Responsive Styling */

/* First breakpoint: homepage only */
@media screen and (max-width: 900px) {
    .featured-title {
        font-size: var(--h3-size);
    }
}

/* Second breakpoint: same as header menu toggle */
@media screen and (max-width: 649px) {
   
    .homepage-overview {
        padding-left: 1em;
        padding-right: 1em;
   }

    .homepage-featured {
        display: grid;
        gap: 1em;
        grid-template-columns: auto;
        align-items: start;
    }

    .hpf-img {
        order: 0;
        height: 250px;
        width: 100%;
    }

    .hpf-text {
        order: 1;
    }

    .homepage-recent {
        grid-template-columns: auto auto;
    }

    .post-preview-image {
        height: 200px;
    }
}

/* Third breakpoint: fixing the "recent" section at very small widths */

@media screen and (max-width: 479px) {

    .homepage-overview {
        padding-left: 0.5em;
        padding-right: 0.5em;
   }    

    .homepage-recent {
        grid-template-columns: auto;
    }
    
}