/* PetMe 首页专用样式 */

/* ==================== 英雄区 (Hero Section) ==================== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 50%, var(--primary-light) 100%);
    min-height: 600px;
    display: flex;
    align-items: center;
    padding: 4rem 0; /* py-16 */
    position: relative;
    overflow: hidden;
    width: 100%; /* 横向铺满 */
}

@media (min-width: 768px) {
    .hero-section {
        padding: 6rem 0; /* md:py-24 */
    }
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255, 140, 66, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-container {
    max-width: 1280px; /* container max-width */
    width: 100%;
    margin: 0 auto; /* mx-auto */
    padding: 0 1rem; /* px-4 */
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

@media (min-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr 1fr; /* md:grid-cols-2 */
        padding: 0 2rem;
    }
}

@media (min-width: 1024px) {
    .hero-container {
        padding: 0 4rem;
    }
}

.hero-content {
    color: var(--white);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--white) 0%, var(--accent-beige) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: var(--gray-300);
    font-weight: 400;
}

.hero-tagline {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--accent-orange);
    margin-bottom: 2.5rem;
    font-weight: 500;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-btn {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--border-radius-lg);
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-btn-primary {
    background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-warm) 100%);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(255, 140, 66, 0.4);
}

.hero-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 30px rgba(255, 140, 66, 0.6);
}

.hero-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 2px solid var(--white);
    backdrop-filter: blur(10px);
}

.hero-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.hero-image {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--border-radius-lg);
}

/* ==================== 核心功能区 (Core Features) ==================== */
.features-section {
    padding: 5rem 0; /* py-20 */
    background: var(--bg-color);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-orange) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

.features-grid {
    max-width: 1280px; /* container max-width */
    width: 100%;
    margin: 0 auto; /* mx-auto */
    padding: 0 1rem; /* px-4 */
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem; /* gap-6 */
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr); /* md:grid-cols-2 */
        padding: 0 2rem;
    }
}

@media (min-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(4, 1fr); /* lg:grid-cols-4 */
        padding: 0 4rem;
    }
}

.feature-card {
    background: var(--card-bg);
    border-radius: 0.75rem; /* rounded-xl */
    padding: 1.5rem; /* p-6 */
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); /* shadow-md */
    display: flex;
    flex-direction: column;
    height: 100%;
}

.feature-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.feature-card .btn {
    margin-top: auto; /* 按钮推到底部 */
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-orange) 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-purple);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--white);
}

.feature-description {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.feature-list {
    list-style: none;
    text-align: left;
    margin-bottom: 1.5rem;
    flex: 1; /* 让列表占据剩余空间 */
}

.feature-list li {
    padding: 0.5rem 0;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-list li::before {
    content: '✓';
    color: var(--accent-orange);
    font-weight: bold;
}

/* ==================== 地图展示区 (Map Highlight) - 已删除 ==================== */

/* ==================== 健康管理展示区 (Health Dashboard) ==================== */
.health-section {
    padding: 5rem 0; /* py-20 */
    background: var(--bg-color);
    /* 防止子元素的变换影响布局 */
    overflow: hidden;
}

.health-container {
    max-width: 1280px; /* container max-width */
    width: 100%;
    margin: 0 auto; /* mx-auto */
    padding: 0 1rem; /* px-4 */
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem; /* gap-12 */
    align-items: center;
}

@media (min-width: 768px) {
    .health-container {
        padding: 0 2rem;
    }
}

@media (min-width: 1024px) {
    .health-container {
        grid-template-columns: 3fr 2fr; /* 左侧占60%，右侧占40% */
        padding: 0 4rem;
    }
}

.health-mockup {
    background: var(--card-bg);
    border-radius: 0.75rem; /* rounded-xl */
    padding: 1.5rem; /* p-6 */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); /* shadow-md */
    border: 1px solid var(--border-color);
    /* 禁用悬停时的变换效果，防止页面抖动 */
    transform: none !important;
}

.health-mockup:hover {
    /* 移除悬停效果，防止页面抖动 */
    transform: none !important;
}

.dashboard-preview {
    background: var(--gray-900);
    border-radius: var(--border-radius);
    padding: 1.5rem;
}

/* 图表容器 */
.chart-container {
    background: rgba(107, 70, 193, 0.1);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
    height: 280px;
}

#weight-chart {
    width: 100% !important;
    height: 100% !important;
}

