/* ═══════════════════════════════════════════════════════════════════
   HongRising Biotech — Official Website Stylesheet
   Blue medical/healthcare theme
   ═══════════════════════════════════════════════════════════════════ */

/* ── CSS Variables ───────────────────────────────────────────────── */
:root {
    --primary: #1e6091;
    --primary-dark: #144a6e;
    --primary-light: #e8f4f8;
    --accent: #3aa0b8;
    --accent-dark: #2e86a0;

    --text-primary: #1a1a2e;
    --text-secondary: #555;
    --text-muted: #888;

    --bg: #f8fafb;
    --bg-alt: #eef3f7;
    --white: #ffffff;
    --border: #dce4e9;
    --border-light: #e8edf1;

    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-lg: 0 4px 24px rgba(0,0,0,0.08);

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
}

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

body {
    font-family: var(--font);
    color: var(--text-primary);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }

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

/* ── Typography ──────────────────────────────────────────────────── */
h1 { font-size: 2rem; font-weight: 700; }
h2 { font-size: 1.5rem; font-weight: 600; }
h3 { font-size: 1.15rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }

.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section-title { text-align: center; margin-bottom: 40px; position: relative; }
.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--primary);
    margin: 12px auto 0;
    border-radius: 2px;
}

/* ── Header / Navigation ─────────────────────────────────────────── */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}
.logo:hover { color: var(--primary); }

.logo-img {
    height: 42px;
    width: auto;
    display: block;
}

.logo-icon {
    font-size: 28px;
    color: var(--primary);
}

.logo-text { display: flex; flex-direction: column; }
.logo-brand { font-size: 1.15rem; font-weight: 700; letter-spacing: 1px; }
.logo-sub { font-size: 0.7rem; color: var(--text-muted); letter-spacing: 0.5px; }

.nav-menu { display: flex; gap: 4px; }
.nav-link {
    padding: 8px 16px;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: all 0.2s;
}
.nav-link:hover, .nav-link.active {
    color: var(--primary);
    background: var(--primary-light);
}

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
}

/* ── Page Header ─────────────────────────────────────────────────── */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 48px 0;
    text-align: center;
}
.page-header h1 { margin-bottom: 8px; }
.page-header p { opacity: 0.9; font-size: 1.05rem; }

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: 6px 16px; font-size: 0.85rem; }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; }

/* ── Hero ────────────────────────────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, #0d3b59 0%, #1e6091 50%, #1a7ab5 100%);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}
.hero h1 { font-size: 2.4rem; margin-bottom: 16px; }
.hero-subtitle { font-size: 1.1rem; opacity: 0.85; line-height: 1.8; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-actions .btn-outline { border-color: rgba(255,255,255,0.7); color: #fff; }
.hero-actions .btn-outline:hover { background: rgba(255,255,255,0.15); border-color: #fff; }

/* ── Features ────────────────────────────────────────────────────── */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}
.feature-card {
    background: var(--white);
    padding: 32px 24px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}
.feature-card:hover { transform: translateY(-4px); }
.feature-icon { font-size: 40px; margin-bottom: 12px; }
.feature-card h3 { margin-bottom: 8px; }
.feature-card p { color: var(--text-secondary); font-size: 0.9rem; }

