/* =========================================
   Footer Section
========================================= */
.dm-footer-section {
    background-color: var(--bg-primary);
    padding: 70px 0 30px;
    position: relative;
    z-index: 10;
    /*border-top: 1px solid var(--border-color);*/
}


.dm-footer-section .dm-footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 44px;
}

.dm-footer-section .footer-text-col {
    max-width: 400px;
}

.dm-footer-section .footer-tagline {
    font-size: 32px;
    line-height: 1.4;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
}

.dm-footer-section .footer-links-col {
    display: flex;
    gap: 40px;
}

.dm-footer-section .footer-link-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dm-footer-section .footer-link-group-title {
    font-size: 13px;
    font-weight: bold;
    color: var(--text-primary);
    opacity: 0.5;
    margin-bottom: 4px;
}

.dm-footer-section .footer-link-group a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 16px;
    transition: color var(--transition-fast), transform var(--transition-fast);
    display: inline-block;
}

.dm-footer-section .footer-link-group a:hover {
    color: var(--accent-primary);
    transform: translateX(-4px);
}

.dm-footer-section .dm-footer-middle {
    width: 100%;
    display: grid;
    grid-template-columns: 7fr 3fr; /* تقسیم 70 به 30 */
    align-items: center;
    gap: 40px;
    margin-bottom: 30px;
}

.dm-footer-section .footer-logo-col {
    display: flex;
    justify-content: start;
    align-items: center;
    width: 100%;
}

.dm-footer-section .footer-giant-logo {
    width: 100%;
    max-width: 700px;
    height: auto;
    object-fit: contain;
    opacity: 0.9;
    transition: opacity var(--transition-fast);
}

.dm-footer-section .footer-ticker-col {
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

.dm-footer-section .footer-ticker-wrapper {
    position: relative;
    height: 280px;
    width: 100%;
    max-width: 320px;
    overflow: hidden;
    mask-image: linear-gradient(to bottom, transparent 0%, black 25%, black 75%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 25%, black 75%, transparent 100%);
    display: flex;
    flex-direction: column;
    padding: 0 10px;
}

.dm-footer-section .footer-ticker {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.dm-footer-section .f-ticker-item {
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background-color: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    opacity: 0.2;
    transform: scale(0.85);
    filter: blur(2px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.dm-footer-section .f-ticker-item.active {
    opacity: 1;
    transform: scale(1.05);
    filter: blur(0);
    border-color: var(--accent-secondary);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    box-shadow: 0 4px 10px rgba(184, 115, 51, 0.15);
}

.dm-footer-section.theme-dark .f-ticker-item.active {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

/* =========================================
   Responsive Logic for Footer Middle
========================================= */
@media (max-width: 992px) {
    .dm-footer-section .dm-footer-middle {
        grid-template-columns: 1fr; /* در موبایل تک‌ستونه می‌شود */
        gap: 50px;
        margin-bottom: 60px;
    }

    .dm-footer-section .footer-ticker-col {
        justify-content: center;
    }

    .dm-footer-section .footer-ticker-wrapper {
        height: 220px;
        max-width: 100%;
    }
}

/* --- Trust badges (Enamad + license), embedded inside dm-footer-bottom --- */
.dm-footer-section .dm-footer-trust {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-inline: auto; /* centers the badges between copyright and powered-by when there's room */
}

.dm-footer-section .footer-trust-badge {
    display: inline-flex;
    align-items: center;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    line-height: 0;
}

.dm-footer-section .footer-trust-badge img {
    height: 42px;
    width: auto;
    max-width: 110px;
    object-fit: contain;
}

.dm-footer-section .footer-license-trigger img {
    height: 38px;
}

/* --- License image modal --- */
.dmhouse-license-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.dmhouse-license-modal[hidden] {
    display: none;
}

.dmhouse-license-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
}

.dmhouse-license-modal-inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    z-index: 1;
}

.dmhouse-license-modal-inner img {
    display: block;
    max-width: 90vw;
    max-height: 85vh;
    width: auto;
    height: auto;
    border-radius: 12px;
}

.dmhouse-license-modal-close {
    position: absolute;
    top: -18px;
    inset-inline-end: -18px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--bg-primary, #fff);
    color: var(--text-primary, #000);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Bottom Area (Copyright + trust badges + powered-by) --- */
.dm-footer-section .dm-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    row-gap: 16px;
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
    font-size: 14px;
    color: var(--text-secondary);
}

.dm-footer-section .footer-powered a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: bold;
}

/* =========================================
   Responsive Logic
========================================= */
@media (max-width: 992px) {
    .dm-footer-section {
        padding: 50px 0 24px;
    }

    .dm-footer-section .dm-footer-top {
        flex-direction: column;
        gap: 32px;
        margin-bottom: 36px;
    }

    .dm-footer-section .footer-tagline {
        font-size: 26px;
    }

    .dm-footer-section .footer-links-col {
        width: 100%;
        flex-wrap: wrap;
        justify-content: space-between;
        row-gap: 24px;
        gap: 20px;
    }

    .dm-footer-section .dm-footer-middle {
        margin-bottom: 24px;
    }

    .dm-footer-section .dm-footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .dm-footer-section .dm-footer-trust {
        margin-inline: 0;
        order: -1; /* badges above copyright/powered-by when stacked */
    }
}