/**
 * Header and Footer Styles
 * Professional header and footer design
 */

/* ============================================
   Top Header Bar
   ============================================ */

.top-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.container-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5em;
    font-weight: bold;
    text-decoration: none;
    color: white;
}

.logo-icon {
    font-size: 1.8em;
}

.logo-text {
    letter-spacing: 1px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.9em;
}

.user-name {
    font-weight: 600;
    margin-bottom: 2px;
}

.user-email {
    font-size: 0.85em;
    opacity: 0.9;
}

.guest-info {
    display: flex;
    gap: 10px;
}

.btn-login, .btn-register {
    padding: 8px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 0.9em;
}

.btn-login {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-login:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-register {
    background: white;
    color: #667eea;
}

.btn-register:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

/* ============================================
   Main Navigation
   ============================================ */

.main-nav {
    background: white;
    border-bottom: 2px solid #f0f0f0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 60px;
    z-index: 999;
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    display: block;
    padding: 15px 20px;
    color: #555;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.nav-menu a:hover {
    color: #667eea;
    background: #f8f9fa;
    border-bottom-color: #667eea;
}

.nav-menu a.active {
    color: #667eea;
    background: #f8f9fa;
    border-bottom-color: #667eea;
    font-weight: 600;
}

.nav-logout {
    color: #dc3545 !important;
}

.nav-logout:hover {
    background: #fff5f5 !important;
    border-bottom-color: #dc3545 !important;
}

/* ============================================
   Main Container
   ============================================ */

.main-container {
    min-height: calc(100vh - 400px);
    padding: 30px 20px;
}

/* ============================================
   Footer
   ============================================ */

.site-footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #ecf0f1;
    margin-top: 50px;
    padding: 40px 0 20px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-section h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.footer-section h4 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.1em;
    border-bottom: 2px solid #667eea;
    padding-bottom: 8px;
    display: inline-block;
}

.footer-section p {
    color: #bdc3c7;
    line-height: 1.6;
    margin-bottom: 15px;
}

.footer-social {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.footer-social span {
    color: #bdc3c7;
    margin-right: 5px;
}

.social-link {
    display: inline-block;
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 35px;
    text-decoration: none;
    font-size: 1.2em;
    transition: all 0.3s;
}

.social-link:hover {
    background: #667eea;
    transform: translateY(-3px);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
    display: inline-block;
}

.footer-links a:hover {
    color: #667eea;
    padding-left: 5px;
}

.footer-links li:not(:has(a)) {
    color: #95a5a6;
    font-size: 0.95em;
}

.footer-bottom {
    margin-top: 20px;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.copyright p {
    margin: 5px 0;
    color: #95a5a6;
    font-size: 0.9em;
}

.footer-meta {
    font-size: 0.85em !important;
    color: #7f8c8d !important;
}

.footer-stats {
    display: flex;
    gap: 30px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.8em;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-label {
    display: block;
    font-size: 0.85em;
    color: #bdc3c7;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================
   Back to Top Button
   ============================================ */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5em;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 1000;
    transition: all 0.3s;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    .container-header {
        flex-direction: column;
        gap: 15px;
    }

    .header-right {
        width: 100%;
        justify-content: center;
    }

    .user-info {
        align-items: center;
        text-align: center;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0;
    }

    .nav-menu a {
        border-bottom: 1px solid #f0f0f0;
        border-left: 3px solid transparent;
    }

    .nav-menu a.active,
    .nav-menu a:hover {
        border-left-color: #667eea;
        border-bottom-color: #f0f0f0;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-stats {
        justify-content: center;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 0.9em;
    }

    .nav-menu a {
        padding: 12px 15px;
        font-size: 0.9em;
    }

    .footer-section {
        text-align: center;
    }

    .footer-links {
        text-align: center;
    }
}
