/* =========================================================
   SK'S FAIRWAYS
   BLOG & GALLERY SHARED STYLES
   Load after /css/styles.css
   ========================================================= */


/* =========================================================
   INNER PAGE HEADER
   ========================================================= */

body:has(.inner-hero) .site-header {
    background: #10281f;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}


/* =========================================================
   INNER PAGE HERO
   ========================================================= */

.inner-hero {
    min-height: 590px;
    display: flex;
    align-items: center;
    position: relative;
    color: #fff;
    padding: 175px 0 95px;
    background-color: #10281f;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    isolation: isolate;
}

.inner-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(
        90deg,
        rgba(5, 25, 17, 0.94) 0%,
        rgba(5, 25, 17, 0.68) 55%,
        rgba(5, 25, 17, 0.25) 100%
    );
}

.inner-hero-gallery {
    background-image: url('/assets/gallery/gallery-hero.jpg');
}

.inner-hero-blog {
    background-image: url('/assets/golf_simulator.jpg');
}

.inner-hero-content {
    width: 100%;
}

.inner-hero h1 {
    max-width: 880px;
    margin-bottom: 24px;
    font-size: clamp(3.7rem, 8vw, 7.4rem);
}

.inner-hero-content > p:not(.eyebrow) {
    max-width: 620px;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 1.13rem;
}


/* =========================================================
   PAGE INTRO
   ========================================================= */

.inner-intro {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 55px;
    align-items: end;
    margin-bottom: 46px;
}

.inner-intro h2 {
    margin: 0;
}

.inner-intro > p {
    max-width: 400px;
    color: var(--muted);
    font-size: 1.03rem;
}

.gallery-page-section,
.blog-page-section {
    background: var(--paper);
}


/* =========================================================
   GALLERY
   ========================================================= */

.masonry {
    columns: 3 280px;
    column-gap: 18px;
}

.masonry-item {
    margin: 0 0 18px;
    break-inside: avoid;
    overflow: hidden;
    background: var(--cream);
    border-radius: 8px;
}

.masonry-item .thumb {
    display: block;
    overflow: hidden;
    cursor: zoom-in;
}

.masonry-item picture,
.masonry-item img {
    display: block;
    width: 100%;
    height: auto;
}

.masonry-item img {
    transition: transform 0.35s ease;
}

.masonry-item:hover img {
    transform: scale(1.025);
}


/* =========================================================
   GALLERY LIGHTBOX
   ========================================================= */

.sk-lightbox[hidden] {
    display: none !important;
}

.sk-lightbox {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 70px 80px;
    color: #fff;
    background: rgba(4, 14, 10, 0.97);
}

.sk-lightbox img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(100dvh - 140px);
    object-fit: contain;
}

.sk-lightbox button {
    position: absolute;
    z-index: 10;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    color: #fff;
    background: rgba(20, 44, 33, 0.88);
    cursor: pointer;
    font-size: 22px;
}

.lb-prev,
.lb-next {
    top: 50%;
    transform: translateY(-50%);
}

.lb-prev {
    left: 18px;
}

.lb-next {
    right: 18px;
}

.lb-close {
    top: 18px;
    right: 18px;
}

.lb-count {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
}

body.lightbox-open {
    overflow: hidden;
}


/* =========================================================
   BLOG
   ========================================================= */

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.blog-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 45px rgba(11, 31, 23, 0.10);
}

.blog-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.blog-card-image {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #1c3b2c;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.04);
}

.blog-image-fallback {
    display: grid;
    place-items: center;
    color: #d7c39d;
    font-family: var(--serif);
    font-size: 1.6rem;
}

.blog-card-body,
.blog-card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 27px;
}

.blog-card-meta,
.blog-meta {
    margin-bottom: 12px;
    color: var(--fairway);
    font-size: 0.77rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.blog-card h3 {
    margin: 0 0 14px;
    font-family: var(--serif);
    font-size: 1.55rem;
    line-height: 1.2;
}

.blog-card h3 a {
    text-decoration: none;
}

.blog-card h3 a:hover,
.blog-read:hover {
    text-decoration: underline;
}

.blog-card-excerpt,
.blog-excerpt {
    flex: 1;
    color: var(--muted);
    font-size: 0.94rem;
}

.blog-card-read,
.blog-read {
    margin-top: auto;
    color: var(--fairway);
    font-weight: 700;
    text-decoration: none;
}

.blog-loading,
.blog-error,
.blog-status {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 1rem;
}

.blog-load-wrap,
.blog-more {
    margin-top: 42px;
    text-align: center;
}


/* =========================================================
   BOTTOM CALL TO ACTION
   ========================================================= */

.inner-bottom-cta {
    padding: 85px 20px;
    color: #fff;
    background: var(--green);
    text-align: center;
}

.inner-bottom-cta h2 {
    margin-bottom: 14px;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
}

.inner-bottom-cta p {
    margin-bottom: 26px;
    color: rgba(255, 255, 255, 0.76);
}


/* =========================================================
   NAVIGATION & ACCESSIBILITY
   ========================================================= */

.site-nav a[aria-current="page"] {
    color: var(--gold);
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 4px;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {
    .inner-hero {
        padding-top: 155px;
    }

    .inner-intro {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .blog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {
    .inner-hero {
        min-height: 500px;
        padding: 135px 0 65px;
    }

    .inner-hero h1 {
        font-size: clamp(3.25rem, 13vw, 5rem);
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .masonry {
        columns: 1;
    }

    .sk-lightbox {
        padding: 65px 10px;
    }

    .sk-lightbox img {
        max-height: calc(100dvh - 155px);
    }

    .lb-prev {
        left: 8px;
    }

    .lb-next {
        right: 8px;
    }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    .masonry-item img,
    .blog-card,
    .blog-card-image img {
        transition: none;
    }
}
