/*
Theme Name: Golf Website
Theme URI:
Author: Madeleine Gronroos
Author URI:
Description: A custom theme for a golf website
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: golf-website
*/

/* Reset & Base Styles */
html {
    scrollbar-gutter: stable;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-primary: #1a472a;      /* Dark green */
    --color-secondary: #2d5a3d;    /* Medium green */
    --color-accent: #c9a227;       /* Gold */
    --color-light: #f5f5f0;        /* Off-white */
    --color-dark: #1a1a1a;         /* Near black */
    --color-white: #ffffff;
    --color-text: #333333;         /* Body text */
    --color-heading: #1a472a;      /* Heading text */
    --color-link: #c9a227;         /* Link color */
    --color-link-hover: #a88620;   /* Link hover color */
    --color-footer-bg: #1a472a;    /* Footer background */
    --color-footer-text: #ffffff;  /* Footer text */
    --font-primary: 'Georgia', serif;
    --font-secondary: 'Arial', sans-serif;
}

body {
    font-family: var(--font-secondary);
    font-size: 20px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-white);
}

a {
    color: var(--color-link);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-link-hover);
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--color-heading);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }

p {
    margin-bottom: 1rem;
}

/* Inline text formatting - ensure these work everywhere */
strong,
b,
.entry-content strong,
.entry-content b {
    font-weight: 700 !important;
}

em,
i,
.entry-content em,
.entry-content i {
    font-style: italic !important;
}

u,
.entry-content u {
    text-decoration: underline !important;
}

s,
strike,
del,
.entry-content s,
.entry-content strike,
.entry-content del {
    text-decoration: line-through !important;
}

mark,
.entry-content mark {
    background-color: #ffff00;
    padding: 0 0.2em;
}

/* Layout */
.container {
    width: 100%;
    max-width: 1526px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (min-width: 1200px) {
    .container {
        padding: 0 40px;
    }
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    padding: 0;
    margin: 0;
    z-index: 10001;
    background-color: var(--color-primary);
    border: none;
    border-bottom: none;
}

/* Solid background when scrolled — color set via Customizer inline styles */

/* Header inner - full width layout */
.header-inner {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 30px 0 0;
}

/* Hide site title - using logo only */
.site-title {
    display: none;
}

.site-title a {
    color: var(--color-white);
    text-decoration: none;
}

.site-title a:hover {
    color: var(--color-accent);
}

/* Logo - positioned at left edge by default */
.site-logo {
    flex-shrink: 0;
}

.site-logo img,
.site-logo .custom-logo {
    height: 100px;
    width: auto;
    display: block;
}

/* SVG logos need explicit dimensions since they have no intrinsic size */
.site-logo img[src$=".svg"] {
    height: 100px;
    width: auto;
}

.site-logo a {
    display: block;
}

/* ==========================================================================
   BURGER MENU BUTTON
   ========================================================================== */

.burger-menu-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    position: relative;
    z-index: 1;
}

.burger-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 36px;
    height: 26px;
    position: relative;
}

.burger-line {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--color-white);
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

.burger-text {
    color: var(--color-white);
    font-size: 1.125rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: opacity 0.3s ease;
}

/* Stack both labels so button always keeps the wider label's width */
.burger-text-wrapper {
    position: relative;
    display: grid;
}

.burger-text-wrapper .burger-text {
    grid-area: 1 / 1;
}

/* Show open label, hide close label by default */
.burger-text--close {
    opacity: 0;
}

.burger-text--open {
    opacity: 1;
}

/* When menu is open: show close label, hide open label */
body.menu-open .burger-text--open {
    opacity: 0;
}

body.menu-open .burger-text--close {
    opacity: 1;
}

/* Animate burger lines into X when menu is open */
body.menu-open .burger-line:nth-child(1) {
    transform: translateY(11.5px) rotate(45deg);
}

body.menu-open .burger-line:nth-child(2) {
    opacity: 0;
}

body.menu-open .burger-line:nth-child(3) {
    transform: translateY(-11.5px) rotate(-45deg);
}

.burger-menu-toggle:hover .burger-line {
    background-color: var(--color-accent);
}

.burger-menu-toggle:hover .burger-text {
    color: var(--color-accent);
}

/* ==========================================================================
   QUICK LINKS BAR
   ========================================================================== */

