:root {
    --brand-primary: #14b8a6;
    --brand-secondary: #0ea5e9;
    --brand-dark: #0f172a;
    --brand-light: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow-soft: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
    --shadow-premium: 0 25px 60px -15px rgba(20, 184, 166, 0.2);
    --container-width: 1280px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

body {
    background-color: var(--brand-light);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

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

.fade-in {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Navigation */
nav {
    position: sticky;
    top: 0;
    height: 80px;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    display: flex;
    align-items: center;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 24px;
    color: var(--brand-dark);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-item {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-item:hover, .nav-item.active {
    color: var(--brand-primary);
}

.nav-item i {
    font-size: 20px;
}

/* Hero Section */
.hero {
    padding: 100px 0;
    background: radial-gradient(circle at top right, rgba(20, 184, 166, 0.05), transparent),
                radial-gradient(circle at bottom left, rgba(14, 165, 233, 0.05), transparent);
    text-align: center;
}

.hero h1 {
    font-size: 56px;
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--brand-dark);
}

.hero p {
    font-size: 20px;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 40px;
}

.text-gradient {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    color: white;
    border: none;
    padding: 18px 40px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 15px 30px -10px rgba(20, 184, 166, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px -10px rgba(20, 184, 166, 0.5);
}

/* Main Content */
main {
    padding: 60px 0 120px;
}

.section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 32px;
    margin-top: 40px;
}

/* Cards */
.hospital-card {
    background: white;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid #f1f5f9;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.hospital-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-premium);
}

.hospital-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.hospital-info {
    padding: 24px;
}

.hospital-info h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

/* Service Tiles */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

.service-item {
    background: white;
    padding: 32px;
    border-radius: 32px;
    border: 1px solid #f1f5f9;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.service-item:hover {
    border-color: var(--brand-primary);
    background: rgba(20, 184, 166, 0.02);
}

.service-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

/* Chat Layout for Desktop */
.chat-window {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 40px;
    height: 700px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-premium);
    overflow: hidden;
    border: 1px solid #f1f5f9;
}

.chat-header {
    padding: 32px;
    background: var(--brand-dark);
    color: white;
    display: flex;
    align-items: center;
    gap: 20px;
}

.chat-messages {
    flex-grow: 1;
    padding: 40px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: #fcfdfe;
}

.message {
    padding: 20px 28px;
    border-radius: 24px;
    max-width: 70%;
    font-size: 16px;
    line-height: 1.6;
}

.message.ai {
    background: white;
    border: 1px solid #f1f5f9;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: var(--shadow-soft);
}

.message.user {
    background: var(--brand-primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-input-area {
    padding: 24px 40px;
    background: white;
    border-top: 1px solid #f1f5f9;
    display: flex;
    gap: 20px;
}

.chat-input-area input {
    flex-grow: 1;
    border: 2px solid #f1f5f9;
    border-radius: 20px;
    padding: 0 24px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

.chat-input-area input:focus {
    border-color: var(--brand-primary);
}

/* Footer */
footer {
    background: var(--brand-dark);
    color: white;
    padding: 80px 0 40px;
}

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

.footer-col h4 {
    margin-bottom: 24px;
    font-size: 18px;
    font-weight: 700;
}

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

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

.footer-col ul li a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 40px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
}

/* Responsive Design Adjustments */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    main {
        padding: 40px 0 80px;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .hero h1 {
        font-size: 32px;
        line-height: 1.2;
        letter-spacing: -1px;
    }
    
    .hero p {
        font-size: 16px;
        margin-bottom: 24px;
    }
    
    /* Search Bar Mobil Responsive styling */
    .hero .max-w-2xl {
        flex-direction: column;
        padding: 12px !important;
        border-radius: 24px !important;
        gap: 8px;
    }
    
    .hero .max-w-2xl .flex-grow {
        padding: 4px 8px !important;
    }
    
    .hero .max-w-2xl input {
        font-size: 15px !important;
        padding: 8px 0 !important;
    }
    
    .hero .max-w-2xl button {
        width: 100%;
        justify-content: center;
        padding: 14px !important;
        border-radius: 16px !important;
    }
    
    .section-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* main navigation items */
    .nav-links {
        display: none;
    }
    
    /* Footer Grid Mobil Stack */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    /* Maps container responsive */
    #map-container {
        height: 400px !important;
        border-radius: 28px !important;
    }
    
    /* Chat bubbles max width adjustment */
    .message {
        max-width: 85% !important;
        font-size: 14px !important;
        padding: 14px 20px !important;
        border-radius: 20px !important;
    }
    
    /* Mobile Active Chats Horizontal Scrollbar hides standard desktop layout */
    .chat-window flex.flex-row {
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Premium Leaflet Popup Overrides */
.custom-leaflet-popup .leaflet-popup-content-wrapper {
    background: white;
    border-radius: 28px;
    padding: 0;
    overflow: hidden;
    box-shadow: var(--shadow-premium) !important;
    border: 1px solid rgba(20, 184, 166, 0.1);
}

.custom-leaflet-popup .leaflet-popup-content {
    margin: 0 !important;
}

.custom-leaflet-popup .leaflet-popup-tip {
    background: white;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.05);
}

.custom-leaflet-popup .leaflet-popup-close-button {
    color: #64748b !important;
    padding: 12px !important;
    font-size: 16px !important;
}
