/* --- CSS Variables --- */
:root {
    --cap-blue: #233c68;       /* Aggiornato colore istituzionale */
    --dark-blue: #000;      /* Aggiornato colore istituzionale secondario */
    --light-blue-bg: #d0e4f2;
    --bg-gray: #eef1f7;
    --white: #ffffff;
    --text-dark: #1a1a1a;
    --footer-bg: #171c24;
    --border-color: #d1d5db;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* --- Base Styles & Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
.doc-card-illustration {
    width: 60px; /* Adjust size as needed */
    height: 60px;
    fill: none !important; /* Removes the fill color */
    stroke: #8cb4d6;       /* Sets the light blue outline color */
    stroke-width: 2;       /* Sets the thickness of the line */
    transition: all 0.3s ease;
}

/* Optional: Add a hover effect to make them 'pop' or change color */
.doc-card:hover .doc-card-illustration {
    stroke: #233c68;       /* Darker blue on hover */
    stroke-width: 2.5;
}

body {
    font-family: var(--font-family);
    color: var(--text-dark);
    background: linear-gradient(to bottom, var(--light-blue-bg) 0%, var(--bg-gray) 70%, var(--bg-gray) 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Regole Font dedotte da Ispezione Elemento */
.paragraph-small-fs9 {
    font-family: "Source Sans Pro Regular", sans-serif !important;
    line-height: 150% !important;
    letter-spacing: 0 !important;
    font-size: .875rem !important;
}

ul.arrow, ul.arrow_blu { margin-left: -2rem; }
.arrow_blu li a, .arrow li a { padding-left: 15px; }
.arrow_blu li a { background: url(../images/arrow_blu.png) no-repeat left 3px; }
.arrow li a { background: url(../images/arrow.png) no-repeat left center; }
ul.arrow_blu.marginTop li a { display: block; }

.registration-wrapper { margin-left: 2rem; }
.registration-wrapper .arrow_blu li a {
    color: var(--dark-blue);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
}

/* Gestione globale dei collegamenti ipertestuali */
.content-section a.inline-text-link {
    color: var(--cap-blue) !important;
    text-decoration: underline !important;
    font-weight: 600;
}
.content-section a.inline-text-link:hover {
    color: var(--dark-blue) !important;
}
.content-section p { padding: 10px 0px; }
a { text-decoration: none; color: white; }

/* General Text Styling */
.content-text {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #1a1a1a;
    margin-bottom: 15px;
}

/* --- Top Navigation Bar --- */
.top-bar {
    background-color: var(--cap-blue);
    height: 40px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 40px;
}

.top-bar-content {
    display: flex;
    align-items: center;
    gap: 12px;
}
.expanded-nav { gap: 30px; }
.nav-link, .home-link {
    color: var(--white);
    font-weight: 700;
    font-size: 14px;
}
.home-link {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
}
.icon-user { width: auto; height: 30px; }

/* --- Main Header --- */
.main-header {
    padding: 25px 40px;
    background-color: var(--white);
}
.header-content {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}
.logo { height: 45px; }
.page-title {
    color: var(--dark-blue);
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}

/* --- Main Layout Grid --- */
.main-container {
    display: flex;
    flex: 1;
    padding: 30px 40px 60px 40px;
    gap: 50px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}
.albo-layout { gap: 60px; align-items: flex-start; }

/* --- Sidebar Destra: Login Card --- */
.login-card-large {
    flex: 0.8;
    background-color: var(--white);
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden; 
    min-height: 350px;
}
.access-header-centered {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    z-index: 2;
}
.access-header-centered h2 {
    font-size: 24px;
    font-weight: 800;
    color: #000;
}
.action-buttons-centered {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    align-items: center;
    z-index: 2;
}
.access-section {
    flex: 1;
    min-width: 320px;
    background-color: var(--white);
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    gap: 25px;
    align-self: flex-start;
	margin-left: -2rem;
}

.cards-section {
    flex: 2.2;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    align-content: flex-start;
}

/* 2. Fix Left Login Card Elements & Headers */
.access-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.access-header h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--dark-blue);
    margin: 0;
}

.icon-lock {
    width: 24px;
    height: auto;
}

/* 3. Fix Invisible Buttons (Forces background and overrides global white text) */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.action-buttons .btn-primary {
    display: block;
    background-color: var(--cap-blue);
    color: var(--white) !important; /* Forces text to be visible */
    padding: 14px 20px;
    border-radius: 30px;
    text-align: center;
    font-weight: 700;
    font-size: 15px;
    width: 320px;
    transition: background-color 0.2s ease;
}

.action-buttons .btn-primary:hover {
    background-color: var(--dark-blue);
}

/* 4. Fix Registration Link styling */
.registration-wrapper .arrow_blu li a {
    color: var(--cap-blue) !important;
}

/* 5. Fix Foreign Supplier Text block colors */
.foreign-supplier {
    margin-top: 15px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.foreign-supplier h3 {
    color: var(--dark-blue);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.foreign-supplier p {
    font-size: 13px;
    color: #4b5563;
    line-height: 1.5;
}

.foreign-supplier a {
    color: var(--cap-blue) !important;
    text-decoration: underline !important;
    font-weight: 600;
}

/* 6. Fix the Right-Hand Grid Cards Layout (.card) */
.cards-section .card {
    background-color: var(--white);
    border-radius: 16px;
    padding: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
    min-height: 150px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cards-section .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.cards-section .card-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2;
    max-width: 65%;
}

.cards-section .card-content h3 {
    color: var(--dark-blue);
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.cards-section .card-illustration {
    position: absolute;
    right: 15px;
    bottom: 15px;
    height: 85px;
    width: auto;
    z-index: 1;
}

.cards-section .arrow-btn {
    display: inline-block;
    margin-top: 5px;
}

.cards-section .arrow-btn img {
    height: 32px;
    width: auto;
    transition: transform 0.2s ease;
}

.cards-section .arrow-btn:hover img {
    transform: translateX(4px);
}
.action-buttons-centered .btn-primary {
    background-color: var(--cap-blue);
    color: var(--white);
    padding: 15px 20px;
    border-radius: 30px;
    text-align: center;
    font-weight: 600;
    font-size: 15px;
    width: 85%;
    transition: background-color 0.3s;
}
.action-buttons-centered .btn-primary:hover {
    background-color: #1a2c4e;
}
.card-bg-wave {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 250px;
    z-index: 1;
}

/* --- Sezione Centrale (Senza Sfondo Bianco) --- */
.content-section {
    flex: 2.5;
    background: transparent !important;
    padding: 15px 0px;
}
.page-heading {
    font-size: 34px;
    font-weight: 800;
    color: #000;
    margin-bottom: 25px;
}
.intro-bold {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #000;
}

/* Allineamento loghi alla larghezza del testo con risoluzione ottimale */
.partners-box {
    background: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 20px;
    flex-wrap: wrap;
    margin: 20px 0 25px 0;
    padding: 0;
}
.partner-logo {
    height: 42px; 
    
    object-fit: contain;
}
.neutalia-wrapper {
    margin: 10px 0 25px 0;
    width: 100%;
}

/* --- NUOVO BOTTONE A CAPSULA (Dall'immagine di riferimento) --- */
.capsule-button {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--cap-blue);
    color: var(--white) !important;
    padding: 12px 35px;
    border-radius: 50px;
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 320px;
    max-width: 100%;
    text-decoration: none !important;
    transition: background-color 0.2s ease, transform 0.1s ease;
    box-shadow: 0 2px 8px rgba(3, 127, 195, 0.2);
}
.capsule-button:hover {
    background-color: var(--dark-blue);
    transform: translateY(-1px);
}
.capsule-arrow {
    font-size: 20px;
    font-weight: 300;
    margin-left: 20px;
    line-height: 1;
}

/* --- NUOVO ELEMENTO LISTA DOCUMENTI (Stile row di Produzione) --- */
.document-list-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 30px;
    width: 100%;
}
.document-row {
    background-color: #f1f4f8; 
    border-radius: 12px;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    transition: background-color 0.2s ease;
}
.document-row:hover {
    background-color: #e6ebf2;
}
.doc-left-side {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}
.doc-icon-box {
    background-color: var(--white);
    border-radius: 8px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    flex-shrink: 0;
}
.doc-icon-box svg {
    width: 26px;
    height: 26px;
    fill: #d32f2f; /* Colore Icona PDF standard */
}
.doc-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.doc-title {
    color: #1a1a1a !important;
    font-family: var(--font-family);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    text-decoration: none !important;
}
.doc-title:hover {
    color: var(--cap-blue) !important;
}
.doc-meta {
    color: #6b7280;
    font-size: 11px;
    font-weight: 600;
}
.doc-actions {
    display: flex;
    align-items: center;
    gap: 25px;
}
.btn-share-icon {
    font-size: 18px;
    color: #55606e;
    cursor: pointer;
    transform: scaleX(-1); /* Specchia l'icona freccia per la condivisione */
    display: inline-block;
}
.btn-share-icon:hover { color: var(--cap-blue); }

.btn-download-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #9ca3af;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #374151 !important;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: underline;
    transition: all 0.2s;
}
.btn-download-circle:hover {
    border-color: var(--dark-blue);
    color: var(--dark-blue) !important;
    background-color: var(--white);
}

/* --- NUOVE CUSTOM CARDS (Da pagina Regolamenti precedente) --- */
.custom-cards-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
    width: 100%;
}
.custom-card {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 30px 24px;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    min-height: 120px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.custom-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}
.custom-card::before {
    content: ""; position: absolute; right: -25px; top: -30px;
    width: 145px; height: 165px; background-color: #b3d1e6;
    border-radius: 50%; opacity: 0.75; z-index: 1;
}
.custom-card::after {
    content: ""; position: absolute; right: -35px; bottom: -45px;
    width: 115px; height: 115px; background-color: #e3edf5;
    border-radius: 50%; opacity: 0.85; z-index: 1;
}
.custom-card-text {
    color: #1c2834 !important; font-family: "Source Sans Pro Regular", sans-serif;
    font-weight: 700; font-size: 16px; z-index: 2; max-width: 75%; line-height: 1.35;
}
.custom-card-arrow { color: #1c2834 !important; font-size: 22px; z-index: 2; font-weight: 300; padding-right: 5px; }

/* --- Footer --- */
.main-footer {
    background-color: var(--footer-bg);
    color: var(--white);
    padding: 30px 40px 20px 40px;
    font-size: 13px;
}
.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1400px;
    margin: 0 auto;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    padding-bottom: 20px;
    margin-bottom: 15px;
}
.footer-left { display: flex; gap: 30px; }
.footer-logo { height: 37px; }
.company-info p { margin-bottom: 4px; color: #dddddd; }
.contact-box { text-align: left; }
.contact-box h4 { font-size: 16px; margin-bottom: 8px; color: #ffffff; }
.support-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--white);
    font-weight: 700;
    font-size: 14px;
}
.icon-small { width: 14px; background-color: white; padding: 2px; }
.footer-bottom { max-width: 1400px; margin: 0 auto; display: flex; justify-content: flex-end; }
.footer-links { display: flex; gap: 25px; }
.footer-links a { color: #ffffff; font-weight: 600; font-size: 12px; }
/* ==========================================================================
   STILI SPECIFICI PER LA PAGINA REGOLAMENTI 
   (Aggiunti in coda per non influire sulle altre pagine del portale)
   ========================================================================== */

/* --- Nuovo Bottone a Capsula "Registrazione" --- */
.content-section .capsule-button {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--cap-blue, #233c68);
    color: #ffffff !important;
    padding: 12px 30px;
    border-radius: 50px;
    font-family: var(--font-family), sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: none;
    min-width: 180px;
    text-decoration: none !important;
    transition: background-color 0.2s ease, transform 0.1s ease;
    box-shadow: 0 4px 10px rgba(35, 60, 104, 0.25);
}

.content-section .capsule-button:hover {
    background-color: #1a2c4e;
    transform: translateY(-1px);
}

.content-section .capsule-arrow {
    font-size: 18px;
    margin-left: 15px;
    line-height: 1;
}

/* --- Nuova Griglia a Due Colonne per Card dei Documenti --- */
.document-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin: 20px 0 30px 0;
    width: 100%;
}

