/* Footer Base Styles */
.site-footer {
    background-color: #C54D4E;
    color: #FFFFFF;
    font-family: 'Roboto', sans-serif;
    padding: 80px 40px 50px;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Desktop Grid: 1 line */
.footer-grid {
    display: grid;
    grid-template-columns: 250px repeat(5, 1fr);
    gap: 30px;
}

/* Brand Column */
.footer-brand-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.footer-logo-img {
    width: 32px;
    height: 32px;
    /* Optional: If the logo is black, we might need a white version, 
       but assuming it's SVG or adaptable, we leave it as is */
}

.footer-logo-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 900;
    color: #FFFFFF;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Language Switcher */
/* Custom Language Dropdown */
.footer-lang-selector {
    position: relative;
    display: inline-block;
    margin-top: 5px;
}

.footer-lang-selector .dropdown-trigger {
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 12px;
    border-radius: 8px;
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.footer-lang-selector .dropdown-trigger:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #FFFFFF;
}

.footer-lang-selector .dropdown-trigger svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

.footer-lang-selector.open .dropdown-trigger .chevron-icon {
    transform: rotate(180deg);
}

.footer-lang-selector .dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: #FFFFFF;
    border-radius: 8px;
    padding: 6px;
    min-width: 130px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    z-index: 100;
}

.footer-lang-selector.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.footer-lang-selector .dropdown-item {
    display: block;
    padding: 8px 12px;
    color: #333333;
    text-decoration: none;
    font-size: 13px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.footer-lang-selector .dropdown-item:hover {
    background: #C54D4E;
    color: #FFFFFF;
}

/* Contact Info */
.footer-contact-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 5px;
    transition: color 0.2s ease;
}

.footer-contact-row svg {
    width: 16px;
    height: 16px;
    stroke: rgba(255, 255, 255, 0.8);
    fill: none;
    transition: transform 0.3s ease, stroke 0.2s ease;
}

.footer-contact-row a {
    color: inherit;
    text-decoration: none;
}

.footer-contact-row:hover {
    color: #FFFFFF;
}

.footer-contact-row:hover svg {
    stroke: #FFFFFF;
    transform: scale(1.1);
}

.footer-copy {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
}

/* Social Links */
.contact-socials {
    display: flex;
    gap: 15px;
    margin-top: 0;
}

.contact-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.75);
    transition: all 0.3s ease;
}

.contact-social-link svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.contact-social-link:hover {
    color: #F86466;
    border-color: #F86466;
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 15px rgba(248, 100, 102, 0.3);
}

/* Links Columns */
.footer-links-col {
    display: flex;
    flex-direction: column;
}

.footer-links-col h4 {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 900;
    color: #FFFFFF;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    width: fit-content;
}

.footer-title-link {
    color: #FFFFFF;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.footer-title-link:hover {
    opacity: 0.8;
}

.footer-links-col h4::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 25px;
    height: 2px;
    background: #FFFFFF;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.footer-links-col h4:hover::after {
    width: 100%;
}

.footer-links-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links-col ul li a {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
    position: relative;
}

.footer-links-col ul li a::before {
    content: '•';
    color: #FFFFFF;
    position: absolute;
    left: -12px;
    opacity: 0;
    transform: translateX(-5px);
    transition: all 0.2s ease;
}

.footer-links-col ul li a:hover {
    color: #FFFFFF;
    transform: translateX(12px);
}

.footer-links-col ul li a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/* -------------------------------------------
   Tablet (from DNB: max 1310px to min 771px)
   ------------------------------------------- */
@media (max-width: 1310px) and (min-width: 771px) {
    .site-footer {
        padding: 60px 40px 40px;
    }
    .footer-grid {
        grid-template-columns: 250px 1fr 1fr 1fr;
        gap: 40px;
    }
    .footer-brand-col { 
        grid-column: 1 / 2; 
        grid-row: 1 / 3; 
    }
    
    .footer-links-col:nth-child(2) { grid-column: 2 / 3; grid-row: 1; }
    .footer-links-col:nth-child(3) { grid-column: 3 / 4; grid-row: 1; }
    .footer-links-col:nth-child(4) { grid-column: 4 / 5; grid-row: 1; }
    
    .footer-links-col:nth-child(5) { grid-column: 2 / 3; grid-row: 2; }
    .footer-links-col:nth-child(6) { grid-column: 3 / 4; grid-row: 2; }
}

/* -------------------------------------------
   Mobile (from DNB: max 770px)
   ------------------------------------------- */
@media (max-width: 770px) {
    .site-footer {
        padding: 50px 20px 30px;
    }
    .footer-grid {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 0 !important;
    }
    .footer-brand-col {
        display: contents !important;
    }
    .footer-links-col,
    .footer-brand-col > * {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        margin: 0 !important;
    }
    
    .footer-logo-wrapper { order: 1; margin-bottom: 15px !important; }
    .footer-contact-row { order: 2; margin-bottom: 40px !important; flex-direction: row !important; gap: 10px !important; }
    .footer-links-col { order: 3; margin-bottom: 30px !important; }
    .footer-links-col h4::after { left: 50%; transform: translateX(-50%); }
    .footer-links-col ul { align-items: center !important; }
    .footer-copy { order: 4; margin-bottom: 20px !important; margin-top: 10px !important; }
    .contact-socials { order: 5; margin-bottom: 20px !important; flex-direction: row !important; gap: 20px !important; justify-content: center !important; margin-top: 10px !important; }
    .footer-lang-selector { order: 6; }

    /* FIX: dropdown-menu opens DOWNWARD by default (top: calc(100% + 8px)).
       When lang-selector is the last item (order:5) at the bottom of the footer,
       the hidden dropdown (visibility:hidden still occupies layout) extends below
       the footer, creating phantom scroll height = dark body strip below footer.
       Solution: open upward on mobile so overflow goes INTO the footer, not out. */
    .footer-lang-selector .dropdown-menu {
        top: auto;
        bottom: calc(100% + 8px);
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
    }
    .footer-lang-selector.open .dropdown-menu {
        transform: translateX(-50%) translateY(0);
    }
}

