/* ============================================================
   SICOMP — PORTFOLIO.CSS
   صفحات لیست نمونه‌کار + نمونه‌کار تک + نظرات
   نسخه: 2.0 — افزودن استایل نظرات با مقادیر ثابت
   ============================================================ */

/* ==================== Subhero (لیست و تک) ==================== */
.subhero { height: 265px; position: relative; overflow: hidden; background: #eaf3ff; }
.subhero__art { position: absolute; inset: 0; background-image: url('../images/laptop-shop.png'); background-position: left center; background-size: cover; filter: saturate(.9); }
.subhero__veil { position: absolute; inset: 0; background: linear-gradient(270deg, #f7faff 0%, #f7faffed 23%, #f7faff85 48%, #f7faff08 78%); }
.subhero__inner { height: 100%; display: flex; align-items: center; position: relative; }
.subhero__copy { width: 100%; margin-right: auto; text-align: right; border-right: 4px solid var(--red, #dc3545); padding: 8px 18px 8px 0; }
.subhero__copy h1 { font-size: clamp(26px, 3vw, 36px); font-weight: 900; margin: 0 0 8px; line-height: 1.5; }
.subhero__copy p { font-size: 14px; font-weight: 600; margin: 0; color: #19345f; }

.subhero--project { height: 230px; }
.subhero--project .subhero__art { background-image: url('../images/siteseo.png'); background-position: left 47%; }
.subhero--project .subhero__copy { width: 100%; }

/* ==================== لیست نمونه‌کارها ==================== */
.portfolio-catalog { padding-top: 24px; }
.portfolio-catalog .section-heading { margin-bottom: 12px; }
.portfolio-filters { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin: 14px 0 34px; }
.filter-chip { border: 1px solid #cbdcf7; background: #fff; color: #1a2b45; border-radius: 28px; padding: 9px 22px; font: 700 12px Vazir, Tahoma, sans-serif; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; box-shadow: 0 3px 12px rgba(11, 60, 128, .03); transition: .2s; text-decoration: none; }
.filter-chip span { font-size: 17px; color: #0878dc; line-height: 1; }
.filter-chip:hover, .filter-chip.is-active { background: #06275f; border-color: #06275f; color: #fff; box-shadow: 0 5px 14px rgba(6, 39, 95, .14); }
.filter-chip.is-active span { color: #fff; }

.portfolio-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.portfolio-card { min-width: 0; overflow: hidden; border: 1px solid #cfe0fb; border-radius: 13px; background: linear-gradient(145deg, #fff, #f8fbff); box-shadow: 0 4px 12px rgba(11, 60, 128, .05); transition: transform .25s, box-shadow .25s; }
.portfolio-card:hover { transform: translateY(-4px); box-shadow: 0 12px 26px rgba(11, 60, 128, .1); }
.portfolio-card[hidden] { display: none; }
.portfolio-card__image { height: 190px; display: block; position: relative; overflow: hidden; background: #e8f2ff; }
.portfolio-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.portfolio-card:hover .portfolio-card__image img { transform: scale(1.04); }
.portfolio-card__tag { position: absolute; top: 13px; right: 14px; background: rgba(230, 241, 255, .93); color: #075bb6; padding: 5px 13px; border-radius: 20px; font-size: 11px; font-weight: 800; }
.portfolio-card__body { padding: 13px 18px 16px; text-align: right; }
.portfolio-card__body h3 { font-size: 15px; font-weight: 900; margin: 0 0 4px; }
.portfolio-card__body h3 a:hover { color: #0878dc; }
.portfolio-card__body p { font-size: 12px; color: #334968; margin: 0 0 14px; min-height: 25px; }
.portfolio-card__body .btn { float: left; min-width: 145px; }
.portfolio-card__body::after { content: ""; display: block; clear: both; }

.portfolio-invite { border: 1px solid #c6dcff; border-radius: 13px; background: radial-gradient(circle at 100% 0, #d9eaff 0, transparent 35%), linear-gradient(135deg, #eaf3ff, #f8fbff); padding: 25px 22px; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; min-height: 270px; }
.invite-icon { width: 58px; height: 58px; border: 1px solid #6aaaff; border-radius: 50%; display: grid; place-items: center; color: #0878dc; font-size: 30px; margin-bottom: 12px; }
.portfolio-invite h3 { font-size: 16px; margin: 0 0 7px; font-weight: 900; }
.portfolio-invite p { font-size: 12px; line-height: 2; margin: 0 0 17px; max-width: 280px; }

.portfolio-cta { margin-top: 42px; margin-bottom: 38px; display: grid; grid-template-columns: 42% 1fr; align-items: center; overflow: hidden; border: 1px solid #d5e4fa; border-radius: 14px; background: linear-gradient(100deg, #e8f2ff, #f8fbff); min-height: 150px; }
.portfolio-cta__visual { height: 150px; overflow: hidden; }
.portfolio-cta__visual img { width: 100%; height: 100%; object-fit: cover; }
.portfolio-cta__content { padding: 20px 34px; }
.portfolio-cta__content h2 { font-size: 19px; margin: 0 0 5px; }
.portfolio-cta__content p { font-size: 12px; margin: 0 0 13px; }
.portfolio-cta__content .btn { min-width: 118px; }

/* ==================== Breadcrumbs ==================== */
.breadcrumbs { display: flex; align-items: center; gap: 9px; margin-top: 17px; font-size: 10px; color: #24456f; }
.breadcrumbs a:hover { color: #0878dc; }
.breadcrumbs b { font-weight: 700; }

/* ==================== نمونه‌کار تک ==================== */
.project-intro { display: grid; grid-template-columns: 1.2fr .8fr; gap: 50px; align-items: center; padding-top: 34px; padding-bottom: 32px; }
.project-preview { border: 1px solid #cbdfff; border-radius: 12px; overflow: hidden; box-shadow: 0 8px 20px rgba(11, 60, 128, .06); background: #fff; }
.project-preview img { width: 100%; height: 245px; object-fit: cover; }
.project-intro__copy { align-self: center; }
.mini-heading { display: none; }
.project-intro__copy h2 { font-size: 22px; margin: 0 0 10px; }
.project-intro__copy h2:after { content: ""; display: inline-block; width: 52px; height: 2px; background: #0878dc; vertical-align: middle; margin-right: 12px; }
.project-intro__copy p { font-size: 12px; line-height: 2.15; text-align: justify; margin: 0 0 12px; color: #243d63; }
.project-intro__copy .btn { margin-top: 4px; padding: 9px 19px; }

.project-details { display: grid; grid-template-columns: 245px minmax(0, 1fr); gap: 18px; margin-top: 0; margin-bottom: 16px; }
.project-sidebar { display: flex; flex-direction: column; gap: 14px; }
.info-panel { border: 1px solid #d3e3fa; border-radius: 11px; padding: 14px 16px; background: linear-gradient(145deg, #fff, #f8fbff); }
.info-panel h3, .gallery-heading h3 { font-size: 15px; font-weight: 900; margin: 0 0 12px; display: flex; align-items: center; gap: 9px; }
.info-panel h3 span, .gallery-heading span { font-size: 20px; color: #0878dc; }
.info-panel dl { margin: 0; }
.info-panel dl > div { display: grid; grid-template-columns: 82px 1fr; gap: 6px; padding: 7px 0; border-top: 1px solid #edf2fa; font-size: 11px; }
.info-panel dt { font-weight: 800; }
.info-panel dd { margin: 0; }
.check-list { display: flex; flex-direction: column; gap: 4px; }
.check-list span:before { content: "✓"; color: #0b9d68; font-weight: 900; margin-left: 6px; }
.tech-tags { display: flex; gap: 7px; flex-wrap: wrap; }
.tech-tags span { background: #e2efff; color: #16477e; border-radius: 18px; padding: 3px 11px; font-size: 10px; font-weight: 700; }

.project-gallery { border: 1px solid #d3e3fa; border-radius: 12px; padding: 15px; background: linear-gradient(145deg, #fff, #f8fbff); display: grid; grid-template-columns: minmax(0, 1fr) 140px; grid-template-rows: auto 1fr; gap: 12px; }
.gallery-heading { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; }
.gallery-heading h3 { margin: 0; }
.gallery-main { border: 0; padding: 0; background: #fff; cursor: zoom-in; min-height: 245px; overflow: hidden; border-radius: 6px; }
.gallery-main img { width: 100%; height: 100%; max-height: 310px; object-fit: contain; }
.gallery-thumbs { display: flex; flex-direction: column; gap: 9px; }
.gallery-thumbs button { padding: 3px; border: 1px solid #d7e4f8; border-radius: 7px; background: #fff; cursor: pointer; height: calc((100% - 18px)/3); min-height: 64px; overflow: hidden; }
.gallery-thumbs button.is-selected { border: 2px solid #0878dc; }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.project-story { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 16px; margin-bottom: 18px; }
.story-card { border: 1px solid #d5e4fa; border-radius: 11px; background: linear-gradient(135deg, #fff, #f5f9ff); padding: 14px 18px; }
.story-card h3 { font-size: 15px; margin: 0 0 5px; display: flex; align-items: center; gap: 8px; }
.story-card h3 span { font-size: 22px; color: #0878dc; }
.story-card h3 .question-mark { color: #dc3545; }
.story-card p { font-size: 12px; line-height: 2; margin: 0; }

.project-results { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; align-items: center; padding: 14px 20px; border: 1px solid #d4e4fa; border-radius: 12px; background: linear-gradient(100deg, #e5f0ff, #f7faff); }
.results-copy h2 { font-size: 19px; margin: 0 0 5px; }
.results-copy p { font-size: 11px; line-height: 1.9; margin: 0; }
.result-stats { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; }
.result-stats > div { display: flex; flex-direction: column; border-right: 1px solid #d4e3f7; }
.result-stats > div:first-child { border: 0; }
.result-stats b { font-size: 21px; color: #06275f; direction: ltr; }
.result-stats span { font-size: 10px; font-weight: 700; }

.related-projects { padding-top: 24px; padding-bottom: 20px; }
.related-projects .section-heading { margin-bottom: 15px; }
.related-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.related-card { border: 1px solid #d5e4fa; border-radius: 10px; padding: 6px; background: #fff; box-shadow: 0 4px 12px rgba(11, 60, 128, .05); text-align: center; }
.related-card img { width: 100%; height: 100px; object-fit: cover; border-radius: 6px; }
.related-card h3 { font-size: 12px; margin: 7px 0 1px; }
.related-card p { font-size: 10px; margin: 0 0 7px; }
.related-card > a { display: inline-flex; align-items: center; gap: 8px; background: #06275f; color: #fff; padding: 4px 14px; border-radius: 18px; font-size: 10px; font-weight: 800; }

.project-contact { margin-bottom: 36px; padding: 20px 28px; border: 1px solid #d4e4fa; border-radius: 12px; background: linear-gradient(100deg, #eaf3ff, #fff); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.project-contact h2 { font-size: 18px; margin: 0 0 4px; }
.project-contact p { font-size: 12px; margin: 0; }

/* ==================== Lightbox ==================== */
.image-lightbox { position: fixed; z-index: 1000; inset: 0; background: rgba(3, 21, 46, .94); display: none; align-items: center; justify-content: center; padding: 40px; }
.image-lightbox.is-open { display: flex; }
.image-lightbox img { max-width: min(1100px, 92vw); max-height: 85vh; object-fit: contain; border-radius: 8px; }
.lightbox-close { position: absolute; top: 18px; left: 24px; border: 0; background: #fff; color: #06275f; width: 42px; height: 42px; border-radius: 50%; font-size: 30px; cursor: pointer; }

/* ============================================================
   نظرات نمونه‌کار (portfolio-single)
   ============================================================ */

/* ==================== لیست نظرات ==================== */
.portfolio-reviews {
    padding-top: 40px;
    padding-bottom: 40px;
}

.portfolio-reviews .section-heading {
    margin-bottom: 25px;
}

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

.review-card {
    display: flex;
    flex-direction: column;
    padding: 18px;
    border: 1px solid #e5edf7;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(9, 39, 92, .05);
    transition: transform .2s, box-shadow .2s;
}

.review-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(9, 39, 92, .1);
}

.review-rating {
    display: flex;
    gap: 2px;
    margin-bottom: 10px;
    font-size: 16px;
}

.review-rating .star-filled { color: #f5a623; }
.review-rating .star-empty  { color: #d4d4d4; }

.review-title {
    font-size: 14px;
    font-weight: 800;
    margin: 0 0 6px;
    color: #06275f;
}

.review-comment {
    font-size: 12px;
    line-height: 2;
    color: #5a6b82;
    margin: 0 0 14px;
    flex: 1;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 9px;
    padding-top: 12px;
    border-top: 1px solid #edf2fa;
    font-size: 11px;
    color: #293e5d;
}

.review-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #0878dc, #06275f);
    color: #fff;
    font-weight: 900;
    font-size: 13px;
    flex-shrink: 0;
}

.review-author small {
    color: #8b96a7;
    margin-right: auto;
    font-size: 10px;
}

/* ==================== فرم ثبت نظر ==================== */
.portfolio-review-form {
    padding-top: 30px;
    padding-bottom: 60px;
}

.review-form-wrapper {
    max-width: 820px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e5edf7;
    border-radius: 14px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(9, 39, 92, .05);
}

.review-form-wrapper .required {
    color: #dc3545;
}

/* کپچا */
.captcha-field {
    grid-column: 1 / -1;
}

.captcha-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}

.captcha-row input {
    flex: 1;
    max-width: 140px;
}

.captcha-refresh {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid #d4e4fa;
    border-radius: 8px;
    background: #fff;
    color: #0878dc;
    font-size: 20px;
    font-weight: 900;
    cursor: pointer;
    transition: all .2s;
    flex-shrink: 0;
}

.captcha-refresh:hover {
    background: #eaf3ff;
    border-color: #0878dc;
    transform: rotate(90deg);
}

.captcha-refresh:disabled {
    opacity: .5;
    cursor: wait;
    transform: none;
}

.captcha-field strong {
    display: inline-block;
    background: #eaf3ff;
    color: #06275f;
    padding: 2px 10px;
    border-radius: 6px;
    font-size: 14px;
    direction: ltr;
    letter-spacing: 1px;
}

/* ==================== ریسپانسیو (همه) ==================== */
@media (max-width: 1000px) {
    .portfolio-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .project-intro { gap: 25px; }
    .project-details { grid-template-columns: 220px minmax(0, 1fr); }
    .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 950px) {
    .reviews-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .subhero { height: 225px; }
    .subhero__art { background-position: 20% center; }
    .subhero__veil { background: linear-gradient(180deg, #f7faff55, #f7faffed 58%, #f7faff); }
    .subhero__inner { align-items: flex-end; padding-bottom: 24px; }
    .subhero__copy, .subhero--project .subhero__copy { width: 100%; text-align: center; border: 0; padding: 0; }
    .subhero__copy h1 { font-size: 25px; }
    .subhero__copy p { font-size: 11px; }
    .breadcrumbs { justify-content: center; margin-top: 9px; }
    .portfolio-filters { gap: 8px; margin-bottom: 20px; }
    .filter-chip { padding: 7px 12px; font-size: 10px; }
    .portfolio-cards { grid-template-columns: 1fr; gap: 14px; }
    .portfolio-card__image { height: 190px; }
    .portfolio-invite { min-height: 220px; }
    .portfolio-cta { grid-template-columns: 1fr; margin-top: 24px; margin-bottom: 24px; }
    .portfolio-cta__visual { height: 130px; }
    .portfolio-cta__content { padding: 17px; text-align: center; }
    .portfolio-cta__content h2 { font-size: 15px; }
    .portfolio-cta__content p { font-size: 10px; }
    .project-intro { grid-template-columns: 1fr; gap: 18px; padding-top: 22px; }
    .project-preview { order: 2; }
    .project-preview img { height: 190px; }
    .project-intro__copy { order: 1; text-align: center; }
    .project-intro__copy h2 { font-size: 19px; }
    .project-intro__copy h2:after { display: none; }
    .project-intro__copy p { text-align: right; font-size: 11px; }
    .project-details { grid-template-columns: 1fr; gap: 12px; }
    .project-gallery { grid-template-columns: 1fr; grid-template-rows: auto auto auto; }
    .gallery-heading { grid-column: auto; }
    .gallery-main { min-height: 190px; }
    .gallery-main img { max-height: 230px; }
    .gallery-thumbs { flex-direction: row; }
    .gallery-thumbs button { height: 75px; min-height: 0; flex: 1; }
    .project-story { grid-template-columns: 1fr; gap: 10px; }
    .project-results { grid-template-columns: 1fr; text-align: center; gap: 12px; }
    .result-stats b { font-size: 18px; }
    .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .project-contact { flex-direction: column; text-align: center; padding: 18px; }
    .project-contact h2 { font-size: 15px; }
    .project-contact p { font-size: 10px; }

    /* نظرات در موبایل */
    .reviews-grid { grid-template-columns: 1fr; gap: 12px; }
    .review-form-wrapper { padding: 20px; }
    .review-card { padding: 16px; }
    .portfolio-reviews { padding-top: 25px; padding-bottom: 25px; }
    .portfolio-review-form { padding-top: 20px; padding-bottom: 40px; }
}

@media (max-width: 420px) {
    .portfolio-card__image { height: 165px; }
    .portfolio-card__body { padding: 12px; }
    .portfolio-card__body h3 { font-size: 13px; }
    .portfolio-card__body p { font-size: 10px; }
    .related-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .related-card img { height: 85px; }
    .related-card h3 { font-size: 10px; }
    .related-card p { font-size: 9px; }
    .result-stats b { font-size: 16px; }
    .result-stats span { font-size: 9px; }
}