@font-face {
    font-family: IranNastaliqfont;
    src: url(../assets/fonts/IranNastaliq.ttf);
}

@font-face {
    font-family: Shabnam;
    src: url(../assets/fonts/Shabnam.ttf);
}

body {
    font-family: 'Vazir', sans-serif;
    background-color: #f3f4f6;
    margin: 0;
    padding: 0;
    direction: rtl;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensures the body takes full height */
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0;
    flex: 1; /* Allows the container to grow and fill the space */
}

header {
    box-sizing: content-box;
    background-color: #00264d;
    color: white;
    padding: 0 0px 20px 0px;
    text-align: center;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-bottom: 3px solid #ffcc00;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    height: 200px;
}

header .masthead {
    background-color: #00162d;
    width: 100%;
    height: 40px;
    margin: 0 0 30px;
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 2px solid #ffcc00;
    border-radius: 0 0 20px 20px;
    align-items: center;
}

header .masthead > div:first-child {
    margin-left: auto;
}

header .masthead > div:last-child {
    margin-right: auto;
}

header .masthead .timeanddate p {
    font-family: "Shabnam", serif;
}

header .masthead .timeanddate {
    display: inline-flex;
    padding-right: 10px;
    margin: 0;
}

header .masthead .timeanddate p {
    margin: 5px 0;
}

header .masthead .icons {
    display: inline-flex;
    gap: 20px;
    color: white;
    padding-left: 10px;
}

header .masthead .masthead-search input {
    width: 300px;
    padding: 8px 12px;
    border: 2px solid #00162d;
    border-radius: 8px;
    font-family: 'Vazir', sans-serif;
    font-size: 1em;
    transition: all 0.3s ease;
    height: 35px;
    background-color: #f0f0f0;
    color: #00162d;
}

header .masthead .masthead-search input:focus {
    border-color: #ffcc00;
    box-shadow: 0 0 8px rgba(255, 204, 0, 0.7);
    outline: none;
    background-color: #ffffff;
}

header .masthead .masthead-search button {
    padding: 0 8px;
    background-color: #00162d;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 20px;
}

header .masthead .masthead-search button:hover {
    color: #ffcc00;
}

header .masthead a {
    color: white;
}

header .masthead a:hover {
    color: #ffcc00;
    transition: all 0.3s ease;
}

header .header-logo h1 {
    font-size: 3em;
    margin: 0;
    font-family: IranNastaliqfont, serif;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.4);
    line-height: 1.8;
}

header .header-logo {
    padding: 8px 0 0 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

header .container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    max-height: 145px;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: space-between;
    gap: 30px;
}

nav ul li a {
    font-family: 'Vazir', sans-serif;
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 10px 15px;
    border-radius: 5px;
    position: relative;
    transition: all 0.3s ease;
}

nav ul li a:hover {
    color: #ffcc00;
    transform: scale(1.1);
}

nav ul li a::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background-color: #ffcc00;
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

.news-section {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.news-item, .all-news-item {
    background-color: white;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    width: 30%;
    transition: transform 0.3s ease;
    margin: 10px;
}

.news-item:hover {
    transform: translateY(-5px);
}

.news-item img, .all-news-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    transition: transform 0.5s ease, filter 0.5s ease;
    filter: blur(1.5px);
}

.news-item img:hover {
    transform: scale(1.05);
    filter: blur(0);
}

.news-item h3 {
    font-size: 1.5em;
    color: #004080;
    margin-bottom: 10px;
    text-align: justify;
}

.news-item p {
    font-size: 1em;
    color: #555;
}

.news-item a {
    text-decoration: none;
    color: #004080;
    transition: color 0.3s ease;
}

.news-item a:hover {
    color: #ffcc00;
}

.content-wrapper {
    display: flex;
    margin-top: 20px;
    flex: 1;
    width: 100%;
}

