/* Header & Footer Styles for CHAD Foundation */

/* Top Contact Bar */
.top-contact-bar {
    background: linear-gradient(to right, var(--dark-color), #34495e);
    color: rgba(255, 255, 255, 0.9);
    padding: 12px 0;
    font-size: 0.9rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1001;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.top-contact-bar.hidden {
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
}

.contact-info-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.contact-details {
    display: flex;
    gap: 30px;
}

.contact-detail {
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.contact-detail:hover {
    color: var(--accent-color);
}

.contact-detail i {
    color: var(--accent-color);
    font-size: 1rem;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icon {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
}

.social-icon:hover {
    color: white;
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

/* Main Navigation */
.main-nav {
    background-color: white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
}

.main-nav.scrolled {
    top: 0;
    transform: translateY(0);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
}

.logo-img-container {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-color);
    box-shadow: 0 4px 10px rgba(26, 82, 118, 0.2);
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-text h1 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 5px;
    line-height: 1.2;
}

.logo-text span {
    font-size: 0.85rem;
    color: var(--gray-color);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 35px;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: var(--dark-color);
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding: 8px 0;
    transition: all 0.3s ease;
}

.nav-link:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    transition: all 0.3s ease;
    border-radius: 2px;
}

.nav-link:hover:after,
.nav-link.active:after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-donate {
    padding: 12px 30px;
    margin-left: 20px;
    font-size: 0.9rem;
}

.mobile-toggle {
    display: none;
    font-size: 1.8rem;
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.mobile-toggle:hover {
    background-color: #f8f9fa;
}

/* Footer */
.main-footer {
    background: linear-gradient(135deg, #1a5276 0%, #2c3e50 100%);
    color: rgba(255, 255, 255, 0.9);
    padding: 80px 0 30px;
    position: relative;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    margin-bottom: 60px;
}

.footer-column h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--accent-color);
    position: relative;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.footer-logo img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.footer-logo h3 {
    border: none;
    padding: 0;
    margin: 0;
    font-size: 1.8rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.footer-links li:hover {
    transform: translateX(5px);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-links a:before {
    content: '›';
    color: var(--accent-color);
    font-size: 1.2rem;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.footer-about p {
    margin-bottom: 25px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.footer-social .social-icon {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.footer-social .social-icon:hover {
    background-color: var(--accent-color);
    transform: translateY(-5px);
}

.footer-contact .contact-detail {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    color: rgba(255, 255, 255, 0.8);
}

.footer-contact i {
    color: var(--accent-color);
    font-size: 1.2rem;
    min-width: 25px;
    margin-top: 3px;
}

.footer-newsletter p {
    margin-bottom: 25px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.newsletter-form input {
    padding: 15px 20px;
    border: none;
    border-radius: 50px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.newsletter-form input:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.15);
}

.newsletter-form button {
    background: linear-gradient(to right, var(--accent-color), #e67e22);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.newsletter-form button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Footer Logo Styling */
.footer-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.footer-logo-img-container {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.footer-logo-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.footer-column:first-child h3 {
    border: none;
    padding: 0;
    margin: 0;
    font-size: 1.8rem;
    color: white;
}

/* Responsive adjustments for footer logo */
@media (max-width: 768px) {
    .footer-logo {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .footer-logo-img-container {
        width: 70px;
        height: 70px;
    }
}

@media (max-width: 576px) {
    .footer-logo-img-container {
        width: 60px;
        height: 60px;
    }
}

/* Mobile menu fix */
@media (max-width: 767px) {
    .nav-menu.show {
        left: 0 !important;
        display: flex !important;
    }
    
    .top-contact-bar {
        transform: translateY(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* Dropdown Menu Styles */
.nav-menu {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu > li {
    position: relative;
    display: inline-block;
}

.nav-menu > li > a {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
}

.nav-menu > li.dropdown > a .fa-caret-down {
    margin-left: 5px;
    font-size: 0.8em;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: none;
    min-width: 200px;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 5px;
    list-style: none;
    margin: 0;
    padding: 10px 0;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    position: relative;
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s;
}

.dropdown-menu a:hover {
    background: #f8f9fa;
    color: #3498db;
}

/* Submenu styles */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -10px;
    margin-left: 1px;
}

.dropdown-submenu:hover > .dropdown-menu {
    display: block;
}

/* Navigation Menu Styles */
.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-size: 16px; /* Fixed font size for all menu items */
    font-weight: 500;
    transition: all 0.3s;
    white-space: nowrap;
}

.nav-menu > li.home-page > a {
    font-weight: 600;
    color: #3498db;
}

.nav-menu > li > a:hover {
    color: #3498db;
    background: #f8f9fa;
}

/* Dropdown Menu Styles */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: none;
    min-width: 200px;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 5px;
    list-style: none;
    margin: 0;
    padding: 10px 0;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    position: relative;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px; /* Increased padding */
    color: #333;
    text-decoration: none;
    font-size: 16px; /* Same font size as parent */
    transition: all 0.3s;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background: #f8f9fa;
    color: #3498db;
}

/* Submenu styles - same font size */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -10px;
    margin-left: 1px;
}

.dropdown-submenu:hover > .dropdown-menu {
    display: block;
}

/* Dropdown arrow for parent items */
.dropdown-toggle::after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-left: 5px;
    font-size: 14px;
}

/* Home icon */
.home-page .fa-home {
    font-size: 18px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .nav-menu > li {
        width: 100%;
    }
    
    .nav-menu > li > a {
        padding: 12px 15px;
        border-bottom: 1px solid #eee;
    }
    
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 20px;
        display: block !important;
    }
}

/* Mobile Menu Z-Index Fix */
@media (max-width: 768px) {
    /* Ensure mobile menu appears above everything */
    .nav-menu {
        z-index: 9999 !important;
        position: fixed !important;
        top: 70px !important; /* Adjust based on your header height */
        left: 0 !important;
        right: 0 !important;
        background: white !important;
        max-height: calc(100vh - 70px) !important;
        overflow-y: auto !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
    }
    
    /* Ensure top contact bar doesn't overlap */
    .top-contact-bar {
        z-index: 1000 !important;
        position: relative !important;
    }
    
    /* Ensure main nav has proper stacking */
    .main-nav {
        z-index: 1001 !important;
        position: relative !important;
    }
    
    /* Mobile toggle button positioning */
    .mobile-toggle {
        z-index: 1002 !important;
        position: relative !important;
    }
}