/* -------------------------------------------------------------------
   Global Reset & Base Styles
------------------------------------------------------------------- */
* {
    box-sizing: border-box;
}

body {
    position: relative;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: "Calibri", "Roboto", sans-serif;
    color: #333;
    background-image: url('../images/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

body::before {
    content: "";
    position: absolute;
    top: 5%;
    right: 8%;
    width: 40vw;
    height: 75vh;
    z-index: 2;
    background: url('../images/expert.png') no-repeat center bottom;
    background-size: contain;
    pointer-events: none;
}

/* -------------------------------------------------------------------
   Layout Containers
------------------------------------------------------------------- */
.content {
    display: flex;
    flex-direction: column;
    width: 100vw;
    max-width: 100%;
    overflow-x: hidden;
    background: url('../images/background.jpg') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
}

.logo-container {
    position: relative;
    z-index: 1;
    height: 10vh;
    background-color: #2aaac7;
}

.logo {
    height: 5vh;
}

.main-section {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 2rem;

    
    padding: 0 8%;
}

/* -------------------------------------------------------------------
   Hero / Promotion Block
------------------------------------------------------------------- */
.info {
    width: 58%;
    padding: 3vh 0;
}

.promotion,
.expert__name {
    font-weight: bold;
    line-height: 110%;
    margin-bottom: 0.5rem;
}

.promotion {
    font-size: 3vw;
}

.expert__name {
    font-size: 1.4vw;
    line-height: 100%;
    margin-bottom: 0.2rem;
}

.expert__info {
    font-size: 1.4vw;
    line-height: 100%;
    margin-bottom: 1rem;
}

.call_to_action {
    padding: 1.5vh 1.5vw;
    font-size: 1vw;
    color: #fff;
    background-color: #f5a623;
    border: none;
    border-radius: 5rem;
    cursor: pointer;
}

/* -------------------------------------------------------------------
   Chat Component
------------------------------------------------------------------- */
.chat-container {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    width: 60vw;
    height: 49vh;
    margin-bottom: 4vh;
}

.chat {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 90vh;
    max-height: calc(95vh - 100px);
    overflow: hidden;
    background-color: #f8f8f8;
    border-radius: 10px;
}

/* Header */
.chat__header {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 60px;
    padding: 15px 0;
    background-color: #2aaac7;
    box-shadow: 0 1px 30px rgba(0, 0, 0, 0.1);
}

.chat__title {
    font-size: 20px;
    text-align: center;
    color: #fff;
}

/* Messages */
.chat__messages {
    flex: 1;
    margin: 0;
    padding: 20px 10px 0;
    list-style: none;
    overflow-y: auto;
    overflow-x: hidden;
}

.chat__message {
    clear: both;
    margin-bottom: 20px;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.5s linear;
}

.chat__message--appeared {
    opacity: 1;
}

/* Avatar & Bubble */
.chat__avatar {
    display: inline-block;
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.chat__text-wrapper {
    position: relative;
    display: inline-block;
    width: calc(100% - 85px);
    min-width: 100px;
    padding: 20px;
    border-radius: 6px;
    pointer-events: none;
}

.chat__text {
    font-size: 18px;
    font-weight: 300;
}

/* Bubble Arrows */
.chat__text-wrapper::before,
.chat__text-wrapper::after {
    content: "";
    position: absolute;
    top: 18px;
    width: 0;
    height: 0;
    border: solid transparent;
    pointer-events: none;
}

.chat__text-wrapper::before { border-width: 15px; margin-top: -2px; }
.chat__text-wrapper::after  { border-width: 13px; margin-top: 0;  }

/* Left (Expert) Messages */
.chat__message--left .chat__avatar {
    float: left;
    position: relative;
    background: url('../images/expert.png') center/cover no-repeat;
}

.chat__message--left .chat__avatar::after {
    content: "";
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 15px;
    height: 15px;
    background-color: #28a745;
    border: 2px solid #fff;
    border-radius: 50%;
}

.chat__message--left .chat__text-wrapper {
    margin-left: 20px;
    background-color: #ffe6cb;
}

.chat__message--left .chat__text-wrapper::before,
.chat__message--left .chat__text-wrapper::after {
    right: 100%;
    border-right-color: #ffe6cb;
}

.chat__message--left .chat__text { color: #8b571f; }

/* Right (User) Messages */
.chat__message--right .chat__avatar {
    float: right;
    background: url('../images/user.png') center/cover no-repeat;
}

.chat__message--right .chat__text-wrapper {
    float: right;
    margin-right: 20px;
    background-color: #c7eafc;
}

.chat__message--right .chat__text-wrapper::before,
.chat__message--right .chat__text-wrapper::after {
    left: 100%;
    border-left-color: #c7eafc;
}

.chat__message--right .chat__text { color: #2b566c; }

/* Footer / Input */
.chat__footer {
    position: relative;
    flex-shrink: 0;
    width: 100%;
    padding: 20px;
    background-color: #fff;
}

.chat__input-wrapper {
    position: relative;
    display: inline-block;
    width: calc(100% - 160px);
    height: 50px;
    padding: 0 20px;
    border: 1px solid #bcbdc0;
    border-radius: 25px;
}

.chat__input {
    position: absolute;
    width: calc(100% - 40px);
    height: 100%;
    border: none;
    outline: none;
    color: #4a4a4a;
    box-sizing: border-box;
}

.chat__send {
    float: right;
    width: 140px;
    height: 50px;
    color: #fff;
    background-color: #fe9900;
    border: 1px solid #fe9900;
    border-radius: 50px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s linear, border-color 0.2s linear;
}

.chat__send:hover {
    background-color: #e57c00;
    border-color: #e57c00;
}

.chat__send-text {
    display: inline-block;
    line-height: 48px;
    font-size: 18px;
    font-weight: 300;
}

.chat__template { display: none; }

/* -------------------------------------------------------------------
   Footer
------------------------------------------------------------------- */
.footer-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 1;
}

.footer {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background-color: transparent;
    text-align: center;
}

.footer__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    border-top: 2px solid #f2f2f2;
}

.footer__text { margin: 0; font-size: 1vw; }

.footer__link,
.footer a:hover {
    font-size: 1vw;
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease-in-out;
}

.footer a:hover { color: #2aaac7; }

/* -------------------------------------------------------------------
   Responsive Adjustments
------------------------------------------------------------------- */
@media (min-width: 768px) and (max-width: 1024px) {
    body::before {
        top: 8%;
        right: 5%;
        width: 50vw;
        height: 50vh;
        background-position: center bottom;
    }

    .main-section { padding: 0; }

    .info { width: 70%; }

    .promotion { font-size: 250%; }

    .expert__name { font-size: 4vw; }

    .expert__info { font-size: 3vw; }

    .call_to_action {
        padding: 1vh 3vw;
        font-size: 3vw;
    }

    .chat-container {
        width: 100%;
        height: 49vh;
        margin-bottom: 1vh;
    }

    .footer__content { padding: 2vh 0; }

    .footer__text,
    .footer__link,
    .footer a:hover { font-size: 2.2vw; }
}

@media (max-width: 767px) {
    body::before {
        top: 12%;
        right: 0;
        width: 60vw;
        height: 40vh;
        background-position: center bottom;
    }

    .main-section { padding: 0; }

    .info {
        width: 80%;
        padding: 2vh 0;
    }

    .promotion { font-size: 6vw; }

    .expert__name { font-size: 5vw; }

    .expert__info {
        font-size: 4vw;
        margin-bottom: 0.5rem;
    }

    .call_to_action {
        padding: 1vh 3vw;
        font-size: 3.8vw;
    }

    .chat__title { font-size: 4vw; }

    .chat__avatar {
        width: 40px;
        height: 40px;
    }

    .chat__text-wrapper {
        width: calc(100% - 75px);
        padding: 20px;
    }

    .chat__text { font-size: 4vw; line-height: 1.2; }

    .chat-container {
        width: 100%;
        height: 49vh;
        margin-bottom: 1vh;
    }

    .chat__input-wrapper { width: calc(100% - 60px); }

    .chat__send {
        width: 50px;
        height: 50px;
    }

    .chat__footer { padding: 10px; }

    .footer__content { padding: 1vh 0; }

    .footer__text,
    .footer__link,
    .footer a:hover { font-size: 3vw; }
}