/* ─── specialita.css ─── */

:root {
    --gold: #c9903a;
    --gold-light: #e4b96a;
    --gold-pale: #f5e4c0;
    --brown: #4a2a10;
    --text-mid: #6b5d54;
    --text-light: #8e837d;
    --cream: #fdfaf5;
    --rose: #e8c4bb;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow-soft: 0 12px 40px rgba(0, 0, 0, 0.04);
    --shadow-gold: 0 15px 45px rgba(201, 144, 58, 0.15);
}

/* ─── LAYOUT GENERALE ─── */
body {
    background-color: var(--cream);
    overflow-x: hidden;
}

/* Reset e Setup Main */
main {
    position: relative;
    z-index: 2; /* Per stare sopra le orbite del background.css */
}

/* ─── HERO SECTION ─── */
.specialita-hero {
    min-height: 60vh; /* Altezza generosa per dare eleganza */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 160px 2rem 60px;
}

.specialita-hero .hero-content {
    max-width: 820px;
    animation: fadeUp 1s ease-out;
}

/* Divider decorativo con la stellina */
.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin: 2rem 0;
    color: var(--gold);
}

.divider::before, .divider::after {
    content: '';
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ─── GALLERY / GRID SECTION ─── */
.gallery-section {
    padding: 2rem 2rem 10rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.specialita-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    justify-content: center;
}

/* ─── CARD DELLE SPECIALITÀ (Popolate da JS) ─── */
/* Nota: Assicurati che nel tuo specialita.js crei elementi con classe .spec-card */
.spec-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--r-lg);
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(.34, 1.56, .64, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.spec-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gold);
}

/* Elementi interni alla Card */
.spec-card-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: block;
    animation: iconFloat 3s ease-in-out infinite;
}

.spec-card-cat {
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 0.8rem;
}

.spec-card-cat::before { content: '\2014\a0'; }
.spec-card-cat::after  { content: '\a0\2014'; }

.spec-card-title {
    font-family: 'DM Serif Display', serif;
    font-size: 1.8rem;
    color: var(--brown);
    line-height: 1.2;
    margin-bottom: 1.2rem;
}

.spec-card-desc {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    color: var(--text-mid);
    line-height: 1.7;
    max-width: 300px;
}

/* ─── ANIMAZIONI ─── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
    .specialita-hero { padding-top: 120px; }
    .specialita-grid { grid-template-columns: 1fr; }
    .spec-card { padding: 2.5rem 1.5rem; }
}

/* ─── COMPATIBILITÀ JS SPECIALITÀ ─── */

/* Card generate dinamicamente */
.spec-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--r-lg);
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.4s cubic-bezier(.34, 1.56, .64, 1), 
                box-shadow 0.4s, 
                border-color 0.4s,
                opacity 0.8s ease, 
                transform 0.8s cubic-bezier(.22, 1, .36, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.spec-item:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gold);
}

/* Stili elementi interni */
.spec-item-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: block;
    animation: iconFloat 3s ease-in-out infinite;
}

.spec-item-cat {
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 0.8rem;
    display: block;
}

.spec-item-cat::before { content: '\2014\a0'; }
.spec-item-cat::after  { content: '\a0\2014'; }

.spec-item-title {
    font-family: 'DM Serif Display', serif;
    font-size: 1.8rem;
    color: var(--brown);
    line-height: 1.2;
    margin-bottom: 1.2rem;
}

.spec-item-desc {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    color: var(--text-mid);
    line-height: 1.7;
    max-width: 300px;
    margin: 0 auto;
}

/* ─── LOGICA REVEAL (Inizialmente nascosti) ─── */
.reveal {
    opacity: 0;
    transform: translateY(36px);
    will-change: transform, opacity;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Animazione icone */
@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}