/* 健康状态 */
.health-status {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: var(--border-radius);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 1.5rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.status-badge.status-good {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.status-icon {
    font-size: 1.2rem;
}

.next-appointment {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.appointment-label {
    font-size: 0.875rem;
    color: var(--text-light);
}

.appointment-date {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-orange);
}

/* 疫苗时间线 */
.vaccine-timeline {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
}

.timeline-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
}

.timeline-items {
    position: relative;
    padding-left: 2rem;
}

.timeline-items::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--accent-orange) 100%);
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -1.5rem;
    top: 0.25rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--white);
    border: 3px solid var(--primary-color);
    z-index: 1;
}

.timeline-item.completed .timeline-marker {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.timeline-item.upcoming .timeline-marker {
    background: var(--accent-orange);
    border-color: var(--accent-orange);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 140, 66, 0.7);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(255, 140, 66, 0);
    }
}

.timeline-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.timeline-vaccine {
    font-weight: 600;
    color: var(--white);
    flex: 1;
}

.timeline-status {
    font-size: 0.875rem;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    white-space: nowrap;
}

.timeline-item.completed .timeline-status {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.timeline-item.upcoming .timeline-status {
    background: rgba(255, 140, 66, 0.2);
    color: var(--accent-orange);
}

.timeline-date {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.health-content h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--white);
}

.health-intro {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.health-features {
    list-style: none;
    margin-bottom: 2rem;
}

.health-features li {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.health-features li:last-child {
    border-bottom: none;
}

.feature-icon-small {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-orange) 100%);
    border-radius: 0.5rem;
}

.feature-text {
    flex: 1;
    color: var(--text-light);
}

.feature-text strong {
    display: block;
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: bold;
    flex-shrink: 0;
}

/* ==================== 用户故事区 (Testimonials) ==================== */
.testimonials-section {
    padding: 5rem 0; /* py-20 */
    background: var(--bg-secondary);
}

.testimonials-grid {
    max-width: 1280px; /* container max-width */
    width: 100%;
    margin: 0 auto; /* mx-auto */
    padding: 0 1rem; /* px-4 */
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem; /* gap-6 */
}

@media (min-width: 768px) {
    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr); /* md:grid-cols-3 */
        padding: 0 2rem;
    }
}

@media (min-width: 1024px) {
    .testimonials-grid {
        padding: 0 4rem;
    }
}

.testimonial-card {
    background: var(--card-bg);
    border-radius: 0.75rem; /* rounded-xl */
    padding: 1.5rem; /* p-6 */
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); /* shadow-md */
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    font-size: 4rem;
    color: var(--primary-color);
    opacity: 0.2;
    font-family: Georgia, serif;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-purple);
    border-color: var(--primary-color);
}

.testimonial-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-orange) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.testimonial-author {
    flex: 1;
}

.testimonial-name {
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.25rem;
}

.testimonial-pet {
    font-size: 0.9rem;
    color: var(--text-light);
}

.testimonial-content {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-light);
    font-style: italic;
    position: relative;
    z-index: 1;
}

.testimonial-image {
    width: 100%;
    height: 200px;
    border-radius: var(--border-radius);
    object-fit: cover;
    margin-top: 1rem;
}

/* ==================== 科学喂养指南区 (Feeding Guide) ==================== */
.feeding-guide-section {
    padding: 5rem 0; /* py-20 */
    background: var(--bg-color);
}

.feeding-guide-grid {
    max-width: 1280px; /* container max-width */
    width: 100%;
    margin: 0 auto; /* mx-auto */
    padding: 0 1rem; /* px-4 */
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem; /* gap-6 */
}

