/* ==========================================
   RESET
========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f6f7fb;
    color: #1f2937;
    line-height: 1.6;
}





/* ==========================================
   HEADER
========================================== */

.header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    max-width: 100%;
    height: 75px;
    display: flex;
    justify-content: space-around;
    align-items: center;
}


.logo {
    font-size: 22px;
    font-weight: 800;
    margin: 20px;
}

nav {
    width: 100%;
    text-align: center;
    margin: 20px;
}

nav a {
    color: #374151;
    text-decoration: none;
    font-weight: 600;
    margin: 20px;
}


nav a:hover {
    color: #2563eb;
}


/* ==========================================
   HERO
========================================== */

.hero {
    min-height: 600px;
    align-content: center;
    justify-items: center;
    background: linear-gradient(
        135deg,
        #eef2ff,
        #ffffff
    );
}


.hero-content {
    max-width: 60%;
    justify-items: center;
}


.hero h1 {
    width: 80%;
    font-size: 45px;
    line-height: 1.1;
    margin-bottom: 25px;
    text-align: left;
}


.hero h1 span {
    color: #2563eb;
}


.hero p {
    width: 80%;
    font-size: 20px;
    color: #6b7280;
    margin-bottom: 35px;
    text-align: justify;
}


/* ==========================================
   SECTION TITLES
========================================== */

.section-title {
    text-align: center;
    margin-bottom: 45px;
    justify-items: center;
}


.section-title h1 {
    font-size: 30px;
    line-height: 1.1;
    margin-bottom: 25px;
}


.section-title h1 span {
    color: #1ebe5d;
}


.section-title p {
    color: #6b7280;
    font-size: 20px;
    text-align: justify;
    max-width: 850px;
}


/* ==========================================
   CHAT SECTION
========================================== */

.chat-section {
    padding: 100px 0;
    background: #ffffff;
    display: flex;
    width: 100%;
    justify-content: center;
}


/* ==========================================
   SELECTOR DE IDENTIDADES
========================================== */

.agent-selector {
    max-width: 900px;
    margin: 0 auto 35px;
    text-align: center;
}


.agent-selector h3 {
    font-size: 24px;
    margin-bottom: 5px;
}


.agent-selector-description {
    color: #6b7280;
    margin-bottom: 20px;
}


/* ==========================================
   CHAT BOX
========================================== */

.chat-box {
    max-width: 90%;
    border-radius: 20px;
    margin: auto;
    overflow: hidden;
    background: #ffffff;

    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.10);

    border: 1px solid #e5e7eb;
}


/* ==========================================
   CHAT HEADER
========================================== */

.chat-header {
    background: #111827;
    display: block;
}

.chat-intro {
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    border-bottom: solid;
    border-color: white;
}


.assistant-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;
    border-style: solid;
    border-color: #fcfcfc;
    background: #92b4ff;
    overflow: hidden;
    flex-shrink: 0;
}


.assistant-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}


.chat-intro strong {
    display: block;
}


.chat-intro small {
    color: #86efac;
}


.agent-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    justify-items: center;
    padding: 15px;
}


.agent-buttons button {
    justify-content: center;
    align-content: center;
    border: none;
    background: none;
    color:  #e5e7eb;
    cursor: pointer;
    display: flex;
    align-items: center;
    width: 75%;
    height: 35px;
    transition:
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


.agent-button:hover {
    transform: translateY(-2px);
}


.agent-button.active {
    color: #86efac;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.15);
}


.agent-button-icon {
    font-size: 30px;
    flex-shrink: 0;
}

.agent-button small {
    display: block;
    color: #6b7280;
    font-size: 12px;
}

.agent-button h1{
    font-size: 15px;
    color: #86efac;
}

/* ==========================================
   MENSAJES
========================================== */

.chat-messages {
    height: 450px;
    overflow-y: auto;
    padding: 25px;
    background: #f9fafb;
}


.message {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#arrow {
    transform: rotate(-90deg);
     object-fit: contain;

    transition: transform 0.5s ease;
}

#arrow:hover {
    transform: rotate(360deg);
}

.message.user {
    flex-direction: row-reverse;
}


.avatar {
    width: 35px;
    height: 35px;
    min-width: 35px;

    border-radius: 50%;
    background: none;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;
}


.avatar img {
    width: 35px;
    height: 35px;
    min-width: 35px;

    border-radius: 50%;
    object-fit: cover;
    display: block;
}


.bubble {
    max-width: 70%;
    padding: 13px 17px;

    border-radius: 15px;
    background: white;

    box-shadow:
        0 2px 5px rgba(0, 0, 0, 0.05);
}


.message.user .bubble {
    background: #2563eb;
    color: white;
}


/* ==========================================
   INPUT
========================================== */

.chat-input {
    display: flex;
    padding: 15px;

    border-top: 1px solid #e5e7eb;
    background: white;
}


