/* Custom Styles for UCZ Bemba Hymn Book */

:root {
    --primary-color: #04015d;
    --secondary-color: #e92112;
    --accent-color: #e92112;
    --dark-color: #04015d;
    --light-bg: #F8F9FA;
    --white-color: #fff;
    --gradient-1: linear-gradient(135deg, #04015d 0%, #0a0380 100%);
    --gradient-2: linear-gradient(135deg, #e92112 0%, #c01d10 100%);
    --gradient-3: linear-gradient(135deg, #04015d 0%, #e92112 100%);
    --gradient-4: linear-gradient(to right, #04015d 0%, #e92112 50%, #04015d 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--dark-color);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
}

/* UCZ Brand Stripe */
.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, #04015d 0%, #04015d 33%, #fff 33%, #fff 66%, #e92112 66%, #e92112 100%);
}

/* Navbar Styles */
.navbar {
    transition: all 0.3s ease;
    padding: 1rem 0;
    position: relative;
}

.navbar-brand {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.nav-link.active {
    color: var(--primary-color) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

/* Hero Section */
.hero-section {
    background: var(--gradient-1);
    padding: 100px 0 120px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,149.3C960,160,1056,160,1152,138.7C1248,117,1344,75,1392,53.3L1440,32L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    animation: fadeInUp 1s ease;
}

.hero-section p {
    animation: fadeInUp 1s ease 0.2s backwards;
}

.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 1s ease 0.4s backwards;
}

.search-container .input-group {
    border-radius: 50px;
    overflow: hidden;
}

.search-container input {
    padding: 1rem 1.5rem;
    font-size: 1rem;
}

.search-container input:focus {
    box-shadow: none;
}

.search-container .input-group-text {
    padding: 0 1.5rem;
}

.search-container button {
    border-radius: 0 50px 50px 0;
    padding: 0 2rem;
    font-weight: 600;
}

/* Search Results Dropdown */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 15px;
    margin-top: 10px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border-top: 3px solid var(--primary-color);
    border-bottom: 3px solid var(--accent-color);
    z-index: 1000;
    display: none;
}

.search-results.show {
    display: block;
    animation: slideDown 0.3s ease;
}

.search-result-item {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--light-bg);
    padding-left: 30px;
}

.search-result-number {
    background: var(--accent-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 600;
    margin-right: 15px;
    min-width: 50px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(233, 33, 18, 0.3);
}

.search-result-title {
    flex: 1;
    font-weight: 500;
    color: var(--dark-color);
}

.no-results {
    padding: 30px;
    text-align: center;
    color: #999;
}

/* Hymn Cards */
.hymn-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.hymn-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.hymn-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.hymn-number {
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px rgba(4, 1, 93, 0.3);
}

/* Alternate red accent for variety */
.hymn-card:nth-child(even) .hymn-number {
    background: var(--accent-color);
    box-shadow: 0 2px 8px rgba(233, 33, 18, 0.3);
}

.btn-favorite {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-favorite:hover,
.btn-favorite.active {
    color: var(--accent-color);
    transform: scale(1.2);
}

.hymn-title {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.hymn-preview {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 15px;
    flex: 1;
}

.hymn-card .btn {
    margin-top: auto;
}

/* Feature Cards */
.feature-card {
    padding: 30px;
    border-radius: 15px;
    background: white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: white;
    font-size: 2rem;
}

/* Statistics Section */
.stat-item {
    padding: 20px;
}

.stat-item i {
    opacity: 0.9;
}

/* UCZ-themed background for statistics */
.bg-primary {
    background: var(--primary-color) !important;
}

/* Red accents for special sections */
.text-danger {
    color: var(--accent-color) !important;
}

/* Buttons */
.btn-primary {
    background: var(--primary-color);
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(233, 33, 18, 0.4);
}

.btn-outline-light {
    border-radius: 25px;
    padding: 8px 20px;
    border-width: 2px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    transform: translateY(-2px);
}

/* Footer */
footer {
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, #04015d 0%, #04015d 33%, #fff 33%, #fff 66%, #e92112 66%, #e92112 100%);
}

footer a:hover {
    color: white !important;
}

.social-links a {
    transition: all 0.3s ease;
    display: inline-block;
}

.social-links a:hover {
    transform: translateY(-3px);
    color: var(--accent-color) !important;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0 80px;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .search-container input {
        font-size: 0.9rem;
    }
    
    .hymn-card {
        margin-bottom: 20px;
    }
    
    .display-3 {
        font-size: 2.5rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
}

/* Scrollbar Styling */
.search-results::-webkit-scrollbar {
    width: 8px;
}

.search-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.search-results::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Loading State */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

