/**
 * SD Footer Styles - Custom footer component
 * Follows BEM methodology with sd- prefix
 */

 .sd-footer {
    background-color: #111;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    width: 100%;
}

/* Footer Container */
.sd-footer__container {
    max-width: 1800px;
    width: 95%;
    margin: 0 auto;
    padding: 60px 0;
}

/* Footer Top Section */
.sd-footer__top {
    margin-bottom: 60px;
}

.sd-footer__brand {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.sd-footer__logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.3s ease;
    max-width: 150px;
}

.sd-footer__logo:hover {
    opacity: 0.8;
}

.sd-footer__logo-image {
    height: 40px;
    width: auto;
    display: block;
}

/* CTA Button */
.sd-footer__cta-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #ffffff;
    color: #485e52;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s ease;
}

.sd-footer__cta-button:hover {
    background-color: #f5f5f5;
    transform: translateY(-2px);
}

.sd-footer__cta-icon {
    width: 20px;
    height: 20px;
}

/* Footer Content */
.sd-footer__content {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 120px;
    margin-bottom: 60px;
}

/* Newsletter Section */
.sd-footer__newsletter {
    max-width: 420px;
}

.sd-footer__newsletter-title {
    font-size: 28px;
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 24px;
    color: #ffffff;
}

.sd-footer__newsletter-form {
    display: flex;
    margin-bottom: 40px;
}

.sd-footer__newsletter-input {
    flex: 1;
    padding: 14px 20px !important;
    font-size: 16px;
    border: none;
    border-radius: 8px 0 0 8px !important;
    background-color: #ffffff;
    color: #333333;
    outline: none;
    transition: box-shadow 0.3s ease;
}

.sd-footer__newsletter-input:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.sd-footer__newsletter-input::placeholder {
    color: #999999;
}

.sd-footer__newsletter-submit {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background-color: #789d4a;
    color: #ffffff;
    border: none;
    border-radius: 0 8px 8px 0;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.sd-footer__newsletter-submit:hover {
    background-color: #63833c;
}

.sd-footer__newsletter-icon {
    width: 20px;
    height: 20px;
}

/* Contact Info */
.sd-footer__contact-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.sd-footer__contact-email,
.sd-footer__contact-phone {
    display: block;
    color: #ffffff;
    text-decoration: none;
    margin-bottom: 8px;
    transition: opacity 0.3s ease;
}

.sd-footer__contact-email:hover,
.sd-footer__contact-phone:hover {
    opacity: 0.8;
}

.sd-footer__contact-phone {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sd-footer__phone-icon {
    width: 16px;
    height: 16px;
}

/* Navigation */
.sd-footer__nav {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 60px;
}

.sd-footer__nav-section {
    min-width: 0;
}

.sd-footer__nav-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.7);
}

.sd-footer__nav-list,
.sd-footer__social-list {
    list-style: none;
    padding: 0;
    text-align: left !important;
}

.sd-footer__nav-item,
.sd-footer__social-item {
    margin-bottom: 12px;
}

.sd-footer__nav-link,
.sd-footer__social-link,
.sd-footer__dropdown-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.3s ease;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    padding: 0;
}

.sd-footer__nav-link:hover,
.sd-footer__social-link:hover,
.sd-footer__dropdown-link:hover {
    opacity: 0.8;
}

/* Dropdown */
.sd-footer__nav-item--dropdown {
    position: relative;
}

.sd-footer__dropdown-icon {
    width: 12px;
    height: 12px;
    transition: transform 0.3s ease;
}

.sd-footer__nav-link--dropdown[aria-expanded="true"] .sd-footer__dropdown-icon {
    transform: rotate(180deg);
}

.sd-footer__dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #3a4d42;
    border-radius: 8px;
    padding: 12px 0;
    margin-top: 8px;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.sd-footer__dropdown-menu--open {
    display: block;
}

.sd-footer__dropdown-item {
    margin: 0;
}

.sd-footer__dropdown-link {
    display: block;
    padding: 8px 20px;
    font-size: 15px;
}

/* .sd-footer__dropdown-link:hover {
    background-color: #324438;
} */

/* Social Links */
.sd-footer__social-link {
    gap: 12px;
}

.sd-footer__social-icon {
    width: 20px;
    height: 20px;
}

.sd-footer__social-text {
    font-size: 16px;
}

/* Affiliation Logos */
.sd-footer__affiliations {
    margin-bottom: 60px;
    text-align: center;
}

.sd-footer__affiliations-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}

.sd-footer__affiliations-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 32px 40px;
    max-width: 1000px;
}