.quick-links__items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    margin: 0;
    padding: 0;
}

.quick-links__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    width: 72px;
    height: 72px;
    background-color: var(--color-white);
    color: var(--color-primary);
    transition: opacity 0.2s ease;
    border-radius: 6px;
}

.quick-links__item:hover,
.quick-links__item:focus {
    opacity: 0.85;
    color: var(--color-accent);
}

.quick-links__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
}

.quick-links__icon img,
.quick-links__icon svg {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.quick-links__label {
    font-size: 0.45rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    white-space: nowrap;
    text-align: center;
    line-height: 1.2;
}

/* Desktop: inline in header, left side after logo */
.quick-links--desktop {
    display: flex;
    align-items: center;
    margin-left: 1rem;
    margin-right: auto;
}

/* Mobile: hidden on desktop */
.quick-links--mobile {
    display: none;
}

/* Hide mobile bar when menu overlay is open */
body.menu-open .quick-links--mobile {
    display: none !important;
}

@media (max-width: 768px) {
    .quick-links--desktop {
        display: none;
    }

    .quick-links--mobile {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 9999;
        background-color: var(--color-white);
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
        padding: 0.4rem 0;
    }

    .quick-links--mobile .quick-links__items {
        display: flex;
        grid-template-columns: none;
        justify-content: space-around;
    }

    .quick-links--mobile .quick-links__item {
        width: auto;
        height: auto;
        padding: 0.6rem 0.5rem;
        flex: 1;
        border-right: 1px solid rgba(0, 0, 0, 0.1);
    }

    .quick-links--mobile .quick-links__item:last-child {
        border-right: none;
    }

    .quick-links--mobile .quick-links__icon img,
    .quick-links--mobile .quick-links__icon svg {
        width: 38px;
        height: 38px;
    }

    .quick-links--mobile .quick-links__label {
        font-size: 0.6rem;
    }

    body {
        padding-bottom: 80px;
    }
}

/* ==========================================================================
   FULL SCREEN MENU OVERLAY
   ========================================================================== */

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--color-primary);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .menu-overlay {
        bottom: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

.menu-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* Adjust for WordPress admin bar */
body.admin-bar .menu-overlay {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .menu-overlay {
        top: 46px;
    }
}

/* Menu Overlay Header */
.menu-overlay__header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 30px 0.5rem 0;
}

.menu-overlay__header .site-logo {
    visibility: hidden;
}

.menu-overlay__header .site-logo img,
.menu-overlay__header .site-logo .custom-logo {
    max-height: 100px;
    width: auto;
}



/* Partner Logo - always top left corner */
.menu-partner-logo {
    flex-shrink: 0;
    padding-left: 30px;
    position: relative;
    z-index: 1;
}

.header-inner .menu-partner-logo {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.menu-partner-logo img {
    max-height: 60px;
    width: auto;
    display: block;
}

.menu-partner-logo a {
    display: block;
}

/* Menu Navigation */
.menu-overlay__nav {
    padding: 3rem 40px 5rem;
}

/* Menu Columns Layout */
.menu-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
}

.menu-column {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

/* Top Level Pages as H1 */
.menu-column__title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-accent);
}

.menu-column__title a {
    color: var(--color-white);
    text-decoration: none;
    transition: color 0.3s ease;
}

.menu-column__title a:hover {
    color: var(--color-accent);
}

/* Child Pages List */
.menu-column__children {
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu-column__children li {
    margin-bottom: 0.5rem;
}

.menu-column__children a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    text-decoration: none;
    transition: color 0.3s ease, padding-left 0.3s ease;
    display: block;
    padding: 0.25rem 0;
}

.menu-column__children a:hover {
    color: var(--color-accent);
    padding-left: 0.5rem;
}

/* Body class when menu is open */
body.menu-open {
    overflow: hidden;
}

body.menu-open .site-header::before,
body.menu-open .site-header::after {
    display: none;
}

