/*GENERAL STYLE*/

body {
    font-family: 'Open Sans', serif;
    padding-top: 54px;
    color: #868e96;
}

@media (min-width: 992px) {
    body {
        padding-top: 0;
        padding-left: 17rem;
    }
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Saira Extra Condensed', serif;
    font-weight: 700;
    text-transform: uppercase;
    color: #343a40;
}

h1 {
    font-size: 6rem;
    line-height: 5.5rem;
}

h2 {
    font-size: 3.5rem;
}

a {
    color: #2196f3;
}

a:hover,
a:focus,
a:active {
    color: #0f72c1;
}

.subheading {
    text-transform: uppercase;
    font-weight: 500;
    font-family: 'Saira Extra Condensed', serif;
    font-size: 1.35rem;
}


/*==================================================
                  SOCIAL-ICON
====================================================*/

.list-social-icons a {
    color: #495057;
}

.list-social-icons a:hover {
    color: #2196f3;
}

.list-social-icons a .fa-lg {
    font-size: 1.75rem;
}

.list-icons {
    font-size: 3rem;
}

.list-icons .list-inline-item i:hover {
    color: #2196f3;
}


/*==================================================
                    NAV-BAR
====================================================*/

#sideNav .navbar-nav .nav-item .nav-link {
    font-weight: 600;
    text-transform: uppercase;
}

@media (min-width: 992px) {
    #sideNav {
        text-align: center;
        position: fixed;
        top: 0;
        left: 0;
        display: flex;
        flex-direction: column;
        width: 17rem;
        height: 100vh;
    }
    #sideNav .navbar-brand {
        display: flex;
        margin: auto auto 0;
        padding: 0.5rem;
    }
    #sideNav .navbar-brand .img-profile {
        max-width: 10rem;
        max-height: 10rem;
        border: 0.5rem solid rgba(255, 255, 255, 0.2);
    }
    #sideNav .navbar-collapse {
        display: flex;
        align-items: flex-start;
        flex-grow: 0;
        width: 100%;
        margin-bottom: auto;
    }
    #sideNav .navbar-collapse .navbar-nav {
        flex-direction: column;
        width: 100%;
    }
    #sideNav .navbar-collapse .navbar-nav .nav-item {
        display: block;
    }
    #sideNav .navbar-collapse .navbar-nav .nav-item .nav-link {
        display: block;
    }
}


/*==================================================
                  BUTTON (Generic)
====================================================*/

.btn-general {
    background-color: transparent;
    text-align: center;
    border-width: 1px;
    border-radius: 0px;
    font-size: 16px;
    padding: 10px 15px;
    font-weight: 400;
    text-transform: uppercase;
}

.btn-white {
    border-color: #2196f3;
    background-color: #2196f3;
    color: #fff;
}

.btn-white:hover,
.btn-white:focus {
    background-color: transparent;
    color: #2196f3;
    cursor: pointer;
}

.btn-green {
    border-color: #2196f3;
    color: #2196f3;
}

.btn-green:hover,
.btn-green:focus {
    background-color: #2196f3;
    color: #fff;
    cursor: pointer;
}


/*==================================================
                  SECTION (Generic)
====================================================*/

.heading-border {
    width: 60px;
    height: 10px;
    background-color: #2196f3;
    margin: 0 auto 20px auto;
}

section.resume-section {
    border-bottom: 1px solid #dee2e6;
    padding-top: 5rem !important;
    padding-bottom: 5rem !important;
}

section.resume-section .resume-item .resume-date {
    min-width: none;
}

@media (min-width: 768px) {
    section.resume-section {
        min-height: 100vh;
    }
    section.resume-section .resume-item .resume-date {
        min-width: 18rem;
    }
}

@media (min-width: 992px) {
    section.resume-section {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
}

.bg-primary {
    background-color: #2196f3 !important;
}

.text-primary {
    color: #2196f3 !important;
}


/*==================================================
                      ABOUT
====================================================*/

#about {
    background-image: url(../img/profile-banner.jpg);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

#about h1 {
    /*font-size: 100%;*/
}


/*==================================================
                    EXPERIENCE
====================================================*/

#experience {
    background: #f5f5f5;
}

#experience .card h4 {
    font-family: 'Roboto Condensed', sans-serif;
    text-transform: none;
    color: #555;
}


