/* 水上救生頁面樣式 */

/* 救生技能區塊 */
.lifesaving-skills {
    padding: 50px 20px;
    background-color: #f8f9fa;
}

.section-title {
    text-align: center;
    font-size: 28px;
    color: var(--text-color);
    margin-bottom: 40px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.skill-item {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.skill-item:hover {
    transform: translateY(-5px);
}

.skill-item i {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.skill-item h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--text-color);
}

.skill-item ul {
    list-style: none;
    padding: 0;
}

.skill-item ul li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.skill-item ul li:before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

/* 救生裝備介紹 */
.lifesaving-equipment {
    padding: 50px 20px;
}

.equipment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.equipment-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.equipment-item:hover {
    transform: translateY(-5px);
}

.equipment-image {
    height: 250px;
    overflow: hidden;
}

.equipment-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.equipment-item:hover .equipment-image img {
    transform: scale(1.1);
}

.equipment-content {
    padding: 20px;
}

.equipment-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-color);
}

.equipment-content p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.equipment-content ul {
    list-style: none;
    padding: 0;
}

.equipment-content ul li {
    margin-bottom: 8px;
    color: #666;
    font-size: 14px;
}

/* 救生技術示範 */
.lifesaving-demos {
    padding: 50px 20px;
    background-color: #f8f9fa;
}

.demo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.demo-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.demo-item h3 {
    font-size: 18px;
    padding: 15px;
    margin: 0;
}

.demo-item p {
    padding: 0 15px 15px;
    color: #666;
    margin: 0;
}

/* 救生知識庫 */
.lifesaving-knowledge {
    padding: 50px 20px;
}

.knowledge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.knowledge-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.knowledge-item:hover {
    transform: translateY(-5px);
}

.knowledge-image {
    height: 200px;
    overflow: hidden;
}

.knowledge-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.knowledge-item:hover .knowledge-image img {
    transform: scale(1.1);
}

.knowledge-content {
    padding: 20px;
}

.knowledge-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-color);
}

.knowledge-meta {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.knowledge-excerpt {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.read-more {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

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

.read-more:hover i {
    transform: translateX(5px);
}

/* 救生員認證 */
.lifeguard-certification {
    padding: 50px 20px;
    background-color: #f8f9fa;
}

.certification-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.certification-info,
.certification-process {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.certification-info h3,
.certification-process h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--text-color);
}

.certification-info ul {
    list-style: none;
    padding: 0;
}

.certification-info ul li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.certification-info ul li i {
    color: var(--primary-color);
}

.certification-process ol {
    padding-left: 20px;
}

.certification-process ol li {
    margin-bottom: 15px;
    color: #666;
    line-height: 1.6;
}

/* 響應式調整 */
@media (max-width: 768px) {
    .section-title {
        font-size: 24px;
    }

    .skill-item,
    .equipment-item,
    .certification-info,
    .certification-process {
        padding: 20px;
    }

    .skill-item i {
        font-size: 32px;
    }

    .skill-item h3,
    .equipment-content h3,
    .knowledge-content h3 {
        font-size: 18px;
    }

    .equipment-image {
        height: 200px;
    }
}

/* 動畫效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.skill-item,
.equipment-item,
.demo-item,
.knowledge-item {
    animation: fadeIn 0.8s ease-out backwards;
}

.skill-item:nth-child(2),
.equipment-item:nth-child(2),
.demo-item:nth-child(2),
.knowledge-item:nth-child(2) {
    animation-delay: 0.2s;
}

.skill-item:nth-child(3),
.demo-item:nth-child(3),
.knowledge-item:nth-child(3) {
    animation-delay: 0.4s;
}

.skill-item:nth-child(4) {
    animation-delay: 0.6s;
}

/* 部落格文章列表樣式 */
.blog-section {
    padding: 60px 0;
    background: linear-gradient(to bottom, #f8f9fa, #ffffff);
}

/* 文章分類過濾器 */
.blog-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.filter-btn {
    padding: 8px 20px;
    border-radius: 20px;
    background: #f8f9fa;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: #007bff;
    color: #fff;
}

/* 文章網格布局 */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

/* 文章卡片樣式 */
.blog-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

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

.blog-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.blog-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 123, 255, 0.9);
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8em;
}

.blog-content {
    padding: 20px;
}

.blog-content h2 {
    margin: 0 0 10px;
    font-size: 1.3em;
}

.blog-content h2 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-content h2 a:hover {
    color: #007bff;
}

.blog-meta {
    display: flex;
    gap: 15px;
    color: #666;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.blog-meta span {
    display: flex;
    align-items: center;
}

.blog-meta i {
    margin-right: 5px;
}

.blog-content p {
    color: #666;
    font-size: 0.9em;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    display: inline-flex;
    align-items: center;
    color: #007bff;
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.3s ease;
}

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

.read-more:hover {
    color: #0056b3;
}

.read-more:hover i {
    transform: translateX(5px);
}

/* 分頁導航 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 35px;
    height: 35px;
    padding: 0 10px;
    border-radius: 5px;
    background: #fff;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination a:hover,
.pagination span.current {
    background: #007bff;
    color: #fff;
}

/* 無資料提示 */
.no-data {
    text-align: center;
    padding: 50px 0;
    color: #666;
    font-size: 1.1em;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-filter {
        justify-content: center;
    }
}

/* 動畫效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-card {
    animation: fadeInUp 0.6s ease-out backwards;
}

.blog-card:nth-child(2) {
    animation-delay: 0.2s;
}

.blog-card:nth-child(3) {
    animation-delay: 0.4s;
}

.blog-card:nth-child(4) {
    animation-delay: 0.6s;
}

/* 圖片延遲載入效果 */
.lazy-load {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    background: linear-gradient(to right, #f0f0f0 0%, #e0e0e0 50%, #f0f0f0 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.lazy-load.loaded {
    opacity: 1;
    background: none;
    animation: none;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
} 