/* Main Container */
.twinsWrap{
    width: 100%;
    max-width: none;
    margin: 0;
}

/* If anything (template / page builder / override) is adding Bootstrap's .container to the Twins wrapper,
   it will cap the width and add side padding. Neutralize that so it matches standard pages. */
.twinsWrap.container{
    max-width: none;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
}

/* Safety: if a nested .container exists inside the Twins output, don’t let it re-cap the width */
.twinsWrap .container{
    max-width: none;
}

/* Banner */
.twinsBanner {
    width: 100%;
    margin-bottom: 2rem;
}

.twinsBanner img {
    width: 100%;
    display: block;
}

/* Intro Section */
.twinsIntro {
    text-align: center;
    margin-bottom: 3rem;
}

.twinsIntro h1 {
    font-family: var(--lotus-head, "Oswald", sans-serif);
    font-size: 2.4rem;
    margin-bottom: 1.2rem;
    font-weight: normal;
}

.twinsIntro p {
    font-style: italic;
    color: #666;
}

/* Image Numbering - Reset counter for each grid */
.twinGrid-images {
    counter-reset: image-counter;
}

/* Display centered number above each image */
.twinGrid-images .twinItem::before {
    counter-increment: image-counter;
    content: counter(image-counter);
    display: block;
    text-align: center;
    font-family: var(--lotus-head, "Oswald", sans-serif);
    font-weight: 400;
    font-size: 1.3em;
    margin-bottom: 0.5em;
    color: #999;
}

.twinSetTitle {
    text-align: center;
    font-family: var(--lotus-head, "Oswald", sans-serif);
    font-weight: 400;
    font-size: 1.3em;
    margin: 0.5em 0 0 0;
    padding: 0.5em;
}

/* Quote */
/*blockquote {
    margin: 2rem auto;
    max-width: 700px;
    font-size: 1.2rem;
    color: #444;
    font-style: italic;
    border: none;
    padding: 0;
}*/

/*.twinsQuoteAuthor {
    font-style: normal;
    font-size: 0.9rem;
    color: #777;
    text-align: right;
    display: block;
    margin-top: 0.5rem;
}*/

.twinsInstruction {
    text-align: center;
    margin-bottom: 2rem;
    color: #555;
}

/* Filters */
.twinsFilters {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.filter-search input,
.filter-select select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-family: inherit;
    font-size: 0.95rem;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-primary {
    background: #5b9bd5;
    color: white;
}

.btn-primary:hover {
    background: var(--lg-ink-hover) !important;
}

.btn-secondary {
    background: #777;
    color: white;
}

.btn-secondary:hover {
    background: #666;
}

.twinsResults {
    text-align: center;
    margin-bottom: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.twinSet {
    margin-bottom: 3rem;
    border-top: 1px solid #ddd;
    padding-top: 2rem;
}

.setIntro {
    margin: 0 0 1.5rem;
    color: #555;
}

.twinGrid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    margin-bottom: 1.2rem;
}

.twinItem {
    text-align: center;
}

.twinPhoto {
    width: 100%;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.twinPhoto:hover {
    transform: scale(1.02);
}

/* Caption */
.twinCaption {
    margin-top: 0.8rem;
    font-size: 0.95rem;
    color: #444;
    text-align: left;
}

/* Captions – no hanging indent, keep basic spacing */
.twinCaption p {
    margin: 0.5em 0;
}

/* Metadata */
.twinsWrap .twinMeta {
    margin-top: 0.5rem;
    color: #666;
    text-align: left;

    /* Safari-safe size reduction */
    font-size: 16px;
    line-height: 1.25;
    transform: scale(0.85);
    transform-origin: left top;
}

.twinsWrap .twinMeta p {
    margin: 3px 0;
}

.twinsWrap .twinMeta strong {
    font-weight: 600;
    color: #555;
}

.pagination {
    display: flex;
    gap: 0.5rem;
}

.pagination a,
.pagination span {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s;
}

.pagination a:hover {
    background: #5b9bd5;
    color: white;
    border-color: #5b9bd5;
}

.pagination .active {
    background: #5b9bd5;
    color: white;
    border-color: #5b9bd5;
}

.pagination-info {
    color: #666;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 992px) {
    .twinsFilters {
        grid-template-columns: 1fr;
    }

    .filter-buttons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .twinsWrap {
        padding: 1rem;
    }

    .twinsIntro h1 {
        font-size: 1.8rem;
    }

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

    blockquote {
        font-size: 1.1rem;
        padding: 0 1rem;
    }

    .twinsPagination {
        flex-direction: column;
        text-align: center;
    }
}

/* FIX: com_twins page narrower than standard pages */
body.com_twins .container.inner-box{
    max-width: 1320px !important;
}