/* ============================================
   Footer Styles - Akademia 21
   ============================================ */

/* Footer Base */
.site-footer {
    background-color: var(--bg-white);
    color: var(--text-primary);
    font-family: var(--font-main);
    padding: 0;
    margin: 0;
}

.footer-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Footer Main Content */
.footer-main {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 0.8fr 0.6fr;
    gap: 30px;
    padding: 40px 0 30px;
}

/* Footer Column */
.footer-column {
    display: flex;
    flex-direction: column;
}

/* Brand Section (Column 1) */
.footer-brand {
    gap: 16px;
}

/* Блоки внутри колонки тащили собственные margin-bottom, и те складывались
   с gap: до лицензии набегало 36px, до соцсетей 40px при объявленных 12px.
   Ритм задаёт только gap. */
.footer-brand > * {
    margin-top: 0;
    margin-bottom: 0;
}

/* Logo Column (Right Side) */
.footer-logo-column {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}

.footer-logo {
    position: relative;
    width: 100px;
    height: 100px;
}

.footer-logo img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    top: 0;
    left: 0;
}

.footer-logo .logo-static {
    z-index: 1;
}

.footer-logo .logo-rotating {
    z-index: 2;
    animation: rotate 10s linear infinite;
}

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

/* Contact Info */
.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-value {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.contact-value:hover {
    color: var(--footer-accent);
}

/* License Text */
.footer-license {
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1.4;
}

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

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: #f5f5f5;
    border: 1px solid #e5e5e5;
    border-radius: 50%;
    color: var(--text-primary);
    text-decoration: none;
    font-size: var(--text-base);
    transition: background-color var(--transition-normal),
                border-color var(--transition-normal),
                color var(--transition-normal),
                transform var(--transition-fast);
}

.social-link:hover {
    background-color: var(--footer-accent);
    border-color: var(--footer-accent);
    color: #ffffff;
    transform: translateY(-2px);
}

/* Navigation Columns */
.footer-nav-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.footer-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-nav-link {
    color: var(--text-gray);
    text-decoration: none;
    font-size: var(--text-sm);
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-nav-link:hover {
    color: var(--text-primary);
}

/* Footer Bottom Bar */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-copyright {
    font-size: var(--text-sm);
    color: var(--text-primary);
    font-weight: 500;
}

.footer-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: var(--text-sm);
    color: var(--text-gray);
}

.footer-rating .stars {
    color: #fbbf24;
    letter-spacing: 1px;
}

.footer-legal {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-legal-link {
    color: var(--text-gray);
    text-decoration: none;
    font-size: var(--text-sm);
    transition: color var(--transition-fast);
}

.footer-legal-link:hover {
    color: var(--text-primary);
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 992px) {
    .footer-main {
        grid-template-columns: 1fr 1fr;
        gap: 24px 20px;
        padding: 30px 0 24px;
    }

    .footer-brand {
        grid-column: span 2;
    }

    .footer-logo-column {
        grid-column: span 2;
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .footer-legal {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .footer-main {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 24px 0 20px;
    }

    .footer-brand {
        grid-column: span 1;
        align-items: center;
        text-align: center;
    }

    .footer-logo-column {
        grid-column: span 1;
        justify-content: center;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-column {
        align-items: center;
        text-align: center;
    }

    .footer-nav-list {
        align-items: center;
    }

    .footer-copyright {
        text-align: center;
    }

    .footer-legal {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }
}