/* ==========================================================================
   In-House Software Products Showcase
   Path: components/home/products/products.css
   ========================================================================== */

.products-section {
    padding: 4.5rem 0 4rem;
    background: #ffffff;
    position: relative;
    overflow: hidden;
}

/* Ensure left alignment inside section */
.products-section .container {
    text-align: left;
    position: relative;
    z-index: 1;
}

/* ---------------- Top Split Container ---------------- */
.prod-top-split {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 2.5rem;
    align-items: end;
    /* Vertically align image to bottom */
    margin-bottom: 2rem;
    text-align: left;
}

/* Left Container: Header Text + OPD Card */
.prod-top-left {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.prod-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.95rem;
    border-radius: 50px;
    background: rgba(47, 213, 199, 0.14);
    color: #0eb8a9;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 0.85rem;
    border: 1px solid rgba(47, 213, 199, 0.35);
    text-align: left;
    width: fit-content;
}

.prod-badge i {
    font-size: 0.85rem;
    color: #2FD5C7;
}

.prod-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
    margin: 0 0 0.85rem;
    letter-spacing: -0.5px;
    text-align: left;
}

.prod-subtitle {
    font-size: 1.02rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
    text-align: left;
}

/* Right Container: Image Vertically Aligned to Bottom */
.prod-top-right {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    /* Bottom alignment */
    align-self: end;
    /* Bottom alignment */
    text-align: left;
    padding-top: 0;
}

.prod-illustration-media {
    width: 100%;
    height: 330px;
    /* Aligns flush with bottom of OPD Pulse card */
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}

.prod-illustration-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    border-radius: 12px;
}

/* ---------------- Product Cards (Compact, No Extra Space) ---------------- */
.prod-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.03);
    padding: 1.25rem 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    transition: all 0.25s ease;
    text-align: left;
    height: auto;
}

.prod-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

/* OPD Pulse Card: Given more space from top */
.prod-card.prod-card-opd {
    margin-top: 2.25rem;
    /* Space from top */
    padding: 1.5rem 1.6rem;
    border-radius: 18px;
    gap: 0.95rem;
    box-shadow: 0 6px 22px rgba(15, 23, 42, 0.04);
}

.prod-opd-desc {
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.55;
    margin: 0;
    text-align: left;
}

/* Card Header (Icon + Titles) */
.prod-card-header {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    text-align: left;
}

.prod-card-titles {
    text-align: left;
}

.prod-card-titles h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    margin: 0 0 0.2rem;
    text-align: left;
}

.prod-card-titles h4 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    margin: 0 0 0.2rem;
    text-align: left;
}

.prod-card-subtitle {
    font-size: 0.86rem;
    color: #64748b;
    font-weight: 500;
    display: block;
    line-height: 1.35;
    text-align: left;
}

/* ---------------- Product Icons (Solid Colors, NO Gradients) ---------------- */
.prod-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    color: #ffffff;
    flex-shrink: 0;
}

.prod-card.prod-card-opd .prod-card-icon {
    width: 56px;
    height: 56px;
    font-size: 1.6rem;
    border-radius: 16px;
}

/* Brand Solid Colors */
.icon-opd {
    background: #2FD5C7;
}

.icon-resto {
    background: #f97316;
}

.icon-pharma {
    background: #8b5cf6;
}

.icon-crm {
    background: #0284c7;
}

/* ---------------- Learn More Link (Text Link ONLY, NO Button Background) ---------------- */
.products-section .prod-card-link,
.products-section a.prod-card-link {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.45rem !important;
    font-size: 0.92rem !important;
    font-weight: 700 !important;
    color: #2FD5C7 !important;
    text-decoration: none !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    margin-top: 0.25rem !important;
    width: fit-content !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-align: left !important;
}

.products-section .prod-card-link i,
.products-section a.prod-card-link i {
    font-size: 0.85rem !important;
    color: #2FD5C7 !important;
    transition: transform 0.2s ease, color 0.2s ease !important;
}

.products-section .prod-card-link:hover,
.products-section a.prod-card-link:hover {
    color: #0eb8a9 !important;
    background: transparent !important;
    gap: 0.7rem !important;
}

.products-section .prod-card-link:hover i,
.products-section a.prod-card-link:hover i {
    color: #0eb8a9 !important;
    transform: translateX(3px) !important;
}

/* ---------------- Bottom 3 Cards Row ---------------- */
.prod-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: start;
    text-align: left;
    margin-bottom: 2.75rem;
}

/* ---------------- Bottom Centered Explore Button ---------------- */
.prod-bottom-action {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    text-align: center;
    margin-top: 0.1rem;
}

.prod-explore-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.9rem 2.2rem;
    border-radius: 50px;
    background: #2FD5C7;
    color: #ffffff !important;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    box-shadow: 0 4px 18px rgba(47, 213, 199, 0.35);
    transition: all 0.28s ease;
    cursor: pointer;
}

.prod-explore-btn i {
    color: #ffffff !important;
    transition: transform 0.25s ease;
}

.prod-explore-btn:hover {
    background: #0eb8a9;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(47, 213, 199, 0.45);
}

.prod-explore-btn:hover i {
    transform: translateX(4px);
}

/* ---------------- Responsive Styles ---------------- */
@media (max-width: 1024px) {
    .prod-top-split {
        grid-template-columns: 1fr;
        gap: 2rem;
        align-items: stretch;
    }

    .prod-top-right {
        align-self: auto;
    }

    .prod-illustration-media {
        height: 280px;
    }

    .prod-card.prod-card-opd {
        margin-top: 1.5rem;
    }

    .prod-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile View: Hide illustration image & perfect responsive flow */
@media (max-width: 768px) {
    .products-section {
        padding: 3rem 0 2.5rem;
    }

    .prod-top-split {
        grid-template-columns: 1fr;
        gap: 0;
        margin-bottom: 1rem;
    }

    /* HIDE IMAGE ON MOBILE VIEW */
    .prod-top-right,
    .prod-illustration-media {
        display: none !important;
    }

    .prod-title {
        font-size: 1.7rem;
        line-height: 1.3;
        margin-bottom: 0.65rem;
    }

    .prod-subtitle {
        font-size: 0.95rem;
        line-height: 1.55;
    }

    .prod-card.prod-card-opd {
        padding: 1.2rem 1.25rem;
        margin-top: 1.25rem;
        border-radius: 14px;
    }

    .prod-card {
        padding: 1.15rem 1.2rem;
        border-radius: 14px;
        gap: 0.75rem;
    }

    .prod-card-icon {
        width: 46px;
        height: 46px;
        font-size: 1.35rem;
        border-radius: 12px;
    }

    .prod-card.prod-card-opd .prod-card-icon {
        width: 50px;
        height: 50px;
        font-size: 1.45rem;
        border-radius: 14px;
    }

    .prod-card-titles h3 {
        font-size: 1.3rem;
    }

    .prod-card-titles h4 {
        font-size: 1.1rem;
    }

    .prod-card-subtitle {
        font-size: 0.82rem;
    }

    .prod-opd-desc {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .prod-cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 0.1rem;
    }

    .prod-bottom-action {
        margin-top: 0.1rem;
    }

    .prod-explore-btn {
        width: 100%;
        max-width: 290px;
        justify-content: center;
        font-size: 0.95rem;
        padding: 0.85rem 1.6rem;
    }
}