/* =========================================================
   GLOBAL FONT
========================================================= */
body,
button,
input,
select,
textarea {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* =========================================================
   DOWNLOAD SECTION
========================================================= */
.download-section {
    padding: 60px 0;
}

.download-section h1 {
    margin-bottom: 15px;
}

.download-section p {
    margin-bottom: 35px;
    color: #444;
    line-height: 1.7;
}

/* =========================================================
   SEARCH SECTION (Glass Box)
========================================================= */
.search-section {
    max-width: 900px;
    margin: 40px auto;
    padding: 40px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    line-height: 1.8;
    text-align: center;
}

.search-section h1 {
    margin-bottom: 15px;
    color: #333;
}

.search-section p {
    margin-bottom: 18px;
    color: #555;
}

/* =========================================================
   SEARCH BOX
========================================================= */
.search-box {
    width: 100%;
    max-width: 700px;
    margin: 30px auto 40px;
    display: flex;
    gap: 10px;
}

.search-box input[type="text"] {
    flex: 1;
    padding: 12px 15px;
    font-size: 15px;
    border: 1px solid #bbb;
    border-radius: 8px;
    outline: none;
    transition: 0.25s;
}

.search-box input[type="text"]:focus {
    border-color: #0073ff;
    box-shadow: 0 0 5px rgba(0, 115, 255, 0.05);
}

.search-box button {
    padding: 12px 22px;
    font-size: 15px;
    background: #0073ff;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.25s;
}

.search-box button:hover {
    background: #005fd4;
}

/* =========================================================
   CATEGORY GRID
========================================================= */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

/* =========================================================
   FILE CARD
========================================================= */
.file-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
    transition: 0.3s;
}

.file-card:hover {
    transform: translateY(-6px);
}

.file-card img {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
}

.file-card h3 {
    font-size: 16px;
    margin-bottom: 15px;
    min-height: 45px;
}

/* =========================================================
   CARD BUTTONS
========================================================= */
.card-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.card-buttons a {
    padding: 6px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    transition: 0.3s;
}

.btn-info {
    background: #444;
    color: #fff;
}

/* =========================================================
   DOWNLOAD GRID
========================================================= */
.download-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.download-column h2 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: #333;
}

/* =========================================================
   GLASS COLUMN
========================================================= */
.glass-column {
    width: 100%;
    height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 15px;
}

.items-wrapper {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
}

.view-all-btn {
    display: block;
    text-align: center;
    margin-top: 12px;
    padding: 8px 0;
    text-decoration: none;
    color: #0d6efd;
    font-weight: 600;
    transition: 0.2s;
}

.view-all-btn:hover {
    color: #0048c7;
}

/* =========================================================
   DOWNLOAD ITEMS
========================================================= */
.download-item {
    display: block;
    margin: 6px 0;
    padding: 6px 0;
    text-decoration: none;
    color: #2c3e50;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    transition: 0.2s ease;
}

.download-item:hover {
    color: #0d6efd;
    transform: translateX(4px);
}

/* =========================================================
   TIP / ARTICLE PAGE
========================================================= */
.article-summary {
    background: #f8f8f8;
    border-left: 4px solid #007bff;
    padding: 14px 18px;
    margin: 20px 0;
    line-height: 1.9;
    font-size: 1.05rem;
    color: #333;
}

/* برای فارسی که RTL هست */
html[dir="rtl"] .article-summary {
    border-left: none;
    border-right: 4px solid #007bff;
}

.article-card {
    max-width: 900px;
    margin: 40px auto;
    padding: 40px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    line-height: 1.8;
}

.article-card h1,
.article-card h2,
.article-card h3 {
    color: #0f172a;
    margin: 30px 0 20px;
    border-bottom: 2px solid rgba(72, 72, 72, 0.1);
    padding-bottom: 10px;
}

.article-card p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    text-align: justify;
}

/* Cover Image */
.tip-cover-img {
    width: 100%;
    max-width: 600px;
    display: block;
    margin: 25px auto;
    border-radius: 10px;
    border: #484848 solid 3px;
    box-shadow: 0 4px 30px rgba(59, 130, 246, 0.2);
}

/* Article Date */
.article-date {
    font-size: 14px;
    color: #555;
    margin-bottom: 20px;
}

/* Body Content */
.article-body img {
    max-width: 600px;
    height: auto;
    border-radius: 10px;
    border: #484848 solid 3px;
    margin: 25px auto;
    display: block;
    box-shadow: 0 4px 30px rgba(59, 130, 246, 0.2);
}

.article-body p {
    text-align: justify;
    margin-bottom: 18px;
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 992px) {
    .download-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .download-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .article-card {
        padding: 22px;
        margin: 20px auto;
    }

    .article-card h1 {
        font-size: 20px;
        text-align: center;
    }

    .article-card h2 {
        font-size: 18px;
    }

    .article-body p {
        font-size: 13px;
    }

    .tip-cover-img,
    .article-body img {
        max-width: 280px;
    }
}

@media (max-width: 600px) {
    .download-grid {
        grid-template-columns: 1fr;
    }

    .search-box {
        flex-direction: column;
    }

    .search-box button {
        width: 100%;
    }
}
