/* ============================
   RESET GENERALE
   ============================ */
 *{
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

/* ============================
   CONTENITORE GENERALE PAGINE
   ============================ */
.page-container {
    width: 90%;
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px 0;
}

@media (max-width: 768px) {
    .page-container {
        width: 95%;
        margin: 20px auto;
    }
}

/* ============================
   TABELLE DI CONTENUTO
   ============================ */
.info-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    margin-bottom: 20px;
}

.info-table .name {
    font-size: 18px;
    font-weight: bold;
    padding: 10px 0;
    color: #000;
}

.info-table .contact {
    font-size: 16px;
    padding: 8px 0;
    color: #444;
}

.info-table .email a {
    font-size: 14px;
    color: #0066cc;
    text-decoration: none;
}

.info-table .email a:hover {
    text-decoration: underline;
}

/* ============================
   IMMAGINI RESPONSIVE
   ============================ */
.responsive-img {
    width: 100%;
    height: auto;
    display: block;
    margin: 15px 0;
}

/* ============================
   BLOCCO TESTO
   ============================ */
.text-block {
    width: 100%;
    margin: 0 auto;
    text-align: justify;
    line-height: 1.6;
    font-size: 16px;
    color: #333;
}

.text-block p {
    margin-bottom: 15px;
}

/* ============================
   LINK INTERNI
   ============================ */
a.internal-link {
    color: #0066cc;
    text-decoration: none;
    font-weight: bold;
}

a.internal-link:hover {
    text-decoration: underline;
}

/* ============================
   PAGINA LOGIN
   ============================ */
.login-container {
    padding-top: 60px;
    padding-bottom: 60px;
}

.login-table {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

.form-table {
    width: 100%;
    border-collapse: collapse;
}

.label-cell {
    text-align: right;
    padding-right: 10px;
    vertical-align: middle;
    width: 40%;
}

.input-text {
    width: 100%;
    padding: 6px;
    border: 1px solid #aaa;
    border-radius: 4px;
}

.hint {
    font-size: 12px;
    color: #666;
    margin-top: 3px;
}

.btn {
    padding: 6px 12px;
    margin-right: 5px;
    border: 1px solid #444;
    background: #92776c;
    color: white;
    cursor: pointer;
    border-radius: 4px;
}

.btn:hover {
    background: #7a5f55;
}

/* ============================
   PAGINA "DOVE SIAMO"
   ============================ */
.visit-counter {
    font-size: 14px;
    color: #444;
    margin-bottom: 20px;
    text-align: center;
}

.info-list {
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.info-item {
    font-size: 16px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #333;
}

.centered-table {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.bullet {
    width: 7px;
    height: 8px;
    margin-right: 8px;
}

.map-container {
    margin-top: 20px;
    text-align: center;
}

/* ============================
   MENU RESPONSIVE (VERSIONE CORRETTA EDGE)
   ============================ */
#topmenu ul,
#topmenu li {
    list-style: none;
    margin: 0;
    padding: 0;
}


#topmenu.menu-container {
    background: #92776c;
    padding: 6px 10px;
    position: sticky;
    top: 0;
    z-index: 999999;
    border-radius: 0 0 10px 10px;
}

/* Toggle mobile */
#topmenu .menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: white;
    cursor: pointer;
    transition: transform 0.3s ease;
}

#topmenu .menu-toggle.active {
    transform: rotate(90deg);
}

/* Desktop menu */
@media (min-width: 769px) {
    #topmenu .menu {
        display: flex;
        justify-content: center;
        gap: 20px;
    }
}

#topmenu .menu > li {
    position: relative;
}

#topmenu .menu > li > a {
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

#topmenu .menu > li > a::before {
    content: "•";
    font-size: 14px;
    opacity: 0.7;
}

/* SUBMENU — FIX EDGE */
#topmenu.menu-container .menu > li > ul.submenu {
    display: none;
    position: absolute;
    background: #ac9890;
    top: 100%;
    left: 0;
    min-width: 180px;
    border-radius: 5px;
    overflow: hidden;
    z-index: 9999;
}

/* Desktop hover */
@media (min-width: 769px) {
    #topmenu.menu-container .menu > li:hover > ul.submenu {
        display: block;
        animation: fadeIn 0.25s ease-out;
    }
}

#topmenu .submenu li a {
    padding: 10px;
    display: block;
    color: white;
    text-decoration: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* MOBILE MENU */
