/* ========================================
   STORIA PATRIA CORE — Widget Styles
   Styles specific to custom Elementor widgets
   that supplement the theme CSS.
   ======================================== */

/* ── No Content Placeholder ── */
.sp-no-content {
    text-align: center;
    padding: 3rem 2rem;
    color: #999;
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: 1rem;
}

/* ── Pubblicazioni Grid ── */
.pub-grid {
    display: grid;
    gap: 1.5rem;
}

.pub-grid--2 { grid-template-columns: repeat(2, 1fr); }
.pub-grid--3 { grid-template-columns: repeat(3, 1fr); }
.pub-grid--4 { grid-template-columns: repeat(4, 1fr); }

.pub-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.06);
    transition: all 0.4s ease;
}

.pub-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(0,0,0,0.08);
}

.pub-card__cover {
    aspect-ratio: 5 / 7;
    overflow: hidden;
    background: #f5f3f0;
}

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

.pub-card:hover .pub-card__cover img {
    transform: scale(1.05);
}

.pub-card__cover--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #060606;
}

.pub-card__cover-text {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    color: #d4af37;
    font-weight: 400;
}

.pub-card__body {
    padding: 1.5rem;
}

.pub-card__type {
    font-family: 'Inter', sans-serif;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #d4af37;
    display: block;
    margin-bottom: 0.5rem;
}

.pub-card__title {
    font-family: 'Crimson Text', serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: #060606;
    line-height: 1.3;
    margin: 0 0 0.5rem;
}

.pub-card__author {
    font-family: 'Lora', serif;
    font-size: 0.875rem;
    color: #666;
    margin: 0 0 0.75rem;
}

.pub-card__meta {
    display: flex;
    gap: 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: #999;
}

/* ── Pubblicazioni List ── */
.pub-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.pub-list-item {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}

.pub-list-item:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.pub-list-item__cover {
    width: 120px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
}

.pub-list-item__cover img {
    width: 100%;
    height: auto;
    display: block;
}

.pub-list-item__type {
    font-family: 'Inter', sans-serif;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #d4af37;
    display: block;
    margin-bottom: 0.5rem;
}

.pub-list-item__title {
    font-family: 'Crimson Text', serif;
    font-size: 1.375rem;
    font-weight: 600;
    color: #060606;
    line-height: 1.3;
    margin: 0 0 0.5rem;
}

.pub-list-item__author {
    font-family: 'Lora', serif;
    font-size: 0.9375rem;
    color: #666;
    margin: 0 0 0.75rem;
}

.pub-list-item__excerpt {
    font-size: 0.9375rem;
    color: #444;
    line-height: 1.7;
    margin: 0 0 1rem;
}

.pub-list-item__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: #999;
}

/* ── Pubblicazioni Filter Bar ── */
.pub-filters {
    margin-bottom: 2rem;
}

/* ── Stat Card Variants ── */
.stat-card--gold {
    background: linear-gradient(135deg, #1a1a0e 0%, #2a2310 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.stat-card--gold .stat-card__number {
    color: #d4af37;
}

.stat-card--gold .stat-card__label {
    color: rgba(255,255,255,0.85);
}

.stat-card--gold .stat-card__detail {
    color: rgba(212, 175, 55, 0.6);
}

.stat-card--dark {
    background: #060606;
}

.stat-card--dark .stat-card__number {
    color: #d4af37;
}

.stat-card--dark .stat-card__label {
    color: rgba(255,255,255,0.6);
}

.stat-card--dark .stat-card__detail {
    color: rgba(255,255,255,0.4);
}

/* ── Stat Horizontal Layout ── */
.chi-intro__stats--row {
    flex-direction: row;
    flex-wrap: wrap;
}

.chi-intro__stats--row .stat-card {
    flex: 1;
    min-width: 140px;
}

/* ── Gallery Item Tall (span 2 rows) ── */
.gallery-item--tall {
    grid-row: span 2;
}

.gallery-item--tall img {
    height: 100%;
    object-fit: cover;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .pub-grid--3,
    .pub-grid--4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .pub-list-item {
        flex-direction: column;
        gap: 1.25rem;
    }

    .pub-list-item__cover {
        width: 100%;
        max-width: 200px;
    }

    .chi-intro__stats--row {
        flex-direction: column;
    }

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

@media (max-width: 480px) {
    .pub-grid--2,
    .pub-grid--3,
    .pub-grid--4 {
        grid-template-columns: 1fr;
    }
}

/* =========================================================================
   v1.1 — SP section widgets
   ========================================================================= */

.sp-section-intro {
    max-width: 600px;
    margin: 1rem auto 0;
    color: #666;
    font-size: 1.125rem;
    line-height: 1.7;
}
.section-3d__header:not(.section-3d__header--center) .sp-section-intro {
    margin-left: 0;
}
.sp-section-header-only {
    padding-bottom: 0 !important;
}

/* ── People cards: photos ── */
.fondatore-card__photo,
.autore-card__photo {
    overflow: hidden;
    background: rgba(212, 175, 55, 0.15);
    flex-shrink: 0;
}
.fondatore-card__photo img,
.autore-card__photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 25%;
    transition: filter 0.4s ease, transform 0.6s ease;
}

/* Round photo (default) */
.sp-people--circle .fondatore-card__photo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin-bottom: 1rem;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.35);
}
.sp-people--circle .fondatore-card--presidente .fondatore-card__photo {
    width: 96px;
    height: 96px;
    box-shadow: 0 0 0 3px #d4af37;
}
.sp-people--circle .autore-card__photo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.5);
}

/* Portrait photo: full width on top of the card */
.sp-people--portrait .fondatore-card.has-photo {
    padding-top: 0;
    overflow: hidden;
}
.sp-people--portrait .fondatore-card__photo {
    margin: 0 -1.5rem 1.25rem;
    aspect-ratio: 4 / 5;
}
.sp-people--portrait .fondatore-card--presidente .fondatore-card__photo {
    aspect-ratio: 16 / 10;
}
.sp-people--portrait .autore-card.has-photo {
    flex-direction: column;
}
.sp-people--portrait .autore-card__photo {
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 4px;
}

.fondatore-card.has-photo:hover .fondatore-card__photo img,
.autore-card.has-photo:hover .autore-card__photo img {
    transform: scale(1.04);
}

/* Black & white variant */
.sp-people--bw .fondatore-card__photo img,
.sp-people--bw .autore-card__photo img {
    filter: grayscale(1) contrast(1.05);
}
.sp-people--bw .has-photo:hover img {
    filter: none;
}

/* ── Featured book with real cover ── */
.sp-book-cover {
    position: relative;
    max-width: 260px;
    margin: 0 auto;
}
.sp-book-cover img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 2px 6px 6px 2px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}
.sp-book-cover .book-3d__badge {
    position: absolute;
    top: 12px;
    right: -10px;
    z-index: 2;
}

/* ── Magazine covers with real images ── */
.cover-mock.has-image {
    padding: 0;
    overflow: hidden;
}
.cover-mock.has-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ── Contact form ── */
.sp-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.sp-form-notice {
    padding: 1rem 1.25rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    line-height: 1.5;
}
.sp-form-notice--ok {
    background: rgba(46, 125, 50, 0.08);
    border-left: 3px solid #2e7d32;
    color: #1b5e20;
}
.sp-form-notice--error {
    background: rgba(198, 40, 40, 0.08);
    border-left: 3px solid #c62828;
    color: #8e1c1c;
}
.form-checkbox__text a {
    color: inherit;
    text-decoration: underline;
}
