﻿/* =========================================================
   تحلیل کد - Homepage / Index custom styles
   File: ~/assets/css/titrindex.css
   ========================================================= */

/* =========================================================
   Page Title Box
   ========================================================= */

.page-title-box {
    display: flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    max-width: 100%;
    margin: 18px auto 24px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(13, 110, 253, 0.10);
    border-radius: 16px;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.06);
    direction: rtl;
}

.page-title-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: linear-gradient(135deg, #0d6efd, #6610f2);
    color: #fff;
    font-size: 17px;
    box-shadow: 0 4px 10px rgba(13, 110, 253, 0.20);
}

.page-title-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.5;
    font-size: 13px;
    color: #6c757d;
}

    .page-title-text strong {
        font-size: 15px;
        font-weight: 700;
        color: #212529;
    }

/* =========================================================
   Home Search Box
   ========================================================= */

.search-box-home {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
}

    .search-box-home .input-group {
        position: relative;
        display: flex;
        align-items: stretch;
        background: #ffffff;
        border-radius: 15px;
        padding: 4px;
        box-shadow: 0 6px 24px rgba(0, 0, 0, 0.09);
        border: 1px solid rgba(13, 110, 253, 0.08);
        transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
    }

        .search-box-home .input-group:hover {
            box-shadow: 0 9px 28px rgba(0, 0, 0, 0.12);
            border-color: rgba(13, 110, 253, 0.16);
            transform: translateY(-1px);
        }

    .search-box-home .form-control {
        min-height: 50px;
        height: 50px;
        border: 0 !important;
        border-radius: 11px !important;
        background: transparent;
        padding: 0 18px;
        font-size: 15px;
        color: #212529;
        box-shadow: none !important;
        direction: rtl;
        text-align: right;
    }

        .search-box-home .form-control::placeholder {
            color: #8a94a6;
            opacity: 1;
        }

        .search-box-home .form-control:focus {
            background: transparent;
            outline: none;
            box-shadow: none !important;
        }

    .search-box-home .btn {
        min-width: 118px;
        min-height: 50px;
        height: 50px;
        border: 0;
        border-radius: 11px !important;
        padding: 0 22px;
        font-size: 15px;
        font-weight: 700;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        box-shadow: none;
        transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    }

        .search-box-home .btn:hover {
            transform: translateY(-1px);
            filter: brightness(0.96);
            box-shadow: 0 5px 15px rgba(13, 110, 253, 0.22);
        }

        .search-box-home .btn:active {
            transform: translateY(0);
        }

        .search-box-home .btn i {
            font-size: 14px;
        }

/* =========================================================
   Project Link
   ========================================================= */

a.project-link {
    display: inline-block !important;
    padding: 10px 25px !important;
    border: 2px solid var(--bs-primary) !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    color: var(--bs-primary) !important;
    background-color: transparent !important;
    transition: all 0.3s ease !important;
}

    a.project-link:hover {
        color: #fff !important;
        background-color: var(--bs-primary) !important;
        border-color: var(--bs-primary) !important;
        text-decoration: none !important;
        box-shadow: 0 5px 15px rgba(var(--bs-primary-rgb), 0.25) !important;
    }

    a.project-link h2 {
        margin: 0 !important;
        color: inherit !important;
    }

/* =========================================================
   Index responsive helpers
   ========================================================= */

.search-box-home .input-group > .form-control {
    min-width: 0;
}

@media (max-width: 768px) {

    .search-box-home {
        width: 94%;
        max-width: 680px;
    }

        .search-box-home .input-group {
            padding: 4px;
            border-radius: 14px;
        }

        .search-box-home .form-control {
            min-height: 46px;
            height: 46px;
            padding: 0 14px;
            font-size: 14px;
        }

        .search-box-home .btn {
            min-height: 46px;
            height: 46px;
            min-width: 105px;
            padding: 0 17px;
            font-size: 14px;
            border-radius: 10px !important;
        }

            .search-box-home .btn i {
                font-size: 13px;
            }

    /* Homepage hero content */
    main > section .display-4 {
        font-size: clamp(1.8rem, 5vw, 2.5rem);
    }

    main > section .display-6 {
        font-size: clamp(1.65rem, 5vw, 2.2rem);
    }
}

@media (max-width: 576px) {

    .page-title-box {
        margin: 14px 12px 20px;
        padding: 9px 13px;
        border-radius: 14px;
        gap: 9px;
    }

    .page-title-icon {
        width: 34px;
        height: 34px;
        min-width: 34px;
        font-size: 15px;
    }

    .page-title-text {
        font-size: 11px;
    }

        .page-title-text strong {
            font-size: 13px;
        }

    .search-box-home {
        width: 96%;
        max-width: none;
    }

        .search-box-home .input-group {
            padding: 3px;
            border-radius: 13px;
        }

        .search-box-home .form-control {
            min-height: 43px;
            height: 43px;
            padding: 0 12px;
            font-size: 13px;
            min-width: 0;
        }

        .search-box-home .btn {
            min-height: 43px;
            height: 43px;
            min-width: 88px;
            padding: 0 12px;
            font-size: 13px;
            border-radius: 9px !important;
            gap: 5px;
            flex-shrink: 0;
        }

            .search-box-home .btn i {
                font-size: 12px;
            }

    /* Prevent oversized hero elements on phones */
    main > section .display-4 {
        font-size: 1.75rem;
        line-height: 1.65;
    }

    main > section .display-6 {
        font-size: 1.65rem;
        line-height: 1.55;
    }

    /* Hero action buttons */
    main .d-flex.flex-wrap.gap-2 .btn {
        width: 100%;
        justify-content: center;
    }

    /* Floating hero icons */
    main .position-absolute.bg-primary.rounded-4.shadow,
    main .position-absolute.bg-success.rounded-4.shadow {
        display: none;
    }

    /* Search heading */
    .search-box-home + * {
        max-width: 100%;
    }
}

@media (max-width: 380px) {

    .search-box-home {
        width: 97%;
    }

        .search-box-home .input-group {
            padding: 3px;
        }

        .search-box-home .form-control {
            min-height: 40px;
            height: 40px;
            padding: 0 9px;
            font-size: 12px;
        }

        .search-box-home .btn {
            min-height: 40px;
            height: 40px;
            min-width: 76px;
            padding: 0 9px;
            font-size: 12px;
        }

            .search-box-home .btn i {
                font-size: 11px;
            }
}
