* {

    margin: 0;

    padding: 0;

    box-sizing: border-box;

}



body {

    font-family: Vazirmatn, sans-serif;

    background:#f7f7f7;

    color: #333;

    line-height: 1.8;

    overflow-x: hidden;

}



.container {

    margin: 0 auto;

    padding: 20px;

    max-width: 1400px;

}





.main-layout {

    display: flex;

    flex-direction: column; /* پیش‌فرض: موبایل – عمودی */

    gap: 0;

    margin-top: 100px;

}



/* ─── دسکتاپ: دو ستونه ─── */

@media (min-width: 1024px) {

    .container {

        direction: ltr;



    }

    .main-layout {

        flex-direction: row-reverse; /* hero سمت راست، تب‌ها سمت چپ */

        gap: 24px;

        align-items: flex-start;

        margin-top: 100px;

    }



    .hero {

        /* ستون سمت راست – ثابت و چسبنده */

        position:static;

        flex: 0 0 400px;

        

        top: 120px;

        margin-top: 0;

        border-radius: 20px 20px 0 0;

        height: fit-content;

    }



    .tabs-container {

        /* ستون سمت چپ – بقیه فضا */

        flex: 1;

        border-radius: 20px;

        min-width: 0;

        direction: rtl;

    }

}





.hero {

    background: url(../img/back_stat.png), #a70a0a 50% / cover no-repeat;

    color: white;

    padding: 10px 2px;

    text-align: center;

    border-radius: 20px;

    margin-top: 0;

    box-shadow: 0 10px 40px rgba(198, 40, 40, 0.3);

    animation: fadeInDown 0.6s ease;

}



@keyframes fadeInDown {

    from {

        opacity: 0;

        transform: translateY(-30px);

    }

    to {

        opacity: 1;

        transform: translateY(0);

    }

}



.hero-content {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 30px;

    flex-wrap: wrap;

}



.hero-image {

    width: 130px;

    height: 130px;

    border-radius: 50%;

    border: 5px solid white;

    object-fit: cover;

    box-shadow: 0 8px 20px rgba(0,0,0,0.2);

    animation: scaleIn 0.6s ease 0.2s both;

}



@keyframes scaleIn {

    from {

        opacity: 0;

        transform: scale(0.8);

    }

    to {

        opacity: 1;

        transform: scale(1);

    }

}



.hero-text h1 {

    font-size: 2.5rem;

    margin-bottom: 10px;

    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);

}



.hero-text p {

    font-size: 1.2rem;

    opacity: 0.95;

}



.tabs-container {

    background: white;

    border-radius: 0 0 20px 20px;

    box-shadow: 0 5px 30px rgba(0,0,0,0.1);

    overflow: hidden;

    animation: fadeInUp 0.6s ease 0.3s both;

}



@keyframes fadeInUp {

    from {

        opacity: 0;

        transform: translateY(30px);

    }

    to {

        opacity: 1;

        transform: translateY(0);

    }

}









/* ===== باکس صلوات داخل hero ===== */

.salavat-box {

    background: #e0e0e0;

    border-radius: 0;

    padding: 30px 20px;

    text-align: center;

    box-shadow: none;

    animation: fadeInUp 0.6s ease 0.4s both;

    margin-top:5px;

    border-top: 3px solid rgba(255, 255, 255, 0.3);

    border-radius: 30px;

}



.salavat-title {

    color: rgb(73, 73, 73);

    font-size: 1.5rem;

    font-weight: 700;

    margin-bottom: 20px;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 10px;

}



.salavat-icon {

    font-size: 1.8rem;

    animation: float 3s ease-in-out infinite;

}



@keyframes float {

    0%, 100% { transform: translateY(0); }

    50% { transform: translateY(-10px); }

}



.salavat-counter {

    font-size: 2rem;

    font-weight: 800;

    color: rgb(73, 73, 73);

    text-shadow: 0 4px 10px rgba(0,0,0,0.2);

    direction: ltr;

    display: flex;

    align-items: center;

    justify-content: center;

}



