/* ============================================
   Hong Kong Oncology Alliance - Main Stylesheet
   Color Scheme: Deep Blue #1a3a5c + Red #c0392b
   ============================================ */

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

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background: #fff;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font: inherit; }
ul, ol { list-style: none; }

/* iPhone X Safe Area */
body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

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

/* ============================================
   Header
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(26, 58, 92, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    padding-top: env(safe-area-inset-top);
}

.header.scrolled {
    background: rgba(26, 58, 92, 1);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    flex-shrink: 0;
}

.logo-icon {
    font-size: 28px;
    font-weight: 700;
    color: #c0392b;
    width: 40px;
    height: 40px;
    border: 2px solid #c0392b;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-text {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

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

.nav a {
    color: rgba(255, 255, 255, 0.85);
    font-size: 15px;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav a:hover { color: #fff; }

.nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #c0392b;
    transition: width 0.3s;
}

.nav a:hover::after { width: 100%; }

.nav-cta {
    background: #c0392b !important;
    color: #fff !important;
    padding: 8px 20px;
    border-radius: 5px;
    font-weight: 600 !important;
    transition: background 0.3s !important;
}

.nav-cta:hover { background: #a93226 !important; }
.nav-cta::after { display: none !important; }

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Nav */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.mobile-nav-overlay.active { display: block; }

.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100%;
    background: #1a3a5c;
    z-index: 999;
    padding: 80px 30px 30px;
    transition: right 0.3s ease;
    padding-top: calc(80px + env(safe-area-inset-top));
}

.mobile-nav.active {
    display: block;
    right: 0;
}

.mobile-nav a {
    display: block;
    color: rgba(255, 255, 255, 0.85);
    font-size: 18px;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: color 0.3s;
}