/* Responsive Menu */
@media (max-width: 1024px) {
    .menu-columns {
        gap: 2rem;
    }

    .menu-column {
        min-width: 180px;
    }

    .menu-column__title {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .menu-overlay__nav {
        padding: 1.5rem 20px 3rem;
    }

    .menu-columns {
        flex-direction: column;
        gap: 2rem;
    }

    .menu-column {
        max-width: 100%;
    }

    .menu-column__title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .menu-column__children a {
        font-size: 1rem;
    }

    .burger-text {
        display: none;
    }
}

/* ==========================================================================
   BREADCRUMBS - Minimal/Elegant Style
   ========================================================================== */

.breadcrumbs {
    padding: 1.5rem 0 1rem;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.breadcrumbs a {
    color: #888;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumbs a:hover {
    color: var(--color-primary);
}

.breadcrumb-separator {
    margin: 0 0.75rem;
    color: #ccc;
}

.breadcrumb-current {
    color: var(--color-primary);
    font-weight: 600;
}

/* ==========================================================================
   PAGE LAYOUT
   ========================================================================== */

.entry-header {
    text-align: center;
}

.page-layout {
    display: block;
    padding: 2rem 0;
    max-width: 1200px;
    margin: 0 auto;
}

.page-layout.has-sidebar {
    max-width: none;
    margin: 0;
}

/* Child page layout with sidebar */
.page-layout.has-sidebar {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 3rem;
}

.page-sidebar {
    order: 1;
}

.page-content {
    min-width: 0;
    order: 0;
    overflow-x: auto;
}

/* Tables */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.entry-content table th,
.entry-content table td {
    padding: 0.6rem 0.8rem;
    border: 1px solid #ddd;
    text-align: left;
}

.entry-content table th {
    background-color: var(--color-primary);
    color: #fff;
    font-weight: 600;
}

.entry-content table tr:nth-child(even) {
    background-color: #f8f8f8;
}

/* Make tables scrollable on mobile */
.entry-content .wp-block-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.entry-content .wp-block-table table {
    min-width: 500px;
}

/* ==========================================================================
   CHILD PAGE SIDEBAR
   ========================================================================== */

.child-pages-menu {
    background-color: var(--color-light);
    padding: 1.5rem;
    border-radius: 8px;
    position: sticky;
    top: 100px;
    height: fit-content;
}

.child-pages-title {
    font-size: 1rem;
    color: var(--color-primary);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.child-pages-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.child-pages-menu li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.child-pages-menu li:last-child {
    border-bottom: none;
}

.child-pages-menu a {
    display: block;
    padding: 0.75rem 0;
    padding-left: 1rem;
    color: var(--color-primary);
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    text-decoration: none;
}

.child-pages-menu a:hover {
    border-left-color: var(--color-accent);
    background: rgba(255, 255, 255, 0.5);
    color: var(--color-accent);
}

.child-pages-menu .current-page a {
    border-left-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.7);
    color: var(--color-primary);
    font-weight: 600;
}

.child-pages-menu .page-title {
    display: block;
    font-size: 0.95rem;
}

.child-pages-menu .page-excerpt {
    display: block;
    font-size: 0.8rem;
    color: #888;
    margin: 0.15rem 0 0 0;
    font-weight: 400;
}

/* Responsive: Page layout on mobile */
@media (max-width: 768px) {
    .page-layout {
        padding: 1.5rem 0;
    }

    .entry-content table {
        font-size: 0.8rem;
    }

    .entry-content table th,
    .entry-content table td {
        padding: 0.4rem 0.5rem;
    }

    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.3rem; }

    .page-layout.has-sidebar {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .page-sidebar {
        order: -1;
    }

    .child-pages-menu {
        position: static;
    }
}

/* ==========================================================================
   CHILD PAGES GRID (auto on top-level pages)
   ========================================================================== */

.child-pages-grid {
    margin-top: 3rem;
}

.child-pages-grid__items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.child-pages-grid__item {
    overflow: hidden;
    background-color: var(--color-primary);
    border-radius: 12px;
    transition: background-color 0.3s ease;
}

.child-pages-grid__item:hover {
    background-color: var(--color-secondary);
}

a.child-pages-grid__link,
a.child-pages-grid__link:hover,
a.child-pages-grid__link:visited {
    display: block;
    text-decoration: none;
    color: inherit;
}

.child-pages-grid__content {
    padding: 2rem 5rem 2rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.child-pages-grid__title {
    font-size: 1.5rem;
    line-height: 1.3;
    margin: 0 0 1rem 0;
    color: var(--color-white);
}

.child-pages-grid__excerpt {
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 0;
    color: var(--color-white);
    opacity: 0.85;
}

.child-pages-grid__arrow {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-accent);
    opacity: 0.6;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.child-pages-grid__item:hover .child-pages-grid__arrow {
    opacity: 1;
    transform: translateY(-50%) translateX(6px);
}

@media (max-width: 768px) {
    .child-pages-grid__content {
        padding: 1.5rem 4rem 1.5rem 1.5rem;
    }

    .child-pages-grid__title {
        font-size: 1.25rem;
    }
}

/* Main Content */
.site-main {
    padding: 0;
    margin: 0;
}

/* Front page - pull content up to meet header seamlessly */
.site-main.front-page {
    margin-top: 0;
    padding-top: 0;
}

.site-main.front-page > *:first-child:not(.cta-bar) {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Remove gap between header and first block */
.site-main {
    margin-top: 0 !important;
}

.site-main > *:first-child,
.entry-content > *:first-child,
.site-main .hero:first-child,
.entry-content .hero:first-child,
.wp-site-blocks > *:first-child {
    margin-top: 0 !important;
    margin-block-start: 0 !important;
}

/* Ensure hero block has no top margin */
.hero,
.wp-block-golf-website-hero {
    margin-top: 0 !important;
    margin-block-start: 0 !important;
}

/* Remove WordPress default block gap from first element */
.is-layout-flow > *:first-child {
    margin-block-start: 0 !important;
}

/* WordPress block editor spacing overrides */
.wp-block-post-content > *:first-child,
.is-root-container > *:first-child,
body .is-layout-constrained > *:first-child,
body .is-layout-flow > *:first-child {
    margin-top: 0 !important;
    margin-block-start: 0 !important;
}

/* Override WordPress default content width */
.entry-content,
.wp-block-post-content,
body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
    max-width: 100% !important;
}

body .is-layout-constrained > .alignwide {
    max-width: 100% !important;
}

/* Page wrapper - no gaps */
#page.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#page.site > * {
    flex-shrink: 0;
}

.site-main,
#page.site > .container {
    flex: 1;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
    background-color: var(--color-footer-bg);
    color: var(--color-footer-text);
}

.site-footer a {
    color: var(--color-footer-text);
}

.site-footer a:hover {
    color: var(--color-accent);
}

/* Footer Main Content */
.footer-main {
    padding: 3rem 0 2rem;
}

.footer-columns {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2.5rem;
}

.footer-col {
    flex: 1;
    min-width: 0;
}

/* Footer Site Logo - inherits size from header logo customizer setting */
.footer-site-logo img,
.footer-site-logo .custom-logo {
    width: auto;
    display: block;
}

.footer-site-logo a {
    display: block;
}

.footer-site-name a {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-footer-text);
    text-decoration: none;
}

