/* ============================================================
   Shanghai Pulmonary Hospital — International Patient Services
   Design System: Refined Medical Authority
   Colors derived from surgical photography (navy scrubs, OR lights)
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Source+Sans+3:wght@300;400;500;600;700&display=swap');

/* --- CSS Variables --- */
:root {
    --navy: #0F2B4C;
    --navy-light: #1B3A5C;
    --navy-muted: #2C4F73;
    --gold: #C8A45C;
    --gold-light: #D4B87A;
    --white: #FFFFFF;
    --off-white: #F7F8FA;
    --gray-100: #F0F2F5;
    --gray-200: #E2E5EA;
    --gray-300: #C8CDD5;
    --gray-500: #7A8494;
    --gray-700: #4A5568;
    --gray-900: #1A202C;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Source Sans 3', 'Segoe UI', sans-serif;
    --max-width: 1200px;
    --section-pad: 100px;
    --transition: 0.3s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.7;
    color: var(--gray-700);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold); }

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

/* --- Typography --- */
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--navy); line-height: 1.25; }
h1 { font-size: 3rem; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 2.25rem; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 1rem; }
h3 { font-size: 1.5rem; font-weight: 600; margin-bottom: 0.75rem; }
h4 { font-size: 1.125rem; font-weight: 600; }

.section-label {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.75rem;
    display: block;
}

.section-intro {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--gray-500);
    max-width: 680px;
}

/* --- Navigation --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 43, 76, 0.97);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    transition: background var(--transition);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.nav-logo-text {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--white);
    line-height: 1.3;
}

.nav-logo-sub {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--gray-300);
    letter-spacing: 0.05em;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color var(--transition);
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--white);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-cta {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--navy) !important;
    background: var(--gold);
    padding: 8px 20px;
    border-radius: 4px;
    letter-spacing: 0.03em;
    transition: background var(--transition), transform var(--transition);
}

.nav-cta:hover {
    background: var(--gold-light);
    color: var(--navy) !important;
    transform: translateY(-1px);
}

/* Mobile nav toggle */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--white); margin: 5px 0; transition: var(--transition); }

/* --- Hero Section --- */
.hero {
    position: relative;
    height: 92vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.35);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(15, 43, 76, 0.85) 0%,
        rgba(15, 43, 76, 0.5) 50%,
        rgba(15, 43, 76, 0.3) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    padding-top: 72px;
}

.hero h1 {
    color: var(--white);
    font-size: 3.5rem;
    max-width: 700px;
    margin-bottom: 1rem;
}

.hero-subtitle {
    color: rgba(255,255,255,0.8);
    font-size: 1.2rem;
    font-weight: 300;
    max-width: 560px;
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

.hero-cta {
    display: inline-block;
    background: var(--gold);
    color: var(--navy);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 14px 36px;
    border-radius: 4px;
    letter-spacing: 0.03em;
    transition: background var(--transition), transform var(--transition);
}

.hero-cta:hover {
    background: var(--gold-light);
    color: var(--navy);
    transform: translateY(-2px);
}

/* --- Stats Bar --- */
.stats-bar {
    background: var(--navy);
    padding: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    max-width: var(--max-width);
    margin: 0 auto;
}

.stat-item {
    text-align: center;
    padding: 36px 20px;
    border-right: 1px solid rgba(255,255,255,0.08);
}

.stat-item:last-child { border-right: none; }

.stat-number {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--gold);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255,255,255,0.6);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* --- Section Styles --- */
.section { padding: var(--section-pad) 0; }
.section-alt { background: var(--off-white); }

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-header .section-intro { margin: 0 auto; }

/* --- Card Grid --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 20px rgba(0,0,0,0.06);
    transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 40px rgba(0,0,0,0.1);
}

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

.card-body { padding: 28px; }
.card-body h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.card-body p { font-size: 0.95rem; color: var(--gray-500); }

/* --- Feature Grid (icon + text) --- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.feature-item { display: flex; gap: 20px; }

.feature-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    background: var(--navy);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon svg { width: 28px; height: 28px; stroke: var(--gold); fill: none; stroke-width: 1.5; }

.feature-text h4 { margin-bottom: 6px; }
.feature-text p { font-size: 0.95rem; color: var(--gray-500); }

/* --- Image + Text Split --- */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.split-reverse { direction: rtl; }
.split-reverse > * { direction: ltr; }

