/* JK Footer Styles */

.jk-footer {
    color: var(--text-body);
    position: relative;
    margin-top: 80px;
    border-top: none;
}

.jk-footer-content {
    position: relative;
}

/* Main Footer */
.jk-footer-main {
    padding: 60px 0 40px;
    border-bottom: 1px solid var(--border);
    background-color: var(--surface-2);
}

.jk-footer-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: space-between;
}

.jk-footer-column {
    flex: 1;
    min-width: 250px;
}

/* Logo and Info Column */
.jk-footer-info {
    flex: 1.5;
}

.jk-footer-logo {
    margin-bottom: 10px;
}

.jk-footer-logo img {
    height: 30px;
    max-height: 30px;
    width: auto;
    object-fit: contain;
}

.jk-footer-description {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 25px;
    color: var(--text-muted);
}

/* Social Links */
.jk-footer-social {
    display: flex;
    gap: 12px;
}

.jk-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--primary);
    color: var(--white);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.jk-social-link:hover {
    background-color: var(--cta);
    color: var(--white);
    transform: translateY(-3px);
}

.jk-social-icon {
    font-weight: bold;
    font-size: 16px;
}

/* Footer Links */
.jk-footer-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--black);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.jk-footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.jk-footer-list li {
    margin-bottom: 12px;
}

.jk-footer-list a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.jk-footer-list a:hover {
    color: var(--secondary);
    text-decoration: none;
}

/* Newsletter */
.jk-newsletter-description {
    font-size: 14px;
    margin-bottom: 20px;
    color: var(--text-muted);
}

.jk-newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
    max-width: 100%;
}

.jk-newsletter-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--pill-radius);
    background-color: var(--white);
    color: var(--text-body);
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    box-sizing: border-box;
    box-shadow: var(--field-shadow);
}

.jk-newsletter-input::placeholder {
    color: var(--text-muted);
}

.jk-newsletter-input:focus {
    outline: none;
    background-color: var(--white);
    border-color: var(--focus-border-color);
    box-shadow: var(--field-shadow-focus);
}

.jk-newsletter-button {
    width: 100%;
    padding: 12px 24px;
    background-color: var(--cta);
    color: var(--white);
    border: none;
    border-radius: var(--pill-radius);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-sizing: border-box;
}

.jk-newsletter-button:hover {
    background-color: var(--cta-hover);
    color: var(--white);
}

.jk-newsletter-message {
    font-size: 14px;
    margin-top: 10px;
    display: none;
}

.jk-newsletter-message.success {
    color: var(--green);
    display: block;
}

.jk-newsletter-message.error {
    color: var(--orange);
    display: block;
}

/* Legal Section */
.jk-footer-legal {
    background-color: var(--footer-bottom-bg);
    padding: 20px 0;
    border-top: 1px solid var(--border);
}

.jk-legal-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.jk-legal-buttons {
    display: flex;
    gap: 10px;
}

.jk-legal-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--white);
    color: var(--text-body);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: var(--pill-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    box-shadow: var(--field-shadow);
}

.jk-legal-button:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(var(--brand-primary-rgb), 0.22);
}

.jk-legal-button svg {
    width: 20px;
    height: 20px;
}

/* Footer Country Switcher */
.footer-country-switcher {
    position: relative;
    display: inline-block;
}

.footer-country-current {
    position: relative;
}

.footer-country-arrow {
    font-size: 10px;
    transition: transform 0.2s ease;
    margin-left: 4px;
}

.footer-country-current[aria-expanded="true"] .footer-country-arrow {
    transform: rotate(180deg);
}

.footer-country-dropdown {
    position: absolute;
    bottom: calc(100% + 5px);
    left: 0;
    background-color: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    list-style: none;
    padding: 8px 0;
    margin: 0;
    min-width: 200px;
    max-height: 260px;
    overflow-y: auto;
    box-shadow: var(--dropdown-shadow);
    z-index: 1000;
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.footer-country-dropdown[aria-hidden="false"] {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.footer-country-dropdown li {
    margin: 0;
}

.footer-country-option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-body);
    background: transparent;
    border: none;
    text-align: left;
    transition: background-color 0.2s ease;
    cursor: pointer;
    font-size: 14px;
}

.footer-country-option:hover,
.footer-country-option:focus {
    background-color: var(--surface-3);
    outline: none;
}

.footer-country-option.is-current {
    background-color: var(--surface-4);
    color: var(--black);
    font-weight: 600;
}

/* Footer Language Switcher */
.footer-language-switcher {
    position: relative;
    display: inline-block;
}

.footer-lang-current {
    position: relative;
}

