/* CONTAINER */
#cartelli-container {
    width: 100%;
    max-width: 100%;
    padding: 0 16px;
    box-sizing: border-box;
}

/* TITOLO */
.module-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: #1a3d6f;
    margin-bottom: 20px;
}

/* UPLOAD */
.upload-section {
    margin-bottom: 20px;
}

.upload-label {
    display: block;
    margin-bottom: 8px;
    font-size: 1rem;
}

#cartello-file {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

/* ANTEPRIMA */
#cartello-preview {
    width: 180px;
    height: auto;
    border-radius: 10px;
    display: block;
    margin: 10px auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

#preview-section {
    text-align: center;
}

/* PULSANTI */
.primary-btn,
.secondary-btn {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    margin-top: 15px;
    cursor: pointer;
}

.primary-btn {
    background: #1a3d6f;
    color: #fff;
    border: none;
}

.secondary-btn {
    background: #e8eef7;
    color: #1a3d6f;
    border: 1px solid #c7d4e8;
}

/* CARD */
.result-card {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* LISTA CONTATTI */
.contact-item {
    background: #fff;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.1);
}

.contact-item img {
    width: 100%;
    border-radius: 6px;
    margin-bottom: 10px;
}

.hidden {
    display: none;
}

.cartelli-nav {
    display: flex;
    gap: 12px;
    margin: 15px 20px;
}

.nav-btn {
    background: #2563eb;
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s;
}

.nav-btn:hover {
    background: #1a3d6f;
}

.upload-section {
    margin-bottom: 25px;
}

.upload-label {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 8px;
    display: block;
}

.upload-box {
    box-sizing: border-box;
    background: #f3f4f6;
    border: 2px dashed #9ca3af;
    padding: 20px 16px;
    border-radius: 12px;
    text-align: center;
    transition: 0.2s;
}

.upload-box:hover {
    border-color: #2563eb;
    background: #eef2ff;
}

.upload-hint {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #6b7280;
}

.cartelli-breadcrumb {
    padding: 12px 16px;
    box-sizing: border-box;
    background: #f3f4f6;
    border-bottom: 1px solid #e5e7eb;
}

.cartelli-breadcrumb .breadcrumb {
    font-size: 0.95rem;
    color: #374151;
}

.cartelli-breadcrumb .breadcrumb a {
    color: #2563eb;
    text-decoration: none;
}

.cartelli-breadcrumb .breadcrumb a:hover {
    text-decoration: underline;
}

.input-hidden {
    opacity: 0;
    position: absolute;
    inset: 0;          /* sostituisce left/top */
    height: 0;
    width: 0;
    pointer-events: none;  /* 🔥 fondamentale */
    z-index: -1;           /* 🔥 fondamentale */
}

.cartelli-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 16px;
    box-sizing: border-box;
}

.cartelli-nav a {
    flex: 1 1 100%;      /* 🔹 ogni pulsante prende tutta la riga */
    text-align: center;
    box-sizing: border-box;
}

body, html {
    overflow-x: hidden;
    max-width: 100%;
}

main, header, nav, section, div {
    max-width: 100%;
    box-sizing: border-box;
}

.cartelli-container,
.cartelli-wrapper,
.cartelli-nav {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.cartelli-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

/* Pulsanti sopra: leggermente più corti */
.cartelli-nav a:nth-child(2),
.cartelli-nav a:nth-child(3) {
    flex: 1 1 calc(50% - 20px);   /* prima era -12px */
    padding: 10px;
    border-radius: 6px;
    box-sizing: border-box;
}

/* Pulsante sotto: proporzionato */
.cartelli-nav a:nth-child(1) {
    flex: 1 1 calc(100% - 4px);   /* evita che tocchi i bordi */
    padding: 10px;
    border-radius: 6px;
    box-sizing: border-box;
}

/* Gap leggermente ridotto */
.cartelli-nav {
    gap: 8px;
}

header {
    padding: 16px;
    box-sizing: border-box;
}

main {
    padding: 16px;
    box-sizing: border-box;
}
