/* ==============================================
   AI ACT ITALIA - Main Stylesheet
   ============================================== */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --primary-blue: #1e3a8a;
    --secondary-blue: #3b82f6;
    --text-dark: #374151;
    --text-light: #6b7280;
    --bg-light: #f3f4f6;
    --bg-white: #ffffff;
    --success-green: #10b981;
    --error-red: #ef4444;
    --warning-orange: #f59e0b;
    --border-color: #d1d5db;

    /* Spacing */
    --container-width: 1200px;
    --section-padding: 80px;

    /* Typography */
    --font-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-base);
    color: var(--text-dark);
    background: var(--bg-white);
    line-height: 1.6;
    font-size: 14px;
}

/* Anti-FOUC (Flash of Unstyled Content) per caricamento dinamico header/footer */
body.loading #header-container,
body.loading #footer-container {
    opacity: 0;
    transition: opacity 0.2s ease-in;
}

body #header-container,
body #footer-container {
    opacity: 1;
}

/* Placeholder con min-height per evitare layout shift */
#header-container {
    min-height: 80px;
}

#footer-container {
    min-height: 300px;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary-blue);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

a {
    text-decoration: none;
    color: var(--secondary-blue);
    transition: color 0.3s;
}

a:hover {
    color: var(--secondary-blue);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: var(--secondary-blue);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--secondary-blue);
    color: var(--secondary-blue);
}

.btn-outline:hover {
    background: var(--secondary-blue);
    color: white;
}

.btn-block {
    width: 100%;
}

.btn-logout {
    background: var(--error-red);
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: #dc2626;
}