/* ── Product Cards ───────────────────────────────────────────────── */
.product-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 24px;
}
.product-card-link { text-decoration: none; color: inherit; }
.product-card-link:hover .product-card { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow);
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}
.product-card-tag {
    display: inline-block;
    background: #f0f7ff;
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 12px;
}
.tag-blue { background: #e8f5e9; color: var(--accent-dark); }
.tag-green { background: #f3e8ff; color: #7c3aed; }
.product-card h3 { margin-bottom: 8px; }
.product-card p { color: var(--text-secondary); margin-bottom: 16px; font-size: 0.95rem; }
.product-pid { font-size: 0.85rem !important; color: var(--text-muted) !important; }

.product-card-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 16px;
    margin-bottom: 20px;
}
.product-card-list li {
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.product-card-list li::before { content: '• '; color: var(--primary); }

.param-table-sm { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: 0.88rem; }
.param-table-sm td { padding: 6px 0; border-bottom: 1px solid var(--border-light); }
.param-table-sm td:first-child { color: var(--text-muted); width: 100px; }

/* ── Product Detail ──────────────────────────────────────────────── */
.product-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}
.info-item {
    background: var(--white);
    padding: 16px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.info-item strong { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.info-item span { font-size: 0.95rem; }

.usage-tip {
    background: #fff8e1;
    border-left: 4px solid #f9a825;
    padding: 16px 20px;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin-bottom: 32px;
    font-size: 0.92rem;
    color: #5d4037;
    line-height: 1.7;
}

/* ── Tables ──────────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; margin-bottom: 32px; }

.param-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.param-table thead { background: var(--primary); }
.param-table thead th {
    color: #fff;
    padding: 12px 16px;
    text-align: left;
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
}
.param-table tbody td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9rem;
}
.param-table tbody tr:hover { background: var(--primary-light); }
.param-table tbody tr:last-child td { border-bottom: none; }
.param-table tbody small { color: var(--text-muted); font-size: 0.8rem; }

.text-muted { color: var(--text-muted); font-style: italic; }

.cta-box {
    text-align: center;
    margin-top: 32px;
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── About Page ──────────────────────────────────────────────────── */
.about-content { max-width: 800px; margin: 0 auto; }
.about-intro h2 { margin-bottom: 16px; }
.about-intro p { margin-bottom: 16px; color: var(--text-secondary); line-height: 1.8; }

.about-highlights {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 40px;
    text-align: center;
}
.highlight-item {
    background: var(--white);
    padding: 24px 16px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.highlight-item strong {
    display: block;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 4px;
}
.highlight-item span { font-size: 0.85rem; color: var(--text-secondary); }

.advantage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}
.advantage-card {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.advantage-card h3 { color: var(--primary); margin-bottom: 8px; }
.advantage-card p { color: var(--text-secondary); font-size: 0.9rem; }

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}
.contact-card {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    text-align: center;
}
.contact-card h3 { margin-bottom: 8px; }
.contact-card p { color: var(--text-secondary); font-size: 0.95rem; }

/* ── Query Page ──────────────────────────────────────────────────── */
.query-box { max-width: 700px; margin: 0 auto; }
.query-input-group { display: flex; gap: 12px; }
.query-input-lg {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1.05rem;
    transition: border-color 0.2s;
}
.query-input-lg:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30, 96, 145, 0.1); }
.query-hint { color: var(--text-muted); font-size: 0.85rem; margin-top: 8px; }

.query-results { margin-top: 32px; }
.query-results h3 { margin-bottom: 16px; }
.query-error {
    background: #fef2f2;
    color: #dc2626;
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-top: 16px;
    text-align: center;
}
.query-loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 1.05rem;
}

.result-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    overflow: hidden;
}
.result-header {
    padding: 20px 24px;
    background: var(--primary-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.result-header h4 { color: var(--primary); }
.result-batch { font-size: 0.85rem; color: var(--text-secondary); display: block; margin-top: 4px; }
.result-dates { text-align: right; font-size: 0.85rem; color: var(--text-muted); }
.result-dates span { display: block; }
.result-card .param-table { box-shadow: none; border-radius: 0; }

/* Homepage quick query */
.quick-query { max-width: 560px; margin: 0 auto; text-align: center; }
.quick-query p { color: var(--text-secondary); margin-bottom: 16px; }
.query-form { display: flex; gap: 12px; }
.query-input {
    flex: 1;
    padding: 12px 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
}
.query-input:focus { outline: none; border-color: var(--primary); }

/* ── Downloads ───────────────────────────────────────────────────── */
.download-grid { display: flex; flex-direction: column; gap: 12px; margin-bottom: 40px; }
.download-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--white);
    padding: 20px 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.2s;
    color: var(--text-primary);
}
.download-card:hover { transform: translateX(4px); color: var(--text-primary); }
.download-icon { font-size: 28px; }
.download-info { flex: 1; }
.download-info h3 { margin-bottom: 2px; }
.download-info p { color: var(--text-secondary); font-size: 0.88rem; }
.download-size { font-size: 0.78rem; color: var(--text-muted); }
.download-btn {
    background: var(--primary);
    color: #fff !important;
    padding: 8px 20px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    flex-shrink: 0;
}