.main-content {
    width: 100%;
    background-color: white;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.main-content .news-image {
    width: 100%;
    height: auto;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 500px;
}

.main-content .news-date {
    font-size: 0.9em;
    color: #888;
    margin-bottom: 10px;
    display: inline;
    text-align: left;
}

.main-content .news-title {
    font-size: 2em;
    color: #004080;
    margin-bottom: 15px;
    display: inline;
}

.main-content p {
    font-size: 1em;
    color: #555;
    line-height: 1.5;
    margin-bottom: 15px;
    text-align: justify;
}

a {
    text-decoration: none;
    color: #004080;
    transition: color 0.3s ease;
}

.sidebar {
    width: 25%;
    background-color: #fefefe;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    margin-right: 10px;
    margin-left: -3.5%;
}

.sidebar h3 {
    color: #004080;
    font-size: 1.5em;
    margin: 0 0 10px 0;
    padding: 0 10px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.sidebar h3:hover {
    color: #004080;
    text-shadow: 2px 2px 6px #ffcc00;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    margin-bottom: 10px;
    align-items: center;
}

.sidebar ul li a {
    text-decoration: none;
    color: #004080;
    font-weight: bold;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.sidebar ul li a:hover {
    color: #ffcc00;
}

footer {
    background-color: #00264d;
    color: white;
    padding: 40px 20px;
    text-align: center;
    font-size: 1em;
    position: relative;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-top: 4px solid #ffcc00;
    margin: 20px auto 0;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1000px;
    margin: 0 auto;
    padding-bottom: 30px;
}

.footer-section {
    flex: 1;
    margin: 20px;
    min-width: 220px;
}

.footer-section h3 {
    margin-bottom: 15px;
    font-size: 20px;
    color: #ffcc00;
}

.footer-section p {
    font-size: 15px;
    line-height: 1.8;
    margin: 0;
}

.footer-section #quote {
    font-size: 15px;
    line-height: 1.8;
    margin: 0;
    text-align: justify;
}

.footer-section .notjustify {
    text-align: center;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #ecf0f1;
    text-decoration: none;
    font-size: 15px;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #e74c3c;
}

.social-icons a img {
    width: 35px;
    height: 35px;
    margin-right: 15px;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    text-align: center;
    display: grid;
}

.footer-bottom p {
    font-size: 15px;
    text-align: center;
}

iframe {
    display: block;
    margin: 0 auto;
}

.icon-container {
    position: relative;
    width: 3.5rem;
    height: 3.5rem;
    text-align: center;
    overflow-x: visible;
    overflow-y: hidden;
}

.icon-background {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 3.5rem;
    height: 3.5rem;
    background: none;
    border-radius: 50%;
    position: absolute;
    top: 0;
    color: white;
    transition: all 0.3s ease;
}

p {
    line-height: 1.6;
    text-align: justify;
}

.about-section p {
    margin-left: 50px;
    text-align: justify;
}

.about-section img {
    border-radius: 5px;
    max-width: 500px;
    display: block;
    margin: 0 auto;
}

.left {
    left: 10px;
}

.right {
    right: 10px;
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    font-size: 25px;
    color: black;
    padding: 15px;
    transform: translateY(-50%);
    user-select: none;
    border-radius: 5px;
}

.prev {
    left: 10px;
}

.next {
    right: 10px;
}

.btn {
    display: grid;
    place-items: center;
    background: none;
    padding: 0.5em;
    border-radius: 10px;
    border: 0;
    cursor: pointer;
    transition: transform 0.5s;
}

.btn:hover {
    transform: translateY(0.5em);
}

.social-icons {
    position: relative;
}

.icon-label {
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    position: absolute;
    bottom: 70%;
    left: 40%;
    transform: translate(-50%, 10px);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    font-size: 1.2em;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.btn:hover .icon-label {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.all-news-section h1 {
    text-align: center;
    font-size: 250%;
}

.all-news-item {
    width: 100%;
    display: flex;
}

.all-news-item img {
    width: 100%;
    max-width: 100px;
    height: auto;
    border-radius: 8px;
    transition: transform 0.5s ease, filter 0.5s ease;
    filter: blur(1.5px);
    margin-left: 20px;
}

.all-news-item img:hover {
    transform: scale(1.05);
    filter: blur(0);
}

.read-more {
    text-align: right;
    margin-right: 90%;
}

.read-more a {
    background: none;
    color: #004080;
    display: inline-block; /* اضافه کردن این خط برای جلوگیری از انباشته شدن */
}

.read-more a:hover {
    text-decoration: underline;
}

#loading-screen {
    position: fixed;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    background: white;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.5s ease;
    flex-direction: column;
}

.hidden {
    opacity: 0;
    pointer-events: none;
}