/* Common Components Styles for Edtech-Guild */

/* Header */
header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 100%;
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: 1px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

nav a:hover,
nav a.active {
    color: var(--primary-color);
}

/* Footer */
footer {
    background-color: #faf7f2 !important;
    color: #333333 !important;
    text-align: center;
    padding: 4rem 2rem 2.5rem !important;
    margin-top: 0 !important;
    border-top: 1px solid #ebdcd0 !important;
}

footer h3, footer h4 {
    color: #19444a !important;
}

footer p, footer li, footer span {
    color: #333333 !important;
}

footer a {
    color: #444444 !important;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #c89551 !important;
}

.copyright {
    font-size: 0.88rem;
    color: #666666 !important;
    border-top: 1px solid #ebdcd0 !important;
    padding-top: 2rem !important;
}

/* Floating Sidebar */
.floating-sidebar {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    background-color: var(--primary-color);
    border-radius: 8px 0 0 8px;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.floating-sidebar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 70px;
    padding: 12px 5px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
    font-weight: 500;
}

.floating-sidebar a:last-child {
    border-bottom: none;
}

.floating-sidebar a:hover {
    background-color: #3f7b88;
    padding-right: 15px;
}

.floating-sidebar i, .floating-sidebar svg {
    width: 24px;
    height: 24px;
    margin-bottom: 5px;
    fill: currentColor;
}

.floating-sidebar .label {
    text-align: center;
    line-height: 1.2;
    word-break: keep-all;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    right: 15px;
    bottom: 15px;
    width: 45px;
    height: 45px;
    background-color: white;
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    z-index: 9999;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }

    .footer-container {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        text-align: left !important;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .floating-sidebar {
        width: 100%;
        border-radius: 0;
        top: auto;
        bottom: 0;
        transform: none;
        flex-direction: row;
    }

    .floating-sidebar a {
        flex: 1;
        width: auto;
        padding: 10px 0;
        font-size: 0.7rem;
        height: 60px;
        border-bottom: none;
        border-right: 1px solid rgba(255, 255, 255, 0.1);
    }

    .floating-sidebar a:last-child {
        border-right: none;
    }
    
    body {
        padding-bottom: 60px; /* Spacer for mobile toolbar */
    }
}
