/* --- Global Styles & Utilities --- */

.hexagon {
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

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

.texto-prata {
    /* Simulates a metallic silver effect using a multi-step linear gradient */
    background: linear-gradient(to bottom right, #7a7a7a 0%, #e8e8e8 50%, #7a7a7a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    font-weight: 700;
}

/* --- Component: Hero Section Animations --- */

#rotating-text {
    transition: opacity 0.8s ease-in-out;
}

#rotating-text.fade-out {
    opacity: 0;
}

#rotating-text span {
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

/* --- Component: Modal Window --- */

#modal {
    opacity: 0;
}

#modal-content {
    transform: scale(0.95);
    /* Limits height and enables scrolling for long content visibility */
    max-height: 85vh;
    overflow-y: auto;
}

#modal.opacity-100 {
    opacity: 1;
}

#modal-content.scale-100 {
    transform: scale(1);
}

/* --- Component: Chat Widget --- */

#chat-widget-container {
    font-family: Arial, sans-serif;
}

#chat-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #e5e4e2c3;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transition: transform 0.2s ease;
    animation: pulse 2s infinite;
}

#chat-icon:hover {
    transform: scale(1.1);
}

#chat-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    max-width: 90vw;
    height: 500px;
    max-height: 70vh;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 10000;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#chat-window.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.chat-header {
    padding: 15px;
    background-color: #3A5A7A;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    margin: 0;
    font-size: 1.1em;
}

#close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

#chat-body {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #f4f4f4;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 80%;
    line-height: 1.4;
}

.user-message {
    background-color: #3A5A7A;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.bot-message {
    background-color: #e9e9eb;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-footer {
    padding: 10px;
    border-top: 1px solid #ddd;
}

#chat-form {
    display: flex;
    gap: 10px;
}

#chat-input {
    flex-grow: 1;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 1em;
    color: #333;
}

#chat-input:focus {
    outline: none;
    border-color: #3A5A7A;
}

#send-btn {
    background-color: #3A5A7A;
    border: none;
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

#send-btn svg {
    width: 20px;
    height: 20px;
}

/* --- Component: WhatsApp Widget --- */

#whatsapp-icon {
    position: fixed;
    /* Positioned above the chat button to avoid overlap */
    bottom: 90px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #e5e4e2c3;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transition: transform 0.2s ease;
    animation: pulse 2s infinite;
    text-decoration: none;
}

#whatsapp-icon:hover {
    transform: scale(1.1);
}

/* --- Animations --- */

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(58, 90, 122, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(58, 90, 122, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(58, 90, 122, 0);
    }
}