.split-img {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0,0,0,0.12);
}

.split-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- Steps / Timeline --- */
.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
    counter-reset: step;
}

.step {
    counter-increment: step;
    position: relative;
    padding: 32px 24px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.05);
}

.step::before {
    content: counter(step, decimal-leading-zero);
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gray-200);
    line-height: 1;
    margin-bottom: 16px;
    display: block;
}

.step h4 { color: var(--navy); margin-bottom: 8px; }
.step p { font-size: 0.9rem; color: var(--gray-500); }

/* --- Programs Section --- */
.program-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 36px;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.program-card:hover {
    border-color: var(--gold);
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}

.program-card h3 { margin-bottom: 12px; }
.program-card p { margin-bottom: 20px; font-size: 0.95rem; }

.program-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold);
    background: rgba(200, 164, 92, 0.1);
    padding: 4px 12px;
    border-radius: 3px;
    margin-bottom: 16px;
}

/* --- CTA Banner --- */
.cta-banner {
    background: var(--navy);
    padding: 80px 0;
    text-align: center;
}

.cta-banner h2 { color: var(--white); margin-bottom: 1rem; }
.cta-banner p { color: rgba(255,255,255,0.7); font-size: 1.1rem; max-width: 560px; margin: 0 auto 2rem; }

/* --- Contact Form --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
}

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

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    background: var(--white);
    color: var(--gray-700);
    transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--navy-light);
}

.form-group textarea { resize: vertical; min-height: 120px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.btn {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 14px 36px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    letter-spacing: 0.03em;
    transition: background var(--transition), transform var(--transition);
}

.btn-primary { background: var(--gold); color: var(--navy); }
.btn-primary:hover { background: var(--gold-light); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--white); border: 1px solid rgba(255,255,255,0.3); }
.btn-outline:hover { background: rgba(255,255,255,0.1); color: var(--white); }

/* --- Contact Info Sidebar --- */
.contact-info { padding-top: 8px; }

.contact-method {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--gray-200);
}

.contact-method:last-child { border-bottom: none; }

.contact-method h4 { margin-bottom: 8px; font-size: 0.95rem; }
.contact-method p { font-size: 0.95rem; }
.contact-method a { color: var(--navy-light); font-weight: 500; }

/* --- Footer --- */
.footer {
    background: var(--navy);
    padding: 60px 0 40px;
    color: rgba(255,255,255,0.5);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer h4 {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    margin-bottom: 20px;
}

.footer-brand .nav-logo-text { font-size: 1.15rem; margin-bottom: 4px; }
.footer-brand p { font-size: 0.85rem; line-height: 1.7; margin-top: 16px; max-width: 320px; }

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: rgba(255,255,255,0.6); font-size: 0.9rem; }
.footer-links a:hover { color: var(--white); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.footer-affiliations { display: flex; gap: 24px; }
.footer-affiliations span { opacity: 0.5; }

/* --- Page Header (interior pages) --- */
.page-header {
    background: var(--navy);
    padding: 140px 0 60px;
    text-align: center;
}

.page-header h1 { color: var(--white); font-size: 2.75rem; margin-bottom: 0.75rem; }
.page-header p { color: rgba(255,255,255,0.6); font-size: 1.1rem; max-width: 560px; margin: 0 auto; }

/* --- Photo Gallery Grid --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.gallery-grid img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 6px;
    transition: transform var(--transition);
}

.gallery-grid img:hover { transform: scale(1.02); }

/* --- Responsive --- */
@media (max-width: 968px) {
    :root { --section-pad: 70px; }
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.75rem; }
    .hero { height: 80vh; }
    .hero h1 { font-size: 2.5rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .card-grid { grid-template-columns: 1fr; }
    .split { grid-template-columns: 1fr; gap: 40px; }
    .split-reverse { direction: ltr; }
    .feature-grid { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; }
    .nav-links { display: none; }
    .nav-toggle { display: block; }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--navy);
        padding: 24px;
        gap: 16px;
        border-top: 1px solid rgba(255,255,255,0.08);
    }
}

@media (max-width: 600px) {
    :root { --section-pad: 50px; }
    .hero { height: 70vh; min-height: 500px; }
    .hero h1 { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-number { font-size: 1.75rem; }
    .form-row { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: 1fr 1fr; }
    .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}
