/* ===== VARIABILI CSS AGGIUNTIVE ===== */
:root {
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.15);
    --shadow-glow: 0 0 40px rgba(94, 145, 208, 0.3);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
    --border-radius-xl: 30px;
    --gradient-primary: linear-gradient(135deg, #5e91d0 0%, #264573 100%);
    --gradient-accent: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-warm: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* ===== ANIMAZIONI AVANZATE ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes floatSlow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(3deg); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes morphBlob {
    0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    25% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    50% { border-radius: 50% 60% 30% 60% / 30% 60% 70% 40%; }
    75% { border-radius: 60% 40% 60% 30% / 70% 30% 50% 60%; }
}

@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    50% { border-color: transparent; }
}

.animate-fadeInUp {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fadeInDown {
    animation: fadeInDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fadeInLeft {
    animation: fadeInLeft 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fadeInRight {
    animation: fadeInRight 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
.animate-delay-5 { animation-delay: 0.5s; }
.animate-delay-6 { animation-delay: 0.6s; }

/* Scroll animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ===== HERO SECTION - DESIGN LUMINOSO G TECH ===== */
.hero {
    background: linear-gradient(180deg, #ffffff 0%, #f0f7ff 100%);
    padding: 80px 0 100px;
    color: var(--text-color);
    position: relative;
    overflow: hidden;
}

/* Decorazione sottile di sfondo */
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(94, 145, 208, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(38, 69, 115, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

/* Rimuovo le forme geometriche pesanti */
.hero-shapes {
    display: none;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(94, 145, 208, 0.1), rgba(38, 69, 115, 0.1));
    border: 1px solid rgba(94, 145, 208, 0.2);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    margin-bottom: 24px;
    color: var(--primary-color);
    font-weight: 500;
}

.hero-badge-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    font-size: 11px;
    color: white;
}

.hero-text h1 {
    font-size: clamp(2.2rem, 4vw, 3rem);
    color: var(--secondary-color);
    margin-bottom: 1.25rem;
    line-height: 1.2;
    font-weight: 700;
}

.hero-text h1 .highlight {
    color: var(--primary-color);
}

.hero-text > p {
    font-size: 1.15rem;
    margin-bottom: 32px;
    line-height: 1.7;
    color: #64748b;
}

.hero-stats {
    display: flex;
    gap: 32px;
    margin-bottom: 32px;
    padding: 24px 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
}

.hero-stat-label {
    font-size: 0.8rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-btn {
    padding: 14px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.hero-btn-primary {
    background: linear-gradient(135deg, #5e91d0, #4a7ab8);
    color: white;
    box-shadow: 0 4px 15px rgba(94, 145, 208, 0.3);
}

.hero-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(94, 145, 208, 0.4);
    color: white;
}

.hero-btn-secondary {
    background: white;
    border: 2px solid #e2e8f0;
    color: var(--secondary-color);
}

.hero-btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.hero-preview {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Hero Document Preview */
.hero-document {
    position: relative;
}

.document-paper {
    width: 280px;
    min-height: 380px;
    background: white;
    border-radius: 8px;
    box-shadow:
        0 25px 50px rgba(0,0,0,0.12),
        0 0 0 1px rgba(0,0,0,0.05);
    padding: 24px 22px;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.document-paper:hover {
    transform: translateY(-5px);
    box-shadow:
        0 30px 60px rgba(0,0,0,0.15),
        0 0 0 1px rgba(0,0,0,0.05);
}

/* Document Header */
.doc-header {
    margin-bottom: 20px;
}

.doc-logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.doc-logo {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.doc-company {
    display: flex;
    flex-direction: column;
}

.doc-company-name {
    font-size: 14px;
    font-weight: 700;
    color: #1e3a5f;
}

.doc-company-slogan {
    font-size: 9px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.doc-header-line {
    height: 2px;
    background: linear-gradient(90deg, #5e91d0, #e2e8f0);
    border-radius: 1px;
}

/* Document Content */
.doc-content {
    padding: 0 2px;
}

.doc-date {
    font-size: 9px;
    color: #64748b;
    text-align: right;
    margin-bottom: 16px;
}

.doc-recipient {
    margin-bottom: 14px;
}

.doc-subject {
    margin-bottom: 14px;
}

.doc-body {
    margin-bottom: 20px;
}

.doc-text-line {
    height: 6px;
    background: #f1f5f9;
    border-radius: 3px;
    margin-bottom: 6px;
}

.doc-text-line.w-100 { width: 100%; }
.doc-text-line.w-95 { width: 95%; }
.doc-text-line.w-90 { width: 90%; }
.doc-text-line.w-80 { width: 80%; }
.doc-text-line.w-70 { width: 70%; }
.doc-text-line.w-60 { width: 60%; }
.doc-text-line.w-50 { width: 50%; }
.doc-text-line.w-40 { width: 40%; }
.doc-text-line.w-35 { width: 35%; }
.doc-text-line.w-30 { width: 30%; }

.doc-signature {
    margin-top: 20px;
}

.doc-sign-line {
    width: 80px;
    height: 1px;
    background: #cbd5e1;
    margin-top: 25px;
}

/* Document Footer */
.doc-footer {
    position: absolute;
    bottom: 20px;
    left: 22px;
    right: 22px;
}

.doc-footer-line {
    height: 1px;
    background: linear-gradient(90deg, #5e91d0, #e2e8f0);
    margin-bottom: 8px;
}

.doc-footer-info {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px;
}

.doc-footer-info span {
    font-size: 7px;
    color: #94a3b8;
}

/* Format Badges */
.format-badges {
    position: absolute;
    top: -10px;
    right: -10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.format-badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.format-badge.pdf {
    background: #dc2626;
    color: white;
}

.format-badge.word {
    background: #2563eb;
    color: white;
}

/* ===== HOW IT WORKS SECTION ===== */
.how-it-works {
    padding: 80px 0 100px;
    background: #f8fafc;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-badge {
    display: inline-block;
    background: rgba(94, 145, 208, 0.1);
    color: var(--primary-color);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.steps-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.steps-line {
    position: absolute;
    top: 55px;
    left: 20%;
    right: 20%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), #4a7ab8);
    z-index: 0;
    display: none;
}

@media (min-width: 992px) {
    .steps-line {
        display: block;
    }
}

.step {
    flex: 1;
    min-width: 260px;
    max-width: 300px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), #4a7ab8);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 auto 20px;
    box-shadow: 0 4px 15px rgba(94, 145, 208, 0.25);
    position: relative;
}

.step-number::after {
    display: none;
}

.step-content {
    background: white;
    padding: 28px 24px;
    border-radius: 16px;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.step:hover .step-content {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    border-color: var(--primary-color);
}

.step-icon {
    width: 60px;
    height: 60px;
    background: rgba(94, 145, 208, 0.08);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.step:hover .step-icon {
    background: linear-gradient(135deg, var(--primary-color), #4a7ab8);
    color: white;
}

.step-content h3 {
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.step-content p {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

.steps-cta {
    text-align: center;
    margin-top: 45px;
}

.steps-cta .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ===== TRUST SECTION ===== */
.trust-section {
    padding: 50px 0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.trust-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.trust-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.trust-stat {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.trust-stat:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(94, 145, 208, 0.1);
    transform: translateY(-2px);
}

.trust-stat-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(94, 145, 208, 0.1);
    border-radius: 10px;
    flex-shrink: 0;
}

.trust-stat-icon svg {
    stroke: var(--primary-color);
}

.trust-stat-content {
    display: flex;
    flex-direction: column;
}

.trust-stat-number {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1.2;
}

.trust-stat-label {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.3;
}

.trust-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(94, 145, 208, 0.08);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--secondary-color);
}

.trust-badge svg {
    stroke: #10b981;
    flex-shrink: 0;
}

/* ===== FEATURES SECTION ===== */
.features {
    padding: 80px 0 100px;
    background: #ffffff;
    position: relative;
}

.section-title {
    text-align: center;
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.section-subtitle {
    text-align: center;
    font-size: 1.05rem;
    color: #64748b;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.feature-card {
    text-align: center;
    padding: 35px 25px;
    border-radius: var(--border-radius-lg);
    background: var(--gray-light);
    transition: all var(--transition-normal);
    border: 2px solid transparent;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    background: var(--white);
    border-color: var(--primary-color);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
    color: var(--white);
    transition: transform var(--transition-normal);
}

.feature-icon svg {
    stroke: #ffffff;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-card h3 {
    color: var(--secondary-color);
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--gray-medium);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ===== GENERATOR SECTION ===== */
.generator-section {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--gray-light) 0%, var(--white) 100%);
}

.generator-container {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 1300px;
    margin: 0 auto;
    overflow: hidden;
}

.generator-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 750px;
}

.generator-form-section {
    padding: 40px;
    overflow-y: auto;
    max-height: 900px;
}

.generator-preview-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: sticky;
    top: 0;
}

/* ===== TABS ===== */
.settings-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 30px;
    background: var(--gray-light);
    padding: 5px;
    border-radius: var(--border-radius-md);
}

.tab-button {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    color: var(--gray-medium);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
}

.tab-button:hover {
    color: var(--primary-color);
    background: rgba(94, 145, 208, 0.1);
}

.tab-button.active {
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: var(--shadow-sm);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

/* ===== FORM STYLES ===== */
.form-section-title {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-top: 30px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-section-title:first-of-type {
    margin-top: 0;
}

.form-section-title svg {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.form-group label .required {
    color: #e74c3c;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 15px;
    border: 2px solid #e8e8e8;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-text);
    font-size: 0.95rem;
    transition: all var(--transition-fast);
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(94, 145, 208, 0.15);
}

.form-group input::placeholder {
    color: #aaa;
}

.form-group input.invalid {
    border-color: var(--error, #ef4444);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}
.form-group input.valid {
    border-color: var(--success, #10b981);
}
.form-group .validation-hint {
    font-size: 0.75rem;
    margin-top: 4px;
    display: none;
}
.form-group .validation-hint.show {
    display: block;
}
.form-group .validation-hint.error {
    color: var(--error, #ef4444);
}
.form-group .validation-hint.ok {
    color: var(--success, #10b981);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Color inputs */
.form-group input[type="color"] {
    padding: 5px;
    height: 45px;
    cursor: pointer;
}

/* ===== TEMPLATE SELECTOR ===== */
.template-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
}

.template-option {
    border: 3px solid #e8e8e8;
    border-radius: var(--border-radius-sm);
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    background: var(--white);
}

.template-option:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

.template-option.selected {
    border-color: var(--primary-color);
    background: rgba(94, 145, 208, 0.08);
    box-shadow: 0 0 0 3px rgba(94, 145, 208, 0.2);
}

.template-preview {
    width: 100%;
    height: 50px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.template-option strong {
    font-size: 0.8rem;
    color: var(--secondary-color);
}

/* ===== FILE UPLOAD ===== */
.file-upload {
    position: relative;
    width: 100%;
}

.file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px;
    border: 3px dashed var(--primary-color);
    border-radius: var(--border-radius-md);
    background-color: rgba(94, 145, 208, 0.03);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
    gap: 10px;
}

.file-upload-label:hover {
    background-color: rgba(94, 145, 208, 0.08);
    border-color: var(--secondary-color);
}

.file-upload-label.has-file {
    border-color: #27ae60;
    background-color: rgba(39, 174, 96, 0.05);
    border-style: solid;
}

.file-upload-label .upload-icon {
    font-size: 2rem;
}

.file-upload-label .upload-text {
    font-size: 0.9rem;
    color: var(--gray-medium);
}

.logo-preview-container {
    margin-top: 15px;
    text-align: center;
}

.logo-preview-container img {
    max-height: 80px;
    max-width: 200px;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-sm);
}

.remove-logo-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 15px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    transition: background var(--transition-fast);
}

.remove-logo-btn:hover {
    background: #c0392b;
}

/* ===== PREVIEW CONTAINER ===== */
.preview-container {
    width: 100%;
    max-width: 450px;
    background: white;
    box-shadow: var(--shadow-md);
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

.preview-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
}

.preview-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.preview-zoom {
    display: flex;
    gap: 8px;
}

.zoom-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background var(--transition-fast);
}

.zoom-btn:hover {
    background: rgba(255,255,255,0.3);
}

.a4-document {
    width: 100%;
    aspect-ratio: 210/297;
    background: white;
    padding: 30px;
    font-size: 10px;
    line-height: 1.5;
    color: var(--text-color);
    overflow: hidden;
    position: relative;
    transform-origin: top center;
    transition: transform var(--transition-normal);
}

/* ===== GENERATE BUTTONS ===== */
.generate-section {
    padding: 25px 40px;
    background: var(--gray-light);
    border-top: 1px solid #e0e0e0;
}

.generate-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-generate {
    padding: 15px 35px;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: var(--border-radius-sm);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    min-width: 180px;
    justify-content: center;
}

.btn-generate.btn-word {
    background: linear-gradient(135deg, #2b579a, #1a3a6e);
    color: white;
}

.btn-generate.btn-word:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(43, 87, 154, 0.4);
}

.btn-generate.btn-pdf {
    background: linear-gradient(135deg, #dc3545, #a71d2a);
    color: white;
}

.btn-generate.btn-pdf:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.4);
}

.btn-generate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-generate .spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn-generate.loading .spinner {
    display: block;
}

.btn-generate.loading .btn-icon {
    display: none;
}

/* ===== SECONDARY ACTIONS ===== */
.secondary-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #ddd;
}

.btn-secondary-action {
    padding: 10px 20px;
    font-size: 0.9rem;
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 8px;
}

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

/* ===== TOAST NOTIFICATION ===== */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: white;
    padding: 18px 25px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 15px;
    transform: translateX(400px);
    transition: transform var(--transition-normal);
    z-index: 1000;
    max-width: 350px;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    border-left: 4px solid #27ae60;
}

.toast.error {
    border-left: 4px solid #e74c3c;
}

.toast.info {
    border-left: 4px solid var(--primary-color);
}

.toast-icon {
    font-size: 1.5rem;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 3px;
}

.toast-message {
    font-size: 0.9rem;
    color: var(--gray-medium);
}

/* ===== WATERMARK OPTION ===== */
.watermark-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--gray-light);
    border-radius: var(--border-radius-sm);
    margin-top: 15px;
}

.watermark-option label {
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.watermark-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.watermark-option input[type="text"] {
    flex: 1;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .generator-layout {
        grid-template-columns: 1fr;
    }

    .generator-preview-section {
        position: relative;
        min-height: auto;
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .generator-form-section {
        padding: 25px;
    }

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

    .btn-generate {
        width: 100%;
    }

    .settings-tabs {
        flex-wrap: wrap;
    }

    .tab-button {
        flex: 1 1 45%;
    }

    .template-selector {
        grid-template-columns: repeat(3, 1fr);
    }

    .toast {
        left: 15px;
        right: 15px;
        bottom: 15px;
    }
}

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.loading-overlay.show {
    display: flex;
}

.loading-content {
    background: white;
    padding: 40px 60px;
    border-radius: var(--border-radius-lg);
    text-align: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--gray-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-text {
    font-size: 1.1rem;
    color: var(--secondary-color);
    font-weight: 500;
}

/* ===== FAQ SECTION ===== */
.faq-section {
    padding: 80px 0 100px;
    background: #f8fafc;
}

.faq-container {
    max-width: 750px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: #cbd5e1;
}

.faq-item.active {
    border-color: var(--primary-color);
    box-shadow: 0 4px 20px rgba(94, 145, 208, 0.1);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: #f8fafc;
}

.faq-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: rgba(94, 145, 208, 0.08);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.faq-item.active .faq-icon {
    background: var(--primary-color);
    color: white;
}

.faq-text {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.faq-toggle {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle {
    transform: rotate(180deg);
    color: var(--primary-color);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 22px;
    background: #f8fafc;
}

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

.faq-answer p {
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.faq-answer ul {
    margin: 12px 0;
    padding-left: 18px;
}

.faq-answer li {
    color: #64748b;
    margin-bottom: 6px;
    line-height: 1.6;
    font-size: 0.9rem;
}

.faq-answer strong {
    color: var(--secondary-color);
}

.faq-cta {
    text-align: center;
    margin-top: 50px;
    padding: 40px;
    background: linear-gradient(135deg, rgba(94, 145, 208, 0.05), rgba(38, 69, 115, 0.05));
    border-radius: var(--border-radius-lg);
}

.faq-cta p {
    color: var(--gray-medium);
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.faq-cta .btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .hero {
        padding: 60px 0 70px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero-badge {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-preview {
        order: -1;
    }

    .document-paper {
        width: 240px;
        min-height: 320px;
        padding: 20px 18px;
    }

    .doc-company-name {
        font-size: 12px;
    }

    .doc-logo svg {
        width: 28px;
        height: 28px;
    }

    .how-it-works {
        padding: 60px 0 70px;
    }

    .trust-section {
        padding: 40px 0;
    }

    .trust-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .trust-stat {
        padding: 16px 18px;
    }

    .trust-stat-icon {
        width: 44px;
        height: 44px;
    }

    .trust-stat-icon svg {
        width: 22px;
        height: 22px;
    }

    .trust-stat-number {
        font-size: 1.2rem;
    }

    .trust-stat-label {
        font-size: 0.8rem;
    }

    .features {
        padding: 60px 0 70px;
    }

    .faq-section {
        padding: 60px 0 70px;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 40px 0 50px;
    }

    .hero-text h1 {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }

    .hero-text > p {
        font-size: 1rem;
        margin-bottom: 24px;
    }

    .hero-badge {
        font-size: 0.8rem;
        padding: 8px 14px;
        margin-bottom: 16px;
    }

    .hero-stats {
        gap: 20px;
        padding: 18px 0;
        margin-bottom: 24px;
    }

    .hero-stat-number {
        font-size: 1.4rem;
    }

    .hero-stat-label {
        font-size: 0.7rem;
    }

    .hero-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 24px;
        font-size: 0.9rem;
    }

    .hero-buttons {
        gap: 12px;
    }

    .document-paper {
        width: 200px;
        min-height: 270px;
        padding: 16px 14px;
    }

    .doc-company-name {
        font-size: 11px;
    }

    .doc-company-slogan {
        font-size: 7px;
    }

    .doc-logo svg {
        width: 24px;
        height: 24px;
    }

    .doc-date {
        font-size: 7px;
    }

    .doc-text-line {
        height: 5px;
        margin-bottom: 5px;
    }

    .doc-footer {
        bottom: 14px;
        left: 14px;
        right: 14px;
    }

    .doc-footer-info span {
        font-size: 6px;
    }

    .format-badges {
        top: -8px;
        right: -8px;
    }

    .format-badge {
        padding: 4px 8px;
        font-size: 8px;
    }

    .section-header {
        margin-bottom: 35px;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .section-subtitle {
        font-size: 0.95rem;
    }

    .steps-container {
        flex-direction: column;
        align-items: center;
        gap: 24px;
    }

    .step {
        max-width: 100%;
        min-width: auto;
    }

    .step-number {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
        margin-bottom: 16px;
    }

    .step-content {
        padding: 22px 20px;
    }

    .step-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 12px;
    }

    .step-icon svg {
        width: 24px;
        height: 24px;
    }

    .step-content h3 {
        font-size: 1rem;
    }

    .step-content p {
        font-size: 0.85rem;
    }

    .steps-cta {
        margin-top: 30px;
    }

    .faq-question {
        padding: 14px 16px;
        gap: 12px;
    }

    .faq-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }

    .faq-icon svg {
        width: 18px;
        height: 18px;
    }

    .faq-text {
        font-size: 0.88rem;
    }

    .faq-answer {
        padding: 0 16px;
    }

    .faq-item.active .faq-answer {
        padding: 14px 16px;
    }

    .how-it-works,
    .features,
    .faq-section {
        padding: 50px 0 60px;
    }

    .trust-section {
        padding: 30px 0;
    }

    .trust-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .trust-stat {
        padding: 14px 12px;
        gap: 10px;
    }

    .trust-stat-icon {
        width: 40px;
        height: 40px;
        border-radius: 8px;
    }

    .trust-stat-icon svg {
        width: 20px;
        height: 20px;
    }

    .trust-stat-number {
        font-size: 1.1rem;
    }

    .trust-stat-label {
        font-size: 0.75rem;
    }

    .trust-badges {
        gap: 10px;
    }

    .trust-badge {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 30px 0 40px;
    }

    .hero-text h1 {
        font-size: 1.5rem;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 15px;
    }

    .hero-stat {
        min-width: 70px;
    }

    .document-paper {
        width: 170px;
        min-height: 230px;
        padding: 14px 12px;
    }

    .doc-logo-area {
        gap: 8px;
    }

    .doc-logo svg {
        width: 20px;
        height: 20px;
    }

    .doc-company-name {
        font-size: 10px;
    }

    .doc-header {
        margin-bottom: 12px;
    }

    .doc-content {
        padding: 0;
    }

    .doc-text-line {
        height: 4px;
        margin-bottom: 4px;
    }

    .doc-recipient,
    .doc-subject {
        margin-bottom: 10px;
    }

    .doc-body {
        margin-bottom: 14px;
    }

    .format-badge {
        padding: 3px 6px;
        font-size: 7px;
    }

    .trust-section {
        padding: 24px 0;
    }

    .trust-content {
        gap: 20px;
    }

    .trust-stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .trust-stat {
        padding: 12px 10px;
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .trust-stat-icon {
        width: 36px;
        height: 36px;
    }

    .trust-stat-icon svg {
        width: 18px;
        height: 18px;
    }

    .trust-stat-number {
        font-size: 1rem;
    }

    .trust-stat-label {
        font-size: 0.7rem;
    }

    .trust-badges {
        gap: 8px;
    }

    .trust-badge {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .trust-badge svg {
        width: 16px;
        height: 16px;
    }
}
