/*
   FOOTER CSS - Pro Translation Service
   Pillar-based footer (Documents / Authorities / Countries / Company)
   Dark theme, mobile accordion, image dimensions preserved.
*/

:root {
    --color-bg: #1a202c;
    --color-bg-bottom: #151b26;
    --color-text: #ffffff;
    --color-text-muted: #c5ccd5;
    --color-text-dim: #8b95a1;
    --color-border: #313c4f;
    --color-accent: #3498db;

    --font-family: 'Manrope', sans-serif;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-bold: 700;

    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    --container-width: min(1400px, 92vw);
    --logo-width: 200px;
    --icon-size: 40px;
    --badge-size: 85px;
    --payment-size: 58px;

    --text-xs: clamp(0.75rem, 1.5vw, 0.875rem);
    --text-sm: clamp(0.875rem, 1.5vw, 1rem);
    --text-base: clamp(1rem, 1.5vw, 1.125rem);

    --accordion-open-height: 1000px;
    --accordion-closed-height: 0px;
}

/* ========== BASE ========== */
.footer {
    background-color: var(--color-bg);
    color: var(--color-text);
    padding: 3rem 0 0;
    width: 100%;
    font-family: var(--font-family);
    opacity: 1;
    position: relative;
    z-index: 1;
    margin-top: 4rem;
}

.footer-loaded {
    opacity: 1;
}

/* Match the header bar: centered at 65% width (17.5% offset each side),
   capped at 1400px, with the header's 1rem inner padding, so the footer's
   left and right content edges line up with the header. */
.footer-container {
    width: 65%;
    max-width: min(1400px, 90vw);
    margin: 0 auto;
    padding: 0 1rem;
}

/* ========== TOP: two stacked rows ========== */
.footer-top {
    margin-bottom: var(--spacing-2xl);
}

/* Row 1: logo/tagline, contact, social - three blocks, full width */
.footer-brand-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
}

.footer-brand-block {
    flex: 1.4 1 280px;
    max-width: 360px;
}

.footer-contact-block {
    flex: 1 1 220px;
}

.footer-social-block {
    flex: 1 1 200px;
}

.footer-divider.footer-divider-mid {
    margin: 0 0 var(--spacing-xl);
}

/* Row 2: page-link pillars - full width now that brand no longer
   shares the row, so each column gets real breathing room */
.footer-pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-lg) var(--spacing-xl);
}

.footer-column {
    min-width: 0;
}

/* Logo */
.footer-logo-link {
    display: inline-block;
    margin-bottom: var(--spacing-md);
    transition: opacity 0.3s ease;
}

.footer-logo-link:hover {
    opacity: 0.9;
}

.footer-logo {
    width: var(--logo-width);
    height: auto;
}

.footer-tagline {
    color: var(--color-text-muted);
    font-size: var(--text-xs);
    line-height: 1.6;
    margin: 0 0 var(--spacing-xl);
    max-width: 320px;
}

/* Contact */
.contact-section {
    margin-bottom: var(--spacing-xl);
}

.contact-heading {
    color: var(--color-text);
    font-size: var(--text-sm);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-md);
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.contact-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--color-text-dim);
}

.contact-text,
.contact-link {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}

.contact-link {
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: var(--color-text);
}

/* Social */
.social-icons {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xs);
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--icon-size);
    height: var(--icon-size);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    transition: transform 0.25s ease, background 0.25s ease;
    transform-origin: center;
}

.social-icons a:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.16);
}

.social-icons svg {
    width: 20px;
    height: 20px;
}