/*==================================================
                 PORTFOLIO STYLE 
====================================================*/

#portfolio {
    padding: 80px 0;
    background-color: #fff;
}

.port-head-cont {
    margin: 20px auto 40px auto;
    text-align: center;
}

.port-head-cont button {
    margin: 5px 2px;
}


/* فاصله آیتم‌ها */

#portfolio .portfolio-item {
    padding: 0 10px;
}


/* --- استایل کارت‌ها (بدون دستکاری مودال) --- */

#portfolio .portfolio-item .portfolio-link {
    position: relative;
    display: block;
    max-width: 400px;
    margin: 0 auto;
    cursor: pointer;
    /* زیبایی بصری */
    border-radius: 15px;
    /* گوشه‌های گرد */
    overflow: hidden;
    /* مهم برای اینکه عکس از کادر بیرون نزند */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    /* سایه */
    transition: all 0.3s ease;
    border: 1px solid #eee;
}


/* افکت هاور */

#portfolio .portfolio-item .portfolio-link:hover {
    transform: translateY(-5px);
    /* بالا آمدن */
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
}


/* لایه آبی رنگ روی عکس */

#portfolio .portfolio-item .portfolio-link .caption-port {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-transition: all ease 0.5s;
    transition: all ease 0.5s;
    opacity: 0;
    background: rgba(33, 150, 243, 0.85);
    /* چون لایه والد overflow:hidden دارد، نیازی به radius اینجا نیست اما محض احتیاط: */
    border-radius: 10px;
}

#portfolio .portfolio-item .portfolio-link .caption-port:hover {
    opacity: 1;
}


/* تنظیمات آیکون ذره‌بین */

#portfolio .portfolio-item .portfolio-link .caption-port .caption-port-content {
    font-size: 20px;
    position: absolute;
    top: 50%;
    width: 100%;
    height: 20px;
    margin-top: -12px;
    text-align: center;
    color: white;
}

#portfolio .portfolio-item .portfolio-link .caption-port .caption-port-content i {
    margin-top: -12px;
}


/* تنظیم فاصله در موبایل */

@media (max-width: 767px) {
    #portfolio .portfolio-item {
        margin-bottom: 30px !important;
        /* فاصله قطعی در موبایل */
    }
}


/* --- ترفند نمایش اولویت‌دار آیتم‌های وب --- */

#portfolio .portfolio-item.web {
    order: -1;
    /* این باعث می‌شود آیتم‌های وب اول صف بایستند */
}


/* ---------------------------------------- */

.portfolio-modal .modal-dialog {
    max-width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
    text-align: left;
    border: none;
    border-radius: 0;
    background-clip: border-box;
    -webkit-box-shadow: none;
    box-shadow: none;
}

.portfolio-modal .title-bar {
    padding: 0 0 50px 0;
}

.portfolio-modal .title-bar h1 {
    visibility: initial;
    animation-name: initial;
}

.portfolio-modal .modal-dialog .modal-content {
    padding: 10px 0 100px 0;
    border: 0;
    border-radius: 0;
}

.portfolio-modal .modal-dialog .modal-content img {
    margin-bottom: 30px;
}

.portfolio-modal .modal-dialog .modal-content .item-details {
    margin: 30px 0;
}

.portfolio-modal .close-modal {
    position: absolute;
    top: 25px;
    right: 25px;
    width: 75px;
    height: 75px;
    cursor: pointer;
    background-color: transparent;
}

.portfolio-modal .close-modal:hover {
    opacity: 0.3;
}

.portfolio-modal .close-modal .lr {
    /* Safari and Chrome */
    z-index: 1051;
    width: 1px;
    height: 75px;
    margin-left: 35px;
    /* IE 9 */
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
    background-color: #2C3E50;
}

.portfolio-modal .close-modal .lr .rl {
    /* Safari and Chrome */
    z-index: 1052;
    width: 1px;
    height: 75px;
    /* IE 9 */
    -webkit-transform: rotate(90deg);
    -ms-transform: rotate(90deg);
    transform: rotate(90deg);
    background-color: #2C3E50;
}

.portfolio-modal .modal-backdrop {
    display: none;
    opacity: 0;
}

@media (max-width: 850px) {
    .portfolio-modal .close-modal {
        display: none;
    }
}


