/* home.css — dùng biến từ :root trong style.css */

/* ===== THÊM VÀO :root CỦA style.css =====
   --color-bg-states: #f0f4f8;
   ========================================= */

.container-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title-wrap {
    text-align: center;
    margin-bottom: 40px;
}

.section-title-wrap h2 {
    display: inline-block;
}

.section-sub {
    color: var(--color-muted);
    font-size: 1rem;
    margin-top: 8px;
    margin-bottom: 0;
}

/* ===== HERO ===== */
.hero-clean {
    width: 100%;
    background: var(--blue-hero-dark);
    color: var(--color-white);
    text-align: center;
    padding: 90px 20px 60px;
}

.hero-clean h1 {
    font-size: 2.8rem;
    margin-bottom: 16px;
    color: var(--color-white);
}

.hero-clean p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.9);
}

.home-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-outline {
    background: transparent;
    color: var(--color-white);
    border: 2px solid rgba(255, 255, 255, 0.6);
    padding: 10px 22px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--color-white);
    color: var(--color-white);
    transform: translateY(-2px);
}

/* ===== WAVES ===== */
.wave {
    display: block;
    line-height: 0;
    font-size: 0;
}

.wave svg {
    display: block;
    width: 100%;
    height: 100%;
}

.wave-hero-to-stats         { background: var(--blue-hero-dark); height: 80px; }
.wave-stats-to-steps        { background: var(--color-bg);       height: 80px; }
.wave-steps-to-features     { background: var(--color-white);    height: 80px; }
.wave-features-to-testimonials { background: var(--color-bg);    height: 80px; }
.wave-testimonials-to-states { background: var(--color-bg-states); height: 80px; }
.wave-states-to-cta         { background: var(--blue-hero-dark);     height: 80px;}

/* ===== STATS ===== */
.stats-bar {
    background: var(--color-white);
    padding: 50px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.stat-item {
    text-align: center;
    padding: 24px 20px;
    border-radius: 14px;
    background: var(--color-bg-2);
    border: 1.5px solid #e8edf2;
    transition: all 0.25s ease;
}

.stat-item:hover {
    border-color: var(--color-blue);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px var(--shadow-blue);
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--color-blue);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--color-muted);
}

/* ===== STEPS ===== */
.steps-section {
    background: var(--color-bg);
    padding: 60px 0;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px 24px;
    position: relative;
}

.step-num {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--color-blue);
    color: var(--color-white);
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

/* Mũi tên nối giữa các bước */
.step-arrow {
    position: absolute;
    top: 50%;
    left: calc(50% + 180px);
    width: calc(100% - 52px);
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.step-arrow::after {
    content: '▶';
    position: absolute;
    right: -6px;
    top: -8px;
    color: var(--color-red);
    font-size: 0.9rem;
}

.step-item:last-child .step-arrow { display: none; }

.step-icon {
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.step-item h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-blue);
    margin-bottom: 8px;
    border: none;
    padding: 0;
    display: block;
}

.step-item p {
    font-size: 0.9rem;
    color: var(--color-muted);
    line-height: 1.6;
    margin: 0;
}

/* ===== FEATURES ===== */
.features-clean {
    background: var(--color-white);
    padding: 64px 0;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.feature-item {
    background: var(--color-bg-2);
    border: 1.5px solid #e8edf2;
    border-radius: 14px;
    padding: 28px 22px 24px;
    text-align: center;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.feature-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--color-blue);
    border-radius: 14px 14px 0 0;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.feature-item:hover::before { transform: scaleX(1); }

.feature-item:hover {
    border-color: var(--color-blue);
    transform: translateY(-6px);
    box-shadow: 0 12px 28px var(--shadow-blue);
}

.feature-icon {
    font-size: 2.2rem;
    display: block;
    margin-bottom: 16px;
    line-height: 1;
}

.feature-item h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-blue);
    margin-bottom: 10px;
    border: none;
    display: block;
    padding: 0;
}

.feature-item p {
    font-size: 0.9rem;
    color: var(--color-muted);
    line-height: 1.55;
    margin: 0;
}

