/* ========================================================
   INVAMAX SOLUTION: DIGITAL FACTORY OPERATING PLATFORM
   (Nền tảng số hóa vận hành nhà máy - INVAMAX Factory Platform)
   Brand UI Guideline v1.2
   ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');
@import url('./invamax-tokens.css');
@import url('./navbar.css');

:root {
    --ifp-dark: #061a1e;
    --ifp-dark-2: #092328;
    --ifp-dark-card: #0c2b31;
    --ifp-orange: #f26b1d;
    --ifp-orange-hover: #ff7a29;
    --ifp-orange-soft: #fff4ec;
    --ifp-teal-light: #eaf5f2;
    --ifp-teal-border: rgba(45, 112, 106, 0.28);
    --ifp-light-bg: #f8fafc;
    --ifp-gray-bg: #f1f5f9;
    --ifp-text-dark: #0f172a;
    --ifp-text-muted: #64748b;
    --ifp-text-light: #cbd5e1;
    --ifp-border: #e2e8f0;
    --ifp-radius: 8px;
    --ifp-radius-lg: 12px;
    --ifp-container: 1280px;
}

/* Page Base */
.ifp-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--ifp-text-dark);
    background: #ffffff;
    overflow-x: hidden;
    padding-top: 0;
    line-height: 1.6;
}

.ifp-page * {
    box-sizing: border-box;
}

.ifp-container {
    width: min(var(--ifp-container), calc(100% - 48px));
    margin: 0 auto;
}

/* Common Headings & Typography */
.ifp-page h1, .ifp-page h2, .ifp-page h3, .ifp-page h4 {
    color: var(--ifp-text-dark);
    line-height: 1.25;
    margin-top: 0;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.ifp-page p {
    margin-top: 0;
}

.text-orange {
    color: var(--ifp-orange) !important;
}

.ifp-eyebrow {
    display: inline-block;
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ifp-orange);
    margin-bottom: 12px;
}

.ifp-section-title {
    font-size: clamp(26px, 2.8vw, 36px);
    font-weight: 800;
    line-height: 1.22;
    margin-bottom: 12px;
}

.ifp-section-sub {
    font-size: 15.5px;
    color: var(--ifp-text-muted);
    max-width: 820px;
    line-height: 1.65;
    margin-bottom: 36px;
}

/* Common Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-orange {
    background: var(--ifp-orange);
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(242, 107, 29, 0.28);
}

.btn-orange:hover {
    background: var(--ifp-orange-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(242, 107, 29, 0.35);
}

.btn-outline-white {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff !important;
}

.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: #ffffff;
    transform: translateY(-2px);
}

.btn-outline-dark {
    background: transparent;
    border-color: #cbd5e1;
    color: var(--ifp-text-dark) !important;
}

.btn-outline-dark:hover {
    background: #f1f5f9;
    border-color: var(--ifp-text-dark);
}

/* ========================================================
   SECTION 1: HERO SECTION (FULL BLEED WITH SMOOTH TRANSITION)
   ======================================================== */
.ifp-hero {
    position: relative;
    background: #061a1e;
    color: #ffffff;
    padding-top: 52px !important;
    overflow: hidden;
}

.ifp-hero-bg-media {
    position: absolute;
    inset: 0;
    z-index: 1;
    cursor: zoom-in;
    overflow: hidden;
}

.ifp-hero-bg-img {
    position: absolute;
    right: -165px;
    top: 0;
    height: 100%;
    width: auto;
    max-width: none;
    display: block;
    transition: transform 0.5s ease;
}

.ifp-hero-bg-media:hover .ifp-hero-bg-img {
    transform: scale(1.02);
}

.ifp-hero-bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, 
        #061a1e 0%, 
        #061a1e 32%, 
        rgba(6, 26, 30, 0.92) 42%, 
        rgba(6, 26, 30, 0.45) 58%, 
        transparent 78%
    );
    pointer-events: none;
}

.ifp-hero-main {
    min-height: 420px;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 2;
}

.ifp-hero-copy {
    max-width: 600px;
    padding: 56px 0 50px;
}

.ifp-hero-copy h1 {
    color: #ffffff;
    font-size: clamp(34px, 3.8vw, 48px);
    font-weight: 800;
    line-height: 1.16;
    letter-spacing: -.025em;
    margin: 0 0 16px;
}

.ifp-hero-tagline {
    display: none !important;
}

.ifp-hero-desc {
    font-size: 16.5px !important;
    font-weight: 600 !important;
    line-height: 1.6 !important;
    color: #ffffff !important;
    margin-bottom: 28px !important;
    max-width: 580px;
}

.ifp-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.ifp-hero-actions .btn {
    border-radius: 12px !important;
    min-height: 48px !important;
    padding: 0 24px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
}

