/* ========================================
   等家寶寶 (Home4Baby) 自訂樣式
   ======================================== */

/* === 全域樣式 === */
:root {
    --primary-color: #FC6C5F;      /* 珊瑚紅 */
    --secondary-color: #4ba83b;    /* 綠色 */
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #F8F9FA;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans TC', 'Microsoft JhengHei', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* === 導航列樣式 === */
.home4baby-header {
    position: relative;
    z-index: 9999;
}

.navbar {
    padding: 1rem 0;
    transition: all var(--transition-normal);
}

.navbar-brand {
    display: flex;
    align-items: center;
    font-weight: 700;
    color: var(--primary-color) !important;
}

.navbar-brand img {
    margin-right: 0.75rem;
}

.brand-text {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark) !important;
    padding: 0.5rem 1rem !important;
    transition: color var(--transition-fast);
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.btn-donate {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white !important;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    transition: all var(--transition-fast);
}

.btn-donate:hover {
    background-color: #e55a4e;
    border-color: #e55a4e;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* === 主要內容區 === */
.home4baby-main {
    margin-top: 76px; /* 導航列高度 */
    min-height: calc(100vh - 76px);
}

/* === 英雄區域 === */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 600px;
    background: linear-gradient(135deg, #FC6C5F 0%, #FFA07A 100%);
    background-image: url('/images/home4baby/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(252, 108, 95, 0.85) 0%, rgba(255, 160, 122, 0.75) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-actions {
    margin-top: 2.5rem;
}

.hero-actions .btn {
    font-size: 1.1rem;
    padding: 0.75rem 2rem;
    border-radius: 30px;
    min-width: 180px;
}

.btn-outline-light:hover {
    background-color: white;
    color: var(--primary-color) !important;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: white;
    animation: bounce 2s infinite;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity var(--transition-fast);
}

.scroll-indicator:hover {
    opacity: 1;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* === 動畫效果 === */
.animate-fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.animate-fade-in.delay-1 {
    animation-delay: 0.2s;
}

.animate-fade-in.delay-2 {
    animation-delay: 0.4s;
}

.animate-fade-in.delay-3 {
    animation-delay: 0.6s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === 區塊樣式 === */
.intro-section,
.services-section,
.cta-section {
    padding: 80px 0;
}

.intro-section {
    background-color: white;
}

.services-section {
    background-color: var(--bg-light);
}

.cta-section {
    background: linear-gradient(135deg, #FC6C5F 0%, #FFA07A 100%);
    color: white;
}

/* === 標題樣式 === */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.cta-section .section-title,
.cta-section .cta-title {
    color: white;
}

.title-underline {
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    margin-bottom: 2rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
}

/* === 組織介紹區 === */
.intro-image img {
    border-radius: 12px;
    transition: transform var(--transition-normal);
}

.intro-image img:hover {
    transform: scale(1.05);
}

.intro-content .lead {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.stats-row {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    flex: 1;
    min-width: 120px;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.stat-item.animate-visible {
    opacity: 1;
    transform: translateY(0);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

/* === 服務卡片 === */
.service-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    height: 100%;
    opacity: 0;
    transform: translateY(30px);
}

.service-card.animate-visible {
    opacity: 1;
    transform: translateY(0);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.service-image {
    position: relative;
    overflow: hidden;
    padding-top: 75%; /* 4:3 Aspect Ratio */
}

.service-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.service-card:hover .service-image img {
    transform: scale(1.1);
}

.service-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(252, 108, 95, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.service-card:hover .service-overlay {
    opacity: 1;
}

.service-icon {
    font-size: 4rem;
    color: white;
}

.service-content {
    padding: 2rem;
}

.service-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.service-description {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    min-height: 72px;
}

.service-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.service-link:hover {
    color: #e55a4e;
    gap: 0.75rem;
}

/* === 行動號召區 === */
.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.cta-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-actions {
    margin-top: 2rem;
}

.cta-actions .btn {
    font-size: 1.1rem;
    padding: 0.75rem 2rem;
    border-radius: 30px;
}

.btn-outline-primary {
    background-color: white;
    color: var(--primary-color) !important;
    border-color: white;
}

.btn-outline-primary:hover {
    background-color: transparent;
    color: white !important;
    border-color: white;
}

/* === 頁尾 === */
.home4baby-footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 60px 0 30px;
}

.home4baby-footer h5 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: white;
}

.home4baby-footer ul li {
    margin-bottom: 0.75rem;
}

.home4baby-footer a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.home4baby-footer a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white !important;
    font-size: 1.2rem;
    transition: all var(--transition-fast);
}

.social-link:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

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

    .hero-subtitle {
        font-size: 1.2rem;
    }

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

    .stats-row {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-actions .btn {
        font-size: 1rem;
        padding: 0.6rem 1.5rem;
        min-width: 150px;
    }

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

    .intro-section,
    .services-section,
    .cta-section {
        padding: 60px 0;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .service-description {
        min-height: auto;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .hero-actions .btn {
        display: block;
        margin: 0.5rem auto;
    }

    .stats-row {
        flex-direction: column;
        gap: 1.5rem;
    }

    .cta-actions .btn {
        display: block;
        margin: 0.5rem auto;
    }
}
