/*
Theme Name: EastChina Travel
Theme URI: 
Author: 
Author URI: 
Description: A travel theme for East China
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: eastchina-travel
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
.site-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-main {
    padding: 10px 0;
}

.header-content {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: 'branding menu right';
    align-items: center;
    gap: 20px;
    position: relative;
    min-height: 60px;
}



.header-right {
    position: static;
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.mega-menu-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    gap: 20px;
    flex-wrap: nowrap;
}

.site-branding {
    position: static;
    justify-self: start;
    flex-shrink: 0;
}

.site-logo {
    font-size: 28px;
    font-weight: bold;
    color: #e74c3c;
    text-decoration: none;
}

/* Mega Menu Styles */
.mega-menu {
    position: relative;
    grid-area: menu;
    display: flex;
    justify-content: center;
    max-width: none;
}

/* 覆盖外部样式文件对导航容器的白底/圆角/阴影，避免“浮在中间”的视觉效果 */
.site-header .mega-menu {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    margin: 0;
}

.mega-menu-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.mega-menu-nav::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

.mega-menu-item {
    position: relative;
    margin-right: 25px;
    flex-shrink: 0;
    height: 100%;
    display: flex;
    align-items: center;
}

.mega-menu-item:last-child {
    margin-right: 0;
}

.mega-menu-item > a {
    display: block;
    padding: 15px 0;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.3s ease;
    white-space: nowrap;
    line-height: 1.2;
}

.mega-menu-item:hover > a {
    color: #e74c3c;
}

.mega-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border-radius: 5px;
    padding: 30px;
    min-width: 800px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 999;
}

.mega-menu-item:hover .mega-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-dropdown-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.mega-column h3 {
    color: #2c3e50;
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e74c3c;
}

.mega-column ul {
    list-style: none;
}

.mega-column li {
    margin-bottom: 8px;
}

.mega-column a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.mega-column a:hover {
    color: #e74c3c;
}

/* Language Switcher */
.language-switcher {
    display: flex;
    align-items: center;
    height: 100%;
}

.language-dropdown {
    position: relative;
    display: inline-block;
}

.language-dropdown-toggle {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    min-width: 120px;
    justify-content: space-between;
}

.language-dropdown-toggle:hover {
    border-color: #0073aa;
    background-color: #f8f9fa;
}

.language-dropdown-toggle:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.dropdown-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.language-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.language-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    list-style: none;
    margin: 0;
    padding: 0;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 2px;
}

.language-dropdown.active .language-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-dropdown-menu .language-item {
    border-bottom: 1px solid #f0f0f0;
}

.language-dropdown-menu .language-item:last-child {
    border-bottom: none;
}

.language-dropdown-menu .language-item a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.language-dropdown-menu .language-item a:hover {
    background-color: #f8f9fa;
    color: #0073aa;
}

.language-dropdown-menu .language-item.current a {
    background-color: #0073aa;
    color: white;
    font-weight: 500;
}

