/**
 * Festival Wire Styles
 * Modern grid layout for music festival news
 */

/* General Styles */
.main-content.festival-wire-page {
    width: 100%;
    margin: 0 auto;
    float: none;
}

/* Header and Filter Styles */
.festival-wire-page .page-header {
    margin-bottom: 2rem;
    text-align: center;
}

.festival-wire-page .page-header .page-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    margin-left: auto;
    margin-right: auto;
    width: max-content;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.archive-description {
    font-size: 1.1rem;
    color: var(--muted-text);
    margin-bottom: 1.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Filter Controls */
.festival-filter-controls {
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem auto;
    max-width: 900px;
    box-shadow: var(--card-shadow);
}

.festival-filter-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.filter-dropdowns {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 220px;
    flex: 1;
}

.filter-label {
    font-size: var(--font-size-base);
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.filter-input {
    width: 100%;
}

.festival-dropdown,
.location-dropdown {
    background-color: var(--background-color);
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 0.95rem;
    width: 100%;
    color: var(--text-color);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

.filter-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.filter-button {
    background-color: #0b5394;
    color: #fff;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 5px;
    font-size: var(--font-size-base);
    cursor: pointer;
    transition: background-color 0.2s ease;
    min-width: 140px;
    text-align: center;
}

.filter-button:hover {
    background-color: #083b6c;
}

.filter-reset {
    font-size: 0.95rem;
    color: var(--muted-text);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.filter-reset:hover {
    color: var(--link-color);
}

/* Grid Layout */
.festival-wire-grid-container {
    margin-bottom: 3rem;
}

.festival-wire-page article{
    margin-bottom: 0;
    padding-top: 0;
    border: 1px solid var(--border-color);
}

.festival-wire-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Card Styles */
.festival-wire-card {
    background-color: var(--card-background);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--border-color);
    margin-bottom: 0;
    position: relative;
}

.festival-wire-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-hover-shadow);
}

.festival-wire-card-image {
    position: relative;
    overflow: hidden;
    padding-top: 56.25%; /* 16:9 aspect ratio */
}

.festival-wire-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    margin-bottom: 0;
}

.festival-wire-card:hover .festival-wire-card-image img {
    transform: scale(1.05);
}

.festival-wire-card-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    margin-bottom: 0;
}

.festival-tags {
    gap: 0.5rem;
}

.taxonomy-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    align-items: center;
    position: relative;
    z-index: 2;
}