/* ========================================================
   SECTION 2: PROBLEMS FACED BY FACTORIES
   ======================================================== */
.ifp-problems {
    padding: 72px 0;
    background: #ffffff;
}

.ifp-problems-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.ifp-prob-card {
    background: #ffffff;
    border: 1px solid var(--ifp-border);
    border-radius: var(--ifp-radius);
    padding: 18px 18px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.ifp-prob-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    border-color: rgba(242, 107, 29, 0.4);
}

.ifp-prob-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.ifp-prob-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 8px;
    background: var(--ifp-orange-soft);
    color: var(--ifp-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    flex-shrink: 0;
}

.ifp-prob-icon svg {
    width: 20px;
    height: 20px;
}

.ifp-prob-card h3,
.ifp-prob-title {
    font-size: 15.5px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
    min-height: 0;
    color: var(--ifp-dark, #0B211A);
    display: flex;
    align-items: center;
}

.ifp-prob-card p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--ifp-text-muted);
    margin: 0;
    flex: 1;
}

/* Support fallback if .ifp-prob-head is not in DOM */
.ifp-prob-card:not(:has(.ifp-prob-head)) {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto 1fr;
    column-gap: 12px;
    row-gap: 10px;
    align-items: center;
}
.ifp-prob-card:not(:has(.ifp-prob-head)) .ifp-prob-icon {
    grid-column: 1;
    grid-row: 1;
    margin-bottom: 0;
}
.ifp-prob-card:not(:has(.ifp-prob-head)) h3 {
    grid-column: 2;
    grid-row: 1;
    margin-bottom: 0;
}
.ifp-prob-card:not(:has(.ifp-prob-head)) p {
    grid-column: 1 / -1;
    grid-row: 2;
}

/* Highlight Quote / Statement Banner */
.ifp-callout-banner {
    background: var(--ifp-teal-light);
    border: 1px solid var(--ifp-teal-border);
    border-radius: var(--ifp-radius);
    padding: 18px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(11, 33, 26, 0.04);
}

.ifp-callout-icon {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
}

.ifp-callout-banner p {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #0b2b23;
    line-height: 1.6;
}

/* ========================================================
   SECTION 3: TWO SOLUTION DIRECTIONS
   ======================================================== */
.ifp-solutions {
    padding: 72px 0 80px;
    background: var(--ifp-light-bg);
    border-top: 1px solid var(--ifp-border);
    border-bottom: 1px solid var(--ifp-border);
}

.ifp-solutions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.ifp-sol-card {
    background: #ffffff;
    border: 1px solid var(--ifp-border);
    border-radius: var(--ifp-radius-lg);
    padding: 34px 30px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ifp-sol-card:hover {
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.ifp-sol-head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.ifp-sol-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--ifp-orange-soft);
    color: var(--ifp-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ifp-sol-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ifp-orange);
    margin-bottom: 4px;
}

.ifp-sol-title {
    font-size: 21px;
    font-weight: 800;
    margin: 0 0 4px;
}

.ifp-sol-sub {
    font-size: 13.5px;
    color: var(--ifp-text-muted);
    font-weight: 500;
}

.ifp-sol-lead {
    font-size: 14.5px;
    color: var(--ifp-text-dark);
    line-height: 1.7;
    margin-bottom: 22px;
}

/* Card 1 Inner Grid (Checklist + Inset Image) */
.ifp-sol-inner-split {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 20px;
    align-items: center;
    margin-bottom: 24px;
    flex: 1;
}

.ifp-check-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.ifp-check-list li {
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--ifp-text-dark);
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.ifp-check-list li svg {
    color: var(--ifp-orange);
    stroke: var(--ifp-orange);
    flex-shrink: 0;
    margin-top: 2px;
}

.ifp-sol-thumb {
    border-radius: var(--ifp-radius);
    overflow: hidden;
    border: 1px solid var(--ifp-border);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.ifp-sol-thumb img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Card 2 Badges Grid (ERP, MES, WMS, QMS, CMMS, BI) */
.ifp-tech-badges-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.ifp-tech-badge {
    background: #f8fafc;
    border: 1px solid var(--ifp-border);
    border-radius: 6px;
    padding: 12px 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.ifp-tech-badge:hover {
    border-color: rgba(242, 107, 29, 0.4);
    background: var(--ifp-orange-soft);
}

.ifp-tech-badge strong {
    font-size: 14.5px;
    font-weight: 800;
    color: var(--ifp-text-dark);
}

.ifp-tech-badge span {
    font-size: 11.5px;
    color: var(--ifp-text-muted);
}

.ifp-tech-note {
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--ifp-text-muted);
    margin-bottom: 24px;
    flex: 1;
}

/* Solution Card Footer Links */
.ifp-card-link {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ifp-orange);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    transition: transform 0.2s ease, color 0.2s ease;
}

