/*
Theme Name: Saint Joseph Township Library
Author: Your Name
Version: 1.0
*/

/* ===========================
   Base Typography & Layout
=========================== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    background-color: #fff;
    color: #222;
    margin: 0;
    padding: 0;
}

main a {
    color: #005EA2;
    text-decoration: underline;
}
main a:hover,
main a:focus {
    color: #002244;
}
main h2, h1 {
    text-align: center;
}
iframe {
    width: 100%;
    height: 600px;
    border: none;
    margin: 0 auto;
}

/* ===========================
   Header
=========================== */
header {
    position: relative;
    margin: auto;
    z-index: 1;
    height: 350px;
}
header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("/wp-content/uploads/2025/04/library.jpg") center center / cover no-repeat;
    z-index: -1;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ===========================
   Intro & Latest Posts
=========================== */
.intro {
    padding: 2rem;
    background-color: #fff;
}
.latest-posts {
    padding: 2rem;
    background-color: #fff;
}
.latest-posts h2 {
    color: #003366;
}

.post-list {
    list-style: none;
    padding: 0;
}
.post-list li {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #ccc;
    padding-bottom: 1rem;
}

/* ===========================
   Main Content
=========================== */
main.homepage {
    padding: 2rem;
    margin: auto;
    background-color: #fff;
    max-width: 1000px;
}
main:not(.homepage) {
    max-width: 1020px;
    padding: 2rem;
    margin: auto;
}

.welcome-message {
    background-color: #ecf0f1;
    padding: 1rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    text-align: center;
}

.latest-posts article {
    background-color: #ecf0f1;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
}

/* ===========================
   Header Inner Layout
=========================== */
.site-header {
    background: #333;
    color: white;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    background: #34495e;
    color: #fff;
}

.home-link {
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: #fff;
}

/* ===========================
   Navigation Menu
=========================== */
.main-menu {
    background: #34495e;
    padding: 0 1rem;
}
.main-menu .menu {
    list-style: none;
    margin: 0 auto;
    padding: 0;
}
.menu > li {
    position: relative;
}
.menu a{
    color:#fff;
    text-decoration:none;
}

/* Non-clickable group title */
.menu-group-title {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 8px 12px;
    color: white;
    cursor: default;
    font-weight: normal;
}
.menu-group-title:hover {
    background: none;
}

/* Submenu toggle button */
.submenu-toggle {
    background: none;
    border: none;
    padding: 0;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}
.submenu-toggle svg {
    display: block;
    width: 12px;
    height: 12px;
    transition: transform 0.3s ease;
}
.submenu-toggle.open svg {
    transform: rotate(180deg);
}

/* Submenu base */
.sub-menu {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
    background: #333;
}
.sub-menu.show {
    display: block !important;
}
.sub-menu li{
    padding: 0.5rem 1rem;
}

/* ===========================
   Footer
=========================== */
footer {
    background-color: #003366;
    color: #fff;
    padding: 1rem;
}
footer a {
    color: #fff;
    text-decoration: none;
}
footer .content {
    color: #ecf0f1;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    padding: 2rem;
    font-size: 0.9rem;
    max-width: 1000px;
    margin: 0 auto;
}
footer .content div {
    margin: 0.5rem 0;
    flex: 1 1 30%;
}
footer ul {
    padding-left: 0;
}
footer li {
    list-style-type: none;
    text-align: left;
}
footer .updates {
    text-align: right;
    font-size: 0.8rem;
}
footer img{
	display:block;
	margin-top:1rem;
}

/* Responsive footer adjustments */
@media (max-width: 900px) {
    footer .content div {
        flex: 1 1 50%;
    }
}
/* ===========================
   Desktop Navigation
=========================== */
@media (min-width: 769px) {
    .header-left,
    .header-right {
        display: none;
    }

    .main-menu {
        display: flex;
        align-items: center;
        /* margin: 0 auto; */
    }

    .menu {
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .menu > li {
        display: flex;
        align-items: center;
    }

    /* Position submenu */
    .sub-menu {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 200px;
        padding: 0.5rem 0;
        z-index: 1000;
    }
}

/* ===========================
   Mobile Navigation
=========================== */
@media (max-width: 768px) {
    .header-left,
    .header-right {
        display: block;
    }

    .main-menu {
        display: none;
        flex-direction: column;
        background: #333;
        padding: 10px;
    }
    .main-menu.show {
        display: flex;
    }

    /* Hide duplicate home link in menu */
    .menu-item-home {
        display: none;
    }

    .menu {
        display: flex;
        flex-direction: column;
        gap: 0;
    }
.main-menu .menu {

    margin: 0;
    padding: 0 0.5rem;
}
    .menu-group-title {
        width: 100%;
        justify-content: flex-start;
        padding: 10px 0;
    }

    .sub-menu {
        flex-direction: column;
        padding-left: 1.5rem;
    }
    .sub-menu li {
    padding: 0.05rem;
    }
}


@media (max-width: 600px) {
    footer .content {
        display: block;
        max-width: 100%;
        padding:1rem;
        font-size:0.75rem;
    }
    footer .content div {
        flex: none;
    }
    figure.wp-block-image.is-resized {
    	border-top: 1px solid #ccc;
    	padding: 1rem 0;
	}
    footer #wow-library{
		border-top:1px solid #ccc;
	}
}