@media (max-width: 768px) {

    #topmenu .menu-toggle {
        display: block;
    }

    #topmenu .menu {
        display: none;
        flex-direction: column;
        width: 100%;
        background: #92776c;
        border-radius: 10px;
        overflow: hidden;
    }

    #topmenu .menu.show {
        display: flex;
        animation: slideDown 0.3s ease-out;
    }

    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    #topmenu .menu > li > a {
        background: #ac9890;
        padding: 10px;
        border-bottom: 1px solid #555;
        width: 100%;
    }

    /* SUBMENU MOBILE — FIX DEFINITIVO EDGE */
    #topmenu.menu-container .menu li.open > ul.submenu {
        display: block !important;
        position: static;
        background: #444;
        width: 100%;
        animation: slideDown 0.3s ease-out;
    }

    #topmenu .submenu li a {
        padding: 12px;
        border-bottom: 1px solid #333;
    }
}

/* ============================
   SOFTWARE – RECORD SINGOLO MOBILE
   ============================ */
.software-row {
    border-bottom: 1px solid #ac9890;
    padding: 12px 0;
}

/* ============================
   CENTRATURE VARIE
   ============================ */
.section-title,
#fragment-1,
#fragment-2 {
    text-align: center;
}

#fragment-1 img,
#fragment-2 img,
.info-list img,
.label-cell a,
.label-cell img {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* ============================
   MOBILE – TUTTO IN UNA COLONNA
   ============================ */
@media (max-width: 768px) {

    .form-table {
        width: 100%;
        display: block;
    }

    .form-table tr {
        display: block;
        margin-bottom: 25px;
        border-bottom: 1px solid #92776c;
        padding-bottom: 20px;
    }

    .form-table td {
        display: block;
        width: 100%;
        text-align: center !important;
        padding: 10px 0;
        border: none !important;
    }

    .label-cell {
        text-align: center !important;
        margin-bottom: 10px;
    }

    .info-list {
        align-items: center !important;
        text-align: center !important;
    }

    .info-item {
        justify-content: center !important;
        text-align: center !important;
        width: 100%;
        padding: 8px 0;
        border-bottom: 1px solid #ac9890;
    }

    .info-item:last-child {
        border-bottom: none;
    }

    .text-block {
        text-align: center !important;
        margin-top: 15px;
    }
}

/* ============================
   FOOTER
   ============================ */
#footer {
    width: 100%;
    background-color: transparent;
    color: white;
    text-align: center;
    padding: 15px 0;
    clear: both;
    position: relative;
    font-size: 14px;
}

@media (max-width: 768px) {
    #footer {
        font-size: 12px;
        padding: 12px 5px;
    }
}

/* WRAPPER FLESSIBILE PER MANTENERE IL FOOTER IN FONDO */
.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* CONTENUTO PRINCIPALE */
.content {
    flex: 1; /* occupa tutto lo spazio disponibile */
}

/* FOOTER */
#footer {
    background-color: #92776c;
    color: #fff;
    text-align: center;
    padding: 10px 0;
    width: 100%;
}

#footer img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.txtsmooldown {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 8pt;
    color: #fff;
    text-align: center;
    line-height: 16px;
}
/* RESET BASE */
#topmenu ul, #topmenu li {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* CONTENITORE MENU */
#topmenu.menu-container {
    background: #92776c;
    padding: 8px 12px;
    position: sticky;
    top: 0;
    z-index: 9999;
    font-family: Arial, sans-serif;
}

/* HAMBURGER BUTTON */
#topmenu .menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: white;
    cursor: pointer;
}

/* MENU DESKTOP */
@media (min-width: 769px) {
    #topmenu .menu {
        display: flex !important;
        justify-content: center;
        gap: 20px;
    }

    #topmenu .menu > li > a {
        color: white;
        text-decoration: none;
        padding: 6px 10px;
        font-weight: bold;
        position: relative;
    }

    #topmenu .menu > li > ul.submenu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        background: #ac9890;
        min-width: 180px;
        border-radius: 5px;
    }

    #topmenu .menu > li:hover > ul.submenu {
        display: block;
    }

    #topmenu .submenu li a {
        display: block;
        padding: 10px;
        color: white;
        text-decoration: none;
    }
}

/* MENU MOBILE */
@media (max-width: 768px) {
    #topmenu .menu-toggle {
        display: block;
    }

    /* Nascondi menu mobile all’avvio */
    #topmenu .menu {
        display: none;
        flex-direction: column;
        width: 100%;
        background: #92776c;
        border-radius: 10px;
    }

    #topmenu .menu.show {
        display: flex;
    }

    #topmenu .menu > li > a {
        padding: 10px;
        display: block;
        color: white;
        text-decoration: none;
        background: #ac9890;
        border-bottom: 1px solid #555;
    }

    #topmenu .menu li.open > ul.submenu {
        display: block !important;
        position: static;
        background: #444;
    }

    #topmenu .submenu li a {
        padding: 12px;
        border-bottom: 1px solid #333;
    }
}