@media (min-width: 768px) {
    .feeding-guide-grid {
        grid-template-columns: repeat(2, 1fr); /* md:grid-cols-2 */
        padding: 0 2rem;
    }
}

@media (min-width: 1024px) {
    .feeding-guide-grid {
        grid-template-columns: repeat(3, 1fr); /* lg:grid-cols-3 */
        padding: 0 4rem;
    }
}

.feeding-card {
    background: var(--card-bg);
    border-radius: 0.75rem; /* rounded-xl */
    padding: 2rem; /* p-8 */
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); /* shadow-md */
}

.feeding-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-orange) 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feeding-card:hover::before {
    transform: scaleX(1);
}

.feeding-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-purple);
    border-color: var(--primary-color);
}

.feeding-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: inline-block;
    transition: transform 0.3s ease;
}

.feeding-card:hover .feeding-icon {
    transform: scale(1.1) rotate(5deg);
}

.feeding-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--white);
}

.feeding-description {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* ==================== 行动号召区 (CTA) ==================== */
.cta-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    padding: 6rem 0; /* py-24 */
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 70% 50%, rgba(255, 140, 66, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.cta-container {
    max-width: 1280px; /* container max-width */
    width: 100%;
    margin: 0 auto; /* mx-auto */
    padding: 0 1rem; /* px-4 */
    position: relative;
    z-index: 1;
}

@media (min-width: 768px) {
    .cta-container {
        padding: 0 2rem;
    }
}

@media (min-width: 1024px) {
    .cta-container {
        padding: 0 4rem;
    }
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1.5rem;
}

.cta-subtitle {
    font-size: 1.2rem;
    color: var(--gray-300);
    margin-bottom: 2.5rem;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-btn {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--border-radius-lg);
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.cta-btn-primary {
    background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-warm) 100%);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(255, 140, 66, 0.4);
}

.cta-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 30px rgba(255, 140, 66, 0.6);
}

.cta-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 2px solid var(--white);
    backdrop-filter: blur(10px);
}

.cta-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

/* ==================== 页脚 (Footer) ==================== */
.footer {
    background: var(--gray-900);
    padding: 4rem 0 2rem; /* pt-16 pb-8 */
    border-top: 1px solid var(--border-color);
}

.footer-container {
    max-width: 1280px; /* container max-width */
    width: 100%;
    margin: 0 auto; /* mx-auto */
    padding: 0 1rem; /* px-4 */
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem; /* gap-8 */
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .footer-container {
        grid-template-columns: repeat(2, 1fr); /* md:grid-cols-2 */
        padding: 0 2rem;
    }
}

@media (min-width: 1024px) {
    .footer-container {
        grid-template-columns: repeat(4, 1fr); /* lg:grid-cols-4 */
        padding: 0 4rem;
    }
}

.footer-section h4 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-section p,
.footer-section a {
    color: var(--text-light);
    line-height: 1.8;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
}

.footer-section a:hover {
    color: var(--accent-orange);
}

.footer-bottom {
    max-width: 1280px; /* container max-width */
    width: 100%;
    margin: 0 auto; /* mx-auto */
    padding: 2rem 1rem 0; /* pt-8 px-4 */
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-light);
}

@media (min-width: 768px) {
    .footer-bottom {
        padding: 2rem 2rem 0;
    }
}

@media (min-width: 1024px) {
    .footer-bottom {
        padding: 2rem 4rem 0;
    }
}

/* ==================== 响应式设计 ==================== */
/* 基于 Tailwind CSS 断点系统 */
/* sm: 640px, md: 768px, lg: 1024px, xl: 1280px, 2xl: 1536px */

@media (max-width: 1024px) {
    .hero-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding: 4rem 0; /* py-16 */
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-btn {
        width: 100%;
        justify-content: center;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .cta-title {
        font-size: 1.8rem;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .cta-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .feature-card {
        padding: 1.25rem;
    }
}
