/*
=========================================================
DG24 FRONTEND
Home Page Styles
File: home.css

این فایل فقط برای صفحه اصلی است.
app.css نباید تغییر کند.
=========================================================
*/

/* =========================================================
   01. Home Search
========================================================= */

.home-search-intro {
    max-width: 820px;
    margin: 0 auto 32px;
    text-align: center;
}

.home-search-title {
    margin: 8px 0 12px;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    line-height: 1.45;
}

.home-search-description {
    max-width: 680px;
    margin: 0 auto;
    line-height: 1.9;
}

.home-search-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.home-search-card,
.home-advisor-card {
    height: 100%;
}

.home-search-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.home-search-card-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--dg-primary-soft, #f8edf0);
    font-size: 1.35rem;
}

.home-search-card-label {
    display: block;
    margin-bottom: 4px;
    font-size: .82rem;
    opacity: .7;
}

.home-search-card h2 {
    margin: 0;
    font-size: 1.15rem;
}

.home-advisor-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 22px;
}

.home-advisor-examples span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(128, 0, 32, .06);
    font-size: .85rem;
}

/* =========================================================
   02. Section Headers
========================================================= */

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.section-link {
    flex: 0 0 auto;
    white-space: nowrap;
    font-weight: 700;
}

/* =========================================================
   03. Categories
========================================================= */

.home-categories-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.category-card {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 108px;
    padding: 18px;
    text-decoration: none;
}

.category-icon {
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: var(--dg-primary-soft, #f8edf0);
    font-size: 1.4rem;
}

.category-content {
    min-width: 0;
}

.category-name {
    display: block;
    margin-bottom: 7px;
    line-height: 1.5;
}

.category-action {
    font-size: .78rem;
    opacity: .65;
}

/* =========================================================
   04. Product Cards
========================================================= */

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.product-card {
    min-width: 0;
    overflow: hidden;
}

.product-card-image {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    text-decoration: none;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    transition: transform .25s ease;
}

.product-card:hover .product-card-image img {
    transform: scale(1.035);
}

.product-image-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    background: #f7f8f9;
    font-size: 2.2rem;
}

.product-image-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--dg-primary, #800020);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
}

.product-card-body {
    padding: 16px;
}

.product-badge {
    display: inline-block;
    margin-bottom: 8px;
    font-size: .72rem;
    font-weight: 700;
    opacity: .7;
}

.product-card-title {
    margin: 0 0 14px;
    min-height: 48px;
    font-size: .98rem;
    line-height: 1.7;
}

.product-card-title a {
    color: inherit;
    text-decoration: none;
}

.product-card-pricing {
    margin-bottom: 14px;
}

.product-card-old-price {
    margin-bottom: 4px;
    font-size: .78rem;
    text-decoration: line-through;
    opacity: .55;
}

.product-card-price {
    font-size: 1.05rem;
    font-weight: 800;
}

/* =========================================================
   05. Education
========================================================= */

.education-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.education-card {
    overflow: hidden;
}

.education-video {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f5f7f8;
}

.education-video iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
}

.video-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-size: 2rem;
}

.education-card-body {
    padding: 16px;
}

.education-card-body h3 {
    margin: 0 0 8px;
    font-size: 1rem;
    line-height: 1.7;
}

.education-card-body p {
    margin: 0;
    font-size: .88rem;
    line-height: 1.8;
    opacity: .72;
}

/* =========================================================
   06. Benefits
========================================================= */

.trust-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.trust-item {
    height: 100%;
    padding: 22px;
    text-align: center;
}

.trust-item-icon {
    margin-bottom: 12px;
    font-size: 1.8rem;
}

.trust-item-title {
    margin-bottom: 8px;
    font-weight: 800;
}

.trust-item-text {
    font-size: .88rem;
    line-height: 1.8;
    opacity: .72;
}

/* =========================================================
   07. Final CTA
========================================================= */

.home-final-cta-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: clamp(24px, 4vw, 42px);
    border-radius: 24px;
    background: linear-gradient(
        135deg,
        rgba(128, 0, 32, .08),
        rgba(255, 255, 255, .9)
    );
}

.home-final-cta-content {
    max-width: 720px;
}

.home-final-cta h2 {
    margin: 8px 0 10px;
    font-size: clamp(1.35rem, 2.5vw, 2rem);
}

.home-final-cta p {
    margin: 0;
    line-height: 1.9;
}

/* =========================================================
   08. Empty States
========================================================= */

.dg-empty {
    grid-column: 1 / -1;
    padding: 30px 20px;
    text-align: center;
    line-height: 1.8;
}

/* =========================================================
   09. Tablet
========================================================= */

@media (max-width: 1100px) {

    .home-categories-grid,
    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .trust-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* =========================================================
   10. Mobile
========================================================= */

@media (max-width: 767.98px) {

    .home-search-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .section-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 20px;
    }

    .home-categories-grid,
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .category-card {
        min-height: 92px;
        padding: 13px;
        gap: 10px;
    }

    .category-icon {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }

    .category-action {
        display: none;
    }

    .product-card-body {
        padding: 12px;
    }

    .product-card-title {
        min-height: 44px;
        font-size: .88rem;
    }

    .product-card-price {
        font-size: .94rem;
    }

    .education-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .trust-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .trust-item {
        padding: 18px;
    }

    .home-final-cta-box {
        align-items: stretch;
        flex-direction: column;
        gap: 20px;
        padding: 24px 18px;
        border-radius: 20px;
    }

    .home-advisor-examples {
        flex-direction: column;
        align-items: stretch;
    }

    .home-advisor-examples span {
        text-align: center;
    }
}

/* =========================================================
   11. Small Mobile
========================================================= */

@media (max-width: 420px) {

    .home-categories-grid,
    .product-grid {
        gap: 10px;
    }

    .product-card-body {
        padding: 10px;
    }

    .product-card-title {
        font-size: .82rem;
    }

    .product-card-price {
        font-size: .88rem;
    }
}