.mobile-nav a:hover { color: #c0392b; }

.mobile-nav-cta {
    display: block !important;
    text-align: center;
    background: #c0392b !important;
    color: #fff !important;
    border-radius: 5px;
    margin-top: 20px;
    border: none !important;
    padding: 12px !important;
}

/* ============================================
   Hero Slider
   ============================================ */
.hero-slider {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 45%; /* Aspect ratio */
    overflow: hidden;
    margin-top: 70px; /* Header height */
}

.slides-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active { opacity: 1; }

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============================================
   Sections Common
   ============================================ */
.section {
    padding: 80px 0;
}

.section:nth-child(even) {
    background: #f8f9fa;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 36px;
    color: #1a3a5c;
    margin-bottom: 12px;
    font-weight: 700;
}

.section-divider {
    width: 60px;
    height: 3px;
    background: #c0392b;
    margin: 0 auto;
    border-radius: 2px;
}

.section-subtitle {
    color: #666;
    font-size: 16px;
    margin-top: 15px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   About
   ============================================ */
.about-text {
    font-size: 17px;
    line-height: 1.8;
    color: #444;
    text-align: center;
    max-width: 900px;
    margin: 0 auto 40px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.stat-card {
    background: linear-gradient(135deg, #1a3a5c, #2c5f8a);
    color: #fff;
    padding: 35px 20px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s;
}

.stat-card:hover { transform: translateY(-5px); }

.stat-number {
    font-size: 38px;
    font-weight: 700;
    line-height: 1.2;
}

.stat-plus { font-size: 28px; }

.stat-unit {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin: 4px 0;
}

.stat-label {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
}

/* ============================================
   Experts
   ============================================ */
.experts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.expert-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.expert-photo {
    width: 100%;
    height: 320px;
    overflow: hidden;
    background: #eee;
}

.expert-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.expert-card:hover .expert-photo img { transform: scale(1.05); }

.expert-info {
    padding: 25px 30px 30px;
}

.expert-info h3 {
    font-size: 24px;
    color: #1a3a5c;
    margin-bottom: 5px;
}

.expert-title {
    color: #c0392b;
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 15px;
}

.expert-titles {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #c0392b;
}

.expert-titles p {
    font-size: 13px;
    color: #555;
    line-height: 1.6;
    padding: 3px 0;
}

.expert-section {
    margin-top: 15px;
}

.expert-section h4 {
    font-size: 16px;
    color: #1a3a5c;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #eee;
}

.expert-section p {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
}

.expert-philosophy {
    background: linear-gradient(135deg, #1a3a5c, #2c5f8a);
    color: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-top: 15px;
}

.expert-philosophy h4 {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.expert-philosophy p {
    color: rgba(255, 255, 255, 0.9);
}

/* ============================================
   Technology
   ============================================ */
.tech-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
    font-size: 17px;
    line-height: 1.8;
    color: #444;
}

.steps-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 100px;
    max-width: 150px;
}

.step-icon {
    font-size: 36px;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.step-label {
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    color: #1a3a5c;
    line-height: 1.3;
}

.step-arrow {
    font-size: 24px;
    color: #c0392b;
    font-weight: 700;
    margin-bottom: 30px;
}

.sub-heading {
    text-align: center;
    font-size: 24px;
    color: #1a3a5c;
    margin-bottom: 30px;
}

.tech-advantages-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}

.tech-card {
    background: #fff;
    padding: 30px 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s;
}

.tech-card:hover { transform: translateY(-5px); }

.tech-card-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.tech-card h4 {
    font-size: 15px;
    color: #1a3a5c;
    margin-bottom: 10px;
}

.tech-card p {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

.applicable-range {
    text-align: center;
}

.range-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.range-tags span {
    display: inline-block;
    padding: 8px 18px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    color: #1a3a5c;
    transition: all 0.3s;
}

.range-tags span:hover {
    background: #1a3a5c;
    color: #fff;
    border-color: #1a3a5c;
}

/* ============================================
   Advantages
   ============================================ */
.advantages-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.advantage-card {
    background: #fff;
    padding: 30px 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s;
    border-top: 3px solid transparent;
}

.advantage-card:hover {
    transform: translateY(-5px);
    border-top-color: #c0392b;
}

.adv-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.advantage-card h4 {
    font-size: 16px;
    color: #1a3a5c;
    margin-bottom: 10px;
}

.advantage-card p {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

/* ============================================
   Mission & Vision
   ============================================ */
.mission-vision {
    background: linear-gradient(135deg, #1a3a5c, #2c5f8a);
    color: #fff;
}

.mv-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.mv-card {
    padding: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.mv-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.mv-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

.mv-card p {
    font-size: 16px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
}

/* ============================================
   Contact Form
   ============================================ */
.contact {
    background: #f8f9fa;
}

.form-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-weight: 500;
    text-align: center;
}

.form-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.contact-form {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

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

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.required { color: #c0392b; }

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px; /* Prevent iOS zoom */
    font-family: inherit;
    color: #333;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: #fff;
    -webkit-appearance: none;
    appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1a3a5c;
    box-shadow: 0 0 0 3px rgba(26, 58, 92, 0.1);
}

.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

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

.form-group input[type="file"] {
    font-size: 15px;
    color: #555;
}

.form-group small {
    display: block;
    font-size: 13px;
    color: #999;
    margin-top: 5px;
}

.btn-submit {
    display: block;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 15px 30px;
    background: #c0392b;
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.btn-submit:hover {
    background: #a93226;
    transform: translateY(-2px);
}

.btn-submit:active { transform: translateY(0); }

/* ============================================
   Footer
   ============================================ */
.footer {
    background: #0f2440;
    color: rgba(255, 255, 255, 0.8);
    padding: 50px 0 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand strong {
    font-size: 16px;
    color: #fff;
    line-height: 1.5;
    display: block;
}

.footer-brand p {
    font-size: 14px;
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.6);
}

.footer-links {
    display: flex;
    gap: 25px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 15px;
    transition: color 0.3s;
}

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

.footer-bottom {
    padding: 20px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
}

/* ============================================
   RESPONSIVE - Tablet (max-width: 1024px)
   ============================================ */
@media (max-width: 1024px) {
    .tech-advantages-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .advantages-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .steps-flow {
        gap: 5px;
    }
    
    .step-icon {
        width: 65px;
        height: 65px;
        font-size: 28px;
    }
}

/* ============================================
   RESPONSIVE - Mobile (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
    .section { padding: 60px 0; }
    
    .section-header h2 { font-size: 28px; }
    .section-header { margin-bottom: 35px; }
    
    /* Header mobile */
    .nav { display: none; }
    .menu-toggle { display: flex; }
    
    .header-inner { height: 60px; }
    .logo-text { font-size: 11px; }
    .logo-icon { width: 28px; height: 28px; font-size: 18px; }
    
    /* Hero */
    .hero-slider { margin-top: 60px; padding-bottom: 56.25%; }
    
    /* About */
    .stats-grid { grid-template-columns: 1fr; gap: 15px; }
    .stat-card { padding: 25px 15px; }
    .stat-number { font-size: 30px; }
    .about-text { font-size: 15px; }
    
    /* Experts */
    .experts-grid { grid-template-columns: 1fr; gap: 25px; }
    .expert-photo { height: 250px; }
    .expert-info { padding: 20px; }
    .expert-info h3 { font-size: 20px; }
    
    /* Tech */
    .steps-flow {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 0 10px;
        -webkit-overflow-scrolling: touch;
    }
    
    .step {
        min-width: 80px;
        max-width: 80px;
    }
    
    .step-icon {
        width: 55px;
        height: 55px;
        font-size: 24px;
    }
    
    .step-label { font-size: 11px; }
    .step-arrow { font-size: 16px; margin-bottom: 25px; }
    
    .tech-advantages-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    
    .advantages-grid { grid-template-columns: 1fr; gap: 15px; }
    
    .advantage-card { padding: 25px 20px; }
    
    /* MV */
    .mv-grid { grid-template-columns: 1fr; gap: 20px; }
    .mv-card { padding: 30px 20px; }
    .mv-card h3 { font-size: 20px; }
    .mv-card p { font-size: 15px; }
    
    /* Contact Form */
    .form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .contact-form { padding: 25px 20px; }
    
    .btn-submit {
        max-width: 100%;
        font-size: 16px;
        padding: 14px 20px;
    }
    
    /* Footer */
    .footer-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .footer-links { flex-wrap: wrap; gap: 15px; }
    
    .sub-heading { font-size: 20px; }
}

/* ============================================
   RESPONSIVE - Small Mobile (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {
    .container { padding: 0 15px; }
    
    .section { padding: 45px 0; }
    .section-header h2 { font-size: 24px; }
    .section-header { margin-bottom: 25px; }
    
    .logo-text { font-size: 9px; letter-spacing: 0; }
    
    .hero-slider { padding-bottom: 70%; }
    
    .stat-number { font-size: 26px; }
    .stat-label { font-size: 13px; }
    
    .expert-photo { height: 200px; }
    
    .tech-card { padding: 20px 15px; }
    .tech-card-icon { font-size: 30px; margin-bottom: 10px; }
    .tech-card h4 { font-size: 14px; }
    .tech-card p { font-size: 12px; }
    
    .tech-advantages-grid { gap: 12px; }
    
    .range-tags span { font-size: 12px; padding: 6px 12px; }
    
    .advantage-card { padding: 20px 15px; }
    .adv-icon { font-size: 30px; margin-bottom: 10px; }
    .advantage-card h4 { font-size: 14px; }
    .advantage-card p { font-size: 12px; }
    
    .mv-card { padding: 25px 15px; }
    .mv-icon { font-size: 36px; margin-bottom: 15px; }
    .mv-card h3 { font-size: 18px; }
    .mv-card p { font-size: 14px; }
    
    .contact-form { padding: 20px 15px; }
    
    .form-group input[type="text"],
    .form-group input[type="tel"],
    .form-group input[type="email"],
    .form-group input[type="number"],
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 16px; /* Keep 16px to prevent iOS zoom */
    }
}