/* Card Voci di Capitolato / Documenti Bianchi */
.doc-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 30px 25px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    min-height: 160px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.doc-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    border-color: #cbd5e1;
}

.doc-card-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    z-index: 2;
    max-width: 70%;
}

.doc-card-body h3 {
    color: #000000 !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 20px 0;
}

/* Pulsantino tondo con freccia dentro la card */
.doc-card-circle-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #94a3b8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 18px;
    transition: all 0.2s ease;
}

.doc-card:hover .doc-card-circle-btn {
    background-color: var(--cap-blue, #233c68);
    border-color: var(--cap-blue, #233c68);
    color: #ffffff;
}

/* Icone grafiche decorative di sfondo (SVG) */
.doc-card-illustration {
    position: absolute;
    right: 20px;
    bottom: 20px;
    width: 65px;
    height: 65px;
    fill: #a0aec0;
    opacity: 0.4;
    z-index: 1;
    transition: opacity 0.2s ease, fill 0.2s ease;
}

.doc-card:hover .doc-card-illustration {
    opacity: 0.7;
    fill: var(--cap-blue, #233c68);
}

/* --- Forzatura layout a 2 colonne per le card azzurre finali --- */
.custom-cards-container.row-two-items {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 25px;
}

/* --- Mobile responsiveness dedicata per le nuove sezioni --- */
@media (max-width: 768px) {
    .document-cards-grid, 
    .custom-cards-container.row-two-items { 
        grid-template-columns: 1fr !important; 
    }
    .doc-card {
        min-height: 140px;
        padding: 20px;
    }
    .doc-card-body h3 {
        font-size: 18px;
    }
}

/* --- Media Queries (Responsiveness) --- */
@media (max-width: 1024px) {
    .main-container { flex-direction: column; }
    .login-card-large { width: 100%; max-width: 600px; margin: 0 auto; }
    .custom-cards-container { grid-template-columns: repeat(2, 1fr); }
    .partners-box { justify-content: center; gap: 25px; }
	
}
@media (max-width: 1024px) {
    .main-container {
        flex-direction: column;
    }
    .access-section, .cards-section {
        width: 100%;
        flex: none;
    }
}

@media (max-width: 768px) {
    .top-bar, .main-header, .main-container { padding: 20px; }
    .expanded-nav { display: none; }
    .header-content { flex-direction: column; align-items: flex-start; }
    .custom-cards-container { grid-template-columns: 1fr; }
    .document-row { flex-direction: column; align-items: flex-start; gap: 15px; }
    .doc-actions { width: 100%; justify-content: flex-end; }
    .footer-container { flex-direction: column; gap: 30px; }
}