.ifp-card-link:hover {
    color: var(--ifp-orange-hover);
    transform: translateX(4px);
}

/* ========================================================
   SECTION 4: EXPLORE INVAMAX FACTORY PLATFORM (Dark Theme)
   ======================================================== */
.ifp-showcase {
    background: linear-gradient(135deg, #041417 0%, #071f24 50%, #041519 100%);
    color: #ffffff;
    padding: 80px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ifp-showcase-grid {
    display: grid;
    grid-template-columns: 1.05fr 1.15fr 0.95fr;
    gap: 36px;
    align-items: center;
}

.ifp-showcase-left h2 {
    color: #ffffff;
    font-size: clamp(24px, 2.5vw, 33px);
    line-height: 1.25;
    margin-bottom: 18px;
}

.ifp-showcase-left p {
    font-size: 14.5px;
    line-height: 1.8;
    color: var(--ifp-text-light);
    margin-bottom: 28px;
}

.ifp-showcase-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.ifp-showcase-mockup {
    border-radius: var(--ifp-radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.12);
    background: #000000;
}

.ifp-showcase-mockup img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.ifp-showcase-right {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--ifp-radius-lg);
    padding: 26px 22px;
}

.ifp-showcase-right h3 {
    color: #ffffff;
    font-size: 16.5px;
    font-weight: 700;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 18px;
}

.ifp-feature-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ifp-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.ifp-feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(242, 107, 29, 0.12);
    border: 1px solid rgba(242, 107, 29, 0.3);
    color: var(--ifp-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ifp-feature-text strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.35;
    margin-bottom: 2px;
}

.ifp-feature-text span {
    display: block;
    font-size: 12.5px;
    color: #94a3b8;
    line-height: 1.45;
}

/* ========================================================
   SECTION 5: CTA BANNER (HÀNH TRÌNH SỐ HÓA)
   ======================================================== */
.ifp-cta-banner {
    position: relative;
    padding: 72px 0;
    background: linear-gradient(90deg, rgba(5, 20, 24, 0.96) 0%, rgba(6, 24, 28, 0.92) 48%, rgba(8, 30, 35, 0.65) 100%),
                url('../images/home/hero-factory.jpg') center/cover no-repeat;
    color: #ffffff;
    overflow: hidden;
}

.ifp-cta-box {
    max-width: 760px;
    position: relative;
    z-index: 2;
}

.ifp-cta-box h2 {
    color: #ffffff;
    font-size: clamp(26px, 3vw, 38px);
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 16px;
}

.ifp-cta-box p {
    font-size: 15px;
    line-height: 1.75;
    color: #d1d5db;
    margin-bottom: 28px;
}

.ifp-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

/* ========================================================
   RESPONSIVE DESIGN BREAKPOINTS
   ======================================================== */
@media (max-width: 991px) {
    .ifp-hero {
        padding-top: 52px !important;
    }
    .ifp-hero-bg-media {
        inset: 0 !important;
        opacity: 0.28;
    }
    .ifp-hero-bg-img {
        position: relative !important;
        right: auto !important;
        top: auto !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center right !important;
    }
    .ifp-hero-main {
        min-height: 380px;
    }
    .ifp-hero-copy {
        max-width: 100%;
        padding: 44px 0 40px;
    }
}

@media (max-width: 1080px) {
    .ifp-problems-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .ifp-solutions-grid {
        grid-template-columns: 1fr;
    }
    .ifp-showcase-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .ifp-showcase-mockup {
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 720px) {
    .ifp-container {
        width: calc(100% - 32px);
    }
    .ifp-problems-grid {
        grid-template-columns: 1fr;
        gap: 12px !important;
    }
    /* Compact Cards on Mobile */
    .ifp-prob-card {
        padding: 14px 16px !important;
    }
    .ifp-prob-head {
        margin-bottom: 8px !important;
        gap: 10px !important;
    }
    .ifp-prob-card h3,
    .ifp-prob-title {
        font-size: 15px !important;
        margin-bottom: 0 !important;
    }
    .ifp-prob-card p {
        font-size: 13px !important;
        line-height: 1.5 !important;
    }
    .ifp-sol-card {
        padding: 16px 16px !important;
    }
    .ifp-diff-card {
        padding: 14px 16px !important;
    }
    .ifp-sol-inner-split {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .ifp-tech-badges-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .ifp-callout-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .ifp-hero-actions, .ifp-cta-actions {
        flex-direction: column;
        width: 100%;
    }
    .ifp-hero-actions .btn, .ifp-cta-actions .btn {
        width: 100%;
    }
}
