/* ===== CUPOLONE - user.css ===== */

@import url('https://fonts.googleapis.com/css2?family=IM+Fell+English:ital@0;1&family=Playfair+Display:wght@400;700&display=swap');

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0 0 56px 0;
    font-family: 'IM Fell English', serif;
    background: #ffffff;
}

/* ===== NASCONDE ELEMENTI JOOMLA NON VOLUTI ===== */
/* .page-header hidden globally except in article - see below */
.subcat-desc,
.alert,
div.alert-info,
dl.categories-grid,
.subcategories-list,
.category-list,
.breadcrumb,
#breadcrumbs {
    display: none !important;
}

.cupolone-main {
    min-height: calc(100vh - 56px);
}

/* ===== VISTA PRINCIPALE: lista copertine ===== */
body.vista-principale {
    background-color: #ffffff;
}

.cupolone-lista-copertine {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px 80px;
    gap: 24px;
    background: #ffffff;
    min-height: 100vh;
}

.cupolone-copertina-item {
    width: 100%;
    max-width: 340px;
    background: #ffffff;
    border: 2px solid #dddddd;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.10);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
    text-decoration: none;
    display: block;
    color: inherit;
}

.cupolone-copertina-item:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.18);
    transform: translateY(-3px);
}

.cupolone-copertina-img {
    width: 100%;
    height: auto;
    display: block;
}

.cupolone-copertina-titolo {
    font-family: 'IM Fell English', serif;
    font-size: 1.1em;
    padding: 12px 16px;
    text-align: center;
    color: #222222;
    background: #ffffff;
}

.cupolone-copertina-placeholder {
    width: 100%;
    aspect-ratio: 3 / 4;
    background: #eeeeee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'IM Fell English', serif;
    font-size: 1.1em;
    color: #888888;
    text-align: center;
    padding: 20px;
}

/* ===== VISTA NUMERO: copertina fullscreen ===== */
body.vista-numero {
    background-color: #ffffff;
}

body.vista-numero .cupolone-main {
    display: flex;
    align-items: center;
    justify-content: center;
    height: calc(100vh - 56px);
    overflow: hidden;
    padding: 0;
}

.cupolone-copertina-fullscreen {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.cupolone-copertina-fullscreen-img {
    max-width: 100vw;
    max-height: calc(100vh - 56px);
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.cupolone-copertina-fullscreen-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #666666;
    font-family: 'IM Fell English', serif;
    font-size: 1.5em;
}

/* ===== VISTA ARTICOLO ===== */
body.vista-articolo {
    background-color: #f9f7f2;
}

body.vista-articolo .cupolone-main {
    max-width: 680px;
    margin: 0 auto;
    padding: 48px 32px 100px;
}

/* Nasconde i metadati Joomla */
body.vista-articolo .article-info,
body.vista-articolo .article-footer,
body.vista-articolo .icons,
body.vista-articolo .pager,
body.vista-articolo .com-content-article__tags,
body.vista-articolo dl.article-info {
    display: none !important;
}

/* Titolo articolo */
body.vista-articolo h1.page-header,
body.vista-articolo h2.page-header,
body.vista-articolo .com-content-article__header h1,
body.vista-articolo .com-content-article__header h2,
body.vista-articolo h1,
body.vista-articolo h2 {
    display: block !important;
    font-family: 'Playfair Display', 'IM Fell English', serif;
    font-size: 2em;
    font-weight: 700;
    color: #1a1a1a !important;
    text-align: center;
    margin: 0 0 0.2em 0;
    line-height: 1.25;
    letter-spacing: 0.01em;
}

/* Linea decorativa sotto il titolo - solo su .page-header */

/* Testo del corpo */
body.vista-articolo .com-content-article__body,
body.vista-articolo .item-page {
    font-family: 'IM Fell English', serif;
    font-size: 1.15em;
    line-height: 1.85;
    color: #222222 !important;
    text-align: justify;
    hyphens: auto;
}

body.vista-articolo .com-content-article__body *,
body.vista-articolo .item-page * {
    color: #222222 !important;
}

/* Paragrafi */
body.vista-articolo p {
    margin: 0 0 1.3em 0;
    color: #222222 !important;
}

/* Capolettera sul primo paragrafo */
body.vista-articolo .com-content-article__body > p:first-of-type::first-letter,
body.vista-articolo .item-page > p:first-of-type::first-letter {
    font-family: 'Playfair Display', serif;
    font-size: 3.8em;
    font-weight: 700;
    float: left;
    line-height: 0.75;
    margin: 0.05em 0.1em 0 0;
    color: #8b0000 !important;
}

/* Linea separatrice ornamentale tra sezioni */
body.vista-articolo hr {
    border: none;
    text-align: center;
    margin: 2em 0;
    color: #999999;
}

body.vista-articolo hr::before {
    content: '— ✦ —';
    font-size: 1em;
    letter-spacing: 0.3em;
    color: #999999;
}

/* ===== BARRA FISSA IN FONDO ===== */
#cupolone-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 56px;
    background-color: #000000;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 9999;
}

