/* Basic Reset & Font */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Sarabun', sans-serif;
}

body {
    background-color: #fff7ed;
    /* Orange-50 */
    color: #431407;
    /* Orange-950 */
    line-height: 1.6;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #fff7ed;
}

::-webkit-scrollbar-thumb {
    background: #f97316;
    /* Orange-500 */
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ea580c;
    /* Orange-600 */
}

/* Header Styles (Homepage Only) */
.hero-header {
    background-image: url("./images/yanyon-bg2.png");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    color: white;
    padding: 3rem 0;
    text-align: center;
    position: relative;
    min-height: 400px;
}

.hero-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(234, 88, 12, 0.9) 0%, rgba(251, 191, 36, 0.8) 100%);
    /* Orange to Amber gradient */
    z-index: 1;
}

.hero {
    position: relative;
    z-index: 2;
}

.hero-icon {
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Navigation System */
.main-nav {
    background: linear-gradient(to right, #c2410c, #ea580c);
    /* Dark Orange gradient */
    padding: 0.5rem 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.nav-item {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    transform: translateY(-2px);
}

.nav-item.active {
    background-color: rgba(255, 255, 255, 0.25);
    color: white;
    font-weight: 600;
}

.nav-item i {
    margin-bottom: 2px;
}

/* Card Styles */
.service-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #fed7aa;
    /* Orange-200 */
    display: block;
    text-decoration: none;
    height: 100%;
    color: inherit;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(234, 88, 12, 0.2);
    border-color: #f97316;
}

/* Chat Interface Styles */
.chat-container {
    height: 600px;
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: 1px solid #fed7aa;
}

/* For mobile fullness */
@media (max-width: 768px) {
    .chat-container {
        height: auto;
        flex-grow: 1;
    }
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background-color: #fafaf9;
}

.message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 15px;
    position: relative;
    word-wrap: break-word;
    font-size: 0.95rem;
    line-height: 1.5;
    animation: fadeIn 0.3s ease;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user {
    background: linear-gradient(135deg, #f97316, #fb923c);
    /* Orange gradient */
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 4px rgba(249, 115, 22, 0.2);
}

.message.bot {
    background-color: white;
    border: 1px solid #e5e5e5;
    color: #1f2937;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.chat-input-area {
    padding: 1rem;
    background-color: white;
    border-top: 1px solid #f3f4f6;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.chat-input {
    flex-grow: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e5e5;
    border-radius: 9999px;
    outline: none;
    transition: all 0.2s;
}

.chat-input:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.send-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(249, 115, 22, 0.3);
}

.send-btn:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, #fb923c, #f97316);
}

/* Quick Replies */
.quick-replies {
    padding: 0.5rem 1rem;
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    background-color: #fff7ed;
    border-bottom: 1px solid #fed7aa;
}

.quick-reply-btn {
    white-space: nowrap;
    padding: 0.4rem 0.8rem;
    background-color: white;
    border: 1px solid #f97316;
    color: #c2410c;
    border-radius: 9999px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-reply-btn:hover {
    background-color: #f97316;
    color: white;
}

/* Feature Cards */
.feature-card {
    background: white;
    /* White bg */
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border-bottom: 4px solid #f97316;
    /* Orange border */
    transition: transform 0.3s ease;
}

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

.feature-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    color: #ea580c;
    font-size: 1.25rem;
}

/* Form Styles */
.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.form-btn {
    background: linear-gradient(to right, #ea580c, #f97316);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.form-btn:hover {
    background: linear-gradient(to right, #c2410c, #ea580c);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(234, 88, 12, 0.2);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #fed7aa;
    border-top-color: #f97316;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}