﻿/* Footer Top Section - Contact Info */
.footer-top {
    padding: 30px 0;
}

.footer-logo {
    display: flex;
    align-items: center;
    height: 100%;
}

    .footer-logo img {
        max-width: 150px;
        height: auto;
    }

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--sa-text);
    height: 100%;
    min-width: 0;
}

    .footer-contact-item svg {
        flex-shrink: 0;
        color: var(--sa-heading-color);
        margin-top: 3px;
    }

.footer-contact-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    flex: 1;
}

.footer-contact-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--sa-heading-color);
}

.footer-contact-value {
    font-size: 14px;
    color: var(--sa-text);
    word-break: break-all;
    overflow-wrap: break-word;
}

/* Footer Divider */
.footer-divider {
    width: 100%;
    height: 1px;
    background-color: rgba(var(--sa-text-rgb), .26);
    margin-bottom: 30px;
}

/* ===== Links Row ===== */
.footer-links-row {
    margin-bottom: 10px;
}

/* Footer Item */
.footer-item {
    margin-bottom: 20px;
    padding-right: 10px;
}

    .footer-item h5,
    .footer-item h6 {
        color: var(--sa-heading-color);
        font-size: 16px;
        font-weight: 600;
        margin-bottom: 16px;
        position: relative;
    }

    .footer-item h6 {
        font-size: 14px;
        margin-bottom: 12px;
    }