.download-empty {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    max-width: 560px;
    margin: 0 auto;
}
.download-empty-icon { font-size: 48px; margin-bottom: 16px; }
.download-empty h2 { margin-bottom: 8px; color: var(--primary); }
.download-empty p { color: var(--text-secondary); margin-bottom: 8px; }
.download-empty-contact { color: var(--text-muted); font-size: 0.9rem; }

/* ── Visitor Login ───────────────────────────────────────────────── */
.user-chip {
    color: var(--primary);
    font-weight: 500;
    white-space: nowrap;
}

.login-card {
    max-width: 440px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 40px 36px;
}

.login-form { display: flex; flex-direction: column; gap: 20px; }

.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field label { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); }
.form-field input {
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.2s;
}
.form-field input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 96, 145, 0.1);
}

.login-error {
    background: #fef2f2;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    text-align: center;
}

.login-submit { width: 100%; }
.login-note {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: center;
    margin-top: 4px;
}

/* ── Admin Dashboard ─────────────────────────────────────────────── */
.stats-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 32px; }
.stat-card {
    background: var(--white);
    padding: 28px 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    text-align: center;
}
.stat-value { font-size: 2.4rem; font-weight: 700; color: var(--primary); }
.stat-label { color: var(--text-secondary); font-size: 0.9rem; margin-top: 4px; }

.chart-container {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    height: 400px;
    position: relative;
}
.chart-container h3 { margin-bottom: 16px; }
.chart-container canvas { width: 100% !important; height: 330px !important; }

/* ── Footer ──────────────────────────────────────────────────────── */
.site-footer {
    background: #0d2b40;
    color: rgba(255,255,255,0.8);
    padding: 48px 0 24px;
    margin-top: 64px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}
.footer-col h4 { color: #fff; margin-bottom: 12px; font-size: 0.95rem; }
.footer-col p { font-size: 0.88rem; line-height: 1.8; }

.footer-logo {
    height: 44px;
    width: auto;
    margin-bottom: 14px;
    display: block;
    opacity: 0.95;
}
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.82rem;
}
.footer-icp { margin-top: 4px; opacity: 0.6; }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
    h1 { font-size: 1.6rem; }
    .hero h1 { font-size: 1.8rem; }
    .section { padding: 40px 0; }

    /* Mobile nav */
    .nav-toggle { display: flex; }
    .nav-menu {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 12px;
        box-shadow: var(--shadow-lg);
        border-top: 1px solid var(--border);
    }
    .nav-menu.open { display: flex; }

    /* Product cards */
    .product-cards { grid-template-columns: 1fr; }
    .product-card-list { grid-template-columns: 1fr 1fr; }

    /* Stats */
    .stats-cards { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .stat-card { padding: 16px 12px; }
    .stat-value { font-size: 1.6rem; }

    /* About */
    .about-highlights { grid-template-columns: repeat(2, 1fr); }
    .features-grid, .advantage-grid, .contact-grid { grid-template-columns: 1fr; }

    /* Query */
    .query-input-group { flex-direction: column; }
    .query-form { flex-direction: column; }

    /* Product info */
    .product-info-grid { grid-template-columns: 1fr 1fr; }

    /* Chart */
    .chart-container { height: 280px; }
}

@media (max-width: 480px) {
    .product-info-grid { grid-template-columns: 1fr; }
    .hero-actions { flex-direction: column; align-items: center; }
    .hero-actions .btn { width: 100%; max-width: 280px; }
    .stats-cards { grid-template-columns: 1fr; }
    .about-highlights { grid-template-columns: 1fr 1fr; }
    .result-header { flex-direction: column; align-items: flex-start; }
    .result-dates { text-align: left; }
}
