/* home.css - Specific to Homepage */

/* Helper classes */
.text-center { text-align: center; }
.text-left { text-align: left; }

/* Hero Section */
.hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    background-color: #0b2053; /* Fallback for missing image */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    padding: 6rem 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #0b2053 0%, #0b2053 45%, rgba(11, 32, 83, 0.4) 80%, rgba(11, 32, 83, 0) 100%);
    z-index: 1;
}

.hero-container {
    position: relative;
    z-index: 2;
}

.hero-content {
    max-width: 650px;
    color: white;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 4vw, 3.8rem);
    margin-bottom: 2rem;
    color: white;
    line-height: 1.2;
}

.hero-benefits {
    margin-bottom: 3rem;
}

.hero-benefits li {
    font-size: 1.1rem;
    color: white;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.check-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 3px;
}

.hero-benefits li strong {
    font-weight: 600;
}

.light-text {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* New Buttons for Hero */
.btn-primary-bright {
    background-color: #2563EB;
    color: white;
}

.btn-primary-bright:hover {
    background-color: #1d4ed8;
    color: white;
}

.btn-secondary-dark {
    background-color: #1e3a8a;
    color: white;
}

.btn-secondary-dark:hover {
    background-color: #172554;
    color: white;
}

/* Placeholder Box (For Images) */
.placeholder-box {
    width: 100%;
    aspect-ratio: 4/3;
    background-color: var(--border-color);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 1.2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.placeholder-box.tall {
    aspect-ratio: 3/4;
}

/* Brands Section (Marquee Slider) */
.brands {
    padding: 3rem 0;
    border-bottom: 1px solid var(--border-color);
    background: #ffffff;
    overflow: hidden;
    position: relative;
}

.brands-marquee {
    width: 100%;
    overflow: hidden;
    position: relative;
    display: flex;
}

.brands-marquee::before,
.brands-marquee::after {
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    content: "";
    z-index: 2;
    pointer-events: none;
}

.brands-marquee::before {
    left: 0;
    background: linear-gradient(to right, #ffffff 0%, transparent 100%);
}

.brands-marquee::after {
    right: 0;
    background: linear-gradient(to left, #ffffff 0%, transparent 100%);
}

.brands-track {
    display: flex;
    align-items: center;
    gap: 3rem;
    width: max-content;
    animation: marquee 35s linear infinite;
}

.brands-track:hover {
    animation-play-state: paused;
}

.brands-track img {
    height: 55px; /* Tăng chiều cao để sát với tỷ lệ thiết kế hơn */
    width: auto;
    max-width: 220px;
    object-fit: contain;
    transition: transform var(--transition-fast);
}

.brands-track img:hover {
    transform: scale(1.05);
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-50% - 1.5rem)); /* 50% width + half gap */
    }
}

/* Bento Grid Section */
.bento-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.bento-card {
    background: #f8fafc;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    border: 1px solid #e2e8f0;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.bento-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.bento-full {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 3rem;
}

.waste-card {
    background: #F4F8FB url('../../images/bg1.png') no-repeat center right;
    background-size: cover;
    border-radius: 16px;
    overflow: hidden;
    min-height: 280px;
    padding: 0;
}

.waste-content {
    max-width: 60%;
    padding: 3rem;
}

.bento-content {
    flex: 1;
}

.bento-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.bento-card h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.bullet-list {
    list-style: none;
    padding: 0;
}

.bullet-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--text-main);
    line-height: 1.5;
}

.bullet-list li::before {
    content: "•";
    color: var(--primary-color);
    font-size: 1.5rem;
    line-height: 1;
    display: inline-block;
    margin-top: -2px;
}

#onepro-wrapper .bullet-list strong {
    font-weight: 600;
    color: var(--text-dark);
}

/* Solution Intro */
.solution-intro {
    padding: 4rem 0;
}

/* Modules (Z-Pattern) */
.modules {
    padding: 2rem 0 6rem;
}

.module-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 6rem;
}

.module-row.reversed {
    direction: rtl;
}

.module-row.reversed .module-content {
    direction: ltr;
}

.module-row.reversed .module-image {
    direction: ltr;
}

.module-tag {
    display: inline-block;
    color: #3b82f6;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    border-left: 3px solid #3b82f6;
    padding-left: 0.75rem;
    line-height: 1.2;
}

.module-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.module-content p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* General Split Layouts (AI & App) */
.ai-integration, .mobile-app {
    padding: 6rem 0;
}

.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.split-layout.reversed {
    direction: rtl;
}

.split-layout.reversed .content, 
.split-layout.reversed .image-box {
    direction: ltr;
}

.split-layout .content p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.feature-list li {
    margin-bottom: 0.75rem;
    color: var(--text-main);
    font-weight: 500;
}

.app-buttons {
    display: flex;
    gap: 1rem;
}

/* Final CTA Banner */
.cta-banner {
    padding: 5rem 0;
    background: var(--primary-color);
    text-align: center;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.cta-content h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    color: rgba(255,255,255,0.8);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.cta-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* BI Dashboard Image */
.bi-dashboard-image {
    width: 90%;
    max-width: 1300px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    margin-top: -1rem; /* Kéo ảnh lên trên một chút */
}

.bi-dashboard-image::before {
    content: '';
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, rgba(37, 99, 235, 0) 60%);
    z-index: -1;
    pointer-events: none;
}

.bi-dashboard-image img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    display: block;
}

.bi-dashboard-image::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: -20px;
    right: -20px;
    height: 25%;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.8) 60%, #ffffff 100%);
    pointer-events: none;
}

/* Responsive Overrides */
@media (max-width: 992px) {
    .hero-grid, .split-layout, .performance-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .module-row {
        grid-template-columns: 1fr;
        text-align: left;
        gap: 2rem;
    }
    
    .module-image {
        justify-content: center !important;
    }
    
    .bento-grid {
        grid-template-columns: 1fr;
    }
    
    .bento-full {
        grid-column: 1;
        flex-direction: column;
    }
    
    .waste-card {
        background-position: bottom right;
        background-size: auto 180px; /* Fixed height for the image to prevent over-shrinking */
        min-height: auto;
    }
    
    .waste-content {
        max-width: 100%;
        padding: 2rem 1.5rem 180px; /* Match padding to the new background height */
        background: none; /* Bỏ lớp nền mờ che ảnh */
    }
    
    .module-row.reversed, .split-layout.reversed {
        direction: ltr;
    }

    .hero-actions, .cta-actions, .app-buttons {
        flex-direction: column;
        justify-content: center;
    }

    .onepro-section-title.text-left {
        text-align: center;
    }
    
    .feature-list li {
        justify-content: center;
        text-align: center;
    }
}