.festival-wire-card h2 {
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.festival-wire-card h2 a {
    color: var(--post-title-link-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.festival-wire-card h2 a:hover {
    color: var(--post-title-link-hover-color);
    text-decoration: underline;
    text-decoration-color: var(--link-color);
}

.festival-wire-card .entry-meta {
    font-size: 0.85rem;
    color: var(--muted-text);
    margin-bottom: 0.75rem;
    padding-bottom: 0;
    display: block;
}

.festival-wire-card .entry-summary {
    font-size: 0.95rem;
    line-height: 1.5;
    flex-grow: 1;
    margin-bottom: 0;
}

.festival-wire-card .entry-summary p {
    margin-bottom: 0;
    color: var(--text-color);
}

/* Clickable Card Styles */
.festival-wire-card h2 a.card-link-target::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
}

/* Single Post Styles - Plugin-specific overrides only */
.festival-wire-single-post .post-thumbnail {
    position: relative;
}

.festival-wire-single-post .post-thumbnail img {
    width: 100%;
    height: auto;
    margin-bottom: 0;
}

.festival-wire-single-post .featured-image-caption {
    padding: 0.5rem 2rem;
    font-size: 0.85rem;
    color: var(--muted-text);
    text-align: center;
    font-style: italic;
}

#festival-wire-load-more{
    display: flex;
    margin: auto;
}

/* Related Festival Wire Posts - inherits from theme .related-tax-section */


/* Forum CTA Section */
.forum-cta-container {
    /* Use the main background color instead of card background for subtle difference */
    background-color: var(--background-color);
    border: 1px solid var(--border-color); /* Keep border consistent */
    border-radius: 10px;
    padding: 2rem;
    margin: 3rem auto 2rem;
    max-width: 800px;
    text-align: center;
    box-shadow: var(--card-shadow); /* Keep shadow for consistency */
}

.forum-cta-title {
    font-size: 1.6rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.forum-cta-description {
    font-size: var(--font-size-base);
    color: var(--muted-text);
    margin-bottom: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.forum-cta-link.button {
    display: inline-block;
    background-color: #0b5394; /* Keep solid button */
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-size: var(--font-size-base);
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease; /* Added color transition */
    cursor: pointer;
    border: 1px solid #0b5394;
    margin-top: 0.5rem;
}

.forum-cta-link.button:hover {
    background-color: #083b6c;
    border-color: #083b6c;
    color: #fff;
    text-decoration: none;
}

/* Pagination styling */
.wp-pagenavi {
    text-align: center;
    padding: 1rem 0;
}

.wp-pagenavi .page, .wp-pagenavi a {
    display: inline-block;
    margin: 0 0.25rem;
    padding: 0.5rem 0.75rem;
    border-radius: 5px;
    background-color: var(--card-background);
    color: var(--text-color);
    text-decoration: none;
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.wp-pagenavi .current {
    background-color: #0b5394;
    color: #fff;
    border-color: #0b5394;
}

/* Back to Archive Button Styling */
.festival-wire-back-button-container {
    text-align: center; /* Center the button */
    margin: 2rem 0; /* Add space above and below */
}

.festival-wire-back-button-container .cm-back-button {
    display: inline-block; /* Allows margin/padding and centering */
    background-color: #0b5394;
    color: #fff;
    padding: 0.75rem 1.5rem; /* Match other theme buttons */
    border-radius: 5px; /* Match other theme buttons */
    text-decoration: none;
    font-size: var(--font-size-base); /* Match filter button */
    font-weight: 500;
    transition: background-color 0.2s ease;
    cursor: pointer;
    border: none; /* Ensure no default border */
}

.festival-wire-back-button-container .cm-back-button:hover {
    background-color: #083b6c;
    color: #fff; /* Keep text color white on hover */
    text-decoration: none;
}

/* Responsive Styles */
@media screen and (max-width: 992px) {
    .festival-wire-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .page-header .page-title {
        font-size: 2.2rem;
    }
    
    .festival-wire-single-post h1 {
        font-size: 1.8rem;
    }
}

@media screen and (max-width: 768px) {
    .festival-wire-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 1rem;
    }
    
    .page-header .page-title {
        font-size: 1.8rem;
    }
    
    .archive-description {
        font-size: var(--font-size-base);
    }
    
    .festival-filter-controls {
        padding: 1.25rem;
    }
    
    .filter-dropdowns {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-actions {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }
    
    .filter-button {
        width: 100%;
    }
    
    .filter-reset {
        margin-bottom: 0.5rem;
    }
    
    .festival-dropdown,
    .location-dropdown {
        width: 100%;
    }
    
    .festival-wire-single-post h1 {
        font-size: 1.6rem;
    }
    
    .related-wire-title {
        font-size: var(--font-size-xl);
    }
}

@media screen and (max-width: 576px) {
    .festival-wire-grid {
        grid-template-columns: 1fr;
    }
    
    .festival-wire-card h2 {
        font-size: 1.2rem;
    }
    
    .festival-filter-controls {
        margin: 1rem 0;
    }
    
    .festival-wire-single-post h1 {
        font-size: 1.4rem;
    }
}

/* Ensure individual badge links are also positioned correctly */
.festival-wire-card .taxonomy-badges a,
.festival-wire-single-post .taxonomy-badges a {
    position: relative;
    z-index: 2;
}

/* ==========================================================================
   Festival Wire FAQ Section
   ========================================================================== */
.festival-wire-faq-container {
    background-color: var(--card-background); /* Match Forum CTA */
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 2rem;
    margin: 3rem auto 2rem;
    max-width: 800px; /* Match Forum CTA */
    box-shadow: var(--card-shadow);
}

.faq-section-title {
    font-size: 1.6rem; /* Match Forum CTA */
    margin-bottom: 1.5rem;
    color: var(--text-color);
    text-align: center;
}

.faq-accordion {
    border-top: 1px solid var(--border-color);
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
}

.faq-question {
    background-color: transparent;
    border: none;
    padding: 1rem 0;
    width: 100%;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-color);
    cursor: pointer;
    position: relative;
    padding-right: 2rem; /* Space for indicator */
    transition: color 0.2s ease;
}

.faq-question:hover,
.faq-question:focus {
    color: var(--link-color);
    outline: none;
}

.faq-question::after {
    content: '+'; /* Plus sign for collapsed */
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--muted-text);
    transition: transform 0.3s ease, color 0.2s ease;
}

.faq-question[aria-expanded="true"]::after {
    content: '−'; /* Minus sign for expanded */
    transform: translateY(-50%); /* Rotate can be jarring */
    color: var(--link-color);
}

.faq-answer {
    padding: 0 0 1rem 0; /* Padding bottom only when open */
    font-size: var(--font-size-base); /* Increased font size */
    line-height: 1.6;
    color: var(--text-color);
    overflow: hidden;
    max-height: 0;
    /* Removed transition from base state, handled in hidden/:not([hidden]) */
}

.faq-answer[hidden] {
    display: block; 
    visibility: hidden; 
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0; /* Ensure no margin when hidden */
    opacity: 0;
    transition: max-height 0.25s ease-in, /* Faster collapse */
                opacity 0.15s ease-in, /* Faster fade out */
                padding 0.25s ease-in,
                margin 0.25s ease-in;
}

.faq-answer:not([hidden]) {
    visibility: visible;
    max-height: 1000px; /* Adjust if needed for very long answers */
    padding-top: 0.5rem; 
    padding-bottom: 1rem;
    margin-top: 0.5rem; /* Add slight margin when open */
    opacity: 1;
    transition: max-height 0.35s ease-out, /* Smoother, slightly faster expand */
                opacity 0.25s ease-out 0.1s, /* Fade in during expand */
                padding 0.35s ease-out,
                margin 0.35s ease-out;
}

.faq-answer p {
    margin: 0;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

/* Last Updated Timestamp */
.festival-wire-last-updated {
    text-align: center;
    font-size: 0.85rem;
    color: var(--muted-text);
    margin-top: -1rem; /* Adjust spacing relative to header */
    margin-bottom: 2rem;
}
