/* European Academic Press Ltd - Custom Styles */

:root {
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --accent-color: #f59e0b;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', 'Helvetica', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
}

/* Header Styles */
.header {
    background: var(--bg-white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    z-index: 1001;
}

.nav-wrapper {
    display: block;
    position: relative;
}

@media (min-width: 769px) {
    .nav-overlay {
        display: none !important;
    }
    
    .nav-wrapper {
        position: static;
        width: auto;
        height: auto;
        background: transparent;
        box-shadow: none;
        padding-top: 0;
        overflow: visible;
    }
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin: 0;
}

.nav-menu li a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    padding: 5px 10px;
    display: block;
}

.nav-menu li a:hover {
    color: var(--primary-color);
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
}

.mobile-menu-toggle span {
    width: 30px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* Hero Banner */
.hero-banner-wrapper {
    margin: 20px auto;
    max-width: 1200px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

/* 确保Layui轮播容器正常显示 */
#hero-carousel {
    border-radius: 8px;
}

/* 轮播项样式 - 按照Layui官方文档，carousel-item内的每个div就是轮播项 */
/* 注意：Layui会自动控制显示/隐藏，我们只设置内容样式，不强制设置display */
.hero-slide {
    width: 100%;
    height: 500px;
    position: relative;
    box-sizing: border-box;
}

.hero-slide-1 {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
}

.hero-slide-2 {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
}

.hero-slide-3 {
    background: linear-gradient(135deg, #1e3a8a 0%, #60a5fa 100%);
}

.hero-slide-4 {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
}

.hero-text {
    text-align: center;
    padding: 20px;
    z-index: 1;
    max-width: 90%;
    box-sizing: border-box;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
}

.hero-title {
    color: white;
    margin: 0 0 20px 0;
    font-size: 48px;
    font-weight: bold;
    line-height: 1.2;
    word-wrap: break-word;
}

.hero-subtitle {
    color: white;
    margin: 0;
    font-size: 24px;
    line-height: 1.4;
    word-wrap: break-word;
}

/* Section Styles */
.section {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 700;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 50px;
    font-size: 18px;
}

/* Featured Books */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.book-card {
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.book-cover {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.book-info {
    padding: 20px;
}

.book-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.book-author {
    color: var(--text-light);
    margin-bottom: 15px;
}

.book-description {
    color: var(--text-dark);
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.book-link {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
}

.book-link:hover {
    background: var(--secondary-color);
}

/* About Section */
.about-preview {
    background: var(--bg-light);
    padding: 40px;
    border-radius: 8px;
    text-align: center;
}

.about-text {
    font-size: 16px;
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* News Section */
.news-title-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
    display: inline-block;
}

.news-title-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.news-card {
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 25px;
    transition: transform 0.3s;
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.news-date {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 15px;
}

.news-title {
    font-size: 22px;
    font-weight: bold;
}

/* News Detail Page */
.news-detail-card {
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 40px;
    margin-bottom: 40px;
}

.news-detail-title {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 20px;
    line-height: 1.3;
}

.news-detail-content {
    color: var(--text-dark);
    line-height: 1.8;
    font-size: 16px;
}

.news-detail-content h3 {
    color: var(--primary-color);
    font-size: 24px;
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: bold;
}

.news-detail-content ul,
.news-detail-content ol {
    margin-left: 20px;
    margin-bottom: 20px;
}

.news-detail-content li {
    margin-bottom: 10px;
}

/* Book Detail Page */
.book-detail-title {
    font-size: 36px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.book-detail-content {
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 40px;
    margin-bottom: 40px;
}

.book-detail-content h3 {
    color: var(--primary-color);
    font-size: 24px;
    margin-top: 30px;
    margin-bottom: 20px;
    font-weight: bold;
}

.book-detail-content ul,
.book-detail-content ol {
    margin-left: 20px;
    margin-bottom: 20px;
}

.book-detail-content li {
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .news-detail-card,
    .book-detail-content {
        padding: 20px;
    }
    
    .news-detail-title {
        font-size: 24px;
    }
    
    .book-detail-title {
        font-size: 28px;
    }
    
    div[style*="grid-template-columns: 300px 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

.news-excerpt {
    color: var(--text-dark);
    margin-bottom: 20px;
    line-height: 1.6;
}

.read-more {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.read-more:hover {
    color: var(--secondary-color);
}

/* Partners Section */
.partners-section {
    background: var(--bg-light);
    padding: 80px 20px 40px;
    margin-bottom: 20px;
    position: relative;
}

.partners-section .section-title {
    margin-bottom: 15px;
}

.partners-section .section-subtitle {
    margin-bottom: 40px;
}

.partner-logos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    justify-items: center;
    align-items: center;
    gap: 30px 20px;
    margin-top: 40px;
    margin-bottom: 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 20px;
}

.partner-logo {
    width: 100%;
    max-width: 200px;
    height: 90px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    font-size: 13px;
    color: var(--text-dark);
    font-weight: 600;
    text-align: center;
    padding: 12px 16px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    cursor: default;
    position: relative;
    overflow: hidden;
}

.partner-logo::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.partner-logo:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    border-color: var(--primary-color);
}

.partner-logo:hover::before {
    left: 100%;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 50px 20px 20px;
    margin-top: 0;
    clear: both;
    position: relative;
    z-index: 1;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-section p,
.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    line-height: 1.8;
}

.footer-section a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.social-links a:hover {
    background: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #9ca3af;
}

/* Page Content */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
}

.page-title {
    font-size: 48px;
    margin-bottom: 20px;
}

.page-breadcrumb {
    font-size: 16px;
    opacity: 0.9;
}

.page-content {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Team Grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.team-member {
    text-align: center;
    background: var(--bg-white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.team-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
    font-weight: bold;
}

.team-name {
    font-size: 22px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.team-role {
    color: var(--text-light);
    margin-bottom: 15px;
}

/* Books Filter */
.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 10px 20px;
    background: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-tab:hover,
.filter-tab.active {
    background: var(--primary-color);
    color: white;
}

/* Contact Form */
.contact-form {
    max-width: 700px;
    margin: 40px auto;
    background: var(--bg-white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.submit-btn:hover {
    background: var(--secondary-color);
}

/* Desktop - Ensure 4 columns for partners */
@media (min-width: 769px) {
    .partner-logos {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* Responsive Design */

@media (max-width: 768px) {
    .header-container {
        flex-direction: row;
        gap: 10px;
        padding: 12px 15px;
        align-items: center;
        justify-content: space-between;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-wrapper {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: white;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        transition: right 0.3s ease;
        z-index: 1002;
        overflow-y: auto;
        padding-top: 70px;
        display: block !important;
    }
    
    .nav-wrapper.active {
        right: 0;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0;
        text-align: left;
        padding: 20px;
        width: 100%;
        margin: 0;
    }
    
    .nav-menu li {
        border-bottom: 1px solid #f0f0f0;
        width: 100%;
    }
    
    .nav-menu li:last-child {
        border-bottom: none;
    }
    
    .nav-menu li a {
        padding: 15px 10px;
        display: block;
        color: var(--text-dark);
        font-size: 16px;
        width: 100%;
    }
    
    .nav-menu li a:hover {
        color: var(--primary-color);
        background: var(--bg-light);
        padding-left: 15px;
    }
    
    .logo {
        font-size: 16px;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        max-width: calc(100% - 50px);
        flex: 1;
        line-height: 1.3;
        word-break: break-word;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .books-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .page-title {
        font-size: 32px;
    }
    
    .contact-form {
        padding: 20px;
    }
    
    /* Hero Banner Mobile Optimization */
    .hero-banner-wrapper {
        margin: 15px auto;
        border-radius: 4px;
    }
    
    .hero-slide {
        height: 350px !important;
        padding: 15px;
    }
    
    .hero-text {
        padding: 15px 10px;
        max-width: 100%;
        width: 90%;
    }
    
    .hero-title {
        font-size: 22px !important;
        margin-bottom: 10px !important;
        line-height: 1.3 !important;
    }
    
    .hero-subtitle {
        font-size: 14px !important;
        line-height: 1.4 !important;
    }
    
    /* Hide carousel arrows on mobile */
    #hero-carousel .layui-carousel-arrow {
        display: none !important;
    }
    
    /* Carousel indicators optimization for mobile */
    #hero-carousel .layui-carousel-ind {
        bottom: 10px;
    }
    
    #hero-carousel .layui-carousel-ind li {
        width: 8px;
        height: 8px;
        margin: 0 4px;
    }
    
    /* Overlay when menu is open */
    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 1001;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .nav-overlay.active {
        display: block;
        opacity: 1;
    }
    
    /* Publishing Fields - 4 columns to 2 columns on tablet */
    div[style*="grid-template-columns: repeat(4, 1fr)"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* Team grid - 3 columns to 2 columns on tablet */
    div[style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* Partner logos - 4 columns to 2 columns on tablet */
    .partner-logos {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 30px 20px !important;
        max-width: 100% !important;
        padding: 15px !important;
    }
    
    .partner-logo {
        max-width: 100% !important;
        height: 85px !important;
        font-size: 12px !important;
    }
}

@media (max-width: 480px) {
    /* Publishing Fields and Academic Series - 2 columns to 1 column on mobile */
    div[style*="grid-template-columns: repeat(4, 1fr)"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Team grid - 2 columns to 1 column on mobile */
    div[style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Partner logos - 3 columns to 2 columns on mobile */
    .partner-logos {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 25px 20px !important;
        max-width: 100% !important;
        padding: 10px !important;
    }
    
    .partner-logo {
        width: 140px !important;
        height: 80px !important;
        font-size: 11px !important;
    }
    
    .partners-section {
        padding: 60px 15px 30px !important;
        margin-bottom: 20px !important;
    }
}