/*====================================================
                      SKILLS
======================================================*/

#skills {
    background-image: url("../img/bg-stats.jpg");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.skill-cover {
    background-color: rgba(31, 31, 31, 0.68);
}

.skill-cover h3 {
    font-family: "hind", sans-serif;
    font-size: 35px;
    margin-bottom: 40px;
}

.skill-item {
    padding: 20px 0;
    margin-bottom: 30px;
    background: rgba(144, 144, 144, 0.78);
}

.skill-item i {
    color: #2196f3;
}

.skill-item h2 {
    color: #fff;
    font-size: "hind", sans-serif;
    font-size: 35px;
    font-weight: 700;
    margin-top: 15px;
    margin-bottom: 1px;
}

.skill-item p {
    color: #fff;
    font-family: "hind", sans-serif;
    /*text-transform: uppercase;*/
    font-weight: 300;
    margin-top: 0;
}


/*====================================================
                      AWARD
======================================================*/

#awards {
    background: #f0f0f0;
}

#award-box {
    overflow: hidden;
    position: relative;
    padding: 60px 0;
}

#award-box:before {
    content: "";
    width: 1px;
    height: 100%;
    background: #cfcdcd;
    position: absolute;
    top: 0;
    left: 50%;
}

#award-box .award {
    width: 50%;
    clear: both;
    position: relative;
}

#award-box .award:before,
#award-box .award:after {
    content: "";
    display: block;
    clear: both;
}

#award-box .award:first-child:before,
#award-box .award:last-child:before {
    content: "";
    width: 11px;
    height: 11px;
    background: #cfcdcd;
    box-sizing: content-box;
    border: 5px solid #fff;
    box-shadow: 0 0 0 2px #cfcdcd;
    position: absolute;
    top: -54px;
    right: -11px;
    transform: rotate(45deg);
}

#award-box .award:last-child:before {
    top: auto;
    bottom: -54px;
}

#award-box .award:last-child:nth-child(even):before {
    right: auto;
    left: -11px;
}

#award-box .award-icon {
    width: 24px;
    height: 24px;
    background: #fff;
    border: 1px solid #cfcdcd;
    position: absolute;
    top: 17px;
    right: -13px;
    z-index: 1;
    transform: rotate(45deg);
}

#award-box .award-icon:before {
    content: "";
    display: block;
    width: 15px;
    height: 15px;
    background: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: background-color 0.2s ease 0s;
}

#award-box .award:hover .award-icon:before {
    background: #39b3ff;
}

#award-box .award-content {
    width: 85%;
    padding: 18px 30px;
    background: #fff;
    text-align: right;
    float: left;
    border: 1px solid transparent;
    position: relative;
    transition: all 0.3s ease 0s;
}

#award-box .award:hover .award-content {
    border: 1px solid #cfcdcd;
}

#award-box .award-content:before {
    content: "";
    display: block;
    width: 14px;
    height: 14px;
    background: #fff;
    border: 1px solid #cfcdcd;
    position: absolute;
    top: 21px;
    right: -7.3px;
    transform: rotate(45deg);
    transition: all 0.2s ease 0s;
}

#award-box .award:hover .award-content:before {
    background: #39b3ff;
    border-color: #39b3ff;
}

#award-box .award-content:after {
    content: "";
    width: 11%;
    height: 1px;
    background: #cfcdcd;
    position: absolute;
    top: 28px;
    right: -14%;
}

#award-box .date {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #39b3ff;
    margin: 0 0 8px;
    transition: all 0.3s ease 0s;
}

#award-box .award:hover .date {
    color: #444;
}

#award-box .title {
    font-size: 18px;
    color: #444;
    margin-top: 0;
    transition: all 0.3s ease 0s;
}

#award-box .award:hover .title {
    color: #39b3ff;
}

#award-box .description {
    font-size: 16px;
    color: #777;
    line-height: 28px;
    margin-top: 8px;
}

#award-box .award:nth-child(2n),
#award-box .award:nth-child(2n) .award-content {
    float: right;
    text-align: left;
}

#award-box .award:nth-child(2n) .award-icon {
    right: 0;
    left: -12px;
}

#award-box .award:nth-child(2n) .award-content:before {
    left: -7.3px;
}

#award-box .award:nth-child(2n) .award-content:after {
    left: -14%;
}

