/**
 * Header & Footer Styles
 * Modern UI/UX for DKM Baitul Hasib
 */


/* ===== GLOBAL STYLES ===== */

:root {
    --primary-color: #28a745;
    --primary-dark: #1e7e34;
    --secondary-color: #6c757d;
    --accent-color: #ffc107;
    --bg-dark: #1a1a1a;
    --bg-light: #f8f9fa;
    --text-light: #ffffff;
    --text-dark: #212529;
    --border-color: #dee2e6;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --border-radius: 8px;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}


/* ===== HEADER STYLES ===== */


/* Top Bar */

.top-bar {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar small {
    font-weight: 500;
    opacity: 0.9;
}


/* Main Navigation */

.main-navbar {
    background: linear-gradient(135deg, #2c3e50, #34495e) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1030;
    backdrop-filter: blur(10px);
}


/* Brand Styling */

.navbar-brand {
    text-decoration: none !important;
    padding: 0.5rem 0;
    transition: var(--transition);
}

.navbar-brand:hover {
    transform: translateY(-1px);
}

.brand-logo {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.brand-text .brand-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-light);
    margin: 0;
}

.brand-text .brand-tagline {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    font-weight: 400;
}


/* Navigation Items */

.navbar-nav .nav-link {
    padding: 0.8rem 1rem !important;
    margin: 0 0.2rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: 500;
    position: relative;
    color: rgba(255, 255, 255, 0.9) !important;
}

.navbar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light) !important;
    transform: translateY(-1px);
}

.navbar-nav .nav-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--text-light) !important;
    box-shadow: 0 2px 10px rgba(40, 167, 69, 0.3);
}


/* User Avatar */

.user-avatar {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.user-dropdown {
    display: flex !important;
    align-items: center;
}


/* Dropdown Menus */

.dropdown-menu-modern {
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    background: white;
    min-width: 280px;
}

.dropdown-menu-modern .dropdown-item {
    padding: 0.8rem 1.2rem;
    border: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    font-weight: 500;
}

.dropdown-menu-modern .dropdown-item:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    transform: translateX(5px);
}

.dropdown-icon {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.dropdown-content .dropdown-title {
    font-weight: 600;
    margin-bottom: 0.1rem;
}

.dropdown-content .dropdown-subtitle {
    font-size: 0.8rem;
    color: var(--secondary-color);
}

.dropdown-header .user-info .user-name {
    font-weight: 600;
    color: var(--text-dark);
}

.dropdown-header .user-info .user-email {
    font-size: 0.85rem;
    color: var(--secondary-color);
}


/* Guest Navigation Buttons */

.btn-login {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)) !important;
    border: none !important;
    color: white !important;
    border-radius: 25px !important;
    padding: 0.6rem 1.5rem !important;
    margin: 0 0.2rem !important;
}

.btn-register {
    background: transparent !important;
    border: 2px solid var(--primary-color) !important;
    color: var(--primary-color) !important;
    border-radius: 25px !important;
    padding: 0.6rem 1.5rem !important;
    margin: 0 0.2rem !important;
}

.btn-register:hover {
    background: var(--primary-color) !important;
    color: white !important;
}


/* Alert Container */

.alert-container {
    margin-bottom: 1rem;
}


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

.main-footer {
    background: linear-gradient(135deg, #1a1a1a, #2c3e50) !important;
    color: var(--text-light);
    margin-top: auto;
}

.footer-content {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}


/* Footer Logo */

.footer-logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.footer-title {
    color: var(--text-light);
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.footer-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-description {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}


/* Footer Stats */

.footer-stats {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-top: 1rem;
}

.stat-item .stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-item .stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}


/* Footer Section Titles */

.footer-section-title {
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}


/* Footer Links */

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.footer-links a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}


/* Contact Info */

.contact-info .contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
}

.contact-item i {
    color: var(--primary-color);
    width: 20px;
    flex-shrink: 0;
}

.contact-item a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.contact-item a:hover {
    color: var(--primary-color);
}


/* Social Media */

.social-title {
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.social-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.social-link {
    display: flex;
    align-items: center;
    padding: 0.6rem 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: var(--transition);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
}

.social-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    color: white;
}

.social-link i {
    margin-right: 0.5rem;
    width: 16px;
    text-align: center;
}


/* Social Platform Colors */

.social-link.facebook:hover {
    background: linear-gradient(135deg, #1877f2, #4267B2);
}

.social-link.instagram:hover {
    background: linear-gradient(135deg, #E4405F, #C13584);
}

.social-link.whatsapp:hover {
    background: linear-gradient(135deg, #25D366, #128C7E);
}

.social-link.youtube:hover {
    background: linear-gradient(135deg, #FF0000, #CC0000);
}

.social-link.telegram:hover {
    background: linear-gradient(135deg, #0088CC, #005F99);
}

.social-link.twitter:hover {
    background: linear-gradient(135deg, #1DA1F2, #0D8BD9);
}


/* Newsletter */

.newsletter-title {
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.newsletter-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.newsletter-form .form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-light);
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.newsletter-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.newsletter-form .form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
    color: var(--text-light);
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.newsletter-form .btn {
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    padding: 0.6rem 1rem;
}


/* Footer Bottom */

.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.8);
}

.footer-links-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-links-bottom a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
}

.footer-links-bottom a:hover {
    color: var(--primary-color);
}

.footer-links-bottom .separator {
    margin: 0 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}


/* Back to Top Button */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    box-shadow: 0 4px 20px rgba(40, 167, 69, 0.3);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(40, 167, 69, 0.4);
}


/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 991.98px) {
    .brand-text .brand-name {
        font-size: 1.3rem;
    }
    .navbar-nav {
        margin-top: 1rem;
        padding: 1rem 0;
        background: rgba(0, 0, 0, 0.1);
        border-radius: var(--border-radius);
    }
    .dropdown-menu-modern {
        min-width: 100%;
        margin-top: 0.25rem;
    }
    .social-links {
        grid-template-columns: 1fr;
    }
    .footer-links-bottom {
        flex-direction: column;
        gap: 0.5rem;
    }
    .footer-links-bottom .separator {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .top-bar {
        padding: 0.5rem 0;
    }
    .top-bar .row {
        text-align: center !important;
    }
    .brand-logo {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }
    .brand-text .brand-name {
        font-size: 1.2rem;
    }
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 575.98px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .footer-content {
        padding: 2rem 0;
    }
    .footer-stats {
        margin-top: 1rem;
    }
}


/* ===== ANIMATIONS ===== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}


/* Animation Classes */

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in-down {
    animation: fadeInDown 0.6s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}


/* Page Load Animations */

.main-header {
    animation: fadeInDown 0.8s ease-out;
}

.main-footer {
    animation: fadeInUp 0.8s ease-out;
}


/* Hover Animations */

.navbar-brand:hover .brand-logo {
    animation: pulse 1s ease-out;
}


/* ===== UTILITY CLASSES ===== */

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)) !important;
}

.shadow-custom {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
}

.border-radius-custom {
    border-radius: var(--border-radius) !important;
}


/* Dark mode support (optional) */

@media (prefers-color-scheme: dark) {
     :root {
        --bg-light: #1a1a1a;
        --text-dark: #ffffff;
        --border-color: #333333;
    }
}