/**
 * Custom Styles for BNP Upazila Theme
 * 
 * @package BNP_Upazila
 * @since 1.0.0
 */

/* ==========================================================================
   Header Styles
   ========================================================================== */

.top-bar {
    background: linear-gradient(135deg, var(--bnp-green) 0%, #004d2f 100%);
    color: white;
    padding: 10px 0;
    font-size: 0.9rem;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left .upazila-name {
    font-weight: 600;
    letter-spacing: 0.5px;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: var(--transition-fast);
}

.social-icon:hover {
    background: var(--bnp-gold);
    color: var(--bnp-dark);
    transform: translateY(-2px);
}

.dark-mode-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-fast);
}

.dark-mode-toggle:hover {
    background: var(--bnp-gold);
    color: var(--bnp-dark);
}

/* Main Header */
.site-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px 0;
    position: relative;
    z-index: 1000;
    transition: all 0.3s ease;
}

.site-header.sticky-header {
    position: sticky;
    top: 0;
}

.site-header.scrolled {
    padding: 10px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 20px;
}

.site-logo img {
    max-height: 60px;
    width: auto;
    transition: var(--transition-fast);
}

.site-header.scrolled .site-logo img {
    max-height: 50px;
}

.bnp-flag-logo {
    max-height: 60px;
    width: auto;
    transition: var(--transition-fast);
}

.site-header.scrolled .bnp-flag-logo {
    max-height: 50px;
}

.site-title {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 700;
    color: var(--bnp-green);
}

.site-title a {
    color: inherit;
    text-decoration: none;
}

.site-description {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

/* Navigation */
.main-navigation {
    flex: 1;
}

.menu-wrapper {
    display: flex;
    justify-content: center;
}

.primary-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.primary-menu li {
    position: relative;
}

.primary-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--bnp-dark);
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition-fast);
    border-radius: 5px;
}

.primary-menu a:hover,
.primary-menu li.current-menu-item > a {
    background: var(--bnp-green);
    color: white;
}

/* Dropdown Menu */
.primary-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition-fast);
    list-style: none;
    padding: 10px 0;
    border-radius: 5px;
    z-index: 100;
}

.primary-menu li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.primary-menu .sub-menu a {
    padding: 10px 20px;
    border-radius: 0;
}

.primary-menu .sub-menu a:hover {
    background: var(--bnp-light);
    color: var(--bnp-green);
    padding-left: 25px;
}

/* Menu Toggle (Mobile) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hamburger .line {
    width: 25px;
    height: 3px;
    background: var(--bnp-green);
    transition: var(--transition-fast);
    border-radius: 2px;
}

.menu-toggle.active .hamburger .line:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active .hamburger .line:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .hamburger .line:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* Header Actions */
.header-actions {
    display: flex;
    gap: 10px;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transition: var(--transition-smooth);
    overflow-y: auto;
}

.mobile-menu-overlay.active {
    right: 0;
}

.mobile-menu-wrapper {
    padding: 30px;
}

.mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--bnp-green);
}

.mobile-menu {
    list-style: none;
    padding: 0;
    margin: 40px 0 0 0;
}

.mobile-menu li {
    border-bottom: 1px solid #eee;
}

.mobile-menu a {
    display: block;
    padding: 15px 0;
    color: var(--bnp-dark);
    text-decoration: none;
    font-weight: 500;
}

.mobile-menu a:hover {
    color: var(--bnp-green);
    padding-left: 10px;
}

/* ==========================================================================
   Footer Styles
   ========================================================================== */

.site-footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #f8f9fa;
    margin-top: var(--spacing-lg);
}

.footer-widgets {
    padding: var(--spacing-lg) 0 var(--spacing-md) 0;
}

.footer-widgets .widget {
    margin-bottom: var(--spacing-md);
}

.footer-widgets .widget-title {
    color: var(--bnp-gold);
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
    position: relative;
    padding-bottom: 10px;
}

.footer-widgets .widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--bnp-green);
}

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

.footer-widgets ul li {
    margin-bottom: 10px;
}

.footer-widgets ul a {
    color: #ccc;
    text-decoration: none;
    transition: var(--transition-fast);
    display: inline-block;
}

.footer-widgets ul a:hover {
    color: var(--bnp-gold);
    padding-left: 5px;
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 15px;
    color: #ccc;
}

.contact-info i {
    color: var(--bnp-green);
    margin-top: 3px;
}

.footer-social {
    display: flex;
    gap: 10px;
    margin-top: var(--spacing-sm);
}

.footer-social .social-icon {
    background: rgba(255, 255, 255, 0.1);
}

.footer-social .social-icon:hover {
    background: var(--bnp-green);
}

/* Footer Bottom */
.footer-bottom {
    background: #0a0a0a;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.copyright {
    color: #999;
    font-size: 0.9rem;
}

.copyright a {
    color: var(--bnp-gold);
    text-decoration: none;
}

.copyright a:hover {
    text-decoration: underline;
}

.footer-menu-list {
    display: flex;
    list-style: none;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.footer-menu-list a {
    color: #999;
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-menu-list a:hover {
    color: var(--bnp-gold);
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--bnp-green);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    z-index: 999;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

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

.scroll-to-top:hover {
    background: var(--bnp-red);
    transform: translateY(-5px);
}

/* Notification Popup */
.notification-popup {
    position: fixed;
    bottom: 30px;
    left: 30px;
    max-width: 400px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition-smooth);
}

.notification-popup.active {
    transform: translateY(0);
    opacity: 1;
}

.notification-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #999;
}

.notification-close:hover {
    color: var(--bnp-red);
}

/* Urgent Notice Marquee */
.urgent-notice-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bnp-red);
    color: white;
    padding: 10px 0;
    z-index: 998;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.urgent-notice-content {
    display: flex;
    align-items: center;
    gap: 15px;
    overflow: hidden;
}

.urgent-label {
    font-weight: 700;
    background: white;
    color: var(--bnp-red);
    padding: 5px 15px;
    border-radius: 20px;
    white-space: nowrap;
}

.marquee {
    flex: 1;
    overflow: hidden;
}

.marquee span {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 20s linear infinite;
    white-space: nowrap;
}

@keyframes marquee {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-100%);
    }
}

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

@media (max-width: 1024px) {
    .header-actions .btn {
        padding: 8px 20px;
        font-size: 0.85rem;
    }
}

@media (max-width: 992px) {
    .menu-toggle {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .menu-text {
        font-size: 0.8rem;
        margin-top: 5px;
    }
    
    .main-navigation .menu-wrapper {
        display: none;
    }
    
    .header-actions {
        display: none;
    }
    
    .top-bar-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .site-header {
        padding: 15px 0;
    }
    
    .site-branding {
        flex-direction: column;
        gap: 10px;
    }
    
    .bnp-flag-logo {
        max-height: 40px;
    }
    
    .footer-widgets .row .col-md-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .scroll-to-top {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
    }
    
    .notification-popup {
        left: 15px;
        right: 15px;
        max-width: none;
    }
}

/* Dark Mode */
body.dark-mode .site-header {
    background: #1a1a1a;
    color: white;
}

body.dark-mode .primary-menu a {
    color: white;
}

body.dark-mode .primary-menu a:hover {
    background: var(--bnp-green);
}

body.dark-mode .primary-menu .sub-menu {
    background: #2d2d2d;
}

body.dark-mode .mobile-menu-overlay {
    background: #1a1a1a;
}

body.dark-mode .mobile-menu a {
    color: white;
}
