/* =============================================
   FOOTER V2 — Shared Stylesheet
   Подключается на всех внутренних страницах.
   НЕ содержит никаких глобальных классов:
   ни .container, ни :root, ни body.
   ============================================= */

/* Footer Grid Layout */
.footer-v2 {
    padding: 80px 0 50px 0;
    border-top: 1px solid var(--glass-border);
    background-color: var(--bg);
    margin-top: 0 !important;
    position: relative;
    z-index: 100;
}

.footer-grid {
    display: grid;
    grid-template-columns: auto auto auto auto;
    justify-content: space-between;
    gap: 40px;
}

.footer-brand-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-brand-col .f-logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-brand-col .f-logo-img {
    width: 32px;
    height: 32px;
}

.footer-brand-col .f-logo-text {
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #fff;
}

.footer-brand-col .f-copy {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.5;
}

.f-socials {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    color: var(--text-dim);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-link svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.social-link:hover {
    color: var(--accent);
    background: rgba(255, 205, 48, 0.05);
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 205, 48, 0.15);
}

.social-link:hover svg {
    transform: scale(1.1);
}

/* Custom Dropdown Language Selector */
.f-lang-selector.dropdown {
    position: relative;
    display: inline-block;
    margin-top: 10px;
}

.f-lang-selector.dropdown .dropdown-trigger {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-dim);
    padding: 6px 12px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.f-lang-selector.dropdown .dropdown-trigger:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.15);
}

.f-lang-selector.dropdown .dropdown-trigger .globe-icon {
    width: 14px;
    height: 14px;
    opacity: 0.6;
}

.f-lang-selector.dropdown .dropdown-trigger .chevron-icon {
    width: 12px;
    height: 12px;
    opacity: 0.4;
    transition: transform 0.2s ease;
}

.f-lang-selector.dropdown.open .dropdown-trigger .chevron-icon {
    transform: rotate(180deg);
}

.f-lang-selector.dropdown .dropdown-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(18, 18, 33, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 4px;
    min-width: 130px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: none;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 100;
}

.f-lang-selector.dropdown.open .dropdown-menu {
    display: block;
    opacity: 1;
}

.f-lang-selector.dropdown .dropdown-item {
    display: block;
    padding: 8px 12px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 13px;
    border-radius: 4px;
    text-align: left;
    transition: all 0.2s ease;
    font-weight: 500;
}

.f-lang-selector.dropdown .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.f-lang-selector.dropdown .dropdown-item.active {
    color: var(--accent);
    background: rgba(255, 205, 48, 0.1);
    font-weight: 600;
    cursor: default;
    pointer-events: none;
}

.footer-links-col h4 {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #fff;
    margin-bottom: 25px;
    text-transform: uppercase;
    position: relative;
    width: fit-content;
}

.footer-title-link {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-title-link:hover {
    color: var(--accent) !important;
}

.footer-links-col h4::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 25px;
    height: 2px;
    background: var(--accent);
    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,
.footer-links-col ul li span.coming-soon-link {
    font-size: 13px;
    color: var(--text-dim);
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
}

.footer-links-col ul li a:hover {
    color: #fff;
    transform: translateX(4px);
}

.footer-links-col ul li span.coming-soon-link:hover {
    color: var(--accent);
}

/* Footer Contact Email Styling */
.f-contact-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

.f-contact-row svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    transition: stroke 0.2s ease;
}

.f-contact-row a {
    color: inherit;
    text-decoration: none;
}

.f-contact-row:hover {
    color: var(--accent);
}

.footer-links-col ul li span.disabled-link {
    font-size: 13px;
    color: var(--text-dim);
    display: inline-block;
    cursor: default;
}

/* Responsive: medium screens */
@media (max-width: 1310px) and (min-width: 771px) {
    .footer-grid {
        display: grid !important;
        grid-template-columns: 250px 1fr 1fr 1fr !important;
        gap: 40px !important;
    }
    .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: 2 / 3; grid-row: 2; }
    .footer-links-col:nth-child(5) { grid-column: 3 / 4; grid-row: 2; }
    .footer-links-col:nth-child(6) { grid-column: 4 / 5; grid-row: 2; }
}

/* Adaptive for medium screens */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: auto auto;
        justify-content: space-between;
        gap: 30px;
    }
}

/* Responsive: small screens */
@media (max-width: 770px) {
    .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-brand-col > a:first-child { order: 1; margin-bottom: 15px !important; }
    .f-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; }
    .f-copy { order: 4; margin-bottom: 20px !important; margin-top: 10px !important; }
    .f-socials { order: 5; margin-bottom: 20px !important; flex-direction: row !important; gap: 20px !important; }
    .f-lang-selector { order: 6; }
    .footer-v2 { padding: 40px 0; }
}

@media (max-width: 769px) {
    .footer-links-col h4 {
        margin-left: auto;
        margin-right: auto;
    }
}

/* Footer Container overriding the local .container max-width */
.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

.footer-links-col ul li {
    margin-bottom: 0 !important;
}
