/*!
 * 3D Overlay Header Enhancement
 * Church Fund Theme Style
 */

/* Enhanced Header with 3D Effect */
.header {
    animation: headerFadeIn 0.5s ease;
    overflow: visible;
}

@keyframes headerFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Container styling for better look */
.header .container {
    max-width: 1140px;
}

/* Header Main Layout - Centered Navigation */
.header-main {
    margin-left: 40px;
    margin-right: 40px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.header.scrolled .header-main {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.12), 0 3px 12px rgba(0, 0, 0, 0.06);
}

.header-main .d-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.header-main .logo {
    flex: 0 0 auto;
    z-index: 1;
}

.header-main .navbar {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    max-width: 60%;
}

.header-main .navbar-collapse {
    flex-grow: 0;
}

.header-main .header-actions {
    flex: 0 0 auto;
    z-index: 1;
}

/* Logo Enhancement */
.logo {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.logo img {
    height: 70px;
}

.logo-large img {
    height: 75px;
}

/* Navigation Enhancement */
.navbar-nav {
    gap: 0;
}

.nav-link {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 14px;
    font-weight: 400;
    padding: 10px 10px;
    color: var(--text-heading);
    letter-spacing: 0px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
    background-color: rgba(27, 45, 70, 0.05);
}

.nav-link.active {
    color: var(--primary-color);
    font-weight: 500;
}

/* Header Actions - Search & CTA */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-search {
    background: transparent;
    border: none;
    color: var(--text-heading);
    font-size: 17px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.btn-search:hover {
    background-color: rgba(27, 45, 70, 0.08);
    color: var(--primary-color);
}

.btn-donate {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.5px;
    padding: 11px 18px;
    background-color: var(--accent-color);
    color: var(--primary-color);
    border: none;
    border-radius: 25px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(255, 202, 36, 0.3);
    white-space: nowrap;
}

.btn-donate:hover {
    background-color: #FFD454;
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 202, 36, 0.4);
}

/* Dropdown Menu 3D Effect */
.navbar-nav .dropdown-menu {
    margin-top: 0.25rem;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 4px 16px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    overflow: hidden;
}

.navbar-nav .dropdown-item {
    padding: 12px 24px;
    transition: all 0.2s ease;
}

.navbar-nav .dropdown-item:hover {
    background-color: var(--background-color);
    color: var(--primary-color);
    transform: translateX(5px);
}

/* Top Bar Styling */
.header-top a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
}

.header-top a:hover {
    color: var(--accent-color);
}

.header-top .social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-left: 8px;
    font-size: 13px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.header-top .social-icons a:hover {
    background: var(--accent-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Slider/Hero Section - No top margin since header overlays */
.carousel,
.hero-slider,
.page-header {
    margin-top: 0 !important;
}

.carousel-item img {
    object-fit: cover;
    min-height: 600px;
}

/* Add visual depth to header on scroll */
@media (min-width: 768px) {
    .header-main {
        padding: 18px 0;
    }
    
    .logo img {
        height: 75px;
    }
    
    .logo-large img {
        height: 80px;
    }
    
    .nav-link {
        font-size: 15px;
        padding: 12px 12px;
    }
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

/* Header fade effect based on scroll */
.header::before {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), transparent);
    pointer-events: none;
}

/* Mobile Adjustments */
@media (max-width: 991px) {
    .header-main .navbar {
        position: static;
        transform: none;
        max-width: 100%;
        width: 100%;
    }
    
    .header-main .d-flex {
        flex-wrap: wrap;
    }
    
    .header-main .navbar {
        order: 3;
        width: 100%;
        margin-top: 1rem;
    }
    
    .navbar-collapse {
        background: var(--white);
        padding: 1rem;
        border-radius: 8px;
        box-shadow: var(--shadow-lg);
        margin-top: 0.5rem;
    }
    
    .navbar-nav {
        flex-direction: column;
        gap: 0;
    }
    
    .nav-link {
        padding: 12px 16px;
    }
    
    .header-actions {
        gap: 0.5rem;
    }
    
    .btn-donate {
        font-size: 11px;
        padding: 10px 20px;
    }
}

@media (max-width: 767px) {
    .header-main {
        padding: 12px 0;
    }
    
    .logo img {
        height: 50px;
    }
    
    .logo-large img {
        height: 55px;
    }
    
    .header-top {
        font-size: 0.75rem;
        padding: 6px 0;
    }
    
    .header-top .social-icons {
        display: none;
    }
    
    .btn-search {
        font-size: 16px;
        width: 36px;
        height: 36ver;
    min-height: 600px;
}

/* Add visual depth to header on scroll */
@media (min-width: 768px) {
    .header-main {
        padding: 18px 0;
    }
    
    .logo img {
        height: 75px;
    }
    
    .logo-large img {
        height: 80px;
    }
    
    .nav-link {
        font-size: 15px;
        padding: 12px 22px;
    }
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

/* Header fade effect based on scroll */
.header::before {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), transparent);
    pointer-events: none;
}

/* Mobile Adjustments */
@media (max-width: 767px) {
    .header-main {
        padding: 12px 0;
    }
    
    .logo img {
        height: 50px;
    }
    
    .logo-large img {
        height: 55px;
    }
}