.salavat-label {

    color: rgb(73, 73, 73);

    font-size: 1rem;

}



.salavat-buttons {

    display: flex;

    gap: 10px;

    justify-content: center;

    flex-wrap: wrap;

}



.salavat-btn {

    background: white;

    color: #16a34a;

    border: 2px solid white;

    padding: 12px 24px;

    border-radius: 50px;

    font-size: 12px;

    font-weight:400;

    cursor: pointer;

    transition: all 0.3s ease;

    font-family: inherit;

    box-shadow: 0 4px 15px rgba(0,0,0,0.1);

}



.salavat-btn:hover:not(:disabled) {

    background: #f0fdf4;

    transform: translateY(-2px);

    box-shadow: 0 6px 20px rgba(0,0,0,0.15);

}



.salavat-btn:active:not(:disabled) {

    transform: translateY(0);

}



.salavat-btn:disabled {

    opacity: 0.7;

    cursor: not-allowed;

}



.salavat-btn.sending {

    animation: pulse 1s infinite;

}



@keyframes pulse {

    0%, 100% { opacity: 1; }

    50% { opacity: 0.6; }

}



.salavat-btn.success {

    animation: successPulse 0.6s ease;

    background: #dcfce7;

}



@keyframes successPulse {

    0% { transform: scale(1); }

    50% { transform: scale(1.1); background: #bbf7d0; }

    100% { transform: scale(1); }

}



.tabs {

    display: flex;

    background: #f5f5f5;

    border-bottom: 3px solid #c62828;

    flex-wrap: wrap; /* اضافه شد – تا تب‌ها بشکنند */



}



.tabs::-webkit-scrollbar {

    height: 4px;

}



.tabs::-webkit-scrollbar-thumb {

    background: #c62828;

    border-radius: 4px;

}



.tab {

    flex: 1;

    min-width: 120px;

    padding: 18px 20px;

    text-align: center;

    cursor: pointer;

    background: transparent;

    border: none;

    font-family: inherit;

    font-size: 1rem;

    color: #666;

    transition: all 0.3s ease;

    position: relative;

}



.tab:hover {

    background: rgba(198, 40, 40, 0.05);

    color: #c62828;

}



.tab.active {

    background: white;

    color: #c62828;

    font-weight: 600;

}



.tab.active::after {

    content: '';

    position: absolute;

    bottom: -3px;

    left: 0;

    right: 0;

    height: 3px;

    background: #c62828;

    animation: slideIn 0.3s ease;

}



@keyframes slideIn {

    from {

        transform: scaleX(0);

    }

    to {

        transform: scaleX(1);

    }

}



.tab-content {

    display: none;

    padding: 30px;

    animation: fadeIn 0.4s ease;

}



@keyframes fadeIn {

    from {

        opacity: 0;

    }

    to {

        opacity: 1;

    }

}



.tab-content.active {

    display: block;

}



.info-grid {

    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));

    gap: 20px;

}



