/* =========================================
   梦途民宿旅居官网系统 - 全局样式
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;600;700&display=swap');

:root {
    /* 主色调 */
    --primary: #E67E22;
    --primary-dark: #D35400;
    --primary-light: #F39C12;
    
    /* 辅助色 */
    --secondary: #2C3E50;
    --secondary-light: #34495E;
    
    /* 背景色 */
    --bg-light: #F8F9FA;
    --bg-white: #FFFFFF;
    
    /* 文字色 */
    --text-dark: #2C3E50;
    --text-gray: #7F8C8D;
    --text-light: #BDC3C7;
    
    /* 功能色 */
    --success: #27AE60;
    --danger: #E74C3C;
    --info: #3498DB;
    --warning: #F1C40F;
    
    /* 渐变色 */
    --gradient-primary: linear-gradient(135deg, #E67E22 0%, #D35400 100%);
    --gradient-dark: linear-gradient(135deg, #2C3E50 0%, #34495E 100%);
    
    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    
    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    /* 动画 */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* 重置样式 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary);
}

img {
    max-width: 100%;
    height: auto;
}

ul, ol {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
}

input, textarea, select {
    font-family: inherit;
    outline: none;
}

/* 容器 */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    width: 100%;
    padding: 0 20px;
}

/* 间距 */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.py-1 { padding-top: 8px; padding-bottom: 8px; }
.py-2 { padding-top: 16px; padding-bottom: 16px; }
.py-3 { padding-top: 24px; padding-bottom: 24px; }
.py-4 { padding-top: 32px; padding-bottom: 32px; }

/* 文本 */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-gray { color: var(--text-gray); }
.text-white { color: white; }
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    border-radius: var(--radius-full);
    font-weight: 500;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 126, 34, 0.5);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-white {
    background: white;
    color: var(--primary);
}

.btn-white:hover {
    background: var(--bg-light);
    color: var(--primary-dark);
}

/* 卡片 */
.card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

/* 头部导航 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transition: all var(--transition-normal);
}

.header.scrolled {
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.logo-image {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-right: 10px;
    border-radius: 4px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 24px;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width var(--transition-normal);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.header-contact {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-phone {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: var(--primary);
}

.header-phone i {
    margin-right: 8px;
}

/* 移动端菜单 */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
}

.mobile-toggle span {
    width: 28px;
    height: 2px;
    background: var(--text-dark);
    transition: all var(--transition-fast);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: white;
    padding: 20px;
    box-shadow: var(--shadow-md);
}

.mobile-menu.active {
    display: block;
}

.mobile-menu a {
    display: block;
    padding: 15px 0;
    border-bottom: 1px solid var(--bg-light);
    font-weight: 500;
}

/* 轮播图 */
.hero-slider {
    position: relative;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.hero-slide-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.6));
}

.hero-content {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
}

.hero-title {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 16px;
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 24px;
    margin-bottom: 40px;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-actions {
    display: flex;
    gap: 20px;
    animation: fadeInUp 1s ease 0.4s both;
}

.slider-dots {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 20;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.slider-dot.active {
    background: var(--primary);
    transform: scale(1.2);
}

/* 区块标题 */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 40px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-gray);
}

/* 精选房源 */
.featured-section {
    padding: 100px 0;
    background: var(--bg-light);
}

.house-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.house-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.house-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.house-card-image {
    position: relative;
    height: 260px;
    overflow: hidden;
}

.house-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.house-card:hover .house-card-image img {
    transform: scale(1.1);
}

.house-card-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 16px;
    background: var(--primary);
    color: white;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-full);
}

.house-card-favorite {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.house-card-favorite:hover {
    background: var(--danger);
    color: white;
}

.house-card-content {
    padding: 24px;
}

.house-card-location {
    display: flex;
    align-items: center;
    color: var(--text-gray);
    font-size: 14px;
    margin-bottom: 8px;
}

.house-card-location i {
    margin-right: 6px;
    color: var(--primary);
}

.house-card-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.house-card-title:hover {
    color: var(--primary);
}

.house-card-features {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    color: var(--text-gray);
    font-size: 14px;
}

.house-card-features span {
    display: flex;
    align-items: center;
}

.house-card-features i {
    margin-right: 4px;
}

.house-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--bg-light);
}

