/* Stampanti hero animations */
.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: subtle-zoom 30s infinite alternate ease-in-out;
    filter: brightness(0.9) contrast(1.1);
    opacity: 0.2;
}

@keyframes subtle-zoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

.header-wave {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
}

.header-wave svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 46px;
}

.header-wave .shape-fill { fill: #FFFFFF; }

.blur-text {
    position: relative;
    display: inline-block;
}

.blur-text:after {
    content: "";
    position: absolute;
    bottom: -8px; left: 0;
    width: 100%;
    height: 3px;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.6s ease-out;
    animation: lineReveal 1s ease-out 0.5s forwards;
}

@keyframes lineReveal {
    0% { transform: scaleX(0); transform-origin: right; }
    100% { transform: scaleX(1); transform-origin: left; }
}

.floating-printer {
    position: absolute;
    right: 5%;
    bottom: 46px;
    width: 180px;
    height: auto;
    opacity: 0.7;
    animation: float 6s ease-in-out infinite;
    display: none;
}

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

@media (min-width: 1024px) {
    .floating-printer { display: block; }
}

.header-droplet {
    position: absolute;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    filter: blur(1px);
    opacity: 0;
    pointer-events: none;
    animation: droplet-fall 2s ease-in forwards;
}

@keyframes droplet-fall {
    0% { transform: translateY(-20px); opacity: 0; }
    30% { opacity: 0.8; }
    100% { transform: translateY(100px); opacity: 0; }
}

/* Comparison tables */
.upgrade-badge {
    position: absolute;
    top: 10px; right: 10px;
    background: #1d4ed8;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.upgrade-badge svg { width: 14px; height: 14px; }

.comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 0.5rem;
    overflow: hidden;
}

.comparison-table th {
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    padding: 1rem;
}

.comparison-table th:first-child { text-align: left; width: 25%; }

.comparison-table td {
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.comparison-table tr:nth-child(odd) { background-color: rgba(243, 244, 246, 0.7); }
.comparison-table tr:nth-child(even) { background-color: rgba(255, 255, 255, 0.7); }
.comparison-table tr:hover td { background-color: rgba(219, 234, 254, 0.4); }

.comparison-table td:first-child { font-weight: 600; text-align: left; color: #1e40af; }

.highlighted-cell { position: relative; font-weight: 600; color: #1d4ed8; }

.highlighted-cell::after {
    content: "";
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background-color: #3b82f6;
    border-radius: 3px;
}

.highlighted-row td { background-color: rgba(219, 234, 254, 0.6) !important; }
.highlighted-col { background-color: rgba(219, 234, 254, 0.3); }

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #dbeafe;
    color: #1e40af;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

.badge-success { background-color: #dcfce7; color: #166534; }
.badge-warning { background-color: #fef3c7; color: #92400e; }

.upgrade-feature {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    color: #1d4ed8;
    font-weight: 600;
}

.upgrade-feature svg { width: 16px; height: 16px; }

.upgrade-section { position: relative; overflow: hidden; }

.upgrade-card {
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 1);
    transition: all 0.3s ease;
}

.upgrade-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.upgrade-icon {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    width: 50px; height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.upgrade-icon svg { width: 30px; height: 30px; }

/* Premium comparison table */
.premium-comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    background: #fff;
    position: relative;
    margin-top: 0;
}

.premium-comparison-table::before {
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.05) 100%);
    pointer-events: none;
    z-index: 1;
}

.premium-comparison-table thead { position: relative; }

.premium-comparison-table th {
    background: #1e40af;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    padding: 1.25rem 1rem;
    position: relative;
}

.premium-comparison-table th:not(:first-child) { text-align: center; }
.premium-comparison-table th:first-child { background: linear-gradient(135deg, #0f2b7a 0%, #1e40af 100%); border-radius: 0.75rem 0 0 0; text-align: left; }
.premium-comparison-table th:last-child { border-radius: 0 0.75rem 0 0; background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%); }
.premium-comparison-table tr:last-child td:first-child { border-radius: 0 0 0 0.75rem; }
.premium-comparison-table tr:last-child td:last-child { border-radius: 0 0 0.75rem 0; }

.premium-comparison-table td {
    padding: 1.25rem 1rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    border-bottom: 1px solid rgba(226, 232, 240, 0.75);
}

.premium-comparison-table td:not(:last-child) { border-right: 1px solid rgba(226, 232, 240, 0.75); }
.premium-comparison-table tr:nth-child(odd) { background-color: rgba(249, 250, 251, 0.7); }
.premium-comparison-table tr:nth-child(even) { background-color: rgba(255, 255, 255, 0.7); }
.premium-comparison-table tr:hover td { background-color: rgba(243, 244, 246, 0.5); }

.premium-comparison-table td:first-child {
    font-weight: 600;
    text-align: left;
    color: #1e40af;
    background-color: rgba(243, 244, 246, 0.5);
    border-right: 2px solid rgba(226, 232, 240, 1);
}

.premium-comparison-table tr:hover td:first-child { background-color: rgba(219, 234, 254, 0.4); }

.premium-highlighted-cell { position: relative; font-weight: 600; color: #1d4ed8; }

.premium-highlighted-cell::after {
    content: "";
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
    border-radius: 3px;
}

.premium-comparison-table .highlighted-row td { background-color: rgba(219, 234, 254, 0.3); }
.premium-comparison-table .highlight-column { background-color: rgba(219, 234, 254, 0.2); }
.premium-comparison-table .highlight-column.premium-highlighted-cell { background-color: rgba(219, 234, 254, 0.3); }

.premium-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(219, 234, 254, 0.7);
    color: #1e40af;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.premium-badge-success {
    background: linear-gradient(135deg, rgba(220, 252, 231, 0.7) 0%, rgba(220, 252, 231, 0.9) 100%);
    color: #166534;
    box-shadow: 0 1px 2px rgba(22, 101, 52, 0.1);
}

.premium-badge-warning {
    background: linear-gradient(135deg, rgba(254, 243, 199, 0.7) 0%, rgba(254, 243, 199, 0.9) 100%);
    color: #92400e;
    box-shadow: 0 1px 2px rgba(146, 64, 14, 0.1);
}

.premium-upgrade-feature {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    color: #1d4ed8;
    font-weight: 600;
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.5) 0%, rgba(219, 234, 254, 0.8) 100%);
    padding: 0.35rem 0.75rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.premium-upgrade-feature:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.premium-upgrade-feature svg { width: 16px; height: 16px; }

.model-image { max-width: 80px; margin: 0 auto 0.75rem; filter: drop-shadow(0 4px 3px rgb(0 0 0 / 0.07)) drop-shadow(0 2px 2px rgb(0 0 0 / 0.06)); }

.table-header-model { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.table-header-model span { display: block; font-weight: normal; font-size: 0.75rem; opacity: 0.9; letter-spacing: normal; margin-top: 0.25rem; }

.premium-price-value { font-size: 1.15rem; font-weight: 700; color: #1e40af; }
.recommended-column { position: relative; overflow: visible; }

/* Chat popup */
.chat-popup {
    position: fixed;
    bottom: 20px; right: 20px;
    width: 360px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 0;
    z-index: 1000;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.chat-bubble {
    position: absolute;
    bottom: 15px; right: 15px;
    width: 40px; height: 40px;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    animation: bubble-pulse 2s infinite;
}

.chat-bubble svg { width: 20px; height: 20px; }
.chat-bubble:hover { transform: scale(1.1); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25); }

@keyframes bubble-pulse {
    0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(59, 130, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

.chat-popup.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    animation: chat-bump 0.5s;
    display: flex;
}

.chat-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 16px 16px 0 0;
    flex-shrink: 0;
}

.chat-body {
    padding: 16px 20px;
    position: relative;
    overflow-y: auto;
    flex-grow: 1;
    max-height: calc(80vh - 130px);
}

.chat-messages { display: flex; flex-direction: column; gap: 15px; margin-bottom: 15px; padding-right: 5px; }

.chat-message-container { display: flex; flex-direction: column; max-width: 80%; }

.user-message { align-self: flex-end; background-color: #3b82f6; color: white; border-radius: 18px 18px 4px 18px; padding: 10px 14px; word-break: break-word; }

.bot-message { align-self: flex-start; background-color: #f3f4f6; color: #374151; border-radius: 18px 18px 18px 4px; padding: 10px 14px; word-break: break-word; }

.bot-message a { color: #2563eb; text-decoration: underline; }

.message-time { font-size: 0.7rem; color: #9ca3af; margin-top: 4px; align-self: flex-end; }

.bot-container { align-self: flex-start; }
.user-container { align-self: flex-end; }

.chat-input-container { display: flex; margin-top: 10px; gap: 8px; border-top: 1px solid #e5e7eb; padding-top: 10px; }

.chat-input { flex-grow: 1; border: 1px solid #d1d5db; border-radius: 99px; padding: 8px 16px; font-size: 0.95rem; outline: none; transition: border-color 0.2s; }

.chat-input:focus { border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2); }

.chat-send { background: #2563eb; color: white; border: none; border-radius: 99px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; }

.chat-send:hover { background: #1d4ed8; transform: scale(1.05); }
.chat-send:disabled { background: #9ca3af; cursor: not-allowed; transform: none; }

.chat-send svg { width: 18px; height: 18px; }

.typing-indicator { display: flex; padding: 10px 14px; background-color: #f3f4f6; border-radius: 18px 18px 18px 4px; align-self: flex-start; }

.typing-dot { width: 8px; height: 8px; background-color: #9ca3af; border-radius: 50%; margin-right: 4px; animation: typing-animation 1.4s infinite ease-in-out both; }

.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; margin-right: 0; }

@keyframes typing-animation {
    0%, 80%, 100% { transform: scale(0.7); opacity: 0.6; }
    40% { transform: scale(1); opacity: 1; }
}

.welcome-message { background-color: rgba(219, 234, 254, 0.3); border-radius: 12px; padding: 12px 16px; margin-bottom: 15px; border-left: 4px solid #3b82f6; }
.welcome-message h3 { font-weight: 600; color: #1e40af; margin-bottom: 8px; font-size: 1rem; }
.welcome-message p { color: #4b5563; font-size: 0.95rem; margin-bottom: 8px; }
.welcome-message ul { list-style: disc; padding-left: 25px; font-size: 0.9rem; color: #4b5563; }
.welcome-message li { margin-bottom: 4px; }
.welcome-message li:last-child { margin-bottom: 0; }
