/* Hero Section with Animation */
.hero {
    text-align: center;
    padding: 2rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    to { left: 100%; }
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: slideInFromTop 0.8s ease-out;
}

.hero p {
    font-size: 1.3rem;
    opacity: 0.95;
    animation: slideInFromBottom 0.8s ease-out 0.2s both;
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 0.95;
        transform: translateY(0);
    }
}

/* Section Styles */
.section {
    margin: 4rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #000;
    position: relative;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100px;
    height: 3px;
    background: #667eea;
    transition: width 0.3s ease;
}

.section-header:hover::after {
    width: 200px;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: bold;
}

.section-header a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.section-header a::after {
    content: '→';
    transition: transform 0.3s ease;
}

.section-header a:hover {
    color: #38bdf8;
}

.section-header a:hover::after {
    transform: translateX(5px);
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    background: #000;
    color: #fff;
    padding: 2.5rem;
    border-radius: 12px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

/* Improved Card Styles - Text Outside Image */
.card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid transparent;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.15);
    border-color: #38bdf8;
}

.card-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.card-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.card-content {
    padding: 1.5rem;
}

.card-category {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    background: #38bdf8;
    color: #fff;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.card-category:hover {
    background: #38bdf8;
    transform: scale(1.05);
}

.card-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #000;
    text-decoration: none;
    display: block;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.card-title:hover {
    color: #38bdf8;
}

.card-excerpt {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #999;
    padding-top: 0.75rem;
    border-top: 1px solid #eee;
}

/* Feature Card - Larger with Text Below */
.feature-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/*.feature-card:hover {*/
/*    transform: translateY(-10px);*/
/*    box-shadow: 0 12px 28px rgba(0,0,0,0.15);*/
/*}*/

.feature-card-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 400px;
}

.feature-card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.feature-card:hover .feature-card-image-wrapper img {
    transform: scale(1.08);
}

.feature-card-content {
    padding: 2rem;
    height: 207px;
}

.feature-card-title {
    font-size: 1.75rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #000;
    line-height: 1.3;
}

.feature-card-excerpt {
    color: #666;
    line-height: 1.7;
    font-size: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Latest News List - Improved */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.news-item {
    display: flex;
    gap: 1.25rem;
    padding: 13px 16.8px;
    background: #fff;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    min-height: 162.3px;
}

.news-item:hover {
    background: #f9f9f9;
    border-color: #38bdf8;
    transform: translateX(5px);
}

.news-item-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    flex-shrink: 0;
    height: 120px;
}

.news-item img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    transition: transform 0.4s ease;
    border-radius: 10px;
}

.news-item:hover img {
    transform: scale(1.1);
    border-radius: 10px;
}

.news-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    /*justify-content: center;*/
    height: 127px;
}

.news-item-category {
    color: #38bdf8;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.news-item-title {
    font-size: 0.95rem;
    color: #666;
    text-decoration: none;
    display: block;
    line-height: 1.4;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-item-title:hover, .latest-news-type:hover {
    color: #38bdf8;
}

.latest-news-type {
    text-decoration: none;
    color: #667eea;
    font-size: 13px;
}

/* Category Section */
.category-description {
    color: #666;
    margin-bottom: 2.5rem;
    line-height: 1.9;
    font-size: 1.05rem;
}

/* Category Layouts - With Text Outside */
.category-layout-standard {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.category-layout-standard .right-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /*grid-template-rows: repeat(2, 1fr);*/
    gap: 1.5rem;
}

/* Swimming Layout */
.category-layout-swimming {
    margin-bottom: 2.5rem;
}

.category-layout-swimming .feature-card {
    border-radius: 0 !important;
}

.category-layout-swimming .top-section {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    /*gap: 2.5rem;*/
    margin-bottom: 2.5rem;
}

.category-layout-swimming .text-card {
    background: linear-gradient(135deg, #000 0%, #1a1a1a 100%);
    color: #fff;
    padding: 3rem 2.5rem;
    /*border-radius: 12px;*/
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

/*.category-layout-swimming .text-card:hover {*/
/*    transform: translateY(-5px);*/
/*}*/

.category-layout-swimming .text-card h3 {
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
    line-height: 1.4;
}

.category-layout-swimming .text-card p {
    line-height: 1.9;
    color: #d0d0d0;
}

.category-layout-swimming .bottom-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

/* Small Cards with Text Below */
.small-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.4s ease;
    border: 1px solid transparent;
    height: 271px;
}

.small-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
    border-color: #38bdf8;
}

.small-card-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 160px;
}

.small-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.small-card:hover img {
    transform: scale(1.12);
}

.small-card-content {
    padding: 1.28rem;
    min-height: 108px;
}

.small-card-title {
    font-size: 14px;
    color: #666;
    text-decoration: none;
    display: block;
    line-height: 1.5;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 3;  /* 2行 */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.small-card-title:hover {
    color: #38bdf8;
}

/* Loading skeleton animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.skeleton {
    animation: shimmer 2s infinite;
    background: linear-gradient(to right, #f0f0f0 4%, #e0e0e0 25%, #f0f0f0 36%);
    background-size: 1000px 100%;
}

/* Responsive */
@media (max-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }

    .category-layout-standard {
        grid-template-columns: 1fr;
    }

    .category-layout-standard .right-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-layout-swimming .top-section {
        grid-template-columns: 1fr;
    }

    .category-layout-swimming .bottom-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .hero p {
        font-size: 1.1rem;
    }

    .grid-2 {
        grid-template-columns: 1fr;
        padding: 2rem;
    }

    .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }

    .feature-card-image-wrapper {
        height: 280px;
    }

    .category-layout-standard .right-grid {
        grid-template-columns: 1fr;
    }

    .category-layout-swimming .bottom-grid {
        grid-template-columns: 1fr;
    }

    .section-header h2 {
        font-size: 1.6rem;
    }

    .news-item {
        flex-direction: column;
    }

    .news-item img {
        width: 100%;
        height: 200px;
    }
}
