﻿:root {
    --site-main: #DAD544;
    --bs-primary: var(--site-main);
    --main: var(--site-main);
    --second: #012e71;
    --accent: #f93d52;
    --dropdown-bg: #fff;
    --dropdown-shadow: rgba(0,0,0,0.1);
    --footer-start: #004cb9;
    --footer-end: #00255e;
    --backColor: #E8F5FF;
}

/* The following rules are deprecated. */

@font-face {
    font-family: 'Titr';
    src: url('titr.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

* {
    font-family: 'Vazirmatn', sans-serif;
}

body {
    background: var(--backColor);
}

.slim-header {
    background: var(--main);
    height: 56px;
    display: flex;
    align-items: center;
    padding: 0 .75rem;
}

    .slim-header .left,
    .slim-header .center,
    .slim-header .right {
        display: flex;
        align-items: center;
    }

    .slim-header .left {
        order: 1;
    }

        .slim-header .left .logo-frame {
            width: 6.572em;
            height: 6.572em;
            padding: .7143em;
            background: #002051;
            background: var(--color-main);
            border-radius: 50%;
            z-index: 9;
            margin-top: 55px;
            background: white;
            border-style: solid;
            border-width: 10px;
            border-color: var(--main);
        }

            .slim-header .left .logo-frame img {
                width: 100%;
            }

        .slim-header .left span {
            color: #fff;
            font-weight: 600;
            font-size: .9rem;
        }

    .slim-header .center {
        flex: 1;
        order: 2;
        justify-content: center;
    }

        .slim-header .center span {
            color: #fff;
            font-weight: 600;
        }

    .slim-header .right {
        order: 3;
    }

        .slim-header .right span,
        .slim-header .right i {
            color: #fff;
            margin-left: 1rem;
            cursor: pointer;
        }

#navMain {
    padding-right: 300px;
}
/* Main navbar */
.navbar {
    background: var(--second) !important;
    font-size: small;
    position: relative;
}

.navbar-nav .nav-link {
    color: #fff !important;
}

    .navbar-nav .nav-link:hover {
        color: var(--accent) !important;
    }

.nav-item {
    text-wrap-mode: nowrap;
}

.navbar-nav .dropdown-menu {
    background: var(--dropdown-bg);
    border-radius: .75rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    padding: .5rem 0;
}

.fixed-link {
    position: absolute;
    top: 50%;
    right: 120px;
    transform: translateY(-50%);
    z-index: 1000;
    text-wrap: auto;
}

.fixed-link-Left {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
}

.container {
    padding-left: 15px;
}

.dropdown-item {
    font-size: 0.9rem;
    padding: .5rem 1rem;
    transition: background 0.2s ease-in-out;
    text-align: right;
}

    .dropdown-item:hover {
        background: var(--accent);
        color: white;
    }

.dropdown-menu::before {
    content: "";
    position: absolute;
    top: -7px;
    right: 1rem;
    width: 14px;
    height: 14px;
    background: #fff;
    transform: rotate(45deg);
    box-shadow: -2px -2px 2px rgba(0,0,0,0.05);
}

.nav-link.active, .dropdown-item.active {
    color: var(--accent) !important;
}

    .nav-link.active::after {
        content: "";
        display: block;
        height: 3px;
        width: 100%;
        background: #ffc000;
        margin-top: 2px;
    }
/* Hero */
.hero {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding-left: 5%;
    padding-top: 5%;
}

.heroh1 {
    position: relative;
    z-index: 3;
    color: #fff;
    font-size: 3rem;
    text-shadow: 1px 1px 3px black;
    max-width: 600px;
    text-align: right;
    color: gold;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin: 85px;
}

.hero .slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: opacity 1s ease-in-out;
}

    .hero .slide.current {
        z-index: 1;
        opacity: 1;
    }

    .hero .slide.next {
        z-index: 2;
        opacity: 0;
    }



@media (max-width: 576px) {
    .hero {
        padding: 0 1rem !important;
    }

        .hero h1 {
            max-width: 100%;
            display: block !important;
            -webkit-line-clamp: unset;
            overflow: visible;
            text-align: center;
            font-size: 2rem;
            line-height: 1.3;
        }

    .fixed-link {
        font-size: small;
    }
}
/* About */
#about {
    background: var(--second);
    color: #fff;
    padding: 4rem 0;
    margin: 3rem 0;
}

    #about h2 {
        color: #ffc000;
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    #about p {
        line-height: 1.8;
        font-size: 1.1rem;
        text-align: justify;
    }

    #about ol {
        margin-top: 1rem;
        padding-inline-start: 1.2rem;
    }

    #about li {
        margin-bottom: .8rem;
    }

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    transition: .3s;
}

#multimedia {
    padding: 4rem 0;
    background: #ffffff;
}

.section-title {
    display: inline-block;
    padding: .75rem 1.25rem;
    border-radius: 50px;
    background: var(--site-main);
    color: white;
    text-shadow:1px 1px 2px black;
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 2rem;
    width: 500px;
    text-align: center;
}

@media (max-width: 768px) {
    .section-title {
        width: 100%;
    }

    .heroh1 {
        margin: 0;
        padding: 0;
        right: 5%;
        top: 5%;
    }

    .custom-carousel {
        height: 400px;
    }

    .serviceItems {
        width: 200px;
    }

    .container {
        padding-left: 10px;
        padding-right: 0;
    }

    #navMain {
        padding-left: 0;
    }
}

#multimedia .card {
    border: none;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    transition: transform .3s ease, box-shadow .3s ease;
}

    #multimedia .card:hover {
        transform: translateY(-8px);
        box-shadow: 0 12px 32px rgba(0,0,0,0.15);
    }

