/*
 * SharifStudy modern footer
 * Namespaced so the original Sahifa footer remains an exact fallback.
 */

footer#theme-footer.ss-site-footer {
    --ss-footer-bg: #073a3d;
    --ss-footer-bg-deep: #052f32;
    --ss-footer-card: rgba(255, 255, 255, 0.055);
    --ss-footer-line: rgba(222, 238, 235, 0.16);
    --ss-footer-text: #dce9e7;
    --ss-footer-muted: #aebfbd;
    --ss-footer-heading: #ffffff;
    --ss-footer-accent: #ff5e15;
    --ss-footer-action: #cf4200;
    box-sizing: border-box;
    width: 100%;
    margin: 24px 0 0;
    padding: 0;
    color: var(--ss-footer-text);
    background: var(--ss-footer-bg);
    border: 0;
    box-shadow: 0 -8px 28px rgba(5, 47, 50, 0.11);
    direction: rtl;
    text-align: right;
}

.ss-site-footer *,
.ss-site-footer *::before,
.ss-site-footer *::after {
    box-sizing: border-box;
}

.ss-site-footer__accent {
    height: 4px;
    background: linear-gradient(90deg, var(--ss-footer-accent) 0 32%, #0b5558 32% 100%);
}

.ss-site-footer__inner,
.ss-site-footer__bottom-inner {
    width: min(1045px, calc(100% - 40px));
    margin: 0 auto;
}

.ss-site-footer__inner {
    padding: 34px 0 30px;
}

.ss-site-footer__intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    min-height: 96px;
    padding: 18px 20px;
    background: var(--ss-footer-card);
    border: 1px solid var(--ss-footer-line);
    border-radius: 12px;
}

.ss-site-footer__identity {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 18px;
}

.ss-site-footer__brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    color: inherit;
}

.ss-site-footer__logo {
    display: block;
    width: 170px;
    height: auto;
    margin: 0;
}

.ss-site-footer__description {
    max-width: 410px;
    margin: 0;
    padding: 0;
    color: var(--ss-footer-text);
    font-size: 16px;
    line-height: 1.95;
}

.ss-site-footer__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    gap: 14px;
}

#theme-footer .ss-site-footer__contact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 40px;
    padding: 13px 15px;
    color: #144447 !important;
    background: #ffffff;
    border: 1px solid #ffffff;
    border-radius: 8px;
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
    transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

#theme-footer .ss-site-footer__contact:hover,
#theme-footer .ss-site-footer__contact:focus-visible {
    color: #ffffff;
    background: #bd3a00;
    border-color: #bd3a00;
    transform: translateY(-1px);
}

.ss-site-footer__contact-arrow {
    font-size: 15px;
    line-height: 1;
}

.ss-site-footer__social {
    line-height: 1;
}

.ss-site-footer__social .social-icons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 3px;
    margin: 0;
    padding: 0;
    line-height: 1;
}

#theme-footer .ss-site-footer__social .social-icons a {
    display: inline-grid;
    place-items: center;
    min-width: 32px;
    min-height: 32px;
    margin: 0;
    color: #dce9e7;
    opacity: 0.78;
    border: 1px solid transparent;
    border-radius: 7px;
    transition: color 160ms ease, opacity 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

#theme-footer .ss-site-footer__social .social-icons a:hover,
#theme-footer .ss-site-footer__social .social-icons a:focus-visible {
    top: 0;
    color: #ffffff;
    opacity: 1;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--ss-footer-line);
}

.ss-site-footer__widgets {
    display: grid;
    gap: 30px;
    width: 100%;
    margin: 32px 0 0;
}

#theme-footer.ss-site-footer #footer-widget-area {
    width: 100% !important;
    margin: 32px 0 0 !important;
}

.ss-site-footer__widgets.footer-1c,
.ss-site-footer__widgets--1 {
    grid-template-columns: minmax(0, 1fr);
}

.ss-site-footer__widgets.footer-2c,
.ss-site-footer__widgets--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ss-site-footer__widgets.footer-3c,
.ss-site-footer__widgets--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ss-site-footer__widgets.footer-4c,
.ss-site-footer__widgets--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ss-site-footer__widgets.narrow-wide-2c {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
}

.ss-site-footer__widgets.wide-narrow-2c {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
}

.ss-site-footer__widgets.wide-left-3c {
    grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr));
}

.ss-site-footer__widgets.wide-right-3c {
    grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(0, 2fr);
}

#theme-footer.ss-site-footer .footer-widgets-box {
    float: none !important;
    width: auto !important;
    min-width: 0;
    margin: 0 !important;
}

#theme-footer.ss-site-footer .footer-widget {
    margin: 0 0 24px;
}

#theme-footer.ss-site-footer .footer-widget:last-child {
    margin-bottom: 0;
}

#theme-footer.ss-site-footer .footer-widget-top {
    position: relative;
    margin: 0 0 13px;
    padding: 0 13px 4px 0;
    color: var(--ss-footer-heading);
    border: 0;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.65;
}

#theme-footer.ss-site-footer .footer-widget-top::before {
    content: "";
    position: absolute;
    top: 0.48em;
    right: 0;
    width: 4px;
    height: 14px;
    background: var(--ss-footer-accent);
    border-radius: 2px;
}

