/* Header */
.site-header {
    padding: 1rem 0;
    /* Reduced padding slightly for fixed header */
    border-bottom: 1px solid #eee;
    margin-bottom: 0;
    /* Removed margin */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-color);
    z-index: 1000;
}

body {
    padding-top: 120px;
    /* Compensate for fixed header height */
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    margin: 0;
    font-size: 2.5rem;
    /* Increased size for script font */
    font-weight: 400;
    font-family: 'Pinyon Script', cursive;
    text-transform: none;
    /* Script fonts usually look bad in all caps */
    letter-spacing: 0;
    color: var(--accent-color);
}

.main-navigation {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 2rem;
}

/* Mosaic Grid */
.mosaic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    grid-auto-rows: 300px;
    grid-gap: 20px;
    grid-auto-flow: dense;
    /* Key for packing the grid tightly */
    padding-bottom: 2rem;
}

.site-main {
    padding-bottom: 4rem;
}

.grid-item {
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.grid-item:hover img {
    transform: scale(1.05);
}

/* Grid Variations */
.grid-item-large {
    grid-column: span 2;
    grid-row: span 2;
}

.grid-item-tall {
    grid-row: span 2;
}

@media (max-width: 768px) {
    .mosaic-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }

    .grid-item-large,
    .grid-item-tall {
        grid-column: span 1;
        grid-row: span 1;
    }
}

/* Overlay */
.post-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
}

.grid-item:hover .post-overlay {
    opacity: 1;
}

.entry-title {
    color: #fff;
    margin: 0;
    /* font-size: 2rem; */
    /* Increased size */
    font-weight: 400;
    font-family: 'Georgia', serif;
}

/* Single Post */
.single-post-content {
    padding: 4rem 0;
}

.entry-title-single {
    font-size: 4rem;
    /* Increased size */
    margin-bottom: 2rem;
    text-align: center;
    font-family: 'Georgia', serif;
    /* font-family: 'Pinyon Script', cursive; */
}

.entry-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

.entry-image {
    width: 100%;
    display: flex;
    justify-content: center;
}

.entry-image img {
    width: auto;
    max-width: 100%;
    height: auto;
    min-height: 40vh;
    /* At least 40% of viewport height */
    max-height: 85vh;
    object-fit: contain;
}

.entry-details {
    padding-top: 0;
    max-width: 800px;
    width: 100%;
    text-align: center;
}

