/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    position: relative;
    overflow: hidden; /* Prevent scrollbar jump */
     -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
}

/* Selection Highlight */
::selection {
    background: #f79520;
    color: #fff;
}

/* Preloader Styles */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    overflow: hidden;
    opacity: 1; /* Start visible */
    transition: opacity 0.5s ease-in; /* Fade-in effect */
}

.preloader.hide {
    opacity: 0;
    pointer-events: none; /* Disable interaction after fade out */
}

.preloader-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.preloader-icon {
    width: 80px;
    height: 80px;
    display: inline-block;
    position: relative;
}

.preloader-icon span {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #f79520;
    animation: preloader-fx 1.5s linear infinite;
}

.preloader-icon span:last-child {
    animation-delay: -0.75s;
}

@keyframes preloader-fx {
    0% {
        transform: scale(0);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.3;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* Container & Cards Layout */
.container {
    max-width: 950px;
    width: 100%;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.main-card {
    display: flex;
    justify-content: space-evenly;
    width: 200%;
    transition: margin-left 1s ease-in-out;
}

#two:checked ~ .main-card {
    margin-left: -100%;
}

.cards {
    width: calc(50% - 20px);
    display: flex;
    flex-wrap: wrap;
    margin: 0 20px;
    justify-content: space-between;
}

.card {
    width: calc(33.33% - 20px);
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.25);
    transition: transform 0.4s ease;
}

.card:hover {
    transform: translateY(-15px);
}

.card .content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.card .content .img {
    height: 130px;
    width: 130px;
    border-radius: 50%;
    padding: 3px;
    background: #f79520;
    margin-bottom: 14px;
}

.card .content .img img {
    height: 100%;
    width: 100%;
    border: 3px solid #fff;
    border-radius: 50%;
    object-fit: cover;
}

.card .content .name {
    font-size: 20px;
    font-weight: 500;
}

.card .content .job {
    font-size: 20px;
    color: #6D3A08;
}

.card .content .media-icons {
    margin-top: 10px;
    display: flex;
}

.media-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 35px;
    width: 35px;
    margin: 0 4px;
    font-size: 14px;
    color: #fff;
    border-radius: 50%;
    background: #f79520;
    transition: all 0.3s ease;
}

.media-icons a:hover {
    color: #f79520;
    background-color: #fff;
    border: 2px solid #f79520;
}

/* Navigation Buttons */
.button {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.button label {
    height: 15px;
    width: 15px;
    border-radius: 50%;
    background: #f79520;
    margin: 0 4px;
    cursor: pointer;
    transition: width 0.5s ease;
}

.button label.active,
#one:checked ~ .button .one,
#two:checked ~ .button .two {
    width: 35px;
}

input[type="radio"] {
    display: none;
}

/* Responsive Layout */
@media (max-width: 768px) {
    .cards {
        width: calc(100% / 2 - 20px);
    }

    .card {
        margin: 20px 0 10px 0;
        width: calc(50% - 20px);
    }
}

@media (max-width: 600px) {
    .card {
        width: 100%;
    }
}

/* Chatbot Styles */
.chatbot-toggler {
    position: fixed;
    bottom: 30px;
    right: 35px;
    outline: none;
    border: none;
    height: 50px;
    width: 50px;
    display: flex;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f79520;
    transition: transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

body.show-chatbot .chatbot-toggler {
    transform: rotate(90deg);
}

.chatbot-toggler span {
    color: #fff;
    position: absolute;
    transition: opacity 0.2s ease;
    user-select: none;
}

body.show-chatbot .chatbot-toggler span:first-child {
    opacity: 0;
}

body.show-chatbot .chatbot-toggler span:last-child {
    opacity: 1;
}

.chatbot {
    position: fixed;
    right: 35px;
    bottom: 90px;
    width: 420px;
    max-width: calc(100% - 70px);
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.5);
    transform-origin: bottom right;
    box-shadow: 0 0 128px 0 rgba(0, 0, 0, 0.1), 0 32px 64px -48px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

body.show-chatbot .chatbot {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.chatbot header {
    padding: 16px;
    text-align: center;
    color: #fff;
    background: #f79520;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-size: 1.4rem;
    position: relative;
    user-select: none;
}

.chatbot header span {
    position: absolute;
    right: 15px;
    top: 50%;
    display: none;
    cursor: pointer;
    transform: translateY(-50%);
}

.chatbot .chatbox {
    height: 510px;
    padding: 30px 20px 100px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.chatbox .chat {
    display: flex;
    list-style: none;
    margin-bottom: 20px;
}

.chatbox .outgoing {
    justify-content: flex-end;
}

.chatbox .incoming span {
    width: 32px;
    height: 32px;
    color: #fff;
    background: #f79520;
    border-radius: 4px;
    text-align: center;
    line-height: 32px;
    margin-right: 10px;
}

.chatbox .chat p {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.95rem;
    white-space: pre-wrap;
    user-select: text;
}

.chatbox .outgoing p {
    background: #f79520;
    color: #fff;
    border-radius: 10px 10px 0 10px;
}

.chatbox .incoming p {
    background: #f2f2f2;
    color: #000;
    border-radius: 10px 10px 10px 0;
}

.chat-input {
    display: flex;
    position: absolute;
    bottom: 0;
    width: 100%;
    background: #fff;
    padding: 10px 20px;
    border-top: 1px solid #ddd;
}

.chat-input textarea {
    flex: 1;
    height: 55px;
    border: none;
    outline: none;
    resize: none;
    padding: 15px;
    font-size: 0.95rem;
    max-height: 180px;
    user-select: text;
    -webkit-user-select: text;
}

.chat-input span {
    align-self: center;
    color: #f79520;
    cursor: pointer;
    font-size: 1.35rem;
    visibility: hidden;
    user-select: none;
}

.chat-input textarea:valid + span {
    visibility: visible;
}

/* Scrollbar styles */
.chatbot ::-webkit-scrollbar {
    width: 6px;
}

.chatbot ::-webkit-scrollbar-track {
    background: #fff;
    border-radius: 25px;
}

.chatbot ::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 25px;
}

/* Mobile-specific styles */
@media (max-width: 768px) {
    .chatbot-toggler {
        bottom: 20px;
        right: 20px;
    }
    
    .chatbot {
        right: 20px;
        bottom: 80px;
        width: calc(100% - 40px);
        max-width: none;
        height: 70vh;
    }
    
    .chatbot .chatbox {
        height: calc(70vh - 120px);
    }
    
    body.show-chatbot {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }
    
    body.show-chatbot::after {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }
}

/* Disable text selection for most elements */
body, div, header, ul, li, span, button {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Enable text selection for chat messages and textarea */
.chatbox .chat p, .chat-input textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}
/* Responsive Chatbot */
@media (max-width: 490px) {
    .chatbot-toggler {
        bottom: 20px;
        right: 20px;
    }

    .chatbot {
        width: 100%;
        height: 100%;
        right: 0;
        bottom: 0;
        border-radius: 0;
    }

    .chatbot .chatbox {
        height: 90%;
        padding: 25px 15px 100px;
    }

    .chatbot .chat-input {
        padding: 5px 15px;
    }

    .chatbot header span {
        display: block;
    }
}