#theme-footer.ss-site-footer .footer-widget-top h4,
#theme-footer.ss-site-footer .footer-widget-top h4 a {
    margin: 0;
    color: var(--ss-footer-heading);
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

#theme-footer.ss-site-footer .footer-widget-container {
    padding: 0;
    color: var(--ss-footer-muted);
    border: 0;
    font-size: 13px;
    line-height: 1.9;
    overflow-wrap: anywhere;
}

#theme-footer.ss-site-footer .footer-widget-container p {
    margin: 0 0 10px;
    padding: 0;
}

#theme-footer.ss-site-footer .footer-widget-container ul {
    margin: 0;
    padding: 0;
}

#theme-footer.ss-site-footer .footer-widget-container li,
#theme-footer.ss-site-footer #tabbed-widget .tabs-wrap li {
    position: relative;
    padding: 7px 12px 7px 0;
    color: var(--ss-footer-muted);
    border-bottom: 1px solid rgba(222, 238, 235, 0.1);
    line-height: 1.8;
}

#theme-footer.ss-site-footer .footer-widget-container li:last-child,
#theme-footer.ss-site-footer #tabbed-widget .tabs-wrap li:last-child {
    border-bottom: 0;
}

#theme-footer.ss-site-footer .footer-widget-container li::before {
    content: "";
    position: absolute;
    top: 1.12em;
    right: 0;
    width: 4px;
    height: 4px;
    background: var(--ss-footer-accent);
    border-radius: 50%;
}

#theme-footer.ss-site-footer a {
    color: var(--ss-footer-text);
}

#theme-footer.ss-site-footer .footer-widget-container a:hover,
#theme-footer.ss-site-footer .footer-widget-container a:focus-visible,
.ss-site-footer__bottom a:hover,
.ss-site-footer__bottom a:focus-visible {
    color: #ffffff;
}

#theme-footer.ss-site-footer img {
    max-width: 100%;
    height: auto;
}

#theme-footer.ss-site-footer iframe,
#theme-footer.ss-site-footer video {
    max-width: 100%;
}

#theme-footer.ss-site-footer input,
#theme-footer.ss-site-footer textarea,
#theme-footer.ss-site-footer select {
    max-width: 100%;
    border-radius: 7px;
}

#theme-footer.ss-site-footer .wpcf7 input[type="email"] {
    min-height: 40px;
    padding: 8px 10px;
    color: #17383b;
    background: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.ss-site-footer__bottom {
    background: var(--ss-footer-bg-deep);
    border-top: 1px solid var(--ss-footer-line);
}

.ss-site-footer__bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 62px;
    padding: 13px 0;
}

.ss-site-footer__legal {
    color: var(--ss-footer-muted);
    font-size: 12px;
    line-height: 1.75;
}

.ss-site-footer__legal p {
    margin: 0;
    padding: 0;
}

.ss-site-footer__legal a {
    color: var(--ss-footer-text);
    text-decoration: none;
}

.ss-site-footer a:focus-visible {
    outline: 2px solid #ffb28f;
    outline-offset: 3px;
}

@media only screen and (max-width: 985px) {
    .ss-site-footer__intro {
        align-items: flex-start;
    }

    .ss-site-footer__identity {
        align-items: center;
        flex-direction: column;
        gap: 12px;
    }

    .ss-site-footer__description {
        max-width: 520px;
        text-align: center;
    }

    #theme-footer.ss-site-footer .ss-site-footer__widgets {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media only screen and (max-width: 680px) {
    footer#theme-footer.ss-site-footer {
        margin-top: 18px;
        padding: 0 !important;
    }

    .ss-site-footer__inner,
    .ss-site-footer__bottom-inner {
        width: calc(100% - 28px);
    }

    .ss-site-footer__inner {
        padding: 22px 0 24px;
    }

    .ss-site-footer__intro {
        align-items: center;
        flex-direction: column;
        gap: 17px;
        padding: 19px 16px 17px;
    }

    .ss-site-footer__identity {
        justify-content: center;
        width: 100%;
    }

    .ss-site-footer__brand {
        justify-content: center;
        width: 100%;
    }

    .ss-site-footer__logo {
        width: min(230px, 72vw);
    }

    .ss-site-footer__description {
        max-width: 310px;
        font-size: 13px;
        line-height: 1.85;
        text-align: center;
    }

    .ss-site-footer__actions {
        justify-content: center;
        flex-wrap: wrap;
        width: 100%;
        gap: 10px 14px;
    }

    #theme-footer.ss-site-footer .ss-site-footer__widgets {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
        margin-top: 26px;
    }

    #theme-footer.ss-site-footer #footer-widget-area {
        margin-top: 26px !important;
    }

    #theme-footer.ss-site-footer .footer-widgets-box + .footer-widgets-box {
        padding-top: 14px;
    }

    .ss-site-footer__bottom-inner {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        gap: 6px;
        min-height: 0;
        padding: 15px 0 17px;
    }

    .ss-site-footer__legal {
        width: 100%;
        text-align: right;
    }
}

@media only screen and (max-width: 420px) {
    .ss-site-footer__actions {
        align-items: center;
        flex-direction: column;
    }

    .ss-site-footer__social,
    .ss-site-footer__social .social-icons {
        width: 100%;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    #theme-footer .ss-site-footer__contact,
    #theme-footer .ss-site-footer__social .social-icons a {
        transition: none;
    }
}