/**
 * Custom CSS for Good Hope Uganda
 * Modern Flat Design - Vibrant & Professional
 */

/* ===== ROOT VARIABLES & COLOR PALETTE ===== */
:root {
    /* Brand Colors - African Earth & Hope Theme */
    --primary-color: #006D77;  /* Deep Teal - Trust/Stability */
    --accent-color: #FFD166;   /* Sun Yellow - Hope/Energy */
    --action-color: #EF476F;   /* Vibrant Red/Pink - Urgent Action (Donate) */
    --success-color: #06D6A0;  /* Mint Green - Growth/Health */
    
    /* Neutrals */
    --dark-color: #264653;     /* Deep Dark Blue/Green - Text */
    --light-color: #F8F9FA;    /* Off White */
    --white-color: #FFFFFF;
    
    /* Typography */
    --font-family: 'Poppins', sans-serif;
    --border-radius: 15px;
    --card-shadow: 0 10px 30px rgba(38, 70, 83, 0.1);
    --hover-shadow: 0 20px 40px rgba(38, 70, 83, 0.2);
}

/* ===== GLOBAL STYLES ===== */
body {
    font-family: var(--font-family);
    line-height: 1.8;
    color: var(--dark-color);
    background-color: var(--white-color);
    overflow-x: hidden; /* Prevent scroll from diagonal shapes */
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 1rem;
}

.display-4 { font-weight: 800; }
.lead { font-weight: 400; opacity: 0.9; }

/* ===== BUTTONS (Modern & Pill Shaped) ===== */
.btn {
    padding: 0.8rem 2rem;
    font-weight: 600;
    border-radius: 50px; /* Pill shape */
    border: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy effect */
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.btn-accent {
    background-color: var(--accent-color);
    color: var(--dark-color);
}

.btn-action {
    background-color: var(--action-color);
    color: var(--white-color);
}

.btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.btn-outline-light {
    border: 2px solid rgba(255,255,255,0.5);
}

.btn-outline-light:hover {
    background-color: var(--white-color);
    color: var(--primary-color);
}

/* ===== HERO SECTION (Dynamic & Overlapping) ===== */
.hero-wrapper {
    position: relative;
    padding-bottom: 100px;
}

.hero-section {
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 120px 0 180px; /* Extra padding bottom for clip-path */
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
    position: relative;
    z-index: 1;
}

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

/* Pattern overlay for hero (CSS only pattern) */
.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    background-image: radial-gradient(var(--white-color) 2px, transparent 2px);
    background-size: 30px 30px;
    z-index: 0;
}

/* Floating Card in Hero */
.hero-floating-card {
    background: var(--white-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--card-shadow);
    position: relative;
    z-index: 10;
    margin-top: -80px; /* Pull up into hero */
}

/* ===== SECTION SHAPES & DIVIDERS ===== */
.section-diagonal {
    position: relative;
    background: var(--light-color);
    z-index: 0;
}

.section-diagonal::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 0;
    width: 100%;
    height: 100px;
    background: var(--light-color);
    clip-path: polygon(0 50%, 100% 0, 100% 100%, 0 100%);
    z-index: -1;
}

/* ===== FEATURE CARDS (Programs) ===== */
.feature-card {
    background: var(--white-color);
    border-radius: var(--border-radius);
    padding: 2.5rem 2rem;
    transition: all 0.4s ease;
    border: 1px solid rgba(0,0,0,0.05);
    height: 100%;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--hover-shadow);
}

.icon-box {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    transition: transform 0.3s ease;
}

