html {
    /* base style */
    box-sizing: border-box;
    font-size: 16px;
}

body,
.page-container {
    margin: 0 auto;
    background: linear-gradient(rgba(240,243,245,0.95), rgba(240,243,245,0.95)), url('../images/pattern.webp') center/cover no-repeat;
    min-height: 100vh;
    /* full viewport height */
    box-sizing: border-box;
    width: 100%;
}

/* header */
#site-header {
    top: 0;
    position: sticky;
    width: 100% !important;
}

.logo {
    float: left;
    width: 70px;
    height: 70px;
    margin-right: 1rem;
    border-radius: 8px;
    border: 2px solid #F0F3F5;
}

.logo-container {
    padding: 1rem;
}

.inner-header {
    background: linear-gradient(135deg, #7B2D26, #7B2D26, #0B7A75);
    padding: 0.5rem 2rem 0.5rem 2rem;
    /* top, right, bottom, left */
    overflow: hidden;
    display: flex;
    /* for horizontal layout */
    align-items: center;
    justify-content: space-between;
    /* this pushes items to the edges */
    flex-wrap: wrap;
    /* this allows wrapping on smaller screens */
}

.inner-header:hover {
    padding: 1rem 2rem 1rem 2rem;
    transition: padding 0.3s;
}

.inner-header h1 {
    float: left;
    font-size: 2rem;
    margin: 0 0 0 0;
    /* this means top, right, bottom, left */
    letter-spacing: 2px;
    color: #F0F3F5;
}

/* navigation */
.nav-list {
    margin: 0;
    padding: 0;
    display: flex;
    /* for horizontal layout */
    gap: 1.5rem;
}

.nav-list a {
    display: inline-block;
    /* for horizontal layout */
    color: #F0F3F5;
    font-weight: 600;
    text-decoration: none;
}

/* intro section */
.intro {
    margin-bottom: 2rem;
}

.img-float-left {
    float: left;
    width: 100%;
    max-width: 400px;
    height: auto;
    /* maintain aspect ratio */
    display: block;
    margin: 1rem 1.5rem 0.5rem 0;
    /* top, right, bottom, left */
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.img-float-right {
    float: right;
    width: 100%;
    max-width: 400px;
    height: auto;
    /* maintain aspect ratio */
    display: block;
    margin: 1rem 0rem 0.5rem 1.5rem;
    /* top, right, bottom, left */
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* content */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /*Garamond, Georgia, 'Times New Roman', Times, serif*/
    background: #F0F3F5;
    color: #19535F;
}

/*Images Styling*/
.image-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.image-row figure {
    flex: 1 1 30%;
    margin: 0;
}

.image-row img {
    width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    height: auto;
    /* maintain aspect ratio */
    margin: 1rem 0 0 0;
    border-radius: 6px;
    height: 220px;            /* fixed height for all images */
    object-fit: cover;   
}

.image-row figcaption {
    text-align: center;
    margin-top: 0.25rem;
    font-weight: 700;
    padding-bottom: 1rem;
    color: #19535F;
}

/*Table Styling*/
table {
    width: 100%;
    border-collapse: collapse;
    background-color: #e6f2ff;
    margin-bottom: 1.5rem;
}

table caption {
    caption-side: top;
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: #19535F;
}

table th,
table td {
    border: 1px solid #ccc;
    padding: 0.7rem 1rem;
    text-align: left;
}

table th {
    background-color: #d8d9da;
    color: #7B2D26;
}

table td {
    background-color: #e6f2ff;
}

table tr:hover td {
    background-color: #cce6ff !important;
    transition: background-color 0.3s;
}

#main-content {
    float: right;
    width: 73%;
    padding: 1rem 2rem;
}

#sub-content {
    float: left;
    width: 65%;
    padding: 1rem 2rem;
}

#main-sidebar {
    float: left;
    width: 25%;
    color: #0B7A75;
    padding: 1rem;
}

#sub-sidebar {
    float: right;
    width: 25%;
    color: #0B7A75;
    padding: 1rem;
}

/* Fun Facts Sidebar Section */
aside section {
    border: 1px solid #ccc;
    /* light gray border around the section */
    padding-right: 1rem;
    /* space inside the border */
    padding-left: 1rem;
    /* space inside the border */
    margin-bottom: 1.5rem;
    /* space below the section */
    border-radius: 8px;
    /* rounded corners */
    background-color: #f9f9f9;
    /* optional light background */
    font-size: 0.9rem;
    /* slightly smaller font */
    line-height: 1.5;
    /* improves readability */
}

aside a {
    color: #0B7A75;
    text-decoration: none;
}

aside a:hover,
a:hover {
    color: #D7C9AA;
    /*background: #19535F;*/
    transition: color 0.2s;
    border-radius: 4px;
    /*padding: 0.2rem 0.2rem;*/
}

#main-content {
    float: right;
    width: 60%;
}

aside h2:hover {
    color: #19535F;
    transition: color 0.2s;
}

footer {
    background: linear-gradient(135deg, #0B7A75, #7B2D26);
    color: #F0F3F5;
    text-align: center;
    padding: 1rem 0;
    font-size: 1rem;
    letter-spacing: 1px;
    margin-top: 2rem;
    /* lock to bottom of page: */
    bottom: 0;
    clear: both;
}

/* Design pattern column */
.pattern-column {
    float: right;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* aligns the img vertically to the top of the container */
    padding-top: 20px;
    
}

.pattern-column img {
    width: 100%;
    height: 100%;
    object-fit: cover;        /* fills the div while keeping proportions */
    border-radius: 20px;      /* rounds the image itself */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

/* responsive design */
@media (max-width: 768px) {
    .inner-header {
        flex-direction: column; /* stack items vertically */
        align-items: flex-start; /* align items to the start */
    }

    .nav-list {
        flex-direction: column; /* stack nav items vertically */
        gap: 0.5rem; /* reduce gap for vertical layout */
        width: 100%;
        margin-top: 0.5rem;
    }

    #main-content, #sub-content, #main-sidebar, #sub-sidebar {
        width: 100%;
        float: none; /* remove float */
        padding: 1rem 0; 
    }

    .img-float-left, .img-float-right {
        float: none;
        display: block;
        margin: 1rem auto;
    }

    .image-row {
        flex-direction: column; /* stack images vertically */
    }

    .image-row figure {
        flex: 1 1 100%;
    }
}
