/* 基本樣式設定 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans TC', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
    color: #333;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, #f9a8d4, #ec4899);
}

.btn {
    display: inline-block;
    background: linear-gradient(to right, #f9a8d4, #ec4899);
    color: #fff;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.2);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(236, 72, 153, 0.3);
}

.btn-small {
    display: inline-block;
    background: transparent;
    color: #ec4899;
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: 1px solid #ec4899;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-small:hover {
    background: #ec4899;
    color: #fff;
    transform: translateY(-2px);
}

/* 頁首樣式 */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-image {
    width: 90px;
    height: 90px;
    object-fit: contain;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    background: linear-gradient(to right, #f9a8d4, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

nav .menu {
    display: flex;
}

nav .menu li {
    margin-left: 30px;
}

nav .menu li a {
    font-weight: 500;
    position: relative;
}

nav .menu li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #f9a8d4, #ec4899);
    transition: width 0.3s ease;
}

nav .menu li a:hover {
    color: #ec4899;
}

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* 英雄區塊樣式 */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    text-align: center;
    padding-top: 80px;
    overflow: hidden;
}

/* 響應式hero區塊 */
@media (max-width: 768px) {
    .hero {
        height: 90vh;
        padding-top: 70px;
    }
}

@media (max-width: 480px) {
    .hero {
        height: 85vh;
        padding-top: 60px;
    }
}

/* 輪播圖片樣式 */
.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* 修改z-index，確保不會蓋住控制按鈕 */
    overflow: hidden;
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
}

/* 滑動指示效果 */
.hero-slider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translateY(-50%) scale(0);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 10;
    pointer-events: none;
}

.hero-slider.swipe-left::after {
    left: 30px;
    animation: swipeIndicator 0.5s ease-out;
}

.hero-slider.swipe-right::after {
    right: 30px;
    animation: swipeIndicator 0.5s ease-out;
}

@keyframes swipeIndicator {
    0% {
        transform: translateY(-50%) scale(0);
        opacity: 0;
    }
    50% {
        transform: translateY(-50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-50%) scale(1.5);
        opacity: 0;
    }
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.05);
    transition: opacity 1.5s ease, transform 1.5s ease;
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

/* 添加輪播前後的淡入淡出效果 */
.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.3);
    z-index: -1;
}

/* 輪播控制樣式 */
.slider-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    z-index: 20; /* 提高z-index，確保高於hero-slider */
    pointer-events: auto; /* 確保控制區域可以接收點擊事件 */
}

.prev-btn, .next-btn {
    background: rgba(255, 255, 255, 0.7);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #333;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin: 0 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative; /* 添加定位 */
    z-index: 25; /* 確保按鈕在最上層 */
    pointer-events: auto; /* 確保按鈕可以接收點擊事件 */
}

.prev-btn:hover, .next-btn:hover {
    background: #ec4899;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
}

.prev-btn:active, .next-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(236, 72, 153, 0.2);
}