.info-item {

    background: linear-gradient(135deg, #fff 0%, #fff5f5 100%);

    padding: 20px;

    border-radius: 12px;

    border-right: 4px solid #c62828;

    transition: all 0.3s ease;

}



.info-item:hover {

    transform: translateX(-5px);

    box-shadow: 0 5px 20px rgba(198, 40, 40, 0.15);

}



.info-label {

    color: #c62828;

    font-weight: 600;

    margin-bottom: 8px;

    font-size: 0.95rem;

}



.info-value {

    color: #333;

    font-size: 1.1rem;

}



.biography-text {

    background: linear-gradient(135deg, #fff 0%, #fff5f5 100%);

    padding: 25px;

    border-radius: 12px;

    line-height: 2;

    text-align: justify;

    border-right: 4px solid #c62828;

}



.will-text {

    background: linear-gradient(135deg, #fff9f9 0%, #fff 100%);

    padding: 30px;

    border-radius: 12px;

    line-height: 2.2;

    text-align: justify;

    border: 2px solid #ffebee;

    box-shadow: inset 0 2px 10px rgba(198, 40, 40, 0.05);

    font-size: 1.05rem;

}



.memory-card {

    background: white;

    padding: 25px;

    border-radius: 12px;

    margin-bottom: 20px;

    border-right: 4px solid #c62828;

    box-shadow: 0 3px 15px rgba(0,0,0,0.08);

    transition: all 0.3s ease;

}



.memory-card:hover {

    transform: translateY(-3px);

    box-shadow: 0 8px 25px rgba(198, 40, 40, 0.15);

}



.memory-header {

    display: flex;

    align-items: center;

    gap: 15px;

    margin-bottom: 15px;

    padding-bottom: 15px;

    border-bottom: 1px solid #f5f5f5;

}



.memory-narrator {

    font-weight: 600;

    color: #c62828;

    font-size: 1.1rem;

}



.memory-relation {

    color: #666;

    font-size: 0.9rem;

}



.memory-content {

    line-height: 2;

    text-align: justify;

    color: #444;

}



.empty-state {

    text-align: center;

    padding: 60px 20px;

    color: #999;

}



.empty-state svg {

    width: 80px;

    height: 80px;

    margin-bottom: 20px;

    opacity: 0.3;

}

.blink {

    text-decoration: none;

    cursor: pointer;

    animation: blink 1s infinite;

  }

  

@keyframes blink {

    0%   { opacity: 1; }

    50%  { opacity: 0; }

    100% { opacity: 1; }

  }



@media (min-width: 1024px) {

    .hero-content {

        flex-direction: column;

    }



    .hero-text h1 {

        font-size: 2rem;

    }



    .hero-text p {

        font-size: 1rem;

    }



    .hero-image {

        width: 160px;

        height: 160px;

    }



    .tabs {

        flex-wrap: wrap;

    }



    .tab {

        min-width: 100px;

        font-size: 0.95rem;

    }

}



/* ─── تبلت ─── */

@media (max-width: 1023px) {

    .main-layout {

        margin-top: 100px;

    }



    .hero {

        margin-top: 0;

        border-radius: 20px 20px 0 0;

    }



    .tabs-container {

        border-radius: 0 0 20px 20px;

    }

}





@media (max-width: 768px) {

    .hero-text h1 {

        font-size: 1.8rem;

    }



    .hero-text p {

        font-size: 1rem;

    }



    .hero-image {

        width: 120px;

        height: 120px;

    }



    .tab {

        font-size: 0.9rem;

        padding: 15px 12px;

        min-width: 100px;

    }



    .tab-content {

        padding: 20px;

    }



    .info-grid {

        grid-template-columns: 1fr;

    }



    .container {

        padding: 15px;

    }

}



@media (max-width: 480px) {

    .hero {

        padding: 30px 15px;

        border-radius: 15px;

    }



    .hero-text h1 {

        font-size: 1.5rem;

    }



    .tab {

        font-size: 0.85rem;

        padding: 12px 10px;

        min-width: 90px;

    }

}





  /* ===== بخش ارسال محتوا ===== */

  .contribution-banner {

    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);

    border-top: 4px solid #c82c2c;

    border-bottom: 4px solid #c82c2c;

    padding: 2.5rem 0;

    position: relative;

    overflow: hidden;

}

.contribution-banner::before {

    content: '';

    position: absolute;

    inset: 0;

    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c82c2c' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");

    opacity: .4;

}

.contribution-banner .container { position: relative; z-index: 1; }

.contribution-header {

    display: flex;

    align-items: center;

    gap: 1.5rem;

    margin-bottom: 1.5rem;

    flex-wrap: wrap;

}

.contribution-icon {

    width: 70px; height: 70px;

    background: linear-gradient(135deg, #c82c2c, #f04040);

    border-radius: 50%;

    display: flex; align-items: center; justify-content: center;

    font-size: 2rem;

    flex-shrink: 0;

    box-shadow: 0 0 30px rgba(200,151,44,.4);

}

.contribution-header-text h2 {

    color: #f04040;

    font-size: 1.6rem;

    margin: 0 0 .3rem;

}

.contribution-header-text p {

    color: rgba(51, 52, 58, 0.75);

    margin: 0;

    font-size: .95rem;

}

.contribution-tabs {

    display: flex;

    gap: .75rem;

    margin-bottom: 1.5rem;

    flex-wrap: wrap;

}

.contrib-tab {

    padding: .65rem 1.5rem;

    border-radius: 50px;

    border: 2px solid rgba(200,151,44,.5);

    background: transparent;

    color: #c82c2c;

    cursor: pointer;

    font-size: .95rem;

    transition: all .3s;

    display: flex; align-items: center; gap: .4rem;

}

.contrib-tab.active,

.contrib-tab:hover {

    background:  #ecc352;

    color: #1a1a2e;

    border-color: transparent;

    font-weight: bold;

}

.contrib-form-panel {

    background: rgba(255,255,255,.05);

    border: 1px solid rgba(200,151,44,.2);

    border-radius: 16px;

    padding: 2rem;

    display: none;

}

.contrib-form-panel.active { display: block; }

.contrib-form-grid {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 1rem;

    margin-bottom: 1rem;

}

.contrib-form-grid.full { grid-template-columns: 1fr; }

@media (max-width: 640px) { .contrib-form-grid { grid-template-columns: 1fr; } }

.contrib-field {

    display: flex;

    flex-direction: column;

    gap: .4rem;

}

.contrib-field label {

    color: #c82c2c;

    font-size: .9rem;

    font-weight: bold;

}

.contrib-field input,

.contrib-field textarea,

.contrib-field select {

    background: rgba(255,255,255,.07);

    border: 1px solid rgba(200,151,44,.3);

    border-radius: 8px;

    padding: .75rem 1rem;

    color: rgba(51, 52, 58, 0.75);

    font-size: .95rem;

    transition: border-color .3s;

    width: 100%;

    box-sizing: border-box;

}

.contrib-field input:focus,

.contrib-field textarea:focus,

.contrib-field select:focus {

    outline: none;

    border-color: #c82c2c;

    background: rgba(200,151,44,.07);

}

.contrib-field textarea { resize: vertical; min-height: 130px; }

.contrib-field select option { background: #1a1a2e; }

.file-upload-area {

    border: 2px dashed rgba(200,151,44,.4);

    border-radius: 12px;

    padding: 2rem;

    text-align: center;

    cursor: pointer;

    transition: all .3s;

    background: rgba(200,151,44,.03);

}

.file-upload-area:hover,

.file-upload-area.dragover {

    border-color: #c82c2c;

    background: rgba(200,151,44,.08);

}

.file-upload-area input[type="file"] { display: none; }

.file-upload-icon { font-size: 3rem; margin-bottom: .5rem; }

.file-upload-area p { color: rgba(49, 49, 49, 0.849); margin: .3rem 0; font-size: .9rem; }

.file-upload-area strong { color: #c82c2c; }

.file-preview-list { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: .5rem; }

.file-preview-item {

    background: rgba(200,151,44,.1);

    border: 1px solid rgba(200,151,44,.3);

    border-radius: 8px;

    padding: .4rem .8rem;

    color: #f04040;

    font-size: .85rem;

    display: flex; align-items: center; gap: .4rem;

}

.contrib-submit-btn {

    display: inline-flex;

    align-items: center;

    gap: .6rem;

    background: linear-gradient(135deg, #c82c2c, #f04040);

    color: #ffffff;

    border: none;

    padding: .85rem 2.5rem;

    border-radius: 50px;

    font-size: 1rem;

    font-weight: bold;

    cursor: pointer;

    transition: all .3s;

    margin-top: 1rem;

}

.contrib-submit-btn:hover {

    transform: translateY(-2px);

    box-shadow: 0 8px 25px rgba(54, 54, 54, 0.1);

}

.contrib-alert {

    padding: 1rem 1.5rem;

    border-radius: 10px;

    margin-top: 1rem;

    font-size: .95rem;

    margin-bottom: 10px;

}

.contrib-alert.success {

    background: rgba(34,197,94,.1);

    border: 1px solid rgba(34,197,94,.3);

    color: #4ade80;

}

.contrib-alert.error {

    background: rgba(239,68,68,.1);

    border: 1px solid rgba(239,68,68,.3);

    color: #f87171;

}

.contrib-note {

    color: rgba(40, 38, 41, 0.5);

    font-size: .82rem;

    margin-top: .75rem;

    display: flex;

    align-items: flex-start;

    gap: .4rem;

}



/* ===== سایر استایل‌های اصلی ===== */

.lightbox {

    display: none;

    position: fixed;

    inset: 0;

    background: rgba(0,0,0,.92);

    z-index: 9999;

    align-items: center;

    justify-content: center;

}

.lightbox.open { display: flex; }



/* ===== چندرسانه‌ای ===== */

.media-subtabs {

    display: flex;

    gap: 8px;

    flex-wrap: wrap;

    margin-bottom: 20px;

    border-bottom: 2px solid rgba(255,255,255,.1);

    padding-bottom: 12px;

}

.media-subtab {

    background: rgba(255,255,255,.08);

    border: 1px solid rgba(255,255,255,.15);

    color: #ccc;

    padding: 8px 18px;

    border-radius: 20px;

    cursor: pointer;

    font-family: inherit;

    font-size: .9rem;

    transition: all .25s;

    display: flex;

    align-items: center;

    gap: 6px;

}

.media-subtab.active,

.media-subtab:hover {

    background: #c62828;

    border-color: #c62828;

    color: #fff;

}

.media-badge {

    background: rgba(255,255,255,.2);

    border-radius: 10px;

    padding: 1px 7px;

    font-size: .78rem;

}

.media-panel { display: none; }

.media-panel.active { display: block; }



/* گرید تصاویر */

.media-grid {

    display: grid;

    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));

    gap: 12px;

}

.media-thumb {

    position: relative;

    border-radius: 10px;

    overflow: hidden;

    cursor: pointer;

    aspect-ratio: 1;

    background: rgba(0,0,0,.3);

    transition: transform .2s;

}

.media-thumb:hover { transform: scale(1.03); }

.media-thumb img {

    width: 100%; height: 100%;

    object-fit: cover;

    display: block;

}

.media-thumb-caption {

    position: absolute;

    bottom: 0; left: 0; right: 0;

    background: linear-gradient(transparent, rgba(0,0,0,.75));

    color: #fff;

    font-size: .75rem;

    padding: 6px 8px;

    text-overflow: ellipsis;

    white-space: nowrap;

    overflow: hidden;

}

/* ===========================
   MEDIA SECTION - STYLING
   =========================== */

#media.tab-content {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 18px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

/* Tabs */
.media-subtabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
    padding: 8px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
}

.media-subtab {
    appearance: none;
    border: 0;
    cursor: pointer;
    padding: 11px 18px;
    border-radius: 14px;
    background: transparent;
    color: #475569;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px transparent;
}

.media-subtab:hover {
    background: rgba(59, 130, 246, 0.08);
    color: #1d4ed8;
    transform: translateY(-1px);
}

.media-subtab.active {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    box-shadow: 0 10px 18px rgba(37, 99, 235, 0.25);
}

.media-subtab.active:hover {
    transform: none;
}

/* Subtab content */
.media-subtab-content {
    display: none;
    animation: fadeInUp 0.25s ease;
}

.media-subtab-content.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Grid for images/videos/gallery */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}

/* Media cards */
.media-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.media-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
    border-color: #cbd5e1;
}

.media-item img,
.media-item video {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: #0f172a;
}

.media-item img {
    cursor: zoom-in;
    transition: transform 0.35s ease, filter 0.35s ease;
}

.media-item:hover img {
    transform: scale(1.03);
    filter: saturate(1.05);
}

.media-item video {
    object-fit: cover;
    background: #000;
}

/* Captions */
.media-caption {
    padding: 12px 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    border-top: 1px solid #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Audio list */
.media-list {
    display: grid;
    gap: 14px;
}

.audio-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
    transition: all 0.25s ease;
}

.audio-item:hover {
    box-shadow: 0 14px 26px rgba(15, 23, 42, 0.10);
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.audio-item audio {
    width: 100%;
    display: block;
    outline: none;
}

/* Documents */
.documents-list {
    display: grid;
    gap: 12px;
}

.document-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.25s ease;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.document-item:hover {
    transform: translateY(-2px);
    border-color: #93c5fd;
    box-shadow: 0 14px 26px rgba(15, 23, 42, 0.10);
}

.document-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: #1e293b;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
}

.document-item a:hover {
    color: #2563eb;
}

.document-item svg {
    width: 22px;
    height: 22px;
    color: #2563eb;
    flex-shrink: 0;
}

/* Empty state */
.empty-state {
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 20px;
    padding: 34px 20px;
    text-align: center;
    color: #64748b;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.empty-state svg {
    width: 54px;
    height: 54px;
    color: #94a3b8;
}

.empty-state p {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    #media.tab-content {
        padding: 14px;
        border-radius: 18px;
    }

    .media-subtabs {
        gap: 8px;
        padding: 6px;
        border-radius: 16px;
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }

    .media-subtabs::-webkit-scrollbar {
        display: none;
    }

    .media-subtab {
        white-space: nowrap;
        padding: 10px 14px;
        font-size: 13px;
        border-radius: 12px;
    }

    .media-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }

    .media-item img,
    .media-item video {
        height: 170px;
    }

    .media-caption {
        font-size: 12px;
        padding: 10px 12px;
    }

    .document-item a {
        padding: 12px 14px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .media-grid {
        grid-template-columns: 1fr 1fr;
    }

    .media-item img,
    .media-item video {
        height: 140px;
    }

    .media-subtab {
        padding: 9px 12px;
        font-size: 12px;
    }
}