@media only screen and (max-width: 767px) {
    #award-box {
        padding-left: 20px;
    }
    #award-box:before {
        left: 20px;
    }
    #award-box .award {
        width: 100%;
    }
    #award-box .award,
    #award-box .award-content {
        float: right;
        padding: 5px;
        text-align: left;
    }
    #award-box .award:first-child:before,
    #award-box .award:last-child:nth-child(odd):before {
        right: auto;
        left: -11px;
    }
    #award-box .award-icon {
        right: 0;
        left: -12px;
    }
    #award-box .award-content:before {
        left: -7.3px;
    }
    #award-box .award-content:after {
        left: -14%;
    }
}


/*====================================================
                   CONTACT
======================================================*/

#contact {
    padding: 50px 0;
}

#contact .contact-cont h3 {
    color: #555;
    font-size: 45px;
}

#contact .contact-cont p {
    padding-right: 20px;
    font-size: 15px;
}

#contact .contact-cont2 address,
#contact .contact-cont2 address a {
    color: #666;
}

.con-form input {
    border-color: #ccc;
    border-radius: 0;
    color: #717171;
    margin-top: 30px;
}

.con-form textarea {
    width: 100%;
    height: 200px;
    margin: 30px 0;
    border-color: #ccc;
    border-radius: 0;
    color: #717171;
}

.contact-side-desc {
    padding-top: 40px;
}

.contact-box-desc h3 {
    color: #555;
}

.contact-box-desc h3 i {
    color: #2196f3;
}

.social-icon-f li {
    display: inline-block;
}

.social-icon-f li i {
    height: 35px;
    width: 35px;
    line-height: 35px;
    border: 2px solid #2196f3;
    text-align: center;
    margin-right: 10px;
    border-radius: 50%;
}

@media(max-width: 767px) {
    #contact-p2 .con-form input {
        margin-bottom: 30px;
    }
    .con-form textarea {
        width: 100%;
        height: 200px;
        margin: 10px 0 30px 0;
        border-color: #ccc;
        border-radius: 0;
        color: #717171;
    }
    .contact-box-desc {
        text-align: center;
    }
    #contact .social-icon-f {
        text-align: center;
    }
}

@media (max-width: 575px) {
    #contact .social-icon-f {
        text-align: center;
    }
}

@media (max-width: 420px) {
    #contact .social-icon-f {
        text-align: center;
    }
}

.map-responsive {
    overflow: hidden;
    padding-bottom: 50%;
    position: relative;
    height: 0;
}

.map-responsive iframe {
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    position: absolute;
}


/*==================================================
                  AWARDS & LIGHTBOX STYLE
====================================================*/

#awards {
    background-color: #f9f9f9;
    /* پدینگ‌ها تنظیم شده تا ارتفاع سکشن کم باشد و بخش دوم دیده شود */
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}

.award-heading {
    font-size: 1.5rem;
    border-left: 5px solid #2196f3;
    padding-left: 15px;
    color: #343a40;
    text-transform: uppercase;
    font-weight: 700;
}


/* --- استایل کارت --- */

.award-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    /* سایه ملایم */
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e1e1e1;
    display: flex;
    flex-direction: column;
}

.award-card:hover {
    transform: translateY(-5px);
    /* حرکت به بالا هنگام موس */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}


/* --- بخش عکس کارت --- */

.award-gallery {
    width: 100%;
    height: 150px;
    /* ارتفاع ثابت و کم برای جمع‌وجور شدن */
    background-color: #f1f1f1;
    border-bottom: 1px solid #eee;
    position: relative;
    cursor: pointer;
    /* نشانگر دست */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.award-gallery img {
    max-height: 90%;
    /* عکس کامل در کادر جا شود */
    max-width: 90%;
    object-fit: contain;
    transition: transform 0.5s ease;
}


/* زوم خفیف روی عکس هنگام هاور */

.award-gallery:hover img {
    transform: scale(1.1);
}


/* آیکون ذره‌بین */

.click-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    /* مخفی در حالت عادی */
    background: rgba(33, 150, 243, 0.85);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    pointer-events: none;
}

.award-gallery:hover .click-hint {
    transform: translate(-50%, -50%) scale(1);
    /* نمایش هنگام هاور */
}


/* --- بخش متن کارت --- */