/* Real per-brand colors instead of the muted site text color */
.social-icon-youtube { color: #FF0000; }
.social-icon-linkedin { color: #0A66C2; }
.social-icon-pinterest { color: #E60023; }
/* Instagram uses its own gradient defined directly in the inline SVG,
   not currentColor, since a single flat color can't represent it. */

/* ========== PILLAR / COMPANY COLUMNS ========== */
.footer-hub {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    margin: 0 0 var(--spacing-lg);
    cursor: pointer;
    text-align: left;
    text-decoration: none;
    font-family: var(--font-family);
}

.footer-column-heading {
    color: var(--color-text);
    font-size: var(--text-base);
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.2px;
    transition: color 0.3s ease;
}

a.footer-hub:hover .footer-column-heading {
    color: var(--color-accent);
}

.accordion-content ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.footer-link {
    color: var(--color-text-muted);
    font-size: 0.9375rem;
    line-height: 1.45;
    text-decoration: none;
    position: relative;
    display: inline-block;
    padding-bottom: 2px;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--color-text);
}

/* Animated left-to-right underline on hover (desktop only) */
@media (min-width: 1025px) {
    .footer-link::after {
        content: '';
        position: absolute;
        width: 0;
        height: 1px;
        bottom: 0;
        left: 0;
        background-color: var(--color-text);
        transition: width 0.3s ease;
    }

    .footer-link:hover::after {
        width: 100%;
    }
}

/* ========== DIVIDER ========== */
.footer-divider {
    height: 1px;
    background-color: var(--color-border);
    width: 100%;
    margin: var(--spacing-md) 0 var(--spacing-xl);
}

/* ========== TRUST BAND ========== */
.footer-trust {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    min-height: 150px;
    padding: var(--spacing-sm) 0 var(--spacing-xl);
}

.trust-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

/* The widget seal is an oversized fixed element, so we pin a clipped box to the
   Company-column zone (rightmost ~19%) and let the seal sit inside it. This
   keeps it aligned under the Company links and stops it overflowing right. */
.smartcustomer-badge {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 19%;
    min-width: 150px;
    height: 150px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.smartcustomer-badge .stjr-badge {
    transform: scale(0.55);
    transform-origin: left center;
}

.security-badges {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.security-badges img {
    width: var(--badge-size);
    height: 55px;
    border-radius: 4px;
    transition: transform 0.3s ease;
    transform-origin: center;
}

.security-badges img:hover {
    transform: scale(1.1);
}

.payments-section {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--spacing-md);
}

.secure-payments-text {
    color: var(--color-text-muted);
    font-weight: var(--font-weight-medium);
    font-size: var(--text-xs);
}

.payment-icons {
    display: flex;
    gap: var(--spacing-md);
}

.payment-icons img {
    width: var(--payment-size);
    height: 42px;
    border-radius: 4px;
    transition: transform 0.3s ease;
    transform-origin: center;
}

.payment-icons img:hover {
    transform: scale(1.15);
}

/* ========== BOTTOM BAR ========== */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    background-color: var(--color-bg-bottom);
    margin: 0 calc(-1 * (50vw - 50%));
    padding: var(--spacing-lg) calc(50vw - 50%);
}

.footer-copy {
    color: var(--color-text-dim);
    font-size: var(--text-xs);
    font-weight: var(--font-weight-regular);
    margin: 0;
}

.footer-legal {
    display: flex;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.footer-legal-link {
    color: var(--color-text-muted);
    font-size: var(--text-xs);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-legal-link:hover {
    color: var(--color-text);
}

/* ========== ACCORDION (shared mechanism) ========== */
.accordion-content {
    max-height: var(--accordion-closed-height);
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.accordion-content.open {
    max-height: var(--accordion-open-height);
}

.accordion-icon {
    color: var(--color-text);
    display: inline-flex;
}

.accordion-arrow {
    transition: transform 0.3s ease;
}

.accordion-toggle[aria-expanded="true"] .accordion-arrow {
    transform: rotate(180deg);
}

/* ========== DESKTOP (>=1025px): columns open, no accordion ========== */
@media (min-width: 1025px) {
    .mobile-accordion .accordion-content {
        max-height: none;
        overflow: visible;
    }

    .mobile-accordion .accordion-icon {
        display: none;
    }

    /* Company heading is not a link: normal cursor on desktop */
    button.footer-hub {
        cursor: default;
    }
}

/* ========== MOBILE (<=1024px): accordion ========== */
@media (max-width: 1024px) {
    .footer-container {
        width: auto;
        max-width: 100%;
    }

    .footer-top {
        margin-bottom: var(--spacing-lg);
    }

    .footer-brand-row {
        flex-direction: column;
        gap: var(--spacing-lg);
        padding-bottom: var(--spacing-lg);
    }

    .footer-brand-block,
    .footer-contact-block,
    .footer-social-block {
        max-width: none;
        width: 100%;
    }

    .footer-pillars {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .footer-tagline {
        max-width: none;
    }

    .footer-column.mobile-accordion {
        flex: 1 1 auto;
        width: 100%;
        border-top: 1px solid var(--color-border);
    }

    .footer-hub {
        margin: 0;
        padding: var(--spacing-md) 0;
        min-height: 44px;
    }

    .footer-hub:hover .footer-column-heading {
        color: var(--color-accent);
    }

    .accordion-content ul {
        padding: 0 0 var(--spacing-md) var(--spacing-md);
        gap: var(--spacing-md);
    }

    .footer-trust {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: var(--spacing-lg);
    }

    .trust-info {
        flex: none;
        align-items: center;
        gap: var(--spacing-lg);
    }

    .footer-trust {
        position: static;
        min-height: 0;
    }

    .smartcustomer-badge {
        display: none;
        position: static;
        width: auto;
        min-width: 0;
        height: auto;
        overflow: visible;
        transform: none;
        justify-content: center;
    }

    .smartcustomer-badge .stjr-badge {
        transform-origin: center;
    }

    .security-badges {
        justify-content: center;
    }

    .payments-section {
        justify-content: center;
        flex-wrap: wrap;
    }

    /* no animated underline on touch */
    .footer-link::after {
        display: none;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-sm);
    }
}

/* ========== SMALL MOBILE (<=480px) ========== */
@media (max-width: 480px) {
    .footer-container {
        padding: 0 var(--spacing-md);
    }

    .security-badges {
        gap: var(--spacing-sm);
    }

    .footer-legal {
        gap: var(--spacing-md);
        justify-content: center;
    }
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
    .footer,
    .social-icons a,
    .security-badges img,
    .payment-icons img,
    .footer-link,
    .accordion-content,
    .accordion-arrow {
        transition: none;
    }
}