/* Footer Contact Info */
.footer-contact {
    font-size: 0.95rem;
    line-height: 1.8;
    opacity: 0.85;
}

.footer-contact__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-footer-text);
    margin-bottom: 0.5rem;
    opacity: 1;
}

/* Social Icons */
.footer-social {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-social__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--color-footer-text);
    transition: border-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.footer-social__icon:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    transform: scale(1.1);
}

/* Footer Partner Logo */
.footer-partner-logo img {
    max-height: 60px;
    width: auto;
    display: block;
}

.footer-partner-logo a {
    display: block;
}

/* Footer Bottom Bar */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding: 1.25rem 0;
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.7;
}

@media (max-width: 768px) {
    .footer-main {
        padding: 2rem 0 1.5rem;
    }

    .footer-columns {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 2rem;
    }

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

    .footer-partner-logo {
        display: flex;
        justify-content: center;
    }
}

/* WordPress Classes */
.alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.aligncenter {
    display: block;
    margin: 1rem auto;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: 0.875rem;
    color: #666;
    text-align: center;
}

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

/* ==========================================================================
   BLOG GRID (posts archive)
   ========================================================================== */

.blog-header {
    margin-bottom: 2rem;
}

.blog-header__title {
    font-size: 2rem;
    color: var(--color-heading);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 1fr;
    gap: 2rem;
}

.blog-grid__item {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--color-white);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-grid__item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