.slider-dots {
    display: flex;
    align-items: center;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dot.active {
    background: #ec4899;
    transform: scale(1.2);
    box-shadow: 0 1px 5px rgba(236, 72, 153, 0.3);
}

/* 響應式輪播控制 */
@media (max-width: 768px) {
    .slider-controls {
        bottom: 20px;
    }
    
    .prev-btn, .next-btn {
        width: 35px;
        height: 35px;
        margin: 0 10px;
        font-size: 0.8rem;
    }
    
    .dot {
        width: 10px;
        height: 10px;
        margin: 0 4px;
    }
}

@media (max-width: 480px) {
    .slider-controls {
        bottom: 15px;
    }
    
    .prev-btn, .next-btn {
        width: 30px;
        height: 30px;
        margin: 0 8px;
        font-size: 0.7rem;
    }
    
    .dot {
        width: 8px;
        height: 8px;
        margin: 0 3px;
    }
}

/* 內容樣式 */
.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 5;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #333;
    background: linear-gradient(to right, #333, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #666;
}

/* 響應式內容樣式 */
@media (max-width: 992px) {
    .hero-content {
        max-width: 90%;
        padding: 30px;
    }
    
    .hero-content h2 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .hero-content {
        max-width: 90%;
        padding: 25px;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .hero-content {
        max-width: 95%;
        padding: 20px;
    }
    
    .hero-content h2 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .hero-content p {
        font-size: 1rem;
        margin-bottom: 20px;
    }
}

/* 服務區塊樣式 */
.services {
    padding: 100px 0;
    background-color: #f9f9f9;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: #fff;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(to right, #f9a8d4, #ec4899);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.service-icon i {
    font-size: 2rem;
    color: #fff;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #333;
}

.service-card p {
    color: #666;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* 流程區塊樣式 */
.procedure {
    padding: 100px 0;
}

.procedure-list {
    max-width: 800px;
    margin: 0 auto;
}

.procedure-item {
    display: flex;
    margin-bottom: 30px;
    align-items: flex-start;
}

.procedure-item .number {
    width: 50px;
    height: 50px;
    background: linear-gradient(to right, #f9a8d4, #ec4899);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-right: 20px;
}

.procedure-item .text {
    flex-grow: 1;
}

.procedure-item h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #333;
}

.procedure-item p {
    color: #666;
}

/* 關於我們區塊樣式 */
.about {
    padding: 100px 0;
    background-color: #f9f9f9;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text p {
    margin-bottom: 20px;
    color: #666;
}

.about-image img {
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* 醫師團隊區塊樣式 */
.doctors {
    padding: 100px 0;
}

.doctor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.doctor-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.doctor-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.btn-view-more {
    display: block;
    width: 100%;
    background: transparent;
    color: #ec4899;
    border: none;
    padding: 10px 0;
    margin: 10px 0 0;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-view-more:hover {
    color: #d61f69;
}

.btn-view-more i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.doctor-card .doctor-credentials {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.5s ease, margin-top 0.3s ease, padding-top 0.3s ease;
    opacity: 0;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.doctor-card.show-credentials .doctor-credentials {
    max-height: 300px;
    opacity: 1;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #ddd;
}

.doctor-card.show-credentials .btn-view-more i {
    transform: rotate(180deg);
}

.doctor-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.doctor-info {
    padding: 20px;
    text-align: center;
}

.doctor-info h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: #333;
}

.doctor-info .doctor-title {
    color: #ec4899;
    font-weight: 500;
    margin-bottom: 15px;
}

.doctor-info p {
    color: #666;
    font-size: 0.95rem;
}

.doctor-credentials {
    margin-top: 15px;
    border-top: 1px dashed #ddd;
    padding-top: 15px;
}

.doctor-credentials p {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.doctor-credentials i {
    color: #ec4899;
    margin-right: 10px;
    width: 16px;
    text-align: center;
}

/* 醫師團隊響應式樣式 */
@media (max-width: 992px) {
    .doctor-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .doctor-info h3 {
        font-size: 1.3rem;
    }
    
    .doctor-info .doctor-title {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .doctor-image img {
        height: 250px;
    }
    
    .doctor-credentials p {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .doctor-grid {
        grid-template-columns: 1fr;
    }
    
    .doctor-image img {
        height: 220px;
    }
    
    .doctor-info {
        padding: 15px;
    }
    
    .doctor-info h3 {
        font-size: 1.2rem;
    }
    
    .doctor-info p {
        font-size: 0.9rem;
    }
    
    .doctor-credentials {
        margin-top: 10px;
        padding-top: 10px;
    }
}

/* 聯絡我們區塊樣式 */
.contact {
    padding: 100px 0;
    background-color: #f9f9f9;
}

.contact-logo {
    text-align: center;
    margin-bottom: 40px;
}

.contact-logo-image {
    max-width: 400px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.contact-logo-image:hover {
    transform: scale(1.05);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 50px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.contact-item i {
    width: 50px;
    height: 50px;
    background: linear-gradient(to right, #f9a8d4, #ec4899);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    margin-right: 15px;
}

.contact-item p {
    color: #666;
    font-size: 1.1rem;
}

.contact-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    background-color: #f9f9f9;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.line-qr-container {
    flex: 1;
    min-width: 250px;
    padding: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fff;
}

.line-qr {
    max-width: 200px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.line-info {
    flex: 2;
    min-width: 300px;
    padding: 30px;
}

.line-info h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #333;
    position: relative;
    padding-bottom: 10px;
}

.line-info h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, #06c755, #00b900);
}

.line-info p {
    color: #666;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.line-benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.line-benefit-item {
    display: flex;
    align-items: center;
}

.line-benefit-item i {
    color: #06c755;
    margin-right: 10px;
    font-size: 1.2rem;
}

.line-benefit-item span {
    color: #333;
    font-weight: 500;
}

.line-info .btn {
    background: linear-gradient(to right, #06c755, #00b900);
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(6, 199, 85, 0.2);
}

.line-info .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(6, 199, 85, 0.3);
}

/* 頁尾樣式 */
footer {
    background-color: #333;
    color: #fff;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-logo h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #fff;
}

.footer-logo p {
    color: #ccc;
}

.footer-links h4,
.footer-social h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #fff;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h4::after,
.footer-social h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(to right, #f9a8d4, #ec4899);
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: #ccc;
    transition: all 0.3s ease;
}

.footer-links ul li a:hover {
    color: #ec4899;
    padding-left: 5px;
}

.social-icons {
    display: flex;
}

.social-icons a {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background: linear-gradient(to right, #f9a8d4, #ec4899);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: #ccc;
    font-size: 0.9rem;
}

/* 響應式設計 */
@media (max-width: 992px) {
    .hero-content h2 {
        font-size: 2.5rem;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }

    .about-image {
        order: -1;
    }
}

@media (max-width: 768px) {
    .contact-logo-image {
        max-width: 300px;
    }
    
    .mobile-menu-btn {
        display: block;
    }

    .logo-image {
        width: 70px;
        height: 70px;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    nav .menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        background-color: #fff;
        flex-direction: column;
        padding: 20px 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
    }

    nav .menu.active {
        left: 0;
    }

    nav .menu li {
        margin: 0;
        padding: 15px 0;
        text-align: center;
        border-bottom: 1px solid #eee;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .contact-logo-image {
        max-width: 250px;
    }
    
    .logo-image {
        width: 55px;
        height: 55px;
    }

    .logo h1 {
        font-size: 1.3rem;
    }

    .hero-content h2 {
        font-size: 1.8rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .procedure-item .number {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .procedure-item h3 {
        font-size: 1.1rem;
    }

    .contact-item i {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .contact-item p {
        font-size: 1rem;
    }
}