/* Reset e base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* Nascondi il widget di Google Translate */
#google_translate_element {
    display: none;
}

/* Nascondi la barra di Google Translate in alto */
.goog-te-banner-frame.skiptranslate {
    display: none !important;
}

body {
    top: 0px !important;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 60px 0 40px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* Hamburger Menu */
.hamburger-menu {
    position: absolute;
    top: 20px;
    right: 30px;
    z-index: 1000;
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 10px;
}

.hamburger-icon span {
    width: 30px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-icon:hover span {
    background-color: #e0e0e0;
}

.menu-dropdown {
    display: none;
    position: absolute;
    top: 60px;
    right: 0;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    min-width: 180px;
}

.menu-dropdown.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.menu-dropdown a {
    display: block;
    padding: 15px 20px;
    color: #1e3c72;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.menu-dropdown a:last-child {
    border-bottom: none;
}

.menu-dropdown a:hover {
    background-color: #f5f5f5;
    color: #2a5298;
}

.menu-dropdown a.logout-btn {
    color: #e74c3c;
}

.menu-dropdown a.logout-btn:hover {
    background-color: #ffebee;
    color: #c0392b;
}

.logo {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 20px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.subtitle {
    font-size: 1.3rem;
    font-weight: 300;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Main Content */
.main-layout {
    display: flex;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px 60px;
    align-items: flex-start;
}

/* Chatbot principale */
.chatbot-main {
    flex: 1;
    min-width: 0;
}

.chatbot-main h2 {
    text-align: center;
    font-size: 2.5rem;
    color: #1e3c72;
    margin-bottom: 20px;
}

/* Sidebar Pacchetti */
.packages-sidebar {
    width: 320px;
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.packages-sidebar h3 {
    font-size: 1.8rem;
    color: #1e3c72;
    text-align: center;
    margin-bottom: 10px;
}

.package-card-sidebar {
    background: white;
    border-radius: 12px;
    padding: 25px 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.package-card-sidebar:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.package-card-sidebar.featured {
    border: 2px solid #667eea;
}

.popular-badge-small {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.package-name {
    font-size: 1.5rem;
    color: #1e3c72;
    font-weight: bold;
    margin-bottom: 10px;
}

.package-price {
    font-size: 2.5rem;
    font-weight: bold;
    color: #1e3c72;
    margin: 10px 0;
}

.package-desc {
    color: #333;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.package-features {
    list-style: none;
    padding: 0;
    margin: 15px 0;
    text-align: left;
}

.package-features li {
    padding: 8px 0;
    color: #555;
    font-size: 0.9rem;
}

.buy-package-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: auto;
}

.buy-package-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.prompt-info {
    text-align: center;
    background: #f0f4ff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    color: #1e3c72;
    font-weight: 500;
}

.chatbot-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    height: 500px;
    overflow-y: auto;
    padding: 25px;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bot-message,
.user-message {
    display: flex;
    width: 100%;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bot-message {
    justify-content: flex-start;
}

.user-message {
    justify-content: flex-end;
}

.message-bubble {
    max-width: 70%;
    padding: 14px 18px;
    border-radius: 18px;
    line-height: 1.6;
    word-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.bot-message .message-bubble {
    background: white;
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 4px;
}

.user-message .message-bubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-input-container {
    display: flex;
    padding: 20px;
    background: white;
    border-top: 2px solid #e0e0e0;
}

.chat-input-container input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    margin-right: 10px;
}

.chat-input-container input:focus {
    outline: none;
    border-color: #667eea;
}

.chat-input-container button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.chat-input-container button:hover:not(:disabled) {
    transform: scale(1.05);
}

.chat-input-container button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Footer */
footer {
    background-color: #1e3c72;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 60px;
}

footer p {
    font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .main-layout {
        flex-direction: column;
    }

    .packages-sidebar {
        width: 100%;
        position: relative;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        order: 1;
    }

    .packages-sidebar h3 {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .logo {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    .chatbot-main h2 {
        font-size: 2rem;
    }

    .packages-sidebar {
        grid-template-columns: 1fr;
    }

    .packages-sidebar h3 {
        text-align: center;
    }

    .package-price {
        font-size: 2rem;
    }

    .chat-messages {
        height: 300px;
    }

    .message-bubble {
        max-width: 85%;
    }

    .chat-input-container {
        flex-direction: column;
    }

    .chat-input-container input {
        margin-right: 0;
        margin-bottom: 10px;
    }
}
