/* Modern Medical Professional Theme */
:root {
    --primary-color: #2E7D32;
    --secondary-color: #4CAF50;
    --accent-color: #E8F5E9;
    --gold: #C8961E;
    --gold-light: #E8B84B;
    --text-color: #333333;
    --light-text: #666666;
    --bg-color: #ffffff;
    --light-bg: #f4f7f6;
    --white: #ffffff;
    --card-bg: #ffffff;
    --card-border: var(--secondary-color);
    --input-bg: #ffffff;
    --input-border: #ddd;
    --success: #28a745;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Dark Mode */
[data-theme="dark"] {
    --primary-color: #4CAF50;
    --secondary-color: #66BB6A;
    --accent-color: #1B5E20;
    --text-color: #e0e0e0;
    --light-text: #aaaaaa;
    --bg-color: #1a1a1a;
    --light-bg: #242424;
    --white: #2a2a2a;
    --card-bg: #2a2a2a;
    --card-border: var(--gold);
    --input-bg: #333;
    --input-border: #555;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
    margin-bottom: 0.5em;
    font-weight: 600;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3 {
    color: var(--gold);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

[data-theme="dark"] a {
    color: var(--gold);
}

[data-theme="dark"] a:hover {
    color: var(--gold-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Slider */
.hero-slider {
    position: relative;
    height: 500px;
    overflow: hidden;
}

.hero-slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    z-index: 1;
}

.hero-slider .slide.active {
    opacity: 1;
    z-index: 2;
}

.hero-slider .slide.fade-out {
    opacity: 0;
    z-index: 2;
}

.hero-slider .slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
}

.hero-slider .slide-overlay h1 {
    color: #fff;
    font-size: 2.8rem;
    margin-bottom: 0.5em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-slider .slide-overlay p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    max-width: 600px;
    margin-bottom: 1.5em;
}

.btn-light {
    display: inline-block;
    padding: 12px 30px;
    background: rgba(255, 255, 255, 0.95);
    color: #111;
    border-radius: 5px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-light:hover {
    background: #fff;
    color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .hero-slider {
        height: 350px;
    }
    .hero-slider .slide-overlay h1 {
        font-size: 1.8rem;
    }
    .hero-slider .slide-overlay p {
        font-size: 1rem;
    }
}

/* Header & Navigation — Black/Gold Theme */
header {
    background-color: #111;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.logo a {
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.logo h1 {
    font-size: 24px;
    margin: 0;
    color: var(--gold);
    letter-spacing: 0.5px;
}

.logo p {
    font-size: 12px;
    margin: 0;
    color: var(--gold-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

nav li {
    margin-left: 25px;
}

nav a {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    font-size: 15px;
    text-transform: uppercase;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
}

nav a:hover,
nav a.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

/* Dark Mode Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s;
}

.theme-toggle:hover {
    color: var(--gold);
}

.theme-toggle .material-symbols-rounded {
    font-size: 22px;
}

/* Page Headers */
.page-header {
    background-color: #111;
    color: #fff;
    padding: 60px 0;
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 3px solid var(--gold);
}

.page-header h1 {
    color: var(--gold);
    margin: 0;
    font-size: 36px;
}

/* Content Sections */
.section {
    padding: 60px 0;
}

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

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 30px;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--gold);
}

/* Cards (Services, profiles) */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    border-top: 4px solid var(--card-border);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.card-content {
    padding: 25px;
}

.card h3 {
    margin-top: 0;
    font-size: 20px;
}

/* Profile Specifics */
.profile-card {
    text-align: center;
}

.profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 20px;
    border: 3px solid var(--light-bg);
}

.profile-role {
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 15px;
    display: block;
}

/* Contact Form */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
}

.contact-info-box {
    background: #111;
    color: #fff;
    padding: 30px;
    border-radius: 8px;
    border-top: 3px solid var(--gold);
}

.contact-info-box h3 {
    color: var(--gold);
    border-bottom: 1px solid rgba(200, 150, 30, 0.3);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.info-item {
    margin-bottom: 20px;
}

.info-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    opacity: 0.8;
    margin-bottom: 5px;
}

.info-value {
    font-size: 16px;
    font-weight: 500;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--input-border);
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
    background-color: var(--input-bg);
    color: var(--text-color);
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--gold);
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: var(--transition);
}

.btn:hover {
    background: #1B5E20;
}

[data-theme="dark"] .btn {
    background: var(--gold);
    color: #111;
}

[data-theme="dark"] .btn:hover {
    background: var(--gold-light);
}

/* Footer */
footer {
    background-color: #111;
    color: #ecf0f1;
    padding: 60px 0 20px;
    border-top: 3px solid var(--gold);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: var(--gold);
    font-size: 18px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--gold);
    padding-bottom: 10px;
    display: inline-block;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a {
    color: #bdc3c7;
}

.footer-col a:hover {
    color: var(--gold);
}

.copyright {
    text-align: center;
    border-top: 1px solid rgba(200, 150, 30, 0.2);
    padding-top: 20px;
    font-size: 14px;
    color: #95a5a6;
}

/* Utilities */
.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-40 {
    margin-bottom: 40px;
}

/* Animation Keyframes */
@keyframes fade {
    from { opacity: 0.4 }
    to { opacity: 1 }
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    nav ul {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    nav li {
        margin: 0 10px;
    }
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

/* 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: var(--gold);
    transition: all 0.2s ease;
    z-index: 10000;
}

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

.chatbot-toggler span {
    color: #111;
    position: absolute;
}

.chatbot-toggler span:last-child,
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;
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    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.1s ease;
    z-index: 9999;
}

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

.chatbot header {
    padding: 16px 0;
    position: relative;
    text-align: center;
    color: #fff;
    background: #111;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

header h2 {
    font-size: 1.4rem;
    color: var(--gold);
}

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

.chatbot :where(.chatbox, textarea)::-webkit-scrollbar {
    width: 6px;
}

.chatbot :where(.chatbox, textarea)::-webkit-scrollbar-track {
    background: var(--card-bg);
    border-radius: 25px;
}

.chatbot :where(.chatbox, textarea)::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 25px;
}

.chatbox .chat {
    display: flex;
    list-style: none;
}

.chatbox .outgoing {
    margin: 20px 0;
    justify-content: flex-end;
}

.chatbox .incoming span {
    width: 32px;
    height: 32px;
    color: #111;
    cursor: default;
    text-align: center;
    line-height: 32px;
    align-self: flex-end;
    background: var(--gold);
    border-radius: 4px;
    margin: 0 10px 7px 0;
}

.chatbox .chat p {
    white-space: pre-wrap;
    padding: 12px 16px;
    border-radius: 10px 10px 0 10px;
    max-width: 75%;
    color: #fff;
    font-size: 0.95rem;
    background: #111;
}

.chatbox .incoming p {
    border-radius: 10px 10px 10px 0;
    color: var(--text-color);
    background: var(--light-bg);
}

.chatbot .chat-input {
    display: flex;
    gap: 5px;
    position: absolute;
    bottom: 0;
    width: 100%;
    background: var(--card-bg);
    padding: 3px 20px;
    border-top: 1px solid var(--input-border);
}

.chat-input textarea {
    height: 55px;
    width: 100%;
    border: none;
    outline: none;
    resize: none;
    max-height: 180px;
    padding: 15px 15px 15px 0;
    font-size: 0.95rem;
    background: transparent;
    color: var(--text-color);
}

.chat-input span {
    align-self: flex-end;
    color: var(--gold);
    cursor: pointer;
    height: 55px;
    display: flex;
    align-items: center;
    visibility: hidden;
    font-size: 1.35rem;
}

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

@media (max-width: 490px) {
    .chatbot-toggler {
        right: 20px;
        bottom: 20px;
    }
    .chatbot {
        right: 0;
        bottom: 0;
        height: 100%;
        border-radius: 0;
        width: 100%;
    }
    .chatbot .chatbox {
        height: 90%;
        padding: 25px 15px 100px;
    }
    .chatbot .chat-input {
        padding: 10px 15px;
        padding-bottom: max(10px, env(safe-area-inset-bottom));
    }
    .chatbot header span {
        display: block;
    }
}
