/* Custom CSS Properties - Premium Palette */
:root {
    --primary-color: #1e3a8a;
    /* 專業深藍 / Medical Blue */
    --primary-light: #3b82f6;
    /* 科技藍 / Tech Blue */
    --secondary-color: #f59e0b;
    /* 溫暖琥珀金 / Warm Amber Gold */
    --secondary-hover: #d97706;
    --text-dark: #1f2937;
    /* 信賴深灰 */
    --text-light: #6b7280;
    --bg-light: #f3f4f6;
    /* 背景淺灰 */
    --white: #ffffff;
    --danger: #ef4444;
    /* 用於強調，本頁特徵為紅底白字的照片 */
    --glass-bg: rgba(255, 255, 255, 0.85);
    /* 玻璃背景 */
    --glass-border: rgba(255, 255, 255, 0.4);
    --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);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);

    --font-heading: 'Outfit', 'Noto Sans TC', sans-serif;
    --font-body: 'Noto Sans TC', sans-serif;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-dark);
    line-height: 1.2;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
}

.text-center {
    text-align: center;
}

.bg-light {
    background-color: var(--bg-light);
}

.highlight {
    color: var(--primary-light);
}

/* Typography Utilities */
.section-title {
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
}

.subtitle {
    display: block;
    color: var(--primary-light);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.underline {
    height: 4px;
    width: 60px;
    background: linear-gradient(90deg, var(--primary-light), var(--primary-color));
    border-radius: 2px;
    margin-top: 15px;
}

.underline.center {
    margin: 15px auto 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    border: 2px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    color: var(--white);
    box-shadow: 0 4px 15px rgba(29, 78, 216, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(29, 78, 216, 0.4);
    color: var(--white);
}

.btn-outline {
    border-color: var(--white);
    color: var(--white);
    background-color: transparent;
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--primary-color);
}

.btn-large {
    padding: 15px 35px;
    font-size: 1.1rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
}

.navbar.scrolled {
    background-color: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 15px 0;
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    font-family: var(--font-heading);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.navbar.scrolled .logo {
    color: var(--primary-color);
    text-shadow: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links li a {
    color: var(--white);
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.navbar.scrolled .nav-links li a {
    color: var(--text-dark);
    text-shadow: none;
}

.nav-links li a:hover {
    color: var(--secondary-color);
}

.navbar.scrolled .nav-links li a.btn-primary {
    color: var(--white);
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    color: var(--white);
    cursor: pointer;
}

.navbar.scrolled .hamburger {
    color: var(--text-dark);
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: var(--primary-color);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 65%;
    /* Subtle zoom effect for background */
    animation: slowZoom 20s infinite alternate;
}

@keyframes slowZoom {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.8) 0%, rgba(15, 23, 42, 0.4) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-text {
    max-width: 600px;
    color: var(--white);
}

.hero-text h1 {
    font-size: 3.5rem;
    color: var(--white);
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero-text p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 30px;
}

.check-list {
    margin-bottom: 30px;
}

.check-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 500;
}

.check-list i {
    color: var(--primary-light);
    font-size: 1.2rem;
}

.about-glass-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(30, 58, 138, 0.05));
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    position: relative;
}

.about-glass-card::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--secondary-color) 0%, transparent 70%);
    opacity: 0.2;
    z-index: -1;
    border-radius: 50%;
}

.glass-content h3 {
    color: var(--secondary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.glass-content p {
    font-size: 1.2rem;
    font-style: italic;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.customer-name {
    display: block;
    text-align: right;
    font-weight: 600;
    color: var(--primary-color);
}

/* Services */
.section-desc {
    max-width: 600px;
    margin: 20px auto 50px;
    color: var(--text-light);
    font-size: 1.1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border-bottom: 4px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-bottom-color: var(--danger);
    /* 搭配紅底白字設計 */
}

.service-img-wrapper {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.service-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.service-card:hover .service-img {
    transform: scale(1.05);
}

.service-icon {
    position: absolute;
    bottom: -25px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
    z-index: 10;
}

.service-content {
    padding: 40px 30px 30px;
}

.service-content h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    /* Simulate the red background header from the uploaded pictures */
    color: var(--text-dark);
}

.service-content p {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.service-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.95rem;
}

.service-link i {
    transition: transform 0.3s ease;
}

.service-link:hover i {
    transform: translateX(5px);
}

/* Why Us Section */
.why-us {
    position: relative;
    background: linear-gradient(to right, #ffffff 50%, #f8fafc 50%);
}

.why-us-container {
    display: flex;
    justify-content: flex-end;
    /* Use background image or pattern here if applicable */
}

.why-us-content {
    width: 55%;
    padding-left: 50px;
}

.why-us-content>p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 40px;
}

.feature-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    border-radius: 16px;
    background: var(--white);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.feature-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--primary-light);
}

.feature-icon-box {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary-light);
}

.feature-text h4 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.feature-text p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* CTA */
.cta {
    background-color: var(--primary-color);
    position: relative;
}

.cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('images/hero.jpg') center/cover fixed;
    /* Optional parallax */
    opacity: 0.15;
}

.cta-container {
    position: relative;
    z-index: 10;
    max-width: 800px;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 60px;
    text-align: center;
    color: var(--white);
}

.cta h2 {
    color: var(--white);
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.cta p {
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.appointment-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    gap: 20px;
}

.form-group input,
.form-group select {
    flex: 1;
    padding: 15px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    background: var(--white);
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Footer */
footer {
    background-color: #0f172a;
    /* 更深的海軍藍 */
    color: var(--white);
    padding-top: 80px;
}

.footer-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand p {
    color: #94a3b8;
    margin-bottom: 25px;
    max-width: 400px;
}

.footer-logo {
    text-shadow: none;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-light);
    transform: translateY(-3px);
}

.footer-info h4 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 25px;
}

.footer-info ul li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
    color: #94a3b8;
}

.footer-info ul li i {
    color: var(--primary-light);
    margin-top: 5px;
}

.footer-bottom {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 20px 0;
    text-align: center;
    color: #64748b;
}

/* Animations (Animate on Scroll) */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.visible,
.fade-in-left.visible,
.fade-in-right.visible {
    opacity: 1;
    transform: translate(0);
}

/* Responsive Design */
@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

    .why-us {
        background: var(--bg-light);
    }

    .why-us-content {
        width: 100%;
        padding-left: 0;
    }

    .hero-text h1 {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .form-group {
        flex-direction: column;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}