/* Main Theme Styles */

/* Layout */
.wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1;
}

/* Top bar social icon links */
.bw-topbar a {
    color: var(--bw-surface-0);
}

.bw-topbar a:hover {
    color: var(--bw-surface-0);
    opacity: 0.85;
}

.bw-topbar-social {
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.bw-topbar-social:hover {
    background-color: var(--bw-surface-0);
    opacity: 1;
}

.bw-topbar-social:hover .bw-icon svg,
.bw-topbar-social:hover .bw-icon svg path {
    fill: var(--bw-surface-100);
}

/* Header */
.site-header {
    --bw-header-height: 64px;
    padding: var(--bw-spacing-24) var(--bw-spacing-16);
    background-color: var(--bw-surface-0);
    border-bottom: 1px solid var(--bw-surface-50);
    z-index: 1002;
    transition:
        box-shadow 0.3s ease,
        transform 0.3s ease,
        background-color 0.3s ease;
}

.site-header[data-sticky="always"],
.site-header[data-sticky="scroll-top"] {
    position: sticky;
    top: 0;
}

.site-header.is-scrolled {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.site-header.is-hidden {
    transform: translateY(-100%);
}

body.menu-open .site-header,
body.menu-open .site-header.is-hidden {
    transform: none;
}

.header-content {
    max-width: var(--bw-container-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: visible;
}

.site-branding {
    flex: 0 0 auto;
    z-index: 1003;
    display: flex;
    align-items: center;
}

.site-title {
    margin: 0;
    font-size: var(--bw-font-size-heading-h4);
    font-family: var(--bw-font-primary-bold);
    line-height: 1.2;
}

.site-title a {
    color: var(--bw-surface-100);
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-title a:hover,
.site-title a:focus {
    color: var(--bw-primary-color);
}

.site-description {
    margin: var(--bw-spacing-4) 0 0;
    font-size: var(--bw-font-size-body-sm);
    color: var(--bw-surface-75);
}

/* Navigation styles live in navigation.css */

/* Content */
/* .entry-content {
    max-width: var(--bw-container-width);
    margin: 0 auto;
    padding: var(--bw-spacing-48) var(--bw-spacing-16);
}

.entry-content > * + * {
    margin-top: var(--bw-spacing-24);
} */

/* Links */
a {
    color: var(--bw-primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover,
a:focus {
    color: var(--bw-primary-alt);
}

/* Buttons */
.wp-block-button__link,
.button,
button[type="submit"] {
    display: inline-block;
    padding: var(--bw-spacing-12) var(--bw-spacing-32);
    background: var(--bw-btn-bg);
    color: var(--bw-surface-0);
    font-family: var(--bw-font-primary-medium);
    font-size: var(--bw-font-size-body-md);
    border: none;
    border-radius: var(--bw-radius-round-subtle);
    cursor: pointer;
    text-decoration: none;
    transition:
        background 0.3s ease,
        transform 0.2s ease;
}

.wp-block-button__link:hover,
.button:hover,
button[type="submit"]:hover {
    background: var(--bw-hover-btn-bg);
    transform: translateY(-2px);
}

/* Images */
img {
    max-width: 100%;
    height: auto;
}

.wp-block-image {
    margin-bottom: var(--bw-spacing-32);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: var(--bw-spacing-32);
}

th,
td {
    padding: var(--bw-spacing-12);
    text-align: left;
    border-bottom: 1px solid var(--bw-surface-50);
}

th {
    font-family: var(--bw-font-primary-semibold);
    background-color: var(--bw-surface-50);
}

/* Accessibility */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: var(--bw-surface-50);
    border-radius: var(--bw-radius-round-subtle);
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    color: var(--bw-surface-100);
    display: block;
    font-size: var(--bw-font-size-body-sm);
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

@media screen and (max-width: 767px) {
    .bw-topbar {
        display: none;
    }

    .site-header {
        height: var(--bw-header-height);
        padding: 0 var(--bw-spacing-16);
    }

    .header-content {
        height: 100%;
    }

    .site-description {
        display: none;
    }

    .site-branding .custom-logo-link,
    .site-branding img,
    .site-branding .custom-logo {
        display: block;
        max-height: 36px;
        width: auto;
    }
}

/* Responsive */
@media screen and (min-width: 768px) {
    .site-header {
        height: auto;
        padding: var(--bw-spacing-32) var(--bw-spacing-24);
    }

    .site-description {
        display: block;
    }

    .site-branding .custom-logo-link,
    .site-branding img,
    .site-branding .custom-logo {
        max-height: 48px;
        width: 100%;
    }

    /* Footer - 2 columns on tablet */
    .footer-widgets {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }

    .footer-navigation {
        width: auto;
    }

    .footer-menu {
        justify-content: flex-end;
    }
}

@media screen and (min-width: 1025px) {
    .site-header {
        padding: var(--bw-spacing-24) var(--bw-spacing-32);
    }

    .site-footer {
        padding: var(--bw-spacing-88) var(--bw-spacing-48);
    }

    /* Footer - 4 columns on desktop */
    .footer-widgets {
        grid-template-columns: repeat(4, 1fr);
    }
}