.sd-footer__affiliation-item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sd-footer__affiliation-link,
.sd-footer__affiliation-item {
    transition: all 0.3s ease;
}

.sd-footer__affiliation-logo {
    max-width: var(--logo-max-width, 80px);
    max-height: var(--logo-max-height, 60px);
    width: auto;
    height: auto;
    object-fit: contain;
    opacity: 0.7;
    filter: grayscale(100%) brightness(0) invert(1);
    transition: all 0.3s ease;
}

.sd-footer__affiliation-link:hover .sd-footer__affiliation-logo,
.sd-footer__affiliation-item:hover .sd-footer__affiliation-logo {
    opacity: 1;
    /* filter: grayscale(0%) brightness(1) invert(0); */
    transform: scale(1.05);
}

/* Footer Bottom */
.sd-footer__bottom {
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sd-footer__copyright {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* Company Details */
.sd-footer__legal {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sd-footer__company-details {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
}

.sd-footer__company-name,
.sd-footer__company-info,
.sd-footer__company-address {
    display: inline;
    font-weight: normal;
}

.sd-footer__company-name::after,
.sd-footer__company-info:not(:last-child)::after {
    content: '•';
    margin: 0 12px;
    color: rgba(255, 255, 255, 0.3);
}

.sd-footer__company-address {
    display: block;
    margin-top: 4px;
}

@media (min-width: 769px) and (max-width: 980px) {
    .sd-footer__content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .sd-footer__container {
        padding: 40px 20px 30px;
    }

    .sd-footer__top {
        margin-bottom: 40px;
    }

    .sd-footer__brand {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .sd-footer__logo {
        margin-bottom: 0;
    }

    .sd-footer__cta-button {
        align-self: stretch;
        justify-content: center;
        width: 100%;
        max-width: 200px;
    }

    .sd-footer__content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .sd-footer__newsletter {
        max-width: 100%;
    }

    .sd-footer__newsletter-title {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .sd-footer__newsletter-form {
        flex-direction: column;
        gap: 0;
    }

    .sd-footer__newsletter-input {
        border-radius: 8px 8px 0 0 !important;
        padding: 16px 20px !important;
    }

    .sd-footer__newsletter-submit {
        border-radius: 0 0 8px 8px;
        padding: 16px 20px;
        justify-content: center;
    }

    .sd-footer__contact {
        margin-bottom: 40px;
    }

    .sd-footer__nav {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .sd-footer__nav-section:last-child {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .sd-footer__nav-section:last-child .sd-footer__nav-title {
        grid-column: 1 / -1;
    }

    .sd-footer__social-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px 20px;
    }

    .sd-footer__dropdown-menu {
        position: static;
        background-color: transparent;
        box-shadow: none;
        padding: 8px 0 0 20px;
        margin-top: 0;
    }

    .sd-footer__dropdown-link {
        padding: 6px 0;
        font-size: 15px;
    }

    .sd-footer__dropdown-link:hover {
        background-color: transparent;
        opacity: 0.8;
    }

    .sd-footer__bottom {
        padding-top: 30px;
        text-align: center;
    }

    .sd-footer__copyright {
        font-size: 13px;
    }
    
    .sd-footer__company-details {
        text-align: center;
        font-size: 13px;
        margin-top: 20px;
    }
    
    .sd-footer__company-name::after,
    .sd-footer__company-info:not(:last-child)::after {
        margin: 0 8px;
    }

    /* Mobile Affiliation Logos */
    .sd-footer__affiliations {
        margin-bottom: 40px;
    }

    .sd-footer__affiliations-title {
        font-size: 15px;
        margin-bottom: 20px;
    }

    .sd-footer__affiliations-grid {
        gap: 24px 32px;
    }

    .sd-footer__affiliation-logo {
        max-width: var(--logo-max-width, 70px);
        max-height: var(--logo-max-height, 50px);
    }
}

@media (max-width: 480px) {
    .sd-footer__container {
        padding: 30px 16px 24px;
    }

    .sd-footer__logo-image {
        height: 32px;
    }

    .sd-footer__newsletter-title {
        font-size: 20px;
    }

    .sd-footer__nav-link,
    .sd-footer__social-text {
        font-size: 15px;
    }

    /* Small Mobile Affiliation Logos */
    .sd-footer__affiliations-grid {
        gap: 20px 24px;
    }

    .sd-footer__affiliation-logo {
        max-width: var(--logo-max-width, 60px);
        max-height: var(--logo-max-height, 40px);
    }
}