/* ===== TESTIMONIALS ===== */
.testimonials {
    background: var(--color-bg);
    padding: 60px 0;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.testimonial-card {
    background: var(--color-white);
    border: 1.5px solid #e8edf2;
    border-radius: 14px;
    padding: 24px;
    transition: all 0.25s ease;
}

.testimonial-card:hover {
    border-color: var(--color-blue);
    transform: translateY(-4px);
    box-shadow: 0 10px 24px var(--shadow-blue);
}

.stars {
    color: #f59e0b;
    font-size: 1rem;
    margin-bottom: 14px;
    letter-spacing: 2px;
}

.testimonial-text {
    font-size: 0.95rem;
    color: var(--color-text-2);
    line-height: 1.7;
    margin-bottom: 20px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
    border-top: 1px solid #e8edf2;
    padding-top: 16px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-blue);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.author-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--color-blue);
}

.author-meta {
    font-size: 0.82rem;
    color: var(--color-muted);
}

.badge-state {
    display: inline-block;
    background: #e6f0ff;
    color: var(--color-blue);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    margin-top: 3px;
}

/* ===== HOME POSTS ===== */
.home-posts {
    background: var(--color-white);
    padding: 60px 0;
}

.home-posts-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
}

.home-post-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
    display: flex;
    flex-direction: column;
}

.home-post-card:hover {
    box-shadow: 0 8px 24px var(--shadow-blue);
    transform: translateY(-3px);
}

.home-post-thumb {
    display: block;
    height: 180px;
    overflow: hidden;
}

.home-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.home-post-card:hover .home-post-thumb img { transform: scale(1.04); }

.home-post-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.home-post-cat {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--color-red);
    text-decoration: none;
    margin-bottom: 8px;
}

.home-post-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.4;
    /* Override h3 global */
    border-bottom: none;
    padding-bottom: 0;
    display: block;
}

.home-post-title a {
    color: var(--color-text);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .15s;
}

.home-post-title a:hover { color: var(--color-blue); }

.home-post-excerpt {
    font-size: 0.85rem;
    color: var(--color-muted);
    line-height: 1.6;
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.home-post-meta {
    display: flex;
    gap: 10px;
    font-size: 0.75rem;
    color: var(--color-muted);
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

@media (max-width: 1024px) {
    .home-posts-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
    .home-posts-grid { grid-template-columns: repeat(2, 1fr); }
    .home-post-thumb { height: 130px; }
}

/* ===== STATES ===== */
.home-states {
    background: var(--color-bg-states);
    padding: 60px 0;
}

/* ===== CTA BANNER ===== */
.cta-banner {
    background: var(--blue-hero-dark);
    padding: 70px 20px;
    text-align: center;
}

.cta-banner h2 {
    color: var(--color-white);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 14px;
    border: none;
    display: block;
    padding: 0;
}

.cta-banner p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.05rem;
    margin-bottom: 32px;
}

.cta-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.btn-cta-main {
    background: var(--color-red);
    color: var(--color-white);
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-cta-main:hover {
    background: #a11235;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--red-glow);
    color: var(--color-white);
}

.btn-cta-ghost {
    background: transparent;
    color: var(--color-white);
    border: 2px solid rgba(255, 255, 255, 0.5);
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-cta-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-white);
    color: var(--color-white);
    transform: translateY(-2px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .stats-grid        { grid-template-columns: repeat(2, 1fr); }
    .feature-grid      { grid-template-columns: repeat(2, 1fr); }
    .testimonial-grid  { grid-template-columns: repeat(2, 1fr); }
    .steps-grid        { grid-template-columns: 1fr; gap: 24px; }
    .step-arrow        { display: none; }
}

@media (max-width: 768px) {
    .hero-clean          { padding: 60px 20px 40px; }
    .hero-clean h1       { font-size: 2rem; }
    .home-actions        { flex-direction: column; align-items: center; }
    .cta-banner h2       { font-size: 1.6rem; }
    .wave-hero-to-stats,
    .wave-stats-to-steps,
    .wave-steps-to-features,
    .wave-features-to-testimonials,
    .wave-testimonials-to-states,
    .wave-states-to-cta  { height: 60px; }
}

@media (max-width: 560px) {
    .testimonial-grid { grid-template-columns: 1fr; }
    .states-grid      { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .cta-actions      { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
    .feature-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
}