.chat-input input {
    flex: 1;
    border: none;
    outline: none;

    font-size: 16px;
    padding: 12px;
}


.chat-input button {
    width: 50px;
    height: 50px;

    border: none;
    border-radius: 10px;

    background: none;
    color: #000000;

    font-size: 40px;
    cursor: pointer;
}


/* ==========================================
   REINICIAR CHAT
========================================== */

.reset-chat {

    width: 40%;
    height: 70px;
    border: none;
    border-radius: 10px;
    justify-items: center;

    background: none;

    display: flex;
    justify-content: right;
    padding-right: 20px;

    cursor: pointer;
     
}

.reset-chat img{
    width: 15%;
}

.reset-chat img:hover {

    transform: rotate(90deg);
       object-fit: contain;
    transition: transform 0.2s ease;
}

/* ==========================================
   EMAIL
========================================== */

.whatsapp-tittle {
    margin-top: 25px;
    margin-bottom: 25px;

    text-align: center;
    justify-items: center;
}


.whatsapp-tittle > p {
    max-width: 850px;
    font-size: 20px;
    color: #6b7280;
    text-align: justify;
}


.chat-whatsapp-container {
    width: 100%;
    min-height: 150px;

    display: flex;
    justify-content: center;
    align-items: center;
}


.chat-whatsapp-container button {
    padding: 14px 20px;

    border: none;
    border-radius: 10px;

    background: #1ebe5d;
    color: white;

    font-size: 15px;
    font-weight: 600;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        opacity 0.2s ease;
}


.chat-whatsapp-container button:hover {
    background: #15803d;
}


.chat-whatsapp-container button:active {
    transform: scale(0.98);
}


/* ==========================================
   FORMULARIO EMAIL
========================================== */

.chat-email-form {
    width: 100%;
    max-width: 600px;

    margin: 0 auto 30px;
    padding: 25px;

    background: #f9fafb;

    border-radius: 15px;
}


.chat-email-form > p {
    margin-bottom: 20px;
    color: #6b7280;
}


.chat-email-form .form-group {
    margin: 15px 0;
}


.chat-email-form input {
    width: 100%;

    background: white;

    border: 1px solid #d1d5db;
    border-radius: 10px;

    padding: 14px;

    font-size: 15px;
    outline: none;
}


.chat-email-form input:focus {
    border-color: #2563eb;
}


.chat-email-form button {
    margin-top: 10px;

    padding: 16px;

    border: none;
    border-radius: 10px;

    background: #1ebe5d;
    color: white;

    font-size: 16px;
    font-weight: bold;

    cursor: pointer;
}


.chat-email-form button:hover {
    background: #15803d;
}


.chat-email-form button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}



/* ==========================================
   CONTACTO
========================================== */

.contact-section {
    padding: 100px 0;
    background: #f6f7fb;
    justify-items: center;
}

.contact-section .container {
 width: 80%;
}


.contact-card {
    max-width: 100%;
    margin: auto;

    padding: 40px;

    background: white;
    border-radius: 18px;

    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.08);
}


.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}


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


.form-group.full {
    grid-column: 1 / -1;
}


.form-group input,
.form-group textarea {
    border: 1px solid #d1d5db;
    border-radius: 8px;

    padding: 13px;

    font-family: inherit;
    font-size: 15px;

    outline: none;
}


.form-group input:focus,
.form-group textarea:focus {
    border-color: #2563eb;
}


.whatsapp-button {
    margin-top: 25px;

    width: 100%;
    padding: 16px;

    border: none;
    border-radius: 10px;

    background: #16a34a;
    color: white;

    font-size: 16px;
    font-weight: bold;

    cursor: pointer;
}


.whatsapp-button:hover {
    background: #15803d;
}


.whatsapp-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}


.success {
    margin-top: 15px;
    color: #15803d;
}


.error {
    margin-top: 15px;
    color: #dc2626;
}


/* ==========================================
   FOOTER
========================================== */

footer {
    padding: 30px 0;

    text-align: center;

    background: #111827;
    color: white;
}


/* ==========================================
   RESPONSIVE
========================================== */

@media (max-width: 900px) {

    .agent-buttons {
        grid-template-columns: 1fr 1fr;
    }

}


@media (max-width: 768px) {

    nav {
        display: none;
    }


    .hero h1 {
        font-size: 42px;
    }


    .hero p {
        font-size: 17px;
    }


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


    .form-group.full {
        grid-column: auto;
    }


    .contact-card {
        padding: 25px;
    }


    .chat-box {
        max-width: 95%;
    }


    .chat-messages {
        height: 400px;
    }


    .bubble {
        max-width: 85%;
    }


    .assistant-avatar {
        width: 65px;
        height: 65px;
    }

}


@media (max-width: 550px) {

    .agent-buttons {
        grid-template-columns: 1fr;
    }


    .agent-button {
        width: 100%;
    }

}