.award-body {
    padding: 12px 15px;
}

.award-body h5 {
    font-size: 1.1rem;
    color: #2196f3;
    font-weight: 700;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* سه نقطه اگر متن طولانی بود */
}

.award-date {
    font-size: 0.8rem;
    color: #888;
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
}

.award-body p {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0;
    line-height: 1.4;
}


/* --- استایل مودال (پنجره زوم) --- */

.custom-lightbox {
    position: fixed;
    z-index: 10000;
    /* خیلی بالا باشد */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    /* تنظیمات مخفی بودن */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-lightbox.show {
    opacity: 1;
    visibility: visible;
}

.lightbox-image {
    max-width: 90%;
    max-height: 90vh;
    border: 4px solid #fff;
    border-radius: 4px;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.1);
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.custom-lightbox.show .lightbox-image {
    transform: scale(1);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.close-btn:hover {
    color: #2196f3;
}


/* --- اصلاح فاصله کارت‌های Awards در ریسپانسیو --- */

@media (max-width: 991px) {
    /* وقتی صفحه کوچک می‌شود */
    #awards .col-md-6 {
        margin-bottom: 30px !important;
        /* فاصله اجباری */
    }
    /* آخرین آیتم هر ردیف در بوت استرپ */
    #awards .col-md-6:last-child {
        margin-bottom: 0 !important;
    }
}


/*==================================================
           FANTASY MINIMAL CONTACT STYLE
====================================================*/

#contact {
    background-color: #fcfcfc;
    /* سفید خیلی خیلی ملایم */
}

.fantasy-card-link {
    text-decoration: none !important;
    display: block;
    height: 100%;
}


/* استایل کلی کارت */

.fantasy-card {
    background: #ffffff;
    border-radius: 25px;
    /* گوشه‌های خیلی گرد (فانتزی) */
    padding: 30px 15px;
    text-align: center;
    border: 1px solid #f0f0f0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03);
    /* سایه خیلی محو */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* حرکت فنری */
    position: relative;
    overflow: hidden;
    height: 100%;
}


/* هاور روی کارت: بالا آمدن و سایه رنگی */

.fantasy-card-link:hover .fantasy-card {
    transform: translateY(-8px);
}


/* استایل آیکون */

.icon-box {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: inline-block;
    /* انیمیشن معلق بودن دائمی */
    animation: float 3s ease-in-out infinite;
}


/* انیمیشن معلق بودن (Floating) */

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-6px);
    }
    100% {
        transform: translateY(0px);
    }
}


/* متن‌ها */

.fantasy-card h5 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #444;
    margin-bottom: 5px;
}

.fantasy-card p {
    font-size: 0.85rem;
    color: #999;
    margin: 0;
    font-family: 'Open Sans', sans-serif;
}


/* --- رنگ‌بندی اختصاصی برای هر کارت (مینیمال) --- */


/* 1. ایمیل (قرمز ملایم/نارنجی) */

.email-style .icon-box {
    color: #ff6b6b;
}

.fantasy-card-link:hover .email-style {
    box-shadow: 0 15px 30px rgba(255, 107, 107, 0.15);
    border-color: rgba(255, 107, 107, 0.2);
}


/* 2. لینکدین (آبی) */

.linkedin-style .icon-box {
    color: #0077b5;
}

.fantasy-card-link:hover .linkedin-style {
    box-shadow: 0 15px 30px rgba(0, 119, 181, 0.15);
    border-color: rgba(0, 119, 181, 0.2);
}


/* 3. گیت‌هاب (بنفش تیره/سیاه) */

.github-style .icon-box {
    color: #333;
}

.fantasy-card-link:hover .github-style {
    box-shadow: 0 15px 30px rgba(51, 51, 51, 0.15);
    border-color: rgba(51, 51, 51, 0.2);
}


/* 4. تلفن (سبز) */

.phone-style .icon-box {
    color: #2ecc71;
}

.fantasy-card-link:hover .phone-style {
    box-shadow: 0 15px 30px rgba(46, 204, 113, 0.15);
    border-color: rgba(46, 204, 113, 0.2);
}


/* --- اصلاح فاصله در موبایل --- */