.footer-lang-flag {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.footer-lang-arrow {
    font-size: 10px;
    transition: transform 0.2s ease;
    margin-left: 4px;
}

.footer-lang-current[aria-expanded="true"] .footer-lang-arrow {
    transform: rotate(180deg);
}

.footer-lang-dropdown {
    position: absolute;
    bottom: calc(100% + 5px);
    left: 0;
    background-color: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    list-style: none;
    padding: 8px 0;
    margin: 0;
    min-width: 180px;
    box-shadow: var(--dropdown-shadow);
    z-index: 1000;
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.footer-lang-dropdown[aria-hidden="false"] {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.footer-lang-dropdown li {
    margin: 0;
}

.footer-lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-body);
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
    cursor: pointer;
    font-size: 14px;
}

.footer-lang-option:hover,
.footer-lang-option:focus {
    background-color: var(--surface-3);
    color: var(--black);
    outline: none;
}

.footer-lang-option .footer-lang-flag {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.footer-lang-name {
    flex: 1;
    font-size: 14px;
}

.footer-lang-fallback {
    opacity: 0.8;
}

.footer-lang-fallback-indicator {
    font-size: 12px;
    color: var(--cta);
    margin-left: 4px;
}

/* Responsive adjustments for footer language switcher */
@media (max-width: 768px) {
    .jk-legal-top {
        flex-direction: column;
        gap: 15px;
    }

    .jk-legal-buttons {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

    .footer-lang-dropdown {
        left: 50%;
        transform: translateX(-50%) translateY(10px);
    }

    .footer-lang-dropdown[aria-hidden="false"] {
        transform: translateX(-50%) translateY(0);
    }

    .footer-country-dropdown {
        left: 50%;
        transform: translateX(-50%) translateY(10px);
    }

    .footer-country-dropdown[aria-hidden="false"] {
        transform: translateX(-50%) translateY(0);
    }
}

.jk-legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
}

.jk-legal-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s ease;
}

.jk-legal-links a:hover {
    color: var(--secondary);
    text-decoration: none;
}

.jk-legal-separator {
    margin: 0 10px;
    opacity: 0.5;
}

.jk-copyright {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    padding-top: 20px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .jk-footer-columns {
        gap: 30px;
    }
    
    .jk-footer-column {
        min-width: 200px;
    }
}

@media (max-width: 768px) {
    .jk-footer-main {
        padding: 40px 0 30px;
    }
    
    .jk-footer-columns {
        flex-direction: column;
        gap: 40px;
    }
    
    .jk-footer-column {
        min-width: auto;
        width: 100%;
        text-align: center;
    }
    
    .jk-footer-info {
        flex: 1;
    }
    
    .jk-footer-logo {
        text-align: center;
    }
    
    .jk-footer-social {
        justify-content: center;
    }
    
    .jk-footer-title {
        font-size: 20px;
        text-align: center;
        margin-bottom: 15px;
    }
    
    .jk-footer-list {
        text-align: center;
    }
    
    .jk-footer-list li {
        margin-bottom: 10px;
    }
    
    .jk-legal-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .jk-legal-section {
        width: 100%;
    }
    
    .jk-cookie-section {
        justify-content: center;
        order: 3;
    }
    
    .jk-legal-links {
        justify-content: center;
        order: 1;
    }
    
    .jk-copyright {
        text-align: center;
        order: 2;
    }
    
    .jk-newsletter-form {
        flex-direction: column;
    }
    
    .jk-newsletter-button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .jk-footer-logo img {
        height: 30px;
    }
    
    .jk-footer-title {
        font-size: 18px;
        text-align: center;
    }
    
    .jk-legal-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .jk-legal-separator {
        display: none;
    }
    
    .jk-footer-social {
        justify-content: center;
    }
    
    .jk-cookie-settings-link {
        width: 100%;
        justify-content: center;
    }
}

/* Accessibility */
.jk-footer a:focus {
    outline: 1px solid var(--focus-outline-color);
    outline-offset: 2px;
    box-shadow: var(--focus-ring);
}

.jk-newsletter-input:focus,
.jk-newsletter-button:focus,
.jk-cookie-settings-btn:focus {
    outline: 1px solid var(--focus-outline-color);
    outline-offset: 2px;
    box-shadow: var(--focus-ring);
}

/* Print Styles */
@media print {
    .jk-footer {
        background-color: var(--white);
        color: var(--black);
    }
    
    .jk-cookie-settings-btn {
        display: none;
    }
}

/* Link Animation */
.jk-footer-list a:hover {
    color: var(--secondary);
}

/* Loading State for Newsletter */
.jk-newsletter-form.loading .jk-newsletter-button {
    position: relative;
    color: transparent;
}

.jk-newsletter-form.loading .jk-newsletter-button::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid var(--white);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