/* Header & Navigation */
.main-header {
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand .logo {
    font-size: 1.5rem;
    color: var(--primary-blue);
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-brand .logo a {
    color: inherit;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-img {
    height: 40px;
    width: auto;
    vertical-align: middle;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-blue);
    margin: 3px 0;
    transition: 0.3s;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu li a {
    color: var(--text-dark);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    background: var(--bg-light);
    color: var(--text-dark);
}

.btn-login {
    background: var(--secondary-blue);
    color: white !important;
    padding: 10px 20px;
}

.btn-login:hover {
    background: var(--primary-blue);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: white;
    padding: var(--section-padding) 0;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    color: white;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.page-header h1 {
    color: white;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Info Boxes Section */
.info-boxes {
    padding: var(--section-padding) 0;
    background: var(--bg-light);
}

.boxes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.info-box {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.info-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.box-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    margin-bottom: 1.5rem;
}

.info-box h3 {
    margin-bottom: 1rem;
}

.info-box p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.box-link {
    color: var(--secondary-blue);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.box-link:hover {
    color: var(--secondary-blue);
}

/* Why Important Section */
.why-important {
    padding: var(--section-padding) 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

.importance-text {
    max-width: 900px;
    margin: 0 auto;
}

.warning-box, .success-box {
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    display: flex;
    gap: 1.5rem;
}

.warning-box {
    background: #fef2f2;
    border-left: 4px solid var(--error-red);
}

.warning-box i {
    color: var(--error-red);
    font-size: 2rem;
}

.success-box {
    background: #f0fdf4;
    border-left: 4px solid var(--success-green);
}

.success-box i {
    color: var(--success-green);
    font-size: 2rem;
}

.warning-box h4, .success-box h4 {
    margin-bottom: 1rem;
}

.warning-box ul, .success-box ul {
    list-style: none;
    padding-left: 0;
}

.warning-box li, .success-box li {
    padding: 0.5rem 0;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: white;
    padding: var(--section-padding) 0;
    text-align: center;
}

.cta-content h2 {
    color: white;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.btn-cta {
    background: white;
    color: var(--secondary-blue);
    padding: 15px 40px;
    font-size: 1.1rem;
}

.btn-cta:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(255,255,255,0.3);
}

/* Content Section */
.content-section {
    padding: var(--section-padding) 0;
}

.content-wrapper {
    max-width: 1000px;
    margin: 0 auto;
}

.content-block {
    margin-bottom: 3rem;
}

.content-block h2 {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.content-block h2 i {
    color: var(--secondary-blue);
}

.content-block p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--secondary-blue);
}

.timeline-item {
    position: relative;
    padding: 1.5rem 0 1.5rem 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -44px;
    top: 25px;
    width: 15px;
    height: 15px;
    background: var(--secondary-blue);
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 3px var(--bg-light);
}

.timeline-date {
    font-weight: 700;
    color: var(--secondary-blue);
    margin-bottom: 0.5rem;
}

.timeline-content h4 {
    margin-bottom: 0.5rem;
}

.timeline-content p {
    color: var(--text-light);
}

/* Key Points */
.key-points {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.key-point {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 8px;
}

.key-point i {
    color: var(--success-green);
    font-size: 1.5rem;
}

.key-point h4 {
    margin-bottom: 0.5rem;
}

/* Applicability Cards */
.applicability-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.applicability-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.applicability-card i {
    font-size: 3rem;
    color: var(--secondary-blue);
    margin-bottom: 1rem;
}

.applicability-card h4 {
    margin-bottom: 0.75rem;
}

/* Risk Levels */
.risk-levels {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.risk-card {
    padding: 2rem;
    border-radius: 12px;
    border-left: 5px solid;
}

.risk-unacceptable {
    background: #fef2f2;
    border-color: var(--error-red);
}

.risk-high {
    background: #fef3c7;
    border-color: var(--warning-orange);
}

.risk-limited {
    background: #dbeafe;
    border-color: var(--secondary-blue);
}

.risk-minimal {
    background: #f0fdf4;
    border-color: var(--success-green);
}

.risk-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.risk-header i {
    font-size: 2rem;
}

.risk-badge {
    margin-left: auto;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    background: white;
}

.risk-card ul {
    padding-left: 1.5rem;
}

.risk-card li {
    margin: 0.5rem 0;
}

.risk-note {
    margin-top: 1rem;
    font-style: italic;
    color: var(--text-light);
}

/* Obligations */
.obligations-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.obligation-card {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.obligation-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.obligation-content {
    flex: 1;
}

.obligation-content h4 {
    margin-bottom: 1rem;
}

.requirement-details {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.requirement-details h5 {
    margin-bottom: 0.75rem;
}

.requirement-details ul {
    padding-left: 1.5rem;
}

.requirement-timing {
    padding: 0.75rem 1rem;
    background: #dbeafe;
    border-radius: 6px;
    margin: 1rem 0;
}

.requirement-doc {
    padding: 0.75rem 1rem;
    background: #f0fdf4;
    border-radius: 6px;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.warning-box-small {
    padding: 0.75rem 1rem;
    background: #fef2f2;
    border-radius: 6px;
    color: var(--error-red);
    margin: 1rem 0;
}

.company-obligations {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.company-obligation-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.card-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.company-obligation-card h4 {
    margin-bottom: 1rem;
}

.company-obligation-card ul {
    list-style: none;
    padding: 0;
}

.company-obligation-card li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.company-obligation-card li::before {
    content: "";
    position: absolute;
    left: 0;
    color: var(--success-green);
    font-weight: 700;
}

/* Tables */
.obligations-table {
    overflow-x: auto;
    margin-top: 2rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

th {
    background: var(--primary-blue);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background: var(--bg-light);
}

/* Sanctions Grid */
.sanctions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.sanction-card {
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid;
}

.sanction-card.severe {
    background: #fef2f2;
    border-color: var(--error-red);
}

.sanction-card.high {
    background: #fef3c7;
    border-color: var(--warning-orange);
}

.sanction-card.medium {
    background: #dbeafe;
    border-color: var(--secondary-blue);
}

.sanction-card.low {
    background: var(--bg-light);
    border-color: var(--text-light);
}

.sanction-card h4 {
    margin-bottom: 0.75rem;
}

.sanction-amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.75rem;
}

/* CTA Box */
.cta-box {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: white;
    padding: 3rem;
    border-radius: 12px;
    text-align: center;
    margin-top: 3rem;
}

.cta-box h3 {
    color: white;
    margin-bottom: 1rem;
}

.cta-box p {
    margin-bottom: 2rem;
}

.cta-box .btn {
    margin: 0 0.5rem;
}

/* FAQ Section */
.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}

.faq-question:hover {
    background: var(--bg-light);
}

.faq-question h3 {
    flex: 1;
    font-size: 1.1rem;
}

.faq-icon {
    color: var(--secondary-blue);
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-light);
    line-height: 1.8;
}

/* Login Page */
.login-section {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    padding: 60px 0;
    background: var(--bg-light);
}

.login-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.login-box {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header i {
    font-size: 4rem;
    color: var(--secondary-blue);
    margin-bottom: 1rem;
}

.login-header h2 {
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-light);
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.login-form input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: var(--secondary-blue);
}

.error-message {
    background: #fef2f2;
    border: 1px solid var(--error-red);
    color: var(--error-red);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.login-footer {
    margin-top: 2rem;
}

.login-info {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.login-info h4 {
    margin-bottom: 1rem;
}

.login-info ul {
    list-style: none;
    padding: 0;
}

.login-info li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.login-info i {
    color: var(--success-green);
}

.login-back {
    text-align: center;
}

.login-benefits h3 {
    margin-bottom: 2rem;
}

.benefit-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.benefit-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.benefit-content h4 {
    margin-bottom: 0.5rem;
}

.benefit-content p {
    color: var(--text-light);
}

/* Dashboard */
.dashboard-section {
    padding: 60px 0;
    min-height: calc(100vh - 200px);
    background: var(--bg-light);
}

.dashboard-header {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.welcome-message h1 {
    margin-bottom: 0.5rem;
}

.welcome-message p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.dashboard-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    position: relative;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.dashboard-card .card-icon {
    width: 70px;
    height: 70px;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.dashboard-card .card-content {
    flex: 1;
}

.dashboard-card h3 {
    margin-bottom: 1rem;
}

.dashboard-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.card-features {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.card-features span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.card-features i {
    color: var(--success-green);
}

.card-arrow {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 1.5rem;
    color: var(--secondary-blue);
    transition: transform 0.3s;
}

.dashboard-card:hover .card-arrow {
    transform: translateX(5px);
}

.dashboard-quick-links {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.dashboard-quick-links h3 {
    margin-bottom: 1.5rem;
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    transition: all 0.3s;
    color: var(--text-dark);
}

.quick-link:hover {
    background: var(--secondary-blue);
    color: white;
    transform: translateX(5px);
}

.quick-link:hover i {
    color: white;
}

.quick-link:active {
    color: white;
}

.quick-link i {
    font-size: 1.5rem;
}

.dashboard-notice {
    background: #fef3c7;
    border: 2px solid var(--warning-orange);
    padding: 2rem;
    border-radius: 12px;
    display: flex;
    gap: 1.5rem;
}

.notice-icon {
    font-size: 2.5rem;
    color: var(--warning-orange);
}

.notice-content h4 {
    margin-bottom: 1rem;
}

.notice-content p {
    margin-bottom: 0.75rem;
}

/* Generator Page */
.doc-type-selector {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.doc-type-selector h3 {
    margin-bottom: 1.5rem;
}

.doc-type-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.doc-type-card {
    position: relative;
    cursor: pointer;
}

.doc-type-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.doc-type-content {
    padding: 2rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s;
    text-align: center;
}

.doc-type-content i {
    font-size: 3rem;
    color: var(--secondary-blue);
    margin-bottom: 1rem;
}

.doc-type-content h4 {
    margin-bottom: 0.75rem;
}

.doc-type-content p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.doc-type-card input:checked + .doc-type-content {
    border-color: var(--secondary-blue);
    background: linear-gradient(135deg, rgba(30, 90, 158, 0.05) 0%, rgba(59, 130, 246, 0.05) 100%);
}

/* Two Column Layout for Generator */
.generator-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.form-column {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

/* Custom scrollbar for form column */
.form-column::-webkit-scrollbar {
    width: 8px;
}

.form-column::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 4px;
}

.form-column::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.form-column::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.preview-column {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
}

.generator-form-container {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Professional PDF Viewer */
.pdf-viewer-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    overflow: hidden;
}

.pdf-viewer-header {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.pdf-viewer-header h3 {
    color: white;
    font-size: 1rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pdf-viewer-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-icon {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.btn-icon:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

#zoomLevel {
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    min-width: 50px;
    text-align: center;
}

.pdf-viewer-body {
    background: #525659;
    padding: 2rem;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

/* Custom scrollbar for PDF viewer */
.pdf-viewer-body::-webkit-scrollbar {
    width: 12px;
}

.pdf-viewer-body::-webkit-scrollbar-track {
    background: #3e4347;
    border-radius: 6px;
}

.pdf-viewer-body::-webkit-scrollbar-thumb {
    background: #6b7280;
    border-radius: 6px;
}

.pdf-viewer-body::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.pdf-preview {
    background: white;
    padding: 3rem;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    min-height: 500px;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    transition: transform 0.3s;
    transform-origin: top center;
}

/* PDF Preview Content Styling */
.pdf-preview {
    font-size: 11px;
}

.pdf-preview h2 {
    text-align: center;
    font-size: 13px;
    margin-bottom: 5px;
    color: #333;
}

.pdf-preview p:first-of-type {
    text-align: center;
    font-size: 9px;
    margin-bottom: 30px;
    color: #666;
}

.pdf-preview p {
    font-size: 11px;
}

.pdf-preview strong {
    font-weight: 700;
    color: #000;
}

.pdf-preview ol {
    margin-top: 15px;
    padding-left: 20px;
    font-size: 11px;
}

.pdf-preview ol li {
    margin-bottom: 15px;
    font-size: 11px;
}

.pdf-preview .footer-text {
    margin-top: 25px;
    font-size: 9px;
    color: #666;
}

.pdf-preview .signature-section {
    margin-top: 40px;
    border-top: 1px solid #ccc;
    padding-top: 20px;
}

.pdf-preview .signature-section p {
    font-size: 11px;
}

.pdf-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 500px;
    color: #999;
}

.pdf-placeholder i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.pdf-placeholder p {
    font-size: 1rem;
    text-align: center;
}

.informativa-form .form-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--bg-light);
}

.informativa-form .form-section:last-of-type {
    border-bottom: none;
}

.informativa-form .form-section h3 {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-blue);
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-light);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.checkbox-item:hover {
    background: #dbeafe;
}

.checkbox-item input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* Preview Container */
.preview-container {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    margin-top: 3rem;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--bg-light);
}

.preview-actions {
    display: flex;
    gap: 1rem;
}

.preview-content {
    background: var(--bg-light);
    padding: 3rem;
    border-radius: 8px;
    max-height: 600px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    line-height: 1.8;
    white-space: pre-wrap;
}

/* Contact Page */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
}

.contact-info {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    height: fit-content;
}

.contact-info h3 {
    margin-bottom: 1rem;
}

.contact-details {
    margin-top: 2rem;
}

.contact-details p {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.contact-details i {
    color: var(--secondary-blue);
    width: 20px;
}

.contact-form-wrapper {
    background: #f3f3fe;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 5px;
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--secondary-blue);
}

/* Guides Grid */
.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.guide-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.guide-card h3 {
    margin-bottom: 1rem;
}

.guide-card p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.guide-card h4 {
    margin: 1.5rem 0 1rem;
}

.guide-card ul {
    padding-left: 1.5rem;
}

.guide-card li {
    margin: 0.5rem 0;
}

/* Doc Grid */
.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.doc-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.doc-card .doc-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.doc-card h3 {
    margin-bottom: 1rem;
}

.doc-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.doc-details {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.doc-details p {
    margin: 0.5rem 0;
    color: var(--text-dark);
}

.doc-card h4 {
    margin: 1.5rem 0 1rem;
}

.doc-card ul {
    padding-left: 1.5rem;
}

.doc-card li {
    margin: 0.75rem 0;
}

.doc-card .btn {
    width: 100%;
    margin-top: 1.5rem;
}

/* Checklist */
.checklist-intro {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-align: center;
}

.checklist-form {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.checklist-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--bg-light);
}

.checklist-section:last-of-type {
    border-bottom: none;
}

.checklist-section h3 {
    margin-bottom: 1.5rem;
}

.checklist-item {
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.checklist-item label {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
}

.checklist-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checklist-actions {
    text-align: center;
    margin-top: 2rem;
}

.checklist-result {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    margin-top: 2rem;
    text-align: center;
}

/* Footer */
.main-footer {
    background: var(--primary-blue);
    color: white;
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3,
.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section li {
    margin-bottom: 0.75rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s;
}

.footer-section a:hover {
    color: rgba(255, 255, 255, 0.8);
}

.footer-section i {
    margin-right: 0.5rem;
}

.footer-logo {
    max-width: 150px;
    height: auto;
    margin-bottom: 1rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
}

/* Highlight Box */
.highlight-box {
    background: linear-gradient(135deg, rgba(30, 90, 158, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    border-left: 4px solid var(--secondary-blue);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
    display: flex;
    gap: 1rem;
}

.highlight-box i {
    font-size: 2rem;
    color: var(--secondary-blue);
}

.highlight-box h4 {
    margin-bottom: 0.75rem;
}

.alert-info {
    background: #dbeafe;
    border-left: 4px solid var(--secondary-blue);
    padding: 1.5rem;
    border-radius: 8px;
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.alert-info i {
    font-size: 1.5rem;
    color: var(--secondary-blue);
}

/* Responsive Design */
@media (max-width: 1024px) {
    :root {
        --section-padding: 60px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .login-container {
        grid-template-columns: 1fr;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        display: none;
    }

    .nav-menu.active {
        display: flex;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }

    .boxes-grid,
    .dashboard-grid,
    .guides-grid,
    .doc-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .checkbox-group {
        grid-template-columns: 1fr;
    }

    .preview-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .preview-actions {
        flex-direction: column;
        width: 100%;
    }

    .preview-actions .btn {
        width: 100%;
    }

    .timeline {
        padding-left: 20px;
    }

    .generator-form-container {
        padding: 1.5rem;
    }

    .cta-box .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }

    /* Two column layout becomes single column on mobile */
    .generator-layout {
        grid-template-columns: 1fr;
    }

    .form-column,
    .preview-column {
        position: relative;
        top: 0;
        max-height: none;
    }

    .pdf-viewer-body {
        max-height: 500px;
    }

    .pdf-viewer-controls {
        flex-wrap: wrap;
    }
}

/* Medium screens: adjust form-row for two-column layout */
@media (max-width: 1200px) and (min-width: 769px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Larger screens with two-column layout */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
}

/* CTA Box dentro Checklist Result */
.cta-box-checklist {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: white;
    padding: 3rem;
    border-radius: 16px;
    text-align: center;
    margin: 2rem 0;
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.3);
}

.cta-box-checklist i.fa-rocket {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.cta-box-checklist h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.cta-box-checklist p {
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.btn-cta-large {
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 700;
}

.btn-cta-large:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.3);
}

.cta-box-checklist .btn-outline {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.cta-box-checklist .btn-outline:hover {
    background: white;
    color: var(--secondary-blue);
}

.cta-note {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
}

/* Mobile responsive per CTA box */
@media (max-width: 768px) {
    .cta-box-checklist {
        padding: 2rem 1.5rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .btn-cta-large {
        width: 100%;
    }
}

/* Utilities */
.text-center { text-align: center; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mt-2 { margin-top: 2rem; }
