/* Light mode variables */
:root {
    --primary-color: #4a90e2;
    --secondary-color: #50c878;
    --text-color: #333333;
    --bg-color: #ffffff;
    --card-bg: #ffffff;
    --chat-bg: #f8f9fa;
    --border-color: #eee;
    --shadow-color: rgba(0,0,0,0.1);
    --input-bg: #ffffff;
    --input-border: #e0e0e0;
    --message-bg: #f8f9fa;
    --message-text: #333333;
    --card-hover: #f8f9fa;
}

/* Dark mode variables */
[data-theme="dark"] {
    --text-color: #ffffff;
    --bg-color: #1a1a1a;
    --card-bg: #2d2d2d;
    --chat-bg: #2d2d2d;
    --border-color: #404040;
    --shadow-color: rgba(0,0,0,0.3);
    --input-bg: #3d3d3d;
    --input-border: #404040;
    --message-bg: #2d2d2d;
    --message-text: #ffffff;
    --card-hover: #333333;
}

/* Apply variables */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: all 0.3s ease;
}

.chat-section, .service-card {
    background-color: var(--card-bg);
}

.chat-messages {
    background-color: var(--chat-bg);
}

.chat-input {
    background-color: var(--chat-bg);
    border-color: var(--border-color);
}

.chat-input input {
    background-color: var(--input-bg);
    border-color: var(--input-border);
    color: var(--text-color);
}

.message p {
    background-color: var(--card-bg);
    color: var(--text-color);
}

/* Theme Toggle Styles */
.theme-toggle {
    margin-left: 20px;
    display: flex;
    align-items: center;
}

.dark-mode-checkbox {
    display: none;
}

.dark-mode-label {
    width: 60px;
    height: 30px;
    position: relative;
    display: block;
    background: #ebebeb;
    border-radius: 200px;
    box-shadow: inset 0px 5px 15px rgba(0,0,0,0.1), inset 0px -5px 15px rgba(255,255,255,0.1);
    cursor: pointer;
    transition: 0.3s;
}