@media (max-width: 991px) {
    /* وقتی صفحه کوچک است (موبایل و تبلت) */
    #contact .col-md-6 {
        margin-bottom: 25px !important;
        /* فاصله اجباری 25 پیکسلی */
    }
    /* حذف فاصله از آخرین کارت که نیازی به فاصله پایین ندارد */
    #contact .col-md-6:last-child {
        margin-bottom: 0 !important;
    }
}


/*==================================================
                 SKILLS 3D STYLE (FIXED)
====================================================*/

#skills {
    background-image: url("../img/bg-stats.jpg");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    padding: 0;
}

.skill-overlay {
    background-color: rgba(30, 30, 30, 0.9);
    /* کمی تاریک‌تر برای خوانایی */
    min-height: 100%;
    width: 100%;
    /* پدینگ بالا و پایین برای اینکه محتوا نچسبد */
    padding-top: 60px !important;
    padding-bottom: 60px !important;
}


/* --- اصلاح فاصله ستون‌ها (جلوگیری از روی هم افتادن) --- */

#skills .col-6,
#skills .col-md-6,
#skills .col-lg-3 {
    margin-bottom: 30px !important;
    /* فاصله قطعی */
}


/* --- کانتینر اصلی کارت --- */

.skill-flip-container {
    background-color: transparent;
    width: 100%;
    height: 130px;
    /* ارتفاع مناسب */
    perspective: 1000px;
    cursor: pointer;
}

.skill-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.skill-flip-container:hover .skill-flip-inner {
    transform: rotateY(180deg);
}


/* --- استایل مشترک جلو و عقب --- */

.skill-front,
.skill-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 12px;
    /* گردتر */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}


/* --- جلوی کارت --- */

.skill-front {
    background-color: rgba(255, 255, 255, 0.08);
    /* خیلی شفاف */
    backdrop-filter: blur(5px);
    /* بلور شیشه‌ای */
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.skill-front i {
    color: #2196f3;
}

.skill-front h5 {
    color: #2196f3 !important;
    /* رنگ آبی (همرنگ آیکون) */
    font-size: 0.85rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 1px;
    text-transform: uppercase;
}


/* --- پشت کارت --- */

.skill-back {
    background-color: #2196f3;
    color: white;
    transform: rotateY(180deg);
    border: 1px solid #2196f3;
}

.skill-back span {
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
    padding: 10px;
}


/* --- تنظیمات موبایل --- */

@media (max-width: 576px) {
    .skill-flip-container {
        height: 110px;
        /* ارتفاع کمتر در موبایل */
    }
    .skill-front h5 {
        color: #2196f3 !important;
        /* رنگ آبی (همرنگ آیکون) */
        font-size: 0.85rem;
        font-weight: 700;
        margin: 0;
        letter-spacing: 1px;
        text-transform: uppercase;
    }
    .skill-front i {
        font-size: 2em;
        margin-bottom: 10px !important;
    }
}


/*==================================================
        CERTIFICATES STYLE 
====================================================*/

#certificates {
    background-color: #ffffff;
}

.cert-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    /* سایه کمی ملایم‌تر */
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #eee;
    /* خط طلایی سمت چپ */
    border-left: 4px solid #d4af37;
    /* کمی باریک‌تر شد */
}

.cert-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}


/* --- تغییر سایز عکس (کوچکتر شد) --- */

.cert-img-wrapper {
    position: relative;
    height: 170px;
    /* قبلا 220px بود -> الان 170px */
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
    overflow: hidden;
}

.cert-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}


/* لایه هاور */

.cert-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cert-overlay span {
    color: #fff;
    margin-top: 8px;
    font-size: 0.9rem;
    /* متن کوچکتر */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cert-card:hover .cert-overlay {
    opacity: 1;
}

.cert-card:hover img {
    transform: scale(1.05);
}


/* --- تغییر سایز متن و پدینگ (جمع‌وجورتر) --- */

.cert-body {
    padding: 12px 15px;
    /* پدینگ کمتر شد (قبلا 20px بود) */
    display: flex;
    align-items: center;
}


/* آیکون دایره‌ای کوچکتر */

.cert-icon {
    width: 40px;
    /* قبلا 50px */
    height: 40px;
    /* قبلا 50px */
    background-color: #fcf8e3;
    color: #d4af37;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    /* آیکون کوچکتر */
    margin-right: 12px;
    flex-shrink: 0;
}

.cert-content h5 {
    font-size: 1rem;
    /* فونت تیتر کوچکتر */
    font-weight: 700;
    color: #333;
    margin-bottom: 2px;
    line-height: 1.2;
}

.cert-issuer {
    display: block;
    font-size: 0.85rem;
    color: #2196f3;
    font-weight: 600;
}

.cert-date {
    display: block;
    font-size: 0.75rem;
    color: #999;
    margin-top: 1px;
}

.text-warning {
    color: #ffc107 !important;
}


/* فاصله در موبایل */

@media (max-width: 991px) {
    .cert-card {
        margin-bottom: 20px;
    }
}


/*==================================================
              EDUCATION STYLE (ACADEMIC)
====================================================*/

#education {
    background-color: #fafafa;
    /* پس زمینه کمی متفاوت */
}

