/* 
 * Custom CSS for Singapore Digestive Health Centre
 * Designed for premium, clean, medical aesthetics (Simplified Chinese)
 */

:root {
    --primary: #1e3a8a; /* Slate Blue */
    --primary-light: #3b82f6;
    --secondary: #0d9488; /* Teal */
    --secondary-hover: #0f766e;
    --background: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --success: #10b981;
    --error: #ef4444;
    --transition: all 0.3s ease;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Header & Navigation */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.logo-icon {
    width: 24px;
    height: 24px;
    color: var(--secondary);
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: var(--text-main);
}

.nav-link:hover {
    color: var(--secondary);
}

.nav-link.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.25rem;
}

.cta-btn {
    background-color: var(--secondary);
    color: #fff;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.cta-btn:hover {
    background-color: var(--secondary-hover);
    transform: translateY(-1px);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #eff6ff 0%, #f0fdfa 100%);
    padding: 5rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    text-align: left;
}

.hero-image-wrapper {
    width: 100%;
    height: 380px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.hero-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-tag {
    display: inline-block;
    background-color: rgba(13, 148, 136, 0.1);
    color: var(--secondary);
    padding: 0.25rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: 2.75rem;
    color: var(--primary);
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background-color: #172554;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: white;
    color: var(--primary);
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background-color: #f1f5f9;
    transform: translateY(-2px);
}

/* General Layout sections */
section {
    padding: 5rem 1.5rem;
}

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

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Services section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 2.5rem 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.service-icon-wrapper {
    width: 48px;
    height: 48px;
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary-light);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
}

.service-icon {
    width: 24px;
    height: 24px;
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Doctors Section */
.doctors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
}

.doctor-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
}

.doctor-image-wrapper {
    height: 280px;
    background-color: #e2e8f0;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.doctor-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 10%;
}

.doctor-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e3a8a 0%, #0d9488 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

.doctor-placeholder-svg {
    width: 80px;
    height: 80px;
    opacity: 0.85;
}

.doctor-info {
    padding: 2rem;
    flex-grow: 1;
}

.doctor-info h3 {
    font-size: 1.35rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.doctor-title {
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.doctor-qualifications {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.doctor-bio {
    font-size: 0.95rem;
    color: var(--text-main);
}

/* CTA Section */
.cta-banner {
    background: linear-gradient(135deg, var(--primary) 0%, #1e1b4b 100%);
    color: white;
    text-align: center;
    padding: 5rem 1.5rem;
}

.cta-banner h2 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.cta-banner p {
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
    opacity: 0.9;
}

/* Contact Page Specific */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h3 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.contact-info-list {
    list-style: none;
    margin-bottom: 2.5rem;
}

.contact-info-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-info-icon {
    width: 24px;
    height: 24px;
    color: var(--secondary);
    flex-shrink: 0;
}

.contact-info-text strong {
    display: block;
    color: var(--primary);
}

.contact-info-text span {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.map-placeholder {
    width: 100%;
    height: 250px;
    background-color: #e2e8f0;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.map-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.contact-form-container {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
    background-color: #fafafa;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-light);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-group input.error-field,
.form-group textarea.error-field {
    border-color: var(--error);
}

.error-message {
    color: var(--error);
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: none;
}

.form-submit-btn {
    width: 100%;
    background-color: var(--primary);
    color: white;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.form-submit-btn:hover {
    background-color: #172554;
    transform: translateY(-1px);
}

/* Privacy Policy Layout */
.privacy-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--card-bg);
    padding: 3rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.privacy-container h1 {
    font-size: 2.25rem;
    color: var(--primary);
    margin-bottom: 2rem;
    text-align: center;
}

.privacy-content h2 {
    font-size: 1.35rem;
    color: var(--primary);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.privacy-content p, 
.privacy-content ul {
    margin-bottom: 1.25rem;
    color: #334155;
}

.privacy-content ul {
    padding-left: 1.5rem;
}

.privacy-content li {
    margin-bottom: 0.5rem;
}

/* Modal success popup */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background-color: var(--card-bg);
    padding: 3rem 2.5rem;
    border-radius: 16px;
    max-width: 480px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-box {
    transform: scale(1);
}

.modal-icon-wrapper {
    width: 64px;
    height: 64px;
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 1.5rem;
}

.modal-icon {
    width: 36px;
    height: 36px;
}

.modal-box h3 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.modal-box p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.modal-close-btn {
    background-color: var(--primary);
    color: white;
    padding: 0.65rem 2rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.modal-close-btn:hover {
    background-color: #172554;
}

/* Footer Section */
footer {
    background-color: #0f172a;
    color: #94a3b8;
    padding: 4rem 1.5rem 2rem;
    border-top: 1px solid #1e293b;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 1rem;
}

.footer-logo-icon {
    width: 24px;
    height: 24px;
    color: var(--secondary);
}

.footer-column h4 {
    color: #f8fafc;
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a:hover {
    color: #f8fafc;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid #1e293b;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

/* Responsive adjustments */
@media (max-width: 968px) {
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--card-bg);
        border-bottom: 1px solid var(--border-color);
        padding: 2rem;
        flex-direction: column;
        gap: 1.5rem;
        box-shadow: var(--shadow-lg);
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-toggle {
        display: block;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .hero-content {
        text-align: center;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .hero-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .hero-image-wrapper {
        height: 280px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}