.dark-mode-label:after {
    content: "";
    width: 28px;
    height: 28px;
    position: absolute;
    top: 1px;
    left: 1px;
    background: linear-gradient(180deg, #ffcc89, #d8860b);
    border-radius: 180px;
    box-shadow: 0px 5px 10px rgba(0,0,0,0.2);
    transition: 0.3s;
}

.dark-mode-label i {
    position: absolute;
    width: 24px;
    top: 6px;
    z-index: 100;
}

.dark-mode-label .fa-sun {
    left: 6px;
    color: #ffd900;
    transition: 0.3s;
}

.dark-mode-label .fa-moon {
    right: 6px;
    color: #c8e3ff;
    transition: 0.3s;
    opacity: 0;
}

.dark-mode-checkbox:checked + .dark-mode-label {
    background: #242424;
}

.dark-mode-checkbox:checked + .dark-mode-label:after {
    left: 31px;
    transform: translateX(0);
    background: linear-gradient(180deg, #777, #3a3a3a);
}

.dark-mode-checkbox:checked + .dark-mode-label .fa-sun {
    opacity: 0;
}

.dark-mode-checkbox:checked + .dark-mode-label .fa-moon {
    opacity: 1;
}

/* Services Page Styles */
.services-container {
    padding: 6rem 5% 2rem;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2rem;
    min-height: 100vh;
    background-color: var(--bg-color);
}

/* Chat Section Styles */
.chat-section {
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 4px 12px var(--shadow-color);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.chat-container {
    height: 600px;
    display: flex;
    flex-direction: column;
}

.chat-header {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.chat-header h2 {
    color: var(--text-color);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.chat-header p {
    color: #666;
    font-size: 1rem;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--chat-bg);
    border-radius: 15px;
    margin-bottom: 1rem;
}

.message {
    max-width: 80%;
    padding: 1rem;
    border-radius: 15px;
    animation: fadeIn 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.message .avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.message.ai .avatar {
    background: var(--primary-color);
    color: white;
}

.message.user .avatar {
    background: var(--secondary-color);
    color: white;
}

.message-content {
    flex-grow: 1;
}

.message-content p {
    margin: 0;
    line-height: 1.5;
}

.message-time {
    font-size: 0.8rem;
    color: #888;
    margin-top: 4px;
}

.message.ai {
    align-self: flex-start;
    background: var(--message-bg);
    color: var(--message-text);
    box-shadow: 0 2px 8px var(--shadow-color);
    border: 1px solid var(--border-color);
}

.message.user {
    align-self: flex-end;
    background: var(--secondary-color);
    color: white;
    box-shadow: 0 2px 8px var(--shadow-color);
    border: 1px solid var(--border-color);
    flex-direction: row-reverse;
}

.message.user .message-time {
    color: rgba(255, 255, 255, 0.8);
}

.chat-input {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--chat-bg);
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.chat-input input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 1px solid var(--input-border);
    border-radius: 10px;
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.chat-input input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.1);
}

.chat-input input::placeholder {
    color: #888;
}

.chat-input button {
    padding: 1rem 2rem;
    border: none;
    border-radius: 10px;
    background: var(--primary-color);
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-input button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.2);
    background: #357abd;
}

.chat-input button:active {
    transform: translateY(0);
}

/* Services Info Section */
.services-info {
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 4px 12px var(--shadow-color);
    border: 1px solid var(--border-color);
}

.services-info h2 {
    color: var(--text-color);
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 600;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.service-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    cursor: pointer;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px var(--shadow-color);
    background: var(--card-hover);
}

.service-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.service-card:hover i {
    transform: scale(1.1);
    color: #5a9ee6;
}

.service-card h3 {
    color: var(--text-color);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.service-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Chat Actions */
.chat-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.chat-actions button {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--chat-bg);
    color: var(--text-color);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-actions button:hover {
    background: var(--card-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Mobile Navigation for Services */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.5rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .services-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding-top: 5rem;
    }
    
    .chat-container {
        height: 500px;
    }
    
    .services-info {
        order: -1;
    }
}

@media (max-width: 1024px) {
    .services-container {
        padding: 4rem 3% 2rem;
    }
    
    .chat-container {
        height: 450px;
    }
    
    .services-info h2 {
        font-size: 1.8rem;
    }
    
    .service-card {
        padding: 1.8rem;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .services-container {
        padding: 4rem 1rem 1rem;
        gap: 1rem;
    }
    
    .chat-section {
        padding: 1rem;
    }
    
    .chat-container {
        height: 400px;
    }
    
    .chat-header h2 {
        font-size: 1.5rem;
    }
    
    .chat-header p {
        font-size: 0.9rem;
    }
    
    .chat-messages {
        padding: 1rem;
    }
    
    .message {
        max-width: 90%;
        padding: 0.8rem;
    }
    
    .message .avatar {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    .chat-input {
        padding: 0.8rem;
        gap: 0.5rem;
    }
    
    .chat-input input {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
    
    .chat-input button {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .chat-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .chat-actions button {
        padding: 0.7rem;
        font-size: 0.9rem;
    }
    
    .services-info {
        padding: 1.5rem;
    }
    
    .services-info h2 {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .service-card i {
        font-size: 2rem;
    }
    
    .service-card h3 {
        font-size: 1.2rem;
    }
    
    .service-card p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .services-container {
        padding: 3rem 0.5rem 1rem;
    }
    
    .chat-section {
        padding: 0.8rem;
    }
    
    .chat-container {
        height: 350px;
    }
    
    .chat-header h2 {
        font-size: 1.3rem;
    }
    
    .chat-header p {
        font-size: 0.8rem;
    }
    
    .chat-messages {
        padding: 0.8rem;
    }
    
    .message {
        max-width: 95%;
        padding: 0.6rem;
    }
    
    .message .avatar {
        width: 25px;
        height: 25px;
        font-size: 12px;
    }
    
    .message-content p {
        font-size: 0.9rem;
    }
    
    .message-time {
        font-size: 0.7rem;
    }
    
    .chat-input {
        padding: 0.6rem;
        gap: 0.4rem;
    }
    
    .chat-input input {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .chat-input button {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
    
    .services-info {
        padding: 1rem;
    }
    
    .services-info h2 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }
    
    .service-card {
        padding: 1rem;
    }
    
    .service-card i {
        font-size: 1.8rem;
    }
    
    .service-card h3 {
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
    }
    
    .service-card p {
        font-size: 0.8rem;
        line-height: 1.4;
    }
}

/* Tablet Landscape */
@media (min-width: 769px) and (max-width: 1024px) {
    .services-container {
        padding: 4rem 4% 2rem;
    }
    
    .chat-container {
        height: 480px;
    }
    
    .service-card {
        padding: 1.8rem;
    }
}

/* Large Desktop */
@media (min-width: 1440px) {
    .services-container {
        padding: 6rem 8% 2rem;
        max-width: 1400px;
        margin: 0 auto;
    }
    
    .chat-container {
        height: 650px;
    }
    
    .services-info h2 {
        font-size: 2.2rem;
    }
    
    .service-card {
        padding: 2.5rem;
    }
    
    .service-card i {
        font-size: 3rem;
    }
    
    .service-card h3 {
        font-size: 1.5rem;
    }
    
    .service-card p {
        font-size: 1.1rem;
    }
}