/* ویدیو */

.video-grid {

    display: grid;

    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));

    gap: 20px;

}

.video-card {

    background: rgba(255,255,255,.05);

    border-radius: 12px;

    overflow: hidden;

    border: 1px solid rgba(255,255,255,.1);

}

.video-embed-wrap {

    position: relative;

    padding-top: 56.25%;

}

.video-embed-wrap iframe {

    position: absolute;

    inset: 0;

    width: 100%; height: 100%;

}

.video-player { width: 100%; display: block; }

.video-title {

    padding: 10px 14px 4px;

    font-weight: 600;

    color: #e0e0e0;

}

.video-desc {

    padding: 0 14px 12px;

    font-size: .85rem;

    color: #aaa;

}



/* صوت */

.audio-list { display: flex; flex-direction: column; gap: 14px; }

.audio-card {

    display: flex;

    align-items: flex-start;

    gap: 14px;

    background: rgba(255,255,255,.05);

    border: 1px solid rgba(255,255,255,.1);

    border-radius: 12px;

    padding: 16px;

}

.audio-icon { font-size: 2rem; flex-shrink: 0; }

.audio-info { flex: 1; }

.audio-title { font-weight: 600; color: #e0e0e0; margin-bottom: 4px; }

.audio-desc  { font-size: .85rem; color: #aaa; }



/* اسناد */

.doc-list { display: flex; flex-direction: column; gap: 12px; }

.doc-card {

    display: flex;

    align-items: center;

    gap: 14px;

    background: rgba(255,255,255,.05);

    border: 1px solid rgba(255,255,255,.1);

    border-radius: 12px;

    padding: 14px 18px;

}

.doc-icon { font-size: 2rem; flex-shrink: 0; }

.doc-info  { flex: 1; }

.doc-title { font-weight: 600; color: #e0e0e0; }

.doc-desc  { font-size: .85rem; color: #aaa; margin-top: 3px; }

.doc-download-btn {

    background: #c62828;

    color: #fff;

    border: none;

    border-radius: 8px;

    padding: 8px 14px;

    text-decoration: none;

    font-size: .85rem;

    white-space: nowrap;

    flex-shrink: 0;

    transition: background .2s;

}

.doc-download-btn:hover { background: #b71c1c; }



/* ===== خاطرات ===== */

.memory-avatar {

    width: 48px; height: 48px;

    border-radius: 50%;

    overflow: hidden;

    flex-shrink: 0;

}

.memory-avatar img { width: 100%; height: 100%; object-fit: cover; }

.memory-avatar-placeholder {

    width: 100%; height: 100%;

    background: #c62828;

    color: #fff;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 1.3rem;

    font-weight: 700;

}

.memory-meta { display: flex; flex-direction: column; gap: 2px; }

.memory-title {

    color: #c62828;

    margin: 12px 0 8px;

    font-size: 1.05rem;

}

.memory-date { font-size: .8rem; color: #888; }



/* ===== لایت‌باکس ===== */

.lightbox-overlay {

    display: none;

    position: fixed;

    inset: 0;

    background: rgba(0,0,0,.93);

    z-index: 9999;

    align-items: center;

    justify-content: center;

}

.lightbox-overlay.active { display: flex; }

.lb-content {

    max-width: 90vw;

    max-height: 90vh;

    text-align: center;

    position: relative;

}

.lb-content img {

    max-width: 100%;

    max-height: 80vh;

    border-radius: 8px;

    object-fit: contain;

}

.lb-caption { color: #ddd; margin-top: 10px; font-size: .95rem; }

.lb-counter  { color: #888; margin-top: 6px; font-size: .85rem; }

.lb-close {

    position: fixed;

    top: 20px; left: 20px;

    background: rgba(255,255,255,.15);

    border: none;

    color: #fff;

    font-size: 1.5rem;

    width: 44px; height: 44px;

    border-radius: 50%;

    cursor: pointer;

    z-index: 10000;

    transition: background .2s;

}

.lb-close:hover { background: #c62828; }

.lb-prev, .lb-next {

    position: fixed;

    top: 50%;

    transform: translateY(-50%);

    background: rgba(255,255,255,.15);

    border: none;

    color: #fff;

    font-size: 2.5rem;

    width: 50px; height: 50px;

    border-radius: 50%;

    cursor: pointer;

    z-index: 10000;

    line-height: 1;

    transition: background .2s;

}

.lb-prev:hover, .lb-next:hover { background: #c62828; }

.lb-prev { right: 20px; }

.lb-next  { left: 20px; }

.captcha-wrapper {
    margin-top: 15px;
    margin-bottom: 15px;
}

.captcha-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.captcha-display {
    background: #e2e8f0;
    color: #1e293b;
    padding: 8px 15px;
    font-weight: bold;
    font-size: 1.2rem;
    letter-spacing: 3px;
    border-radius: 5px;
    user-select: none;
    font-family: 'Tahoma', sans-serif;
    min-width: 80px;
    text-align: center;
    background-image: linear-gradient(45deg, #ccc 25%, transparent 25%), 
                      linear-gradient(-45deg, #ccc 25%, transparent 25%);
    background-size: 4px 4px; /* ایجاد خطوط برای جلوگیری از خواندن توسط ربات */
}

.refresh-captcha {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.refresh-captcha:hover {
    transform: rotate(180deg);
}

#captcha_input_memory, #captcha_input_media {
    width: 100px !important;
    margin-bottom: 0 !important;
    text-align: center;
}
