/*
 * Archivio — override e adattamenti
 * Usare per: classi base, Bootstrap overrides, componenti UI (Navbar, Cards, Bento)
 */

/* Base Resets & Bootstrap Overrides */
body {
    background-color: var(--background);
    color: var(--on-surface);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .font-serif {
    font-family: var(--font-headline);
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Buttons */
.btn-primary-custom {
    background-color: var(--primary);
    color: var(--on-primary);
    padding: 0.75rem 2rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    border: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary-custom:hover, .btn-primary-custom:active, .btn-primary-custom:focus {
    opacity: 0.9;
    background-color: var(--primary) !important;
    color: var(--on-primary) !important;
    transform: scale(0.98);
}

.btn-secondary-custom {
    background-color: var(--secondary-container);
    color: var(--on-secondary-container);
    padding: 0.75rem 2rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    border: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-secondary-custom:hover, .btn-secondary-custom:active, .btn-secondary-custom:focus {
    background-color: var(--secondary-container) !important;
    color: var(--on-secondary-container) !important;
    transform: scale(0.98);
}

/* Layout Components */
/* Navbar */
.navbar-custom {
    background-color: rgba(253, 249, 240, 0.8) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: background-color 0.3s;
    border-bottom: none;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.navbar-brand-custom {
    font-family: var(--font-headline);
    font-size: 1.5rem !important;
    font-style: italic;
    color: var(--primary) !important;
}

.nav-link-custom {
    color: var(--primary-container) !important;
    font-weight: 600 !important;
    border-bottom: 2px solid transparent;
    padding-bottom: 0.25rem !important;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.nav-link-custom:hover {
    color: var(--primary) !important;
}

.nav-link-custom.active {
    color: var(--primary) !important;
    font-weight: 700 !important;
    border-bottom: 2px solid var(--primary);
}

/* Hero Section */
.hero-section {
    position: relative;
    padding-top: 6rem;
    padding-bottom: 8rem;
    overflow: hidden;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.hero-eyebrow {
    font-family: var(--font-label);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--secondary);
    font-weight: 600;
}

.hero-title {
    font-size: 4.5rem;
    line-height: 1.1;
    color: var(--primary);
    margin-bottom: 1rem;
}

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

.hero-desc {
    font-size: 1.25rem;
    color: var(--on-surface-variant);
    line-height: 1.6;
    max-width: 32rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-visual {
    position: relative;
}

.hero-image-main {
    aspect-ratio: 4 / 5;
    border-radius: var(--radius-3xl);
    overflow: hidden;
    box-shadow: var(--shadow-2xl);
    transform: rotate(3deg);
    background-color: var(--surface-container-highest);
}

.hero-image-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(0.2);
    transition: filter 0.7s ease;
}

.hero-image-main:hover img {
    filter: grayscale(0);
}

.hero-image-accent {
    position: absolute;
    bottom: -2rem;
    left: -2rem;
    width: 12rem;
    height: 12rem;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    transform: rotate(-6deg);
    border: 8px solid white;
    background-color: var(--surface-container);
}

.hero-image-accent img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Bento Grid home */
.bento-section {
    background-color: var(--surface-container-low);
    padding: 6rem 0;
}

.bento-header-title {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.bento-header-desc {
    color: var(--on-surface-variant);
    max-width: 28rem;
}

.bento-card {
    background-color: var(--surface-container-lowest);
    border-radius: var(--radius-4xl);
    overflow: hidden;
    transition: transform 0.5s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.bento-card:hover {
    transform: translateY(-8px);
}

.bento-image-wrapper {
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.bento-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.bento-card:hover .bento-image {
    transform: scale(1.1);
}

.bento-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.bento-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.bento-title {
    font-size: 1.875rem;
    color: var(--primary);
    margin-bottom: 0;
    font-family: var(--font-headline);
}

.bento-meta {
    font-family: var(--font-label);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--secondary);
    font-weight: 700;
}

.bento-text {
    color: var(--on-surface-variant);
    margin-bottom: 2rem;
    flex-grow: 1;
}

.bento-btn {
    background-color: var(--primary);
    color: var(--on-primary);
    width: 100%;
    padding: 1rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    transition: all 0.3s ease;
    text-decoration: none;
}

.bento-card:hover .bento-btn {
    box-shadow: var(--shadow-lg);
    color: var(--on-primary);
}

/* UI Components (Cards for Lists) */
.archive-card {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
    transition: transform 0.25s ease, filter 0.25s ease;
}

.archive-card:hover {
    transform: translateY(-4px);
    filter: drop-shadow(var(--shadow-primary));
}

.archive-card__media-wrapper {
    aspect-ratio: 4 / 5;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    background: var(--surface-container-highest);
    box-shadow: var(--shadow-md);
    margin-bottom: 1rem;
}

.archive-card__media {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.archive-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, var(--surface-container-high) 0%, var(--primary-fixed-dim) 45%, var(--surface-container-highest) 100%);
    color: var(--primary-container);
}

.archive-card__placeholder .material-symbols-outlined {
    font-size: 3rem;
    opacity: 0.5;
}

.archive-card__body {
    padding: 0 0.5rem;
}

.archive-card__title {
    font-family: var(--font-headline);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
    line-height: 1.25;
}

.archive-card__meta {
    font-size: 0.875rem;
    color: var(--on-surface-variant);
    margin: 0;
}

/* Vinyl special card */
.archive-card--vinyls .archive-card__media-wrapper {
    aspect-ratio: 1;
    padding: 1rem;
    border-radius: var(--radius-2xl);
    background: var(--surface-container-highest);
    box-shadow: var(--shadow-md);
}

.archive-card--vinyls .archive-card__media-disc {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface-container-high);
    display: flex;
    align-items: center;
    justify-content: center;
}

.archive-card--vinyls .archive-card__media-disc .material-symbols-outlined {
    font-size: 4rem;
    color: var(--outline);
    opacity: 0.5;
}

/* Page Intro Block */
.page-intro {
    margin-bottom: 3rem;
}

.page-intro__title {
    font-family: var(--font-headline);
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.page-intro__subtitle {
    font-size: 1.125rem;
    color: var(--on-surface-variant);
}

/* Pagination */
.pagination-custom {
    gap: 0.5rem;
    justify-content: center;
    margin-top: 3rem;
}
.pagination-custom .page-link {
    border-radius: var(--radius-full);
    border: none;
    color: var(--on-primary);
    background-color: var(--primary);
    padding: 0.5rem 1rem;
    font-weight: 600;
    min-width: 2.5rem;
    text-align: center;
}
.pagination-custom .page-link:hover {
    opacity: 0.9;
    color: var(--on-primary);
}
.pagination-custom .page-item.active .page-link {
    background-color: var(--secondary);
}

/* Form Styles */
.form-control-custom {
    background-color: var(--surface-container-highest);
    border: 1px solid var(--outline-variant);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    color: var(--on-surface);
}

.form-control-custom:focus {
    background-color: var(--surface-container-highest);
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(22, 52, 34, 0.2);
}

/* Search panel */
.search-panel {
    background-color: var(--surface-container-low);
    border-radius: var(--radius-xl);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.search-panel input {
    flex-grow: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 1rem;
}

/* Details Page specific */
.detail-hero-media {
    border-radius: var(--radius-3xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}
.detail-hero-media img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.detail-label {
    font-family: var(--font-label);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--secondary);
    font-weight: 700;
    margin-bottom: 0.25rem;
}

/* Footer structure */
.site-footer {
    background-color: var(--surface-container-low);
    padding: 4rem 0;
    margin-top: 5rem;
}

.footer-brand {
    font-family: var(--font-headline);
    font-size: 1.125rem;
    font-style: italic;
    color: var(--primary);
}
.footer-text {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-container);
}

/* Detail Layout Components */
.archive-detail-layout {
    margin-top: 2rem;
}

.archive-detail-sidebar {
    position: sticky;
    top: 6rem;
}

.archive-detail-panel {
    background: var(--surface-container-low);
    border-radius: var(--radius-3xl);
    padding: 2rem;
    margin-bottom: 2rem;
}

.archive-detail-panel h3 {
    font-family: var(--font-headline);
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.archive-detail-cover {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.archive-detail-cover__img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.archive-detail-dl {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.archive-detail-dl dt {
    font-family: var(--font-label);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--secondary);
    font-weight: 700;
    margin-top: 0.5rem;
}

.archive-detail-dl dd {
    font-size: 1rem;
    color: var(--on-surface);
    margin-bottom: 0;
}

.archive-detail-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--surface-container-high);
}

.archive-detail-heading {
    font-family: var(--font-headline);
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.archive-detail-meta {
    font-size: 1.125rem;
    color: var(--on-surface-variant);
}

.archive-detail-section {
    margin-bottom: 3rem;
}

.archive-detail-section h3 {
    font-family: var(--font-headline);
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.archive-detail-section p, .archive-detail-section .cooking-instructions {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--on-surface);
}

.procedure-steps-list li {
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
    color: var(--on-surface);
}

.procedure-steps-list strong {
    color: var(--primary);
    display: block;
    margin-bottom: 0.5rem;
}

.procedure-step-description {
    line-height: 1.8;
}

.archive-detail-tracklist {
    padding-left: 1.5rem;
}

.archive-detail-tracklist li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--surface-container-high);
    color: var(--on-surface);
}
