/* 合作伙伴页面样式 */

@layer utilities {
    .content-auto {
        content-visibility: auto;
    }
    .text-shadow {
        text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    .card-hover {
        transition: all 0.3s ease;
    }
    .card-hover:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    }
    .partner-card {
        background-color: #fff;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        height: 100%;
        display: flex;
        flex-direction: column;
        cursor: pointer;
        position: relative;
        border: 1px solid #E2E8F0;
    }
    .partner-card:hover {
        border-color: #3B82F6;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
        transform: translateY(-5px);
    }

    /* 出版社logo样式 */
    .publisher-logo {
        width: 100%;
        height: 160px;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #f9f9f9;
        overflow: hidden;
    }

    .publisher-logo img {
        max-width: 100%;
        max-height: 120px;
        object-fit: contain;
        transition: transform 0.3s ease;
    }

    .partner-card:hover .publisher-logo img {
        transform: scale(1.05);
    }

    /* 国家标签样式 */
    .country-badge {
        position: absolute;
        top: 10px;
        right: 10px;
        padding: 0.2rem 0.5rem;
        background-color: rgba(46, 204, 113, 0.9);
        color: white;
        border-radius: 12px;
        font-size: 0.8rem;
        font-weight: 500;
        z-index: 10;
    }

    /* 卡片内容样式 */
    .card-content {
        padding: 1rem;
        flex-grow: 1;
        display: flex;
        flex-direction: column;
    }

    .partner-name {
        font-size: 1.1rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
        color: #333;
    }

    .partner-description {
        font-size: 0.9rem;
        color: #666;
        flex-grow: 1;
        margin-bottom: 0.5rem;
    }
}

/* 响应式断点调整 */
@media (max-width: 640px) {
    .partner-grid {
        grid-template-columns: 1fr;
    }
    .header-breadcrumb {
        display: none;
    }
    .tab-buttons {
        flex-wrap: wrap;
    }
    .tab-buttons button {
        margin-bottom: 0.5rem;
    }
    .section-header {
        padding: 3rem 1rem;
    }
    .section-header h1 {
        font-size: 2rem;
    }
    .cooperation-flow .md\:flex {
        flex-direction: column;
    }
    .cooperation-flow .md\:text-right {
        text-align: center !important;
    }
    .cooperation-flow .md\:pl-12, .cooperation-flow .md\:pr-12 {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .partner-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .section-header {
        padding: 4rem 2rem;
    }
}

/* 确保联系表单在小屏幕上也有良好的体验 */
@media (max-width: 768px) {
    #partner-application-form .grid-cols-1\.sm\:grid-cols-2 {
        grid-template-columns: 1fr;
    }
}

/* 确保合作流程在移动设备上正确显示 */
@media (max-width: 768px) {
    .cooperation-flow .md\:w-8 {
        order: -1;
        margin-bottom: 1rem;
    }
}

/* 加载更多按钮响应式 */
#load-more-partners {
    width: 100%;
}

/* 确保返回顶部按钮在移动设备上有足够的点击区域 */
#back-to-top {
    width: 50px;
    height: 50px;
}

#backToTop {
    width: 50px;
    height: 50px;
}

/* 响应式样式增强 */
@media (max-width: 768px) {
    /* 响应式国家筛选 */
    #country-filter {
        padding: 0.8rem;
        gap: 0.6rem;
    }

    .country-item {
        padding: 0.3rem 0.6rem;
        font-size: 0.85rem;
    }

    /* 响应式出版社logo */
    .publisher-logo {
        height: 140px;
    }

    .publisher-logo img {
        max-height: 100px;
    }

    .country-badge {
        font-size: 0.75rem;
        padding: 0.15rem 0.4rem;
    }

    /* 移动端优化 */
    .mobile-filters {
        position: relative;
    }

    .filter-toggle {
        display: block;
        width: 100%;
        padding: 0.8rem;
        background-color: #3498db;
        color: white;
        border: none;
        border-radius: 6px;
        cursor: pointer;
        font-weight: 500;
        margin-bottom: 1rem;
        text-align: center;
    }

    @media (min-width: 769px) {
        .filter-toggle {
            display: none;
        }
    }
}

/* 模态框样式 */
#success-message {
    animation: fadeIn 0.3s ease-in-out;
}

#modal-overlay {
    animation: fadeIn 0.3s ease-in-out;
}

.partner-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    justify-content: center;
}

.partner-category {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fff;
    font-weight: 500;
}

.partner-category.active {
    background-color: #3498db;
    color: #fff;
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.partner-category:hover:not(.active) {
    background-color: #f5f5f5;
    transform: translateY(-1px);
}

/* 国家筛选区域样式 */
#country-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 2rem;
    justify-content: center;
    padding: 1rem;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eee;
}

.country-filter-title {
    width: 100%;
    text-align: center;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.country-item {
    padding: 0.4rem 0.8rem;
    border: 1px solid #ddd;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fff;
    font-size: 0.9rem;
}

.country-item.active {
    background-color: #2ecc71;
    color: #fff;
    border-color: #2ecc71;
    box-shadow: 0 2px 6px rgba(46, 204, 113, 0.3);
}

.country-item:hover:not(.active) {
    background-color: #f5f5f5;
    transform: translateY(-1px);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}