#multimedia .card-body {
    position: relative;
    padding: 0;
}

#multimedia .media-thumb {
    width: 100%;
    height: 0;
    padding-top: 56.25%; /* 16:9 ratio */
    background-size: cover;
    background-position: center;
}

#multimedia .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .3s;
}

    #multimedia .play-button:hover {
        background: rgba(0,0,0,0.8);
    }

    #multimedia .play-button i {
        font-size: 2rem;
        color: #fff;
    }

#multimedia .card-footer {
    background: #fff;
    padding: 1rem 1.25rem;
    text-align: center;
}

    #multimedia .card-footer h5 {
        margin-bottom: .5rem;
        font-weight: 600;
    }

    #multimedia .card-footer p {
        margin-bottom: 0;
        color: #555;
        font-size: .95rem;
    }

.mission {
    background: var(--backColor);
}
/* Footer */
footer {
    background: linear-gradient(90deg, var(--footer-start), var(--footer-end));
    color: #ccc;
    padding: 2rem 0;
    border-top: 3px solid var(--accent);
}

    footer a {
        color: #fff;
        text-decoration: none;
    }

.news {
    background: var(--backColor);
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.news-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: #fff;
    padding: 1rem;
    border-radius: .75rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .news-item {
        flex-direction: column !important;
    }
}

.news-image img {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: .5rem;
    object-fit: cover;
    cursor: pointer;
}

.news-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

    .news-text h5 {
        margin-bottom: .75rem;
        text-align: center;
    }

.news-item:nth-child(odd) {
    flex-direction: row-reverse;
}

.text-collapse {
    position: relative;
    max-height: 4.2em;
    overflow: hidden;
    transition: max-height 0.4s ease;
    text-align: justify;
}

    .text-collapse::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 1.5em;
        background: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,1));
        pointer-events: none;
    }

    .text-collapse.expanded {
        max-height: 100vh;
    }

        .text-collapse.expanded::after {
            display: none;
        }

.toggle-btn {
    align-self: flex-start;
    background: none;
    border: none;
    color: var(--accent);
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-top: auto;
}

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

    .lightbox-overlay img {
        max-width: 90%;
        max-height: 90%;
        border-radius: .5rem;
        background-color: #fff;
    }

    .lightbox-overlay:focus,
    .lightbox-overlay:focus-visible {
        outline: none;
    }

.custom-carousel {
    width: 95%;
    margin: 2rem auto;
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

    /* ارتفاع ثابت برای همهٔ آیتم‌ها */
    .custom-carousel .carousel-inner,
    .custom-carousel .carousel-item {
        height: 500px;
    }

    /* کنترل تصویر */
    .custom-carousel .slide-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        border-radius: 0.75rem;
    }

    /* اندیکاتورها */
    .custom-carousel .carousel-indicators {
        bottom: 10px;
    }

        .custom-carousel .carousel-indicators button {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background-color: rgba(255, 255, 255, 0.7);
            border: none;
            margin: 0 6px;
            transition: all 0.3s;
        }

        .custom-carousel .carousel-indicators .active {
            background-color: var(--bs-primary);
            opacity: 1;
            transform: scale(1.3);
            box-shadow: 0 0 4px var(--bs-primary);
        }

    /* کپشن (متن روی تصویر) */
    .custom-carousel .carousel-caption {
        position: absolute;
        bottom: 20px;
        right: 20px;
        left: 20px;
        background: rgba(0,0,0,0.5);
        padding: 1rem;
        border-radius: 0.75rem;
    }

        .custom-carousel .carousel-caption h1 {
            font-size: 1.8rem;
            line-height: 1.3;
            color: #fff;
            text-shadow: 1px 1px 2px #000;
            margin: 0;
        }

.services-section {
    background: linear-gradient(90deg, var(--second) 0%, var(--main) 100%);
}

.row.align-items-stretch {
}

.services-section {
    background: linear-gradient(90deg, var(--second) 0%, var(--main) 100%);
}

.service-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(255,255,255,0.1);
    border-radius: 0.75rem;
    text-decoration: none;
    transition: background 0.3s, transform 0.3s;
    color: #fff;
}

    .service-card i {
        font-size: 3rem;
        color: var(--accent);
    }

    .service-card p {
        margin: 0;
        font-weight: 500;
    }

    .service-card:hover {
        background: rgba(255,255,255,0.2);
        transform: translateY(-5px);
    }

.service-card-wrapper {
    width: calc(100% / 8 - 0.5rem); /* یا حدود 13.8% */
    min-width: 120px;
}


#news-section {
    background: var(--backColor);
}

.custom-news-card img {
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

    .custom-news-card img:hover {
        transform: scale(1.02);
    }

.modal-backdrop.show {
    opacity: 0.85;
    background-color: #000;
}

.service-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(2px);
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.3s, box-shadow 0.3s;
    text-shadow: 1px 1px 2px black;
    margin: 0 0.5rem;
    height: 150px;
}

    .service-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    }

/* Overlay برای MD+ */
.services-overlay {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0 1rem;
    z-index: 5;
}

    .services-overlay .container {
        background: transparent;
        backdrop-filter: none;
        box-shadow: none;
        padding: 0;
    }

/* Block برای SM & XS */
.services-below {
    position: static;
    padding: 0 1rem;
}


/* هماهنگ‌سازی کلاس‌های متداول با رنگ اصلی */
.text-success {
    color: var(--site-main) !important;
}
a.nav-link, .nav-link {
    color: var(--site-main);
}
.section-title {
    color: white;
}
/* دکمه‌های primary از متغیر بوت‌استرپ استفاده می‌کنند */
