/* ==========================================================================
   1. FONT IMPORT
   ========================================================================== */
@font-face {
    font-family: 'font1';
    src: url("../font/font1.ttf");
}

@font-face {
    font-family: 'Bebas Neue';
    font-style: normal;
    font-weight: 400;
    src: url(https://fonts.gstatic.com/s/bebasneue/v2/JTUSjIg69CK48gW7PXoo9Wlhyw.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Aclonica';
    font-style: normal;
    font-weight: 400;
    src: url(https://fonts.gstatic.com/s/aclonica/v11/K2FyfZJVlfNNSEBXGY7UAo8.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================================
   2. VARIABILI E BASE
   ========================================================================== */
:root {
    --primary-color: #a67c52;
    --dark-grey: #4d4b4b;
    --bg-body: #eeebe3;
    --font-heading: 'Bebas Neue', sans-serif;
}

body {
    height: 100%;
    width: 100%;
    margin: 43px 0 50px 0;
    font: 1rem/1.5 Helvetica, Arial, sans-serif;
    overflow: auto;
    background-color: var(--bg-body) !important;
    color: #000;
}

/* ==========================================================================
   3. TIPOGRAFIA
   ========================================================================== */
h1 {
    font-family: 'font1', sans-serif;
    font-size: 80px;
    font-weight: bold;
}

h2, h3, h4, h5 { font-family: var(--font-heading); }
h2 { font-size: 40px; }
h3 { font-size: 50px; }
h4 { font-size: 20px; }
h5 { font-size: 24px; color: var(--primary-color); }

@media screen and (max-width: 600px) {
    h1 { font-size: 4rem; }
}

.elegante {
    font-family: "Aclonica", sans-serif;
    color: var(--dark-grey);
}

a, a:visited {
    color: var(--primary-color);
    text-decoration: none;
    transition: 0.3s;
}

/* ==========================================================================
   4. FORM E COMPONENTI UI
   ========================================================================== */
input, textarea, select {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid #ccc;
}

input[type='submit'], 
input[type='button'] {
    background-color: rgba(76, 43, 21, 0.7);
    color: #fff;
    cursor: pointer;
    border: none;
}

.accordion {
    background-color: #838383;
    color: #fff;
    cursor: pointer;
    padding: 10px;
    width: 100%;
    border: none;
    text-align: left;
    font-size: 15px;
    transition: 0.4s;
}

.panel {
    padding: 0 18px;
    background-color: white;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
}

.vertical-menu { width: 300px; }
.vertical-menu a {
    color: #000;
    display: block;
    padding: 6px 6px 6px 14px;
    margin-bottom: 1px;
    border-bottom: 1px solid var(--dark-grey);
}
.vertical-menu a:hover {
    color: #fff;
    background-color: var(--dark-grey);
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #ccc; }
::-webkit-scrollbar-thumb { background: #aeaeae; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* ==========================================================================
   5. ESTENSIONI PER QUILL (Editor e Visualizzazione)
   ========================================================================== */

/* 5a. Allineamento Testo */
/* Forziamo i paragrafi a occupare tutta la larghezza per permettere l'allineamento interno */
.ql-align-center { text-align: center !important; display: block !important; width: 100%; }
.ql-align-right  { text-align: right !important; display: block !important; width: 100%; }
.ql-align-left   { text-align: left !important; display: block !important; width: 100%; }
.ql-align-justify { text-align: justify !important; display: block !important; width: 100%; }

/* 5b. Allineamento Immagini */
/* Usiamo Flexbox sui paragrafi allineati per posizionare le immagini correttamente */

.ql-editor p.ql-align-center {
    display: flex !important;
    justify-content: center !important;
    flex-direction: column !important;
    align-items: center !important;
}

.ql-editor p.ql-align-right {
    display: flex !important;
    justify-content: flex-end !important;
    flex-direction: column !important;
    align-items: flex-end !important;
}

/* Fix universale per le immagini allineate */
.ql-editor .ql-align-center img {
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
    float: none !important;
}

.ql-editor .ql-align-right img {
    margin-left: auto !important;
    margin-right: 0 !important;
    display: block !important;
    float: none !important;
}

/* 5c. Impostazioni base immagini nell'Extra */
.ql-editor img, .extra-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 10px !important;
}

/* 5d. Stile specifico per l'area editor */
#editor-extra {
    background: white;
    min-height: 300px;
}

/* Fix se la classe è applicata direttamente all'immagine */
img.ql-align-right { float: right !important; margin-left: 15px; display: block; }
img.ql-align-center { display: block !important; margin: 10px auto !important; }
img.ql-align-left { float: left !important; margin-right: 15px; display: block; }