/* Mobile Language Switcher */
@media (max-width: 768px) {
    .language-dropdown-toggle {
        font-size: 13px;
        padding: 6px 10px;
        min-width: 100px;
    }
    
    .language-dropdown-menu .language-item a {
        font-size: 13px;
        padding: 8px 10px;
    }
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    padding: 0;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background-color: #333;
    transition: all 0.3s ease;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

body.menu-open {
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .mega-menu-item {
        margin-right: 15px;
    }
    
    .mega-menu-item > a {
        font-size: 13px;
        padding: 12px 0;
    }
}

@media (max-width: 1024px) {
    .header-content {
        flex-wrap: wrap;
    }
    
    .mega-menu {
        flex-basis: 100%;
        margin-top: 10px;
    }
    
    .mega-menu-nav {
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .mega-menu-nav::-webkit-scrollbar {
        display: none;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .header-content {
        flex-wrap: nowrap;
        justify-content: space-between;
        position: relative;
    }
    
    .site-branding {
        position: static;
        flex: 1;
        text-align: center;
        order: 2;
    }
    
    .header-right {
        position: static;
        order: 3;
        gap: 10px;
    }
    
    .mobile-menu-toggle {
        display: flex;
        order: 1;
    }
    
    .mega-menu-container {
        display: none;
    }
    
    .mega-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: white;
        z-index: 9999;
        transition: left 0.3s ease;
        overflow-y: auto;
        padding-top: 80px;
        order: 1;
    }
    
    .mega-menu.active {
        left: 0;
    }
    
    .mega-menu-nav {
        flex-direction: column;
        padding: 2rem;
        overflow-x: visible;
        align-items: stretch;
    }
    
    .mega-menu-item {
        margin: 0;
        border-bottom: 1px solid #eee;
        width: 100%;
        margin-bottom: 5px;
    }
    
    .mega-menu-item > a {
        display: block;
        padding: 12px 15px;
        color: #333;
        font-size: 14px;
        border-bottom: 1px solid #eee;
    }
    
    .mega-dropdown {
        position: static;
        display: none;
        background: #f8f9fa;
        margin-top: 0;
        padding: 20px;
        min-width: auto;
        width: 100%;
        box-shadow: none;
        border: none;
        border-top: 1px solid #eee;
        border-radius: 0;
        transform: none;
        opacity: 1;
        visibility: visible;
    }
    
    .mega-menu-item:hover .mega-dropdown,
    .mega-menu-item.active .mega-dropdown {
        display: block;
    }
    
    .mega-dropdown-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .language-switcher {
        order: 2;
        margin-left: 0;
        align-self: flex-end;
    }
    
    .language-switcher .widget_polylang ul {
        flex-direction: column;
        gap: 5px;
    }
    
    .language-switcher select {
        min-width: 100px;
    }
    
    .header-search {
        order: 3;
        width: 100%;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-search {
        margin: 0 1rem;
        padding: 1.5rem;
    }
    
    .search-tabs {
        flex-direction: column;
    }
    
    .search-tab {
        padding: 0.8rem;
    }
    
    .search-fields {
        flex-direction: column;
    }
    
    .search-input {
        width: 200px;
    }
    
    .section-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .destinations-grid,
    .features-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

/* Hero Section Styles */
.hero-section {
    position: relative;
    height: 600px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.8) 0%, rgba(255, 215, 0, 0.6) 100%);
}

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

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

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 3rem;
    opacity: 0.95;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Hero Search */
.hero-search {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.search-tabs {
    display: flex;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.search-tab {
    flex: 1;
    padding: 1rem;
    border: none;
    background: none;
    color: #666;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.search-tab.active {
    color: #FF6B35;
    border-bottom-color: #FF6B35;
}

.search-tab:hover {
    color: #FF6B35;
}

.search-fields {
    display: flex;
    gap: 1rem;
}

.search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid #eee;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #FF6B35;
}

.search-submit {
    padding: 1rem 2rem;
    background: #FF6B35;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-submit:hover {
    background: #e55a2b;
}

/* Destinations Section */
.destinations-section {
    padding: 5rem 0;
    background: #f8f9fa;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.view-all-link {
    color: #FF6B35;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.view-all-link:hover {
    color: #e55a2b;
}

.destinations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.destination-card {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.destination-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.destination-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.destination-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 2rem;
    text-align: left;
}

.destination-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.destination-desc {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
}

.more-destinations {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
}

.more-content {
    text-align: center;
    color: white;
    padding: 2rem;
}

.more-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.more-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.more-content p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.more-link {
    color: white;
    text-decoration: none;
    border: 2px solid white;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.more-link:hover {
    background: white;
    color: #667eea;
}

/* Features Section */
.features-section {
    padding: 5rem 0;
    background: white;
}

.section-subtitle {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    margin-top: 1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: 15px;
    background: #f8f9fa;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 3rem;
    color: #FF6B35;
    margin-bottom: 1.5rem;
}

.feature-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

.feature-desc {
    color: #666;
    line-height: 1.6;
}

/* Blog Section */
.blog-section {
    padding: 5rem 0;
    background: #f8f9fa;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

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

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

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

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

.blog-card:hover .blog-thumbnail {
    transform: scale(1.05);
}

.blog-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.blog-content {
    padding: 1.5rem;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.blog-date {
    color: #FF6B35;
}

.blog-title {
    margin-bottom: 1rem;
}

.blog-title a {
    color: #333;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.blog-title a:hover {
    color: #FF6B35;
}

.blog-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.blog-read-more {
    color: #FF6B35;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.blog-read-more:hover {
    color: #e55a2b;
}

/* Main Content */
.site-main {
    padding: 40px 0;
}

/* Footer */
.site-footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 60px 0 30px;
}

.footer-main {
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-column {
    text-align: left;
}

.footer-title {
    color: #fff;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: #e74c3c;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: #e74c3c;
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
}

.footer-bottom-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer-copyright p {
    margin: 0;
    color: #95a5a6;
    font-size: 0.9rem;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #e74c3c;
    transform: translateY(-3px);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mb-20 { margin-bottom: 20px; }
.mt-20 { margin-top: 20px; }
.hidden { display: none; }
.visible { display: block; }

/* Responsive Footer */
@media (max-width: 768px) {
    .site-footer {
        padding: 40px 0 20px;
    }
    
    .footer-main {
        padding-bottom: 20px;
        margin-bottom: 20px;
    }
    
    .footer-columns {
        gap: 30px;
    }
    
    .footer-title {
        font-size: 1.2rem;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-copyright p {
        font-size: 0.85rem;
    }
    
    .footer-social {
        order: -1;
    }
}
