/* 小海马儿童之家 - 响应式样式 */

/* ========== 平板设备 (768px - 1024px) ========== */
@media (max-width: 1024px) {
    .container {
        padding: 0 var(--spacing-md);
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.6rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .intro-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .intro-image {
        order: -1;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========== 移动设备 (< 768px) ========== */
@media (max-width: 768px) {
    :root {
        --spacing-xl: 3rem;
        --spacing-lg: 2rem;
    }
    
    /* 导航栏移动端样式 */
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        padding: 80px 30px 30px;
        box-shadow: var(--shadow-lg);
        transition: var(--transition);
        gap: var(--spacing-md);
        align-items: flex-start;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-link {
        width: 100%;
        padding: var(--spacing-sm) 0;
        font-size: 1.1rem;
    }
    
    .lang-switch {
        width: 100%;
        margin-top: var(--spacing-md);
    }
    
    /* Hero区域 */
    .hero {
        min-height: 500px;
        padding: calc(var(--spacing-lg) + 60px) 0 var(--spacing-lg);
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.4rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: var(--spacing-sm);
    }
    
    .hero-buttons .btn {
        width: 100%;
        text-align: center;
    }
    
    /* Section标题 */
    .section-title {
        font-size: 1.8rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    /* 页面标题 */
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-header p {
        font-size: 1.1rem;
    }
    
    /* Grid布局调整 */
    .philosophy-grid,
    .features-grid,
    .montessori-grid,
    .age-cards,
    .achievements-grid,
    .contact-grid,
    .campus-grid {
        grid-template-columns: 1fr;
    }
    
    /* 教育理念卡片 */
    .philosophy-card {
        padding: var(--spacing-md);
    }
    
    .card-icon {
        font-size: 2.5rem;
    }
    
    /* 特色亮点 */
    .feature-item {
        padding: var(--spacing-md);
    }
    
    .feature-number {
        font-size: 2.5rem;
    }
    
    /* CTA区域 */
    .cta-content h2 {
        font-size: 1.8rem;
    }
    
    .cta-content p {
        font-size: 1rem;
    }
    
    /* 关于页面 */
    .intro-text h2 {
        font-size: 1.8rem;
    }
    
    .intro-text p {
        font-size: 1rem;
    }
    
    .feature-row {
        flex-direction: column;
        text-align: center;
    }
    
    .feature-row:hover {
        transform: translateY(-5px);
    }
    
    .feature-icon {
        font-size: 2.5rem;
    }
    
    /* 课程页面 */
    .age-card {
        padding: var(--spacing-md);
    }
    
    .age-card h3 {
        font-size: 1.5rem;
    }
    
    .area-header {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    
    .area-icon {
        font-size: 2rem;
    }
    
    .area-header h3 {
        font-size: 1.5rem;
    }
    
    .schedule-item {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .schedule-time {
        font-size: 1rem;
    }
    
    .schedule-content h4 {
        font-size: 1.1rem;
    }
    
    /* 联系页面 */
    .contact-card {
        padding: var(--spacing-md);
    }
    
    .contact-icon {
        font-size: 2rem;
    }
    
    .map-placeholder {
        min-height: 300px;
        padding: var(--spacing-md);
    }
    
    .map-placeholder p {
        font-size: 1.1rem;
    }
    
    .map-placeholder code {
        font-size: 0.8rem;
        word-break: break-all;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .contact-form {
        padding: var(--spacing-md);
    }
    
    .form-success {
        padding: var(--spacing-md);
    }
    
    .success-icon {
        font-size: 3rem;
    }
    
    .form-success h3 {
        font-size: 1.6rem;
    }
    
    .form-success p {
        font-size: 1rem;
    }
    
    /* 页脚 */
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .footer-section h4 {
        font-size: 1.2rem;
    }
    
    /* 友情链接移动端优化 */
    .footer-section.friendly-links ul {
        flex-wrap: wrap; /* 移动端自动换行 */
        gap: 8px; /* 稍微缩小间距 */
        justify-content: center; /* 居中对齐 */
    }
    
    .footer-section.friendly-links a {
        padding: 6px 12px; /* 移动端稍小的内边距 */
        font-size: 0.85rem; /* 稍小的字体 */
    }
    
    /* 返回顶部按钮 */
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
        font-size: 1.3rem;
    }
}

/* ========== 小屏幕移动设备 (< 480px) ========== */
@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .section-subtitle {
        font-size: 0.95rem;
    }
    
    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .btn-large {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    .logo-text {
        font-size: 1rem;
    }
    
    .logo-icon {
        font-size: 1.5rem;
    }
    
    .page-header h1 {
        font-size: 1.6rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
    
    .cta-content h2 {
        font-size: 1.5rem;
    }
    
    .intro-text h2 {
        font-size: 1.5rem;
    }
    
    .philosophy-card h3,
    .montessori-card h3,
    .area-header h3 {
        font-size: 1.2rem;
    }
    
    .feature-item h3,
    .achievement-card h3,
    .contact-card h3 {
        font-size: 1.2rem;
    }
    
    .age-card h3 {
        font-size: 1.3rem;
    }
    
    .placeholder-image p {
        font-size: 1.2rem;
    }
    
    .placeholder-image span {
        font-size: 0.8rem;
    }
}

/* ========== 打印样式 ========== */
@media print {
    .navbar,
    .hamburger,
    .lang-switch,
    .hero-buttons,
    .cta,
    .contact-form,
    .back-to-top,
    .footer {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .page-header,
    .hero {
        padding: 20pt 0;
        background: none !important;
    }
    
    .hero-background,
    .wave {
        display: none;
    }
    
    section {
        page-break-inside: avoid;
        padding: 15pt 0;
    }
    
    .section-title {
        font-size: 18pt;
        color: #000;
    }
    
    .philosophy-card,
    .feature-item,
    .contact-card,
    .area-item {
        box-shadow: none;
        border: 1pt solid #ccc;
        page-break-inside: avoid;
    }
}

/* ========== 横屏模式优化 ========== */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: 400px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .nav-menu {
        padding-top: 60px;
    }
}

/* ========== 无障碍优化 ========== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .wave {
        animation: none;
    }
}

/* ========== 高对比度模式 ========== */
@media (prefers-contrast: high) {
    :root {
        --primary-blue: #0066CC;
        --text-dark: #000000;
        --white: #FFFFFF;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
    
    .nav-link::after {
        height: 3px;
    }
}

/* ========== 暗色模式支持 (可选) ========== */
@media (prefers-color-scheme: dark) {
    /* 如果需要暗色模式，可以在这里添加样式 */
    /* 目前保持浅色主题，因为幼儿园网站通常使用明亮温馨的颜色 */
}