.btn-inquiry {
    display: inline-block;
    background: transparent;
    color: var(--accent-color);
    padding: 0.8rem 2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2rem;
    border: 1px solid var(--accent-color);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-inquiry:hover {
    background: var(--accent-color);
    color: #fff;
}

@media (max-width: 768px) {
    .entry-content-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Newspaper Layout */
.newspaper-article {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

.newspaper-header {
    text-align: center;
    margin-bottom: 3rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 1rem;
}

.newspaper-title {
    font-family: 'Pinyon Script', cursive;
    font-size: 5rem;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.newspaper-meta {
    font-family: var(--font-main);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
}

.newspaper-featured-image {
    margin: 0 auto 3rem auto;
    /* width: 50%; */
}

.newspaper-featured-image img {
    width: 100%;
    height: auto;
    filter: saturate(50%);
    /* Optional: Adds to the newspaper vibe */
}

.newspaper-caption {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.5rem;
    font-style: italic;
}

.newspaper-content {
    column-count: 3;
    column-gap: 3rem;
    column-rule: 1px solid #ddd;
    font-family: 'Georgia', serif;
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: justify;
}

/* Drop Cap */
.newspaper-content>p:first-of-type::first-letter {
    font-size: 4rem;
    float: left;
    line-height: 0.8;
    margin-right: 0.5rem;
    font-weight: bold;
}

/* Images inside content */
.newspaper-content img {
    margin: 1rem 0;
    width: 100%;
    height: auto;
    break-inside: avoid;
}

.newspaper-content h2,
.newspaper-content h3 {
    break-after: avoid;
    font-family: var(--font-main);
    margin-top: 2rem;
    border-bottom: 1px solid #eee;
}

@media (max-width: 1024px) {
    .newspaper-content {
        column-count: 2;
    }
}

@media (max-width: 768px) {
    .newspaper-title {
        font-size: 2.5rem;
    }

    .newspaper-content {
        column-count: 1;
        text-align: left;
    }
}

/* Pagination */
.posts-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    flex-direction: row-reverse;
    padding: 2rem 0;
    border-top: 1px solid #eee;
    margin-top: 2rem;
}

.posts-navigation .nav-previous,
.posts-navigation .nav-next {
    font-family: var(--font-main);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

/* Force center and size for content images (Postie, etc) */
.entry-content img,
.postie-attachment,
.aligncenter,
.alignleft,
.alignright {
    display: block;
    margin: 2rem auto;
    /* Center horizontally */
    max-width: 100%;
    height: auto;
    width: auto;
    min-height: 40vh;
    /* Ensure it's big enough */
    object-fit: contain;
    float: none !important;
    /* Override WP alignleft/right */
}

/* Specific fix for Postie containers if they are divs */
div.postie-attachment,
.postie-attachments {
    width: 100% !important;
    text-align: center;
    display: flex;
    justify-content: center;
}

.postie-attachments img {
    width: auto !important;
    /* Override HTML width attribute */
    height: auto !important;
    /* Override HTML height attribute */
    max-width: 100%;
    min-height: 50vh;
    /* Make it large */
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* Lightbox Styles */
#massimo-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
}

#massimo-lightbox.active {
    display: flex;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    z-index: 10000;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: none;
    border: none;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    padding: 0 1rem;
    transition: color 0.3s ease;
    outline: none;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    color: var(--accent-color);
}



.lightbox-prev {
    top: 50%;
    left: -60px;
    transform: translateY(-50%);
}

.lightbox-next {
    top: 50%;
    right: -60px;
    transform: translateY(-50%);
}

@media (max-width: 768px) {
    .lightbox-prev {
        left: -40px;
    }

    .lightbox-next {
        right: -40px;
    }
}

/* Standard Page */
.page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 0;
}

.page-content .entry-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Contact Form 7 Styles */
.wpcf7-form {
    max-width: 600px;
    margin: 0 auto;
    font-family: var(--font-main);
}

.wpcf7-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
}

.wpcf7-form-control-wrap {
    display: block;
    margin-bottom: 1.5rem;
}

.wpcf7-text,
.wpcf7-textarea,
.wpcf7-select,
.wpcf7-date,
.wpcf7-number {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    background: #fff;
    font-family: var(--font-main);
    font-size: 1rem;
    color: var(--text-color);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    /* Ensure padding doesn't overflow width */
}

.wpcf7-text:focus,
.wpcf7-textarea:focus,
.wpcf7-select:focus,
.wpcf7-date:focus,
.wpcf7-number:focus {
    border-color: var(--accent-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(169, 101, 33, 0.1);
    /* Subtle glow using accent color */
}

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

/* Checkboxes & Radio Buttons */
.wpcf7-checkbox .wpcf7-list-item,
.wpcf7-radio .wpcf7-list-item {
    display: inline-block;
    margin-right: 1.5rem;
    margin-bottom: 0.5rem;
}

.wpcf7-checkbox input[type="checkbox"],
.wpcf7-radio input[type="radio"] {
    margin-right: 0.5rem;
    accent-color: var(--accent-color);
    /* Modern browser support */
}

.wpcf7-checkbox .wpcf7-list-item-label,
.wpcf7-radio .wpcf7-list-item-label {
    font-size: 0.95rem;
}

/* Submit Button */
.wpcf7-submit {
    display: inline-block;
    background: transparent;
    color: var(--accent-color);
    padding: 0.8rem 2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid var(--accent-color);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
    width: auto;
    min-width: 200px;
}

.wpcf7-submit:hover {
    background: var(--accent-color);
    color: #fff;
}

/* Validation Errors */
.wpcf7-not-valid-tip {
    font-size: 0.8rem;
    color: #d00;
    margin-top: 0.2rem;
}

.wpcf7-response-output {
    border: 1px solid var(--accent-color) !important;
    padding: 1rem !important;
    margin: 2rem 0 !important;
    text-align: center;
    font-size: 0.9rem;
}

/* Language Switcher */
.lang-switcher-placeholder {
    margin-left: 2rem;
}

.wpm-language-switcher {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1rem;
}

.wpm-language-switcher li {
    display: inline-block;
}

.wpm-language-switcher li a {
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    color: var(--text-color);
}

.wpm-language-switcher li.active a,
.wpm-language-switcher li a:hover {
    color: var(--accent-color);
    text-decoration: none;
}