.house-card-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.house-card-price span {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-gray);
}

.house-card-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--warning);
}

/* 服务特色 */
.services-section {
    padding: 100px 0;
    background: white;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.service-card {
    text-align: center;
    padding: 40px 30px;
    border-radius: var(--radius-lg);
    background: var(--bg-light);
    transition: all var(--transition-normal);
}

.service-card:hover {
    background: white;
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
}

.service-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.service-desc {
    color: var(--text-gray);
    font-size: 14px;
}

/* 关于预览 */
.about-preview {
    padding: 100px 0;
    background: var(--bg-light);
}

.about-preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-preview-image {
    position: relative;
}

.about-preview-image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.about-preview-badge {
    position: absolute;
    bottom: -30px;
    right: -30px;
    width: 150px;
    height: 150px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow-md);
}

.about-preview-badge .number {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
}

.about-preview-badge .text {
    font-size: 14px;
}

.about-preview-content h2 {
    font-size: 36px;
    margin-bottom: 24px;
}

.about-preview-content p {
    color: var(--text-gray);
    margin-bottom: 16px;
    line-height: 1.8;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.about-feature {
    display: flex;
    align-items: center;
    gap: 12px;
}

.about-feature i {
    width: 40px;
    height: 40px;
    background: rgba(230, 126, 34, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

/* 新闻预览 */
.news-section {
    padding: 100px 0;
    background: white;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.news-card {
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.news-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.news-card-image {
    height: 200px;
    overflow: hidden;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.news-card:hover .news-card-image img {
    transform: scale(1.1);
}

.news-card-content {
    padding: 24px;
}

.news-card-date {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 12px;
}

.news-card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-dark);
    line-height: 1.5;
}

.news-card-title:hover {
    color: var(--primary);
}

.news-card-excerpt {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* CTA区块 */
.cta-section {
    padding: 100px 0;
    background: var(--gradient-dark);
    color: white;
    text-align: center;
}

.cta-section h2 {
    font-size: 40px;
    margin-bottom: 16px;
}

.cta-section p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 40px;
}

/* 页脚 */
.footer {
    background: var(--secondary);
    color: white;
    padding: 80px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand {
    max-width: 300px;
}

.footer-brand .logo {
    font-size: 28px;
    margin-bottom: 20px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    background: var(--primary);
}

.footer-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 24px;
}

.footer-links a {
    display: block;
    padding: 8px 0;
    color: rgba(255, 255, 255, 0.7);
    transition: all var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 8px;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    color: rgba(255, 255, 255, 0.7);
}

.footer-contact i {
    color: var(--primary);
    margin-top: 4px;
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 60px;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    border-radius: var(--radius-full);
    background: var(--bg-light);
    color: var(--text-dark);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.pagination a:hover,
.pagination .active {
    background: var(--primary);
    color: white;
}

/* 页面标题区 */
.page-header {
    padding: 180px 0 100px;
    background: var(--gradient-dark);
    color: white;
    text-align: center;
}

.page-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
}

.page-breadcrumb {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    font-size: 16px;
}

.page-breadcrumb a:hover {
    color: var(--primary);
}

.page-breadcrumb i {
    opacity: 0.5;
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--bg-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式 */
@media (max-width: 1200px) {
    .house-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-inner {
        height: 70px;
    }
    
    .nav-menu,
    .header-contact {
        display: none;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .house-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .about-preview-grid {
        grid-template-columns: 1fr;
    }
    
    .about-preview-badge {
        right: 20px;
        bottom: -20px;
        width: 100px;
        height: 100px;
    }
    
    .about-preview-badge .number {
        font-size: 32px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .page-title {
        font-size: 32px;
    }
    
    .page-header {
        padding: 150px 0 80px;
    }
}

/* 分享按钮样式 */
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    transition: all 0.3s;
}

.share-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.share-btn.weibo {
    background: #E6162D;
}

.share-btn.qq {
    background: #12B7F5;
}

.share-btn.weixin {
    background: #07C160;
}

.share-btn.link {
    background: #666;
}