.edu-card {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    border-left: 5px solid #2196f3;
    /* خط آبی کلاسیک سمت چپ */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.edu-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}


/* --- استایل عکس مدرک --- */

.edu-img-container {
    position: relative;
    width: 280px;
    /* عرض ثابت برای عکس */
    height: 200px;
    flex-shrink: 0;
    /* جلوگیری از جمع شدن */
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #ddd;
    cursor: pointer;
}

.edu-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.edu-img-container:hover .edu-img {
    transform: scale(1.05);
}


/* لایه هاور ساده */

.edu-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(33, 150, 243, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    color: white;
}

.edu-img-container:hover .edu-overlay {
    opacity: 1;
}


/* --- روبان رسمی (Legalized Ribbon) --- */

.legal-ribbon {
    position: absolute;
    top: 20px;
    left: -25px;
    /* تنظیم دقیق برای گوشه */
    width: 120px;
    height: 30px;
    background: #27ae60;
    /* سبز رسمی */
    color: #fff;
    font-size: 0.65rem;
    font-weight: bold;
    text-align: center;
    line-height: 30px;
    transform: rotate(-45deg);
    /* چرخش کج */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 2;
    letter-spacing: 0.5px;
}


/* --- محتوای متنی --- */

.edu-icon {
    color: #343a40 !important;
    /* رنگ کلاه فارغ التحصیلی مشکی/خاکستری */
    margin-right: 15px;
}

.edu-divider {
    border-top: 1px solid #eee;
    margin: 15px 0;
}

.edu-description p {
    color: #666;
    line-height: 1.7;
    font-size: 0.95rem;
    text-align: justify;
}

.edu-tags .badge {
    padding: 8px 12px;
    margin-right: 5px;
    color: #555;
    font-weight: 500;
    background-color: #f8f9fa;
}


/* --- ریسپانسیو --- */

@media (max-width: 767px) {
    .edu-img-container {
        width: 100%;
        /* در موبایل عکس تمام عرض شود */
        height: 220px;
    }
    .legal-ribbon {
        left: -10px;
        /* تنظیم مجدد روبان در موبایل */
    }
}

.award-gallery {
    background-color: #f8f9fa !important;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    /* ایجاد پدینگ برای اینکه عکس به لبه‌ها نچسبد */
    position: relative;
    overflow: hidden;
}

.award-gallery img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}


/*==================================================
            EDUCATION PROJECT REFERRAL
====================================================*/

.edu-project-referral {
    perspective: 1000px;
}

.project-link-box {
    display: block;
    background: #f0f7ff;
    /* آبی خیلی کمرنگ */
    border: 1px dashed #2196f3;
    /* کادر نقطه چین برای جلب توجه */
    padding: 15px 20px;
    border-radius: 12px;
    text-decoration: none !important;
    transition: all 0.3s ease;
    color: #333;
}

.project-link-box:hover {
    background: #e3f2fd;
    transform: translateX(5px);
    /* حرکت جزیی به سمت راست */
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.1);
    border-style: solid;
}

.project-icon-box {
    width: 40px;
    height: 40px;
    background: #2196f3;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.project-text-box h5 {
    color: #2196f3;
    font-size: 1rem;
    font-weight: 700;
}

.project-text-box p {
    color: #666 !important;
    margin: 0;
}

.arrow-icon {
    color: #2196f3;
    font-size: 1.2rem;
    opacity: 0.5;
}

.project-link-box:hover .arrow-icon {
    opacity: 1;
}