.icon-box-primary { background: rgba(0, 109, 119, 0.1); color: var(--primary-color); }
.icon-box-accent { background: rgba(255, 209, 102, 0.2); color: #e0b145; }
.icon-box-action { background: rgba(239, 71, 111, 0.1); color: var(--action-color); }
.icon-box-success { background: rgba(6, 214, 160, 0.1); color: var(--success-color); }

.feature-card:hover .icon-box {
    transform: scale(1.1) rotate(5deg);
}

/* ===== STATS COUNTER ===== */
.counter-box {
    text-align: center;
    padding: 2rem;
}

.counter-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.counter-text {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

/* ===== IMAGE PLACEHOLDERS ===== */
.img-placeholder-modern {
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.img-placeholder-modern i {
    color: #dee2e6;
    font-size: 8rem;
}

/* ===== NEWS CARDS ===== */
.news-card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    height: 100%;
    overflow: hidden;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.news-img-top {
    height: 200px;
    background-color: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-date {
    background: var(--accent-color);
    color: var(--dark-color);
    padding: 0.25rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 0.8rem;
}

/* ===== CTA SECTION ===== */
.cta-section {
    background-color: var(--dark-color);
    color: var(--white-color);
    position: relative;
    overflow: hidden;
    padding: 80px 0;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

/* ===== FOOTER ===== */
.footer {
    background-color: #1d3557;
    padding-top: 80px;
}

/* ===== UTILITIES ===== */
.text-primary-custom { color: var(--primary-color) !important; }
.bg-light-custom { background-color: #F8F9FA !important; }
.bg-soft-primary { background-color: rgba(0, 109, 119, 0.05); }

.blob-shape {
    position: absolute;
    z-index: -1;
    opacity: 0.5;
}

/* ===== ABOUT US PAGE ===== */
.inner-hero {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.about-section-title {
    position: relative;
    padding-left: 1.2rem;
}

.about-section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    border-radius: 10px;
}

.about-section-title span {
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.stat-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background: var(--white-color);
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    font-size: 0.9rem;
}

.about-image-grid {
    position: relative;
}

.about-img-main {
    position: relative;
    z-index: 1;
}

.about-img-floating {
    position: absolute;
    bottom: -20px;
    right: -20px;
    z-index: 2;
    max-width: 250px;
}

.mvv-card {
    transition: all 0.3s ease;
}

.mvv-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important;
}

.icon-box-lg {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.approach-step {
    padding: 2rem 1rem;
    transition: all 0.3s ease;
}

.approach-step:hover {
    transform: translateY(-10px);
}

.step-number {
    width: 50px;
    height: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.step-icon {
    width: 80px;
    height: 80px;
    margin-top: 30px;
}

.accordion-button:not(.collapsed) {
    background-color: var(--primary-color);
    color: white;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: rgba(0, 0, 0, 0.125);
}

/* Bootstrap Badge Subtle Colors */
.bg-primary-subtle {
    background-color: rgba(0, 109, 119, 0.1);
}

.bg-success-subtle {
    background-color: rgba(6, 214, 160, 0.1);
}

.bg-warning-subtle {
    background-color: rgba(255, 209, 102, 0.2);
}

.bg-danger-subtle {
    background-color: rgba(239, 71, 111, 0.1);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .about-img-floating {
        position: relative;
        bottom: 0;
        right: 0;
        margin-top: 1rem;
    }
    
    .about-section-title {
        padding-left: 1rem;
    }
    
    .step-number {
        position: static;
        transform: none;
        margin-bottom: 0.5rem;
    }
}

/* ===== GALLERY PAGE ===== */
.gallery-card {
    background: var(--white-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    height: 100%;
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.gallery-img-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-card:hover .gallery-img {
    transform: scale(1.1);
}

.gallery-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.gallery-card:hover .gallery-placeholder {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.gallery-info {
    background: var(--white-color);
}

.filter-btn {
    transition: all 0.3s ease;
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: var(--white-color);
    border-color: var(--primary-color);
}

.gallery-item {
    transition: all 0.3s ease;
}

.gallery-item.hide {
    display: none;
}

.gallery-stat-card {
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.gallery-stat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15) !important;
}

.gallery-stat-card:hover .stat-icon-wrapper {
    transform: scale(1.1) rotate(5deg);
}

.stat-icon-wrapper {
    transition: transform 0.3s ease;
}

.stat-box {
    padding: 1.5rem;
    transition: transform 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-5px);
}

.bg-info-subtle {
    background-color: rgba(13, 202, 240, 0.1);
}

/* Gallery Filter Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.gallery-item.show {
    animation: fadeIn 0.4s ease;
}

/* ===== CONTACT PAGE ===== */
.contact-info-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.contact-info-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.contact-info-card:hover .icon-wrapper {
    transform: scale(1.1) rotate(5deg);
}

.icon-wrapper {
    transition: transform 0.3s ease;
}

.contact-info-card a:hover {
    text-decoration: underline !important;
}

/* Contact Form Styling */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 109, 119, 0.15);
}

.form-control-lg,
.form-select-lg {
    border-radius: 10px;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
}

.form-label {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

textarea.form-control {
    resize: vertical;
}

/* Map Placeholder */
.map-placeholder {
    border: 2px dashed #dee2e6;
    transition: all 0.3s ease;
}

.map-placeholder:hover {
    border-color: var(--primary-color);
    background-color: rgba(0, 109, 119, 0.05) !important;
}

/* Office Hours Card */
.office-hours {
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Social Media Buttons */
.social-btn {
    transition: all 0.3s ease;
}

.social-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Form Success/Error Messages */
#successMessage,
#errorMessage {
    animation: slideDown 0.4s ease;
}

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

/* Responsive Adjustments for Contact Page */
@media (max-width: 768px) {
    .contact-info-card {
        margin-bottom: 1rem;
    }
    
    .social-btn {
        width: 50px !important;
        height: 50px !important;
    }
}

/* ===== BLOG PAGES ===== */
.blog-card {
    background: var(--white-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--hover-shadow);
}

.blog-card-img {
    position: relative;
    overflow: hidden;
}

.blog-card-img img {
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-img img {
    transform: scale(1.1);
}

.blog-card-title a {
    transition: color 0.3s ease;
}

.blog-card-title a:hover {
    color: var(--primary-color) !important;
}

/* Pagination */
.pagination .page-link {
    border-radius: 50px;
    margin: 0 0.25rem;
    border: 2px solid #dee2e6;
    color: var(--primary-color);
    font-weight: 600;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.pagination .page-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Blog Single Page */
.blog-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.blog-content p {
    margin-bottom: 1.5rem;
}

.blog-content h2, .blog-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.blog-meta {
    border-top: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
    padding: 1.5rem 0;
}

.author-box {
    background: var(--light-color);
    border-radius: var(--border-radius);
    padding: 2rem;
}

.related-post-card {
    transition: all 0.3s ease;
}

.related-post-card:hover {
    transform: translateX(10px);
}

/* ===== NAVIGATION BAR ===== */
.navbar {
    font-family: var(--font-family);
    padding: 0.85rem 0;
    background-color: var(--white-color);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: 0.03em;
    color: var(--primary-color) !important;
}

.navbar-brand i {
    font-size: 1.3rem;
}

.navbar-nav .nav-link {
    position: relative;
    font-weight: 500;
    color: var(--dark-color);
    padding: 0.25rem 0.9rem !important;
    transition: color 0.25s ease, transform 0.25s ease;
}

.navbar-nav .nav-link i {
    font-size: 0.95rem;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -6px;
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 999px;
    transform: translateX(-50%);
    transition: width 0.25s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color);
    transform: translateY(-1px);
}

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

.navbar-nav .nav-link.active {
    color: var(--primary-color);
    font-weight: 600;
}

.navbar .btn.btn-primary {
    background-color: var(--primary-color);
    border-radius: 999px;
    padding-inline: 1.8rem;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(0, 109, 119, 0.35);
}

.navbar .btn.btn-primary:hover {
    background-color: #005864;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 109, 119, 0.45);
}

/* Mobile nav */
@media (max-width: 991.98px) {
    .navbar {
        padding: 0.6rem 0;
    }

    .navbar-nav .nav-link {
        padding: 0.4rem 0 !important;
    }

    .navbar .btn.btn-primary {
        width: 100%;
        margin-top: 0.5rem;
    }
}