/* Footer Links */
.footer-item-link {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .footer-item-link li {
        margin-bottom: 10px;
    }

        .footer-item-link li a {
            color: var(--sa-text);
            text-decoration: none;
            font-size: 14px;
            transition: color 0.3s ease;
            position: relative;
            display: inline-block;
        }

            .footer-item-link li a::before {
                content: '';
                position: absolute;
                right: 0;
                top: 50%;
                transform: translateY(-50%);
                width: 0;
                height: 2px;
                background-color: transparent;
                transition: width 0.3s ease, background-color 0.3s ease;
            }

            .footer-item-link li a:hover {
                color: var(--sa-primary);
            }

                .footer-item-link li a:hover::before {
                    width: 15px;
                    background-color: var(--sa-primary);
                }

/* Newsletter Feed Section */
.feed {
    margin-bottom: 24px;
}

.feed-input-wrapper {
    position: relative;
    display: flex;
    align-items: stretch;
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--sa-body-bg-secondary);
    border: 1px solid rgba(var(--sa-text-rgb), 0.2);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

    .feed-input-wrapper:focus-within {
        border-color: var(--sa-primary);
        box-shadow: 0 0 0 3px rgba(var(--sa-primary-rgb, 0, 123, 255), 0.1);
    }

.feed-inp {
    flex: 1;
    padding: 11px 90px 11px 12px;
    border: none;
    background-color: transparent;
    font-size: 13px;
    color: var(--sa-text);
    outline: none;
}

    .feed-inp::placeholder {
        color: rgba(var(--sa-text-rgb), 0.5);
    }

.feed-btn {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    padding: 0 18px;
    background-color: var(--sa-primary);
    color: #fff;
    border: none;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease, opacity 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .feed-btn:hover {
        opacity: 0.9;
    }

    .feed-btn:active {
        opacity: 0.8;
    }

/* Social Media Section */
.footer-social h6 {
    color: var(--sa-heading-color);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.social-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

    .social-links li a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 8px;
        background-color: rgba(var(--sa-text-rgb), 0.08);
        color: var(--sa-text);
        transition: all 0.3s ease;
    }

        .social-links li a:hover {
            background-color: var(--sa-primary);
            color: #fff;
            transform: translateY(-2px);
        }

        .social-links li a svg {
            width: 20px;
            height: 20px;
        }

        .social-links li a.whatsapp-link svg {
            width: 24px;
            height: 24px;
        }

/* Responsive */
@media (max-width: 991px) {
    .footer-top > [class*="col-"], .footer-links-row > [class*="col-"] {
        padding-left: 15px;
        padding-right: 15px;
    }

    .footer-logo {
        justify-content: flex-start;
    }

        .footer-logo img {
            max-width: 120px;
        }

    .footer-links-row {
    }

    .footer-item {
        margin-bottom: 0;
    }
}

@media (max-width: 767px) {
    .feed-inp {
        font-size: 12px;
        padding: 10px 85px 10px 10px;
    }

    .feed-btn {
        padding: 0 16px;
        font-size: 12px;
    }

    .footer-item h5 {
        font-size: 15px;
        margin-bottom: 14px;
    }

    .footer-item-link li a {
        font-size: 13px;
    }
}

@media (max-width: 575px) {
    .footer-top > [class*="col-"],
    .footer-links-row > [class*="col-"] {
        padding-left: 10px;
        padding-right: 10px;
    }

    .footer-logo img {
        max-width: 100px;
    }

    .footer-contact-item {
        gap: 8px;
    }

        .footer-contact-item svg {
            width: 16px;
            height: 16px;
        }

    .footer-contact-label {
        font-size: 12px;
    }

    .footer-contact-value {
        font-size: 13px;
    }

    /* Mobile: Two columns for footer items */
    .footer-links-row > [class*="col-"]:nth-child(1),
    .footer-links-row > [class*="col-"]:nth-child(2),
    .footer-links-row > [class*="col-"]:nth-child(3) {
        flex: 0 0 50%;
        max-width: 50%;
        padding-left: 10px;
        padding-right: 10px;
        margin-bottom: 20px;
    }

    /* Newsletter takes full width on its own row */
    .footer-links-row > [class*="col-"]:nth-child(4) .feed-newsletter-col {
        flex: 0 0 100%;
        max-width: 100%;
        text-align: center;
        margin-bottom: 20px;
    }

    /* Social takes full width on its own row */
    .footer-links-row > [class*="col-"]:nth-child(4) .feed-social-col {
        flex: 0 0 100%;
        max-width: 100%;
        text-align: center;
        margin-bottom: 20px;
    }

    .footer-links-row > [class*="col-"]:nth-child(4) {
        flex: 0 0 100%;
        max-width: 100%;
    }

        .footer-links-row > [class*="col-"]:nth-child(4) .footer-item {
            display: flex;
            flex-direction: column;
            align-items: center;
        }

    .social-links {
        justify-content: center;
    }

    .feed-inp {
        padding: 9px 80px 9px 10px;
        font-size: 11.5px;
    }

    .feed-btn {
        padding: 0 14px;
        font-size: 11.5px;
    }

    .social-links li a {
        width: 36px;
        height: 36px;
    }

        .social-links li a svg {
            width: 18px;
            height: 18px;
        }

    .footer-item h5,
    .footer-item h6 {
        font-size: 14px;
    }

    .footer-item-link li a {
        font-size: 12px;
    }
}

/* ===== 992px - 768px: Three columns for footer items ===== */
@media (min-width: 768px) and (max-width: 991px) {
    .footer-links-row > div:nth-child(1),
    .footer-links-row > div:nth-child(2),
    .footer-links-row > div:nth-child(3) {
        flex: 0 0 33.3333%;
        max-width: 33.3333%;
    }

    .footer-links-row > div:nth-child(4) {
        flex: 0 0 100%;
        max-width: 100%;
    }

        /* Newsletter + Social side by side on full-width row */
        .footer-links-row > div:nth-child(4) .footer-item {
            display: flex;
            flex-direction: row;
            gap: 40px;
            align-items: flex-start;
        }

        .footer-links-row > div:nth-child(4) .feed {
            flex: 1;
            margin-bottom: 0;
        }

        .footer-links-row > div:nth-child(4) .footer-social {
            flex: 1;
        }
}

/* ===== Under 768px: Newsletter + Social fixes ===== */
@media (max-width: 767px) {
    .footer-links-row > div:nth-child(4) {
        flex: 0 0 100%;
        max-width: 100%;
    }

        .footer-links-row > div:nth-child(4) .footer-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
        }

        .footer-links-row > div:nth-child(4) .feed {
            width: 100%;
            max-width: 400px;
        }

        .footer-links-row > div:nth-child(4) .footer-social {
            width: 100%;
        }

    .social-links {
        justify-content: center;
    }

    /* Fix feed button position for RTL centered layout */
    .feed-input-wrapper {
        direction: ltr;
    }

    .feed-inp {
        direction: rtl;
    }
}

/* ===== Footer Description ===== */
.footer-desc {
    padding-bottom: 20px;
}

.footer-desc-item h3 {
    color: var(--sa-heading-color);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
}

.footer-desc-text p {
    font-size: 13px;
    line-height: 1.8;
    margin-bottom: 8px;
}

/* Extra text hidden by default */
.footer-desc-extra {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.4s ease;
    opacity: 0;
}

    .footer-desc-extra.is-open {
        max-height: 600px;
        opacity: 1;
    }

/* Toggle button */
.footer-desc-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    padding: 0;
    color: var(--sa-navbar-hover-color);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 4px;
    transition: opacity 0.2s ease;
}

    .footer-desc-toggle:hover {
        opacity: 0.8;
    }

    .toggle-less,
    .footer-desc-toggle[aria-expanded="true"] .toggle-more {
        display: none;
    }

    .footer-desc-toggle[aria-expanded="true"] .toggle-less {
        display: inline;
    }

.toggle-icon {
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.footer-desc-toggle[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}

/* Certificates */
.footer-certificates {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

    .footer-certificates li a {
        display: block;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

        .footer-certificates li a:hover {
            transform: translateY(-2px);
            opacity: 0.85;
        }

    .footer-certificates li img {
        width: 80px;
        height: auto;
        object-fit: contain;
    }

@media (max-width: 767px) {
    .footer-certificates {
        justify-content: center;
        margin-top: 20px;
    }

    .footer-desc-item h3 {
        font-size: 14px;
    }
}

.footer-certificates {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    flex-direction: row; /* add this */
    direction: rtl; /* add this — ensures wrap goes right */
}

.copy-right {
    padding: 16px 0;
    border-top: 1px solid rgba(var(--sa-text-rgb), 0.15);
    background-color: var(--sa-body-bg-secondary);
}

.copy-right-text {
    font-size: 15px;
    color: var(--sa-heading-color);
    opacity: 1;
    margin: 0;
    text-align: right;
    text-align: center;
}

#newsletterError{
    margin-top : 10px;
    color : var(--sa-muted-text);
    font-size : 12px
}