#cupolone-titolo {
    font-family: 'IM Fell English', serif;
    font-size: 1.6em;
    font-weight: 700;
    letter-spacing: 3px;
    color: #ffffff;
    text-decoration: none;
}

#cupolone-titolo:hover { color: #cccccc; }

#cupolone-hamburger {
    font-size: 1.8em;
    cursor: pointer;
    user-select: none;
    padding: 8px 12px;
    color: #ffffff;
    line-height: 1;
    background: none;
    border: none;
}

#cupolone-hamburger:hover { color: #cccccc; }

/* ===== MENU HAMBURGER ===== */
#cupolone-menu {
    position: fixed;
    bottom: 56px;
    right: 0;
    width: 280px;
    background-color: #111111;
    z-index: 9998;
    border-top: 1px solid #444444;
    border-left: 1px solid #444444;
    display: none;
}

#cupolone-menu.aperto { display: block; }

#cupolone-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#cupolone-menu ul li {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #333333;
}

#cupolone-menu ul li a {
    display: block;
    color: #ffffff !important;
    font-family: 'IM Fell English', serif;
    font-size: 1.15em;
    padding: 18px 24px;
    text-decoration: none !important;
    transition: background 0.2s;
    cursor: pointer;
}

#cupolone-menu ul li a:hover,
#cupolone-menu ul li a:active {
    background-color: #333333;
    color: #ffffff !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    .cupolone-copertina-item { max-width: 95vw; }
    #cupolone-menu { width: 100%; }
    body.vista-articolo .cupolone-main { padding: 32px 18px 80px; }
    body.vista-articolo h1 { font-size: 1.6em; }
}

/* Mostra il titolo nella vista articolo */
body.vista-articolo .page-header {
    display: block !important;
}

body.vista-articolo .page-header h2,
body.vista-articolo .page-header h1 {
    font-family: 'Playfair Display', 'IM Fell English', serif;
    font-size: 2em;
    font-weight: 700;
    color: #1a1a1a !important;
    text-align: center;
    margin: 0 0 0.15em 0;
    line-height: 1.25;
}

body.vista-articolo .page-header::after {
    content: '✦';
    display: block;
    text-align: center;
    font-size: 1em;
    color: #999999;
    margin: 0.3em 0 1.2em;
    letter-spacing: 0.5em;
}

/* ===== COLORI STAGIONALI - vista numero ===== */
body.vista-numero.stagione-carmine {
    background-color: #ff9900;
}
body.vista-numero.stagione-lumini {
    background-color: #006699;
}
body.vista-numero.stagione-natale {
    background-color: #009363;
}
body.vista-numero.stagione-pasqua {
    background-color: #cc0000;
}