a.blog-grid__link,
a.blog-grid__link:hover,
a.blog-grid__link:visited {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.blog-grid__image {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.blog-grid__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-grid__item:hover .blog-grid__image img {
    transform: scale(1.05);
}

.blog-grid__image--placeholder {
    background-color: var(--color-secondary);
}

.blog-grid__content {
    flex: 1;
    padding: 1.25rem 1.5rem 1.5rem;
}

.blog-grid__title {
    font-size: 1.25rem;
    line-height: 1.3;
    margin: 0 0 0.5rem 0;
    color: var(--color-heading);
}

.blog-grid__meta {
    font-size: 0.8125rem;
    color: #888;
    margin-bottom: 0.75rem;
}

.blog-grid__excerpt {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--color-text);
    opacity: 0.85;
}

/* Blog List */
/* Category filter */
.blog-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.blog-filter__item {
    display: inline-block;
    padding: 0.5em 1.25em;
    font-family: var(--font-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    border-radius: 999px;
    color: var(--color-text);
    background: var(--color-light, #f5f5f0);
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.blog-filter__item:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.blog-filter__item.is-active {
    background-color: var(--color-primary);
    color: var(--color-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Blog list */
.blog-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.blog-list__item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.blog-list__item:first-child {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

a.blog-list__link,
a.blog-list__link:visited,
div.blog-list__link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s ease;
}

a.blog-list__link:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.blog-list__date {
    flex-shrink: 0;
    font-size: 0.8125rem;
    color: #888;
    min-width: 7rem;
}

.blog-list__title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-heading);
    flex: 1;
    min-width: 0;
}

a.blog-list__link:hover .blog-list__title {
    color: var(--color-accent, #c9a227);
}

@media (max-width: 600px) {
    a.blog-list__link,
    div.blog-list__link {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .blog-list__date {
        width: 100%;
    }

    .blog-list__title {
        font-size: 1rem;
    }
}

/* Pagination */
.blog-pagination {
    margin-top: 3rem;
    text-align: center;
}

.blog-pagination .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.blog-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--color-text);
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.blog-pagination .page-numbers:hover {
    background-color: var(--color-light);
}

.blog-pagination .page-numbers.current {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.blog-pagination .prev,
.blog-pagination .next {
    font-size: 1.25rem;
    width: auto;
    padding: 0 0.75rem;
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    .blog-grid__title {
        font-size: 1.1rem;
    }

    .blog-grid__excerpt {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* ==========================================================================
   SINGLE POST
   ========================================================================== */

main.single-post {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

.single-post__header {
    margin-bottom: 2rem;
}

.single-post__title {
    font-size: 2.25rem;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.single-post__meta {
    font-size: 0.9rem;
    color: #888;
}

.single-post__separator {
    margin: 0 0.5rem;
}

/* Author Role Badge */
.author-role-badge {
    display: inline-block;
    background-color: var(--color-accent, #c9a227);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2em 0.7em;
    border-radius: 999px;
    text-decoration: none;
    margin-left: 0.5rem;
    vertical-align: middle;
    transition: background-color 0.2s ease;
}

.author-role-badge:hover {
    background-color: var(--color-secondary, #2d5a3d);
    color: #ffffff;
}

.single-post__thumbnail {
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
}

.single-post__thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.single-post__footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

.single-post__footer .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.single-post__footer .nav-previous,
.single-post__footer .nav-next {
    flex: 1;
}

.single-post__footer .nav-next {
    text-align: right;
}

.single-post__footer a {
    color: var(--color-primary);
    font-size: 0.9rem;
}

.single-post__footer a:hover {
    color: var(--color-secondary);
}

/* Responsive: Single post on mobile */
@media (max-width: 768px) {
    main.single-post {
        padding: 1.5rem 0;
    }

    .single-post__title {
        font-size: 1.6rem;
    }

    .single-post__header {
        margin-bottom: 1.5rem;
    }

    .single-post__thumbnail {
        margin-bottom: 1.5rem;
        border-radius: 8px;
    }

    .single-post__footer {
        margin-top: 2rem;
        padding-top: 1.5rem;
    }

    .single-post__footer .nav-links {
        flex-direction: column;
        gap: 1rem;
    }

    .single-post__footer .nav-next {
        text-align: left;
    }
}

/* ==========================================================================
   HERO BLOCK
   ========================================================================== */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero__background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('https://images.unsplash.com/photo-1587174486073-ae5e5cff23aa?w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(26, 71, 42, 0.85) 0%,
        rgba(26, 71, 42, 0.6) 50%,
        rgba(26, 71, 42, 0.4) 100%
    );
}

.hero__content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Title Box */
.hero__title-box {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 2.5rem 3rem;
    text-align: center;
}

.hero__title {
    font-family: var(--font-primary);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    color: var(--color-primary);
    margin: 0 0 0.5rem 0;
    letter-spacing: 0.02em;
}

.hero__slogan {
    font-family: var(--font-primary);
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-style: italic;
    color: var(--color-accent);
    margin: 0;
    letter-spacing: 0.05em;
}

/* Description Box */
.hero__description-box {
    background-color: rgba(201, 162, 39, 0.95);
    padding: 1.5rem 2rem;
    text-align: center;
}

.hero__description {
    font-family: var(--font-secondary);
    font-size: clamp(1rem, 2vw, 1.125rem);
    line-height: 1.7;
    color: var(--color-dark);
    margin: 0;
}

/* Page Hero (smaller than front page) */
.hero--page {
    min-height: 40vh;
}

.hero--page .hero__overlay {
    background: linear-gradient(
        135deg,
        rgba(26, 71, 42, 0.9) 0%,
        rgba(26, 71, 42, 0.7) 100%
    );
}

.hero--page .hero__title-box {
    background-color: transparent;
    padding: 1.5rem 2rem;
}

.hero--page .hero__title {
    color: var(--color-white);
    font-size: clamp(2rem, 5vw, 3rem);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero {
        min-height: 80vh;
    }

    .hero--page {
        min-height: 30vh;
    }

    .hero__content {
        padding: 1rem;
        gap: 1.5rem;
    }

    .hero__title-box {
        padding: 2rem 1.5rem;
    }

    .hero--page .hero__title-box {
        padding: 1rem 1.5rem;
    }

    .hero__description-box {
        padding: 1.25rem 1.5rem;
    }
}

/* ==========================================================================
   PAGE HERO (from Customizer)
   ========================================================================== */

.page-hero {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.page-hero__background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.page-hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.page-hero__content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem;
    max-width: 900px;
}

.page-hero__title {
    font-family: var(--font-primary);
    font-size: 3rem;
    font-weight: 400;
    color: #ffffff;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.02em;
}

@media (max-width: 768px) {
    .page-hero__title {
        font-size: 2rem;
    }

    .page-hero__content {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .page-hero__title {
        font-size: 1.75rem;
    }
}

/* ==========================================================================
   CONTACT FORM 7 STYLES
   ========================================================================== */

.wpcf7 {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.wpcf7-form p {
    margin-bottom: 1.25rem;
}

.wpcf7-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-heading);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="url"],
.wpcf7-form input[type="number"],
.wpcf7-form textarea,
.wpcf7-form select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: var(--font-secondary);
    font-size: 1rem;
    color: var(--color-text);
    background-color: var(--color-white);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form input[type="tel"]:focus,
.wpcf7-form input[type="url"]:focus,
.wpcf7-form input[type="number"]:focus,
.wpcf7-form textarea:focus,
.wpcf7-form select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 15%, transparent);
}

.wpcf7-form textarea {
    min-height: 160px;
    resize: vertical;
}

.wpcf7-form input[type="submit"] {
    display: inline-block;
    padding: 0.75rem 2.5rem;
    font-family: var(--font-secondary);
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-white);
    background-color: var(--color-primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: background-color 0.2s ease;
}

.wpcf7-form input[type="submit"]:hover {
    background-color: var(--color-secondary);
}

/* Validation messages */
.wpcf7-not-valid-tip {
    color: #d32f2f;
    font-size: 0.8125rem;
    margin-top: 0.25rem;
}

.wpcf7-form .wpcf7-not-valid {
    border-color: #d32f2f;
}

.wpcf7-response-output {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9375rem;
    margin-top: 1.5rem;
}

.wpcf7-form.sent .wpcf7-response-output {
    border-color: var(--color-primary);
    background-color: rgba(26, 71, 42, 0.06);
    color: var(--color-primary);
}

.wpcf7-form.failed .wpcf7-response-output,
.wpcf7-form.aborted .wpcf7-response-output {
    border-color: #d32f2f;
    background-color: rgba(211, 47, 47, 0.06);
    color: #d32f2f;
}
