/* Custom polish for Störsvikin asukasyhdistys ry / Störsviks boendeförening rf */

:root {
    --storsvik-accent: #1e5b7b;
    --storsvik-accent-hover: #144057;
}

/* 1. Desktop navigation: symmetric centered grid using #gh-head ID specificity so menu never jumps */
@media (min-width: 992px) {
    #gh-head .gh-head-inner {
        grid-template-columns: 160px 1fr 160px;
        column-gap: 16px;
    }

    #gh-head .gh-head-brand {
        justify-self: start;
    }

    #gh-head .gh-head-logo img {
        max-height: 28px;
        width: auto;
    }

    body.is-head-left-logo #gh-head .gh-head-menu,
    body.is-head-left-logo.home-template #gh-head:not(.is-header-hidden) .gh-head-menu,
    #gh-head .gh-head-menu {
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        justify-content: center;
    }

    #gh-head .gh-head-actions {
        justify-self: end;
    }

    #gh-head .gh-head-menu .nav {
        gap: 18px;
        flex-wrap: nowrap;
        justify-content: center;
    }

    #gh-head .gh-head-menu .nav a {
        font-size: 1.35rem;
        letter-spacing: 0.04em;
        white-space: nowrap;
    }

    #gh-head .gh-head-menu .nav-current a {
        text-decoration: underline;
        text-underline-offset: 6px;
        text-decoration-thickness: 2px;
        opacity: 1;
    }
}

@media (min-width: 1120px) {
    #gh-head .gh-head-inner {
        grid-template-columns: 180px 1fr 180px;
    }

    #gh-head .gh-head-menu .nav {
        gap: 20px;
    }
}

/* Remove harsh focus outline on mouse click while preserving keyboard :focus-visible */
.gh-head-menu .nav a:focus:not(:focus-visible),
.gh-head-logo:focus:not(:focus-visible),
.gh-search:focus:not(:focus-visible) {
    outline: none;
}

.gh-head-menu .nav a:focus-visible,
.gh-head-logo:focus-visible,
.gh-search:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
    border-radius: 4px;
}

/* 2. Homepage hero: atmospheric dark gradient + balanced height so top post shows above the fold */
.site-header-content {
    min-height: 350px;
    padding-top: calc(11vmin + 52px);
    padding-bottom: 10vmin;
}

@media (min-width: 992px) {
    .site-header-content {
        min-height: 370px;
        max-height: 440px;
    }
}

.site-header-content::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(16, 26, 33, 0.44) 0%,
        rgba(16, 26, 33, 0.28) 45%,
        rgba(16, 26, 33, 0.64) 100%
    );
    pointer-events: none;
    z-index: 1;
}

.site-header-inner {
    position: relative;
    z-index: 2;
}

.site-logo {
    max-height: 76px;
}

.site-logo + .site-description,
.site-title + .site-description {
    max-width: 640px;
    font-size: 2.1rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.94);
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
}

/* 3. Post cards & article polish */
.post-card-image-link {
    border-radius: 10px;
    overflow: hidden;
}

.post-card-image {
    transition: transform 0.35s ease;
}

.post-card-image-link:hover .post-card-image {
    transform: scale(1.025);
}

.post-card-content-link:hover .post-card-title {
    color: var(--storsvik-accent);
    transition: color 0.2s ease;
}

.post-card-primary-tag,
.article-tag .post-card-primary-tag a {
    color: var(--storsvik-accent);
}

/* Coastal blue links in articles/pages despite dark navbar accent (#15171a) */
.gh-content a:not(.kg-btn):not(.kg-bookmark-container) {
    color: var(--storsvik-accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.gh-content a:not(.kg-btn):not(.kg-bookmark-container):hover {
    color: var(--storsvik-accent-hover);
}

.dark-mode .gh-content a:not(.kg-btn):not(.kg-bookmark-container) {
    color: #6bb6d9;
}

.kg-image,
.kg-bookmark-container {
    border-radius: 8px;
}

/* 4. Clean footer layout */
.site-footer {
    padding-top: 44px;
    padding-bottom: 64px;
}

.site-footer .inner {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 24px;
}

.site-footer-center {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
}

.site-footer-social-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.85);
}

.site-footer-social-links a:hover {
    color: #fff;
}

.site-footer-social-label {
    font-size: 1.3rem;
    font-weight: 500;
}

.site-footer-nav a {
    color: rgba(255, 255, 255, 0.8);
}

.site-footer-nav a:hover {
    color: #fff;
}

@media (max-width: 767px) {
    .site-footer .inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .site-footer-social-links {
        justify-content: center;
    }
}
