/* ==========================================================================
   CSS PER DEPLIANT A4 - CANTIEREPRO
   ========================================================================== */

/* --- VARIABILI DESIGN SYSTEM --- */
:root {
    --color-primary: #f39c12;       /* Arancione cantiere */
    --color-primary-dark: #d35400;  /* Arancione scuro / ruggine */
    --color-dark: #1e293b;          /* Slate scuro per intestazioni e box */
    --color-light: #f8fafc;         /* Sfondo chiaro per le schede */
    --color-text: #334155;          /* Testo principale grigio scuro */
    --color-text-light: #64748b;    /* Testo secondario */
    --color-success: #10b981;       /* Verde per indicazioni positive */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --page-width: 210mm;
    --page-height: 297mm;
}

/* --- REGOLE GENERALI PER SCHERMO --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #0f172a;
    font-family: var(--font-body);
    color: var(--color-text);
    line-height: 1.5;
    padding: 40px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

/* --- BARRA DI CONTROLLO NO-PRINT --- */
.print-bar {
    width: var(--page-width);
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.btn-print {
    background-color: var(--color-primary);
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-print:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
}

.print-note {
    font-size: 12px;
    color: var(--color-text-light);
    max-width: 60%;
    text-align: right;
}

/* --- STRUTTURA PAGINA A4 --- */
.brochure-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.page {
    width: var(--page-width);
    height: var(--page-height);
    background-color: #ffffff;
    position: relative;
    padding: 20mm;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

/* Watermark con il numero di pagina sfumato sullo sfondo */
.watermark {
    position: absolute;
    bottom: 25mm;
    right: 20mm;
    font-family: var(--font-heading);
    font-size: 150px;
    font-weight: 800;
    color: rgba(243, 156, 18, 0.05);
    line-height: 1;
    pointer-events: none;
    z-index: 1;
}

/* --- INTESTAZIONE (HEADER) --- */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--color-light);
    padding-bottom: 15px;
    margin-bottom: 20px;
    z-index: 2;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 32px;
}

.logo-text h1 {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 800;
    color: var(--color-dark);
    line-height: 1.1;
}

.logo-text h1 span {
    color: var(--color-primary);
}

.tagline {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-text-light);
    font-weight: 600;
}

.badge-version {
    background-color: var(--color-light);
    border: 1px solid #e2e8f0;
    color: var(--color-text-light);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.section-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
    color: var(--color-primary-dark);
    letter-spacing: 1px;
}

/* --- AREA CONTENUTO PRINCIPALE --- */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    z-index: 2;
}

/* --- HERO SECTION (PAGINA 1) --- */
.hero {
    margin-bottom: 30px;
}

.hero-text h2 {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 800;
    color: var(--color-dark);
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 15px;
    color: var(--color-text-light);
    margin-bottom: 25px;
    max-width: 90%;
}

.hero-image-container {
    width: 100%;
    background-color: var(--color-light);
    border-radius: 12px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.mockup-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.image-caption {
    font-size: 11px;
    color: var(--color-text-light);
    margin-top: 8px;
    text-align: center;
    font-style: italic;
}

/* --- PILASTRI DI FUNZIONALITÀ (PAGINA 1) --- */
.pillars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 10px;
}

.pillar-card {
    background-color: var(--color-light);
    border-left: 4px solid var(--color-primary);
    border-radius: 0 12px 12px 0;
    padding: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.pillar-icon {
    font-size: 24px;
    margin-bottom: 10px;
}

.pillar-card h3 {
    font-family: var(--font-heading);
    font-size: 16px;
    color: var(--color-dark);
    margin-bottom: 8px;
    font-weight: 700;
}

.pillar-card p {
    font-size: 12px;
    color: var(--color-text-light);
    line-height: 1.4;
}

/* --- GRID LAYOUT PER PAGINA 2 --- */
.grid-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 25px;
}

.feature-section {
    margin-bottom: 20px;
}

.section-subtitle {
    font-family: var(--font-heading);
    font-size: 18px;
    color: var(--color-dark);
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 6px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    font-weight: 700;
}

.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feature-list li {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.feature-list li strong {
    font-size: 13px;
    color: var(--color-dark);
    font-weight: 600;
}

.feature-list li span {
    font-size: 11px;
    color: var(--color-text-light);
    line-height: 1.4;
}

/* --- COLONNA DESTRA (PAGINA 2) --- */
.right-column {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
}

.mobile-mockup-wrapper {
    background-color: var(--color-light);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.mobile-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.technical-box {
    background-color: var(--color-dark);
    color: #fff;
    border-radius: 12px;
    padding: 18px;
    font-size: 11px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.technical-box h3 {
    font-family: var(--font-heading);
    font-size: 13px;
    color: var(--color-primary);
    margin-bottom: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.technical-box p {
    margin-bottom: 6px;
    color: #cbd5e1;
}

.technical-box p strong {
    color: #fff;
}

.technical-box p:last-child {
    margin-bottom: 0;
}

/* --- PIÈ DI PAGINA (FOOTER) --- */
.page-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e2e8f0;
    padding-top: 12px;
    margin-top: 20px;
    font-size: 11px;
    color: var(--color-text-light);
    z-index: 2;
}

.web-link {
    color: var(--color-primary-dark);
    font-weight: 600;
}

/* --- OTTIMIZZAZIONI DI STAMPA (@MEDIA PRINT) --- */
@media print {
    /* Resetta gli stili del body per la stampa */
    body {
        background-color: transparent;
        padding: 0;
        margin: 0;
        display: block;
        width: auto;
        height: auto;
    }

    /* Nasconde la barra di stampa a schermo */
    .no-print {
        display: none !important;
    }

    .brochure-container {
        gap: 0;
    }

    /* Imposta le dimensioni A4 precise per le pagine stampate */
    @page {
        size: A4 portrait;
        margin: 0;
    }

    .page {
        margin: 0;
        padding: 20mm;
        width: 210mm;
        height: 297mm;
        box-shadow: none;
        page-break-after: always;
        page-break-inside: avoid;
        box-sizing: border-box;
        position: relative;
        background-color: #ffffff;
    }
}
