/* ============================================================
   FOOTER
   ============================================================ */

.main-footer {
    background: var(--dark-secondary);
    color: rgba(255, 255, 255, 0.6);
    position: relative;
}

/* No separator above the footer: the dark block reads as its own boundary
   (both the hairline .divider and the colorful accent stripe were retired). */

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px 40px;
}

/* ── Grid ── */
.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr 0.85fr;
    gap: 40px;
    padding: 52px 0 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

/* ── Brand column ── */
.footer-logo-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.footer-logo-mark {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}

.footer-logo-mark span {
    display: block;
    border-radius: 3px;
}

.footer-logo-mark span:nth-child(1) { background: var(--primary); }
.footer-logo-mark span:nth-child(2) { background: var(--primary-light); }
.footer-logo-mark span:nth-child(3) { background: var(--accent-cyan); }
.footer-logo-mark span:nth-child(4) { background: var(--accent); }

.footer-logo-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.3px;
}

.footer-brand p {
    font-size: 0.875rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.38);
    max-width: 260px;
    margin-bottom: 20px;
}

/* ── Link columns ── */
.footer-col {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.footer-col h4 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: rgba(255, 255, 255, 0.32);
    font-weight: 400;
    margin-bottom: 1rem;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-col a {
    color: rgba(255, 255, 255, 0.48);
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.35rem 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.18s ease, transform 0.18s ease;
    line-height: 1.4;
}

.footer-col a:hover {
    color: rgba(255, 255, 255, 0.92);
    transform: translateX(3px);
}

.footer-col a i {
    width: 16px;
    text-align: center;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.32);
    transition: color 0.18s ease;
}

.footer-col a:hover i { color: var(--accent-cyan, #06b6d4); }

/* ── Bottom row ── */
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 28px;
}

.footer-bottom p {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: 0.3px;
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.16) !important;
}

/* ── Social icons ── */
.footer-socials {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.footer-social-icon {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.9rem;
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.footer-social-icon:hover {
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

/* ── Back-to-top button ── */
#back-to-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--dark);
    color: #fff;
    border: none;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

#back-to-top.visible {
    opacity: 1;
    pointer-events: all;
}

#back-to-top:hover {
    background: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

/* ── Responsive ── */
@media (max-width: 1200px) {
    .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
    .footer-brand { grid-column: 1 / -1; display: flex; flex-direction: row; flex-wrap: wrap; gap: 24px 48px; }
    .footer-brand p { margin-bottom: 0; }
    .footer-brand > div:first-child { width: 100%; }
}

@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr 1fr; gap: 28px; }
    .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
    .footer-inner { padding: 0 24px 32px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
    .footer-brand { grid-column: 1 / -1; flex-direction: column; }
    .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
    .footer-tagline { display: none; }
}

@media (max-width: 400px) {
    .footer-grid { grid-template-columns: 1fr; }
}
