/* Global Styles */
:root {
    --primary-color: #198754;
    --secondary-color: #6c757d;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
}

/* Navigation */
.navbar {
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.5rem;
}

.nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* Page Header */
.page-header {
    position: relative;
    background: url('../images/bg.jpg') no-repeat center center;
    background-size: cover;
    padding: 120px 0 60px;
    color: white;
    margin-top: 56px;
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.breadcrumb-item a {
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: var(--primary-color) !important;
}

/* Contact Information */
.contact-info {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.contact-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(25, 135, 84, 0.1);
    border-radius: 50%;
}

/* Contact Form */
.contact-form {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-form:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

.form-floating>.form-control,
.form-floating>.form-select {
    height: calc(3.5rem + 2px);
    line-height: 1.25;
}

.form-floating>textarea.form-control {
    height: 150px;
}

.form-floating>label {
    padding: 1rem 0.75rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}

/* Map Section */
.map-section {
    position: relative;
    overflow: hidden;
}

.map-container {
    position: relative;
    height: 450px;
}

.map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* FAQ Section */
.accordion-button:not(.collapsed) {
    background-color: rgba(25, 135, 84, 0.1);
    color: var(--primary-color);
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
    border-color: var(--primary-color);
}

.accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23198754'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

/* Cards & Gallery */
.card {
    transition: transform 0.3s cubic-bezier(.22, 1, .36, 1), box-shadow 0.3s cubic-bezier(.22, 1, .36, 1);
}

/* Gallery Section BG */
section.bg-light {
    background: linear-gradient(135deg, #f8fafc 0%, #e6f4ee 100%) !important;
}

.gallery-item {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 22px;
    box-shadow: 0 8px 32px 0 rgba(25, 135, 84, 0.10), 0 2px 8px 0 rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: transform 0.48s cubic-bezier(.22, 1, .36, 1), box-shadow 0.38s cubic-bezier(.22, 1, .36, 1), background 0.44s;
    position: relative;
    backdrop-filter: blur(6px);
    border: 1.5px solid rgba(25, 135, 84, 0.09);
    will-change: transform, box-shadow;
}

.gallery-item:hover {
    transform: scale(1.06) translateY(-10px) rotateZ(-1deg);
    box-shadow: 0 16px 60px 0 rgba(25, 135, 84, 0.22), 0 8px 32px 0 rgba(0, 0, 0, 0.11);
    background: rgba(255, 255, 255, 0.28);
    z-index: 3;
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    height: 20px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.08) 100%);
    border-radius: 50%;
    opacity: 0.7;
    transition: opacity 0.4s;
    pointer-events: none;
    z-index: 2;
}

.gallery-item:hover::before {
    opacity: 1;
}

.gallery-item img {
    border-radius: 16px;
    object-fit: cover;
    transition: filter 0.7s, transform 0.7s;
    filter: brightness(0.98) saturate(1.09) drop-shadow(0 2px 8px rgba(25, 135, 84, 0.07));
    box-shadow: 0 2px 12px 0 rgba(25, 135, 84, 0.08);
    width: 100%;
    aspect-ratio: 4/3;
    background: #f5fbf9;
}

.gallery-item:hover img {
    filter: brightness(1.08) saturate(1.18) blur(0.3px) drop-shadow(0 8px 24px rgba(25, 135, 84, 0.12));
    transform: scale(1.04) rotateZ(0.7deg);
}

.gallery-item:hover {
    animation: floatGallery 1.2s cubic-bezier(.22, 1, .36, 1) infinite alternate;
}

@keyframes floatGallery {
    0% {
        transform: scale(1.06) translateY(-10px) rotateZ(-1deg);
    }

    100% {
        transform: scale(1.08) translateY(-16px) rotateZ(-1.5deg);
    }
}

.gallery-overlay {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background: linear-gradient(0deg, rgba(25, 135, 84, 0.25) 80%, rgba(255, 255, 255, 0.06) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(.22, 1, .36, 1);
    pointer-events: none;
    border-radius: 16px;
    backdrop-filter: blur(12px) saturate(1.2);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
    pointer-events: auto;
    background: linear-gradient(0deg, rgba(25, 135, 84, 0.32) 80%, rgba(255, 255, 255, 0.12) 100%);
}

.gallery-overlay .text-center {
    width: 100%;
    padding: 20px 0 14px 0;
    background: rgba(255, 255, 255, 0.23);
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    backdrop-filter: blur(12px) saturate(1.3);
    box-shadow: 0 2px 16px 0 rgba(25, 135, 84, 0.11);
}

.gallery-overlay h6 {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 700;
    color: #198754;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.13);
    opacity: 0.98;
    transition: color 0.3s;
    filter: drop-shadow(0 1px 4px #fff8);
}

/* Gallery fade-in animation using AOS or fallback */
.gallery-item[data-aos] {
    opacity: 0;
    transform: translateY(60px) scale(0.96);
    transition: opacity 0.9s cubic-bezier(.22, 1, .36, 1), transform 0.9s cubic-bezier(.22, 1, .36, 1);
}

.gallery-item.aos-animate {
    opacity: 1;
    transform: none;
}

/* Responsive gallery improvements */
@media (max-width: 991px) {
    .gallery-item img {
        aspect-ratio: 16/10;
    }

    .gallery-item {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 575px) {
    .gallery-item img {
        aspect-ratio: 1/1;
    }

    .gallery-overlay .text-center {
        padding: 14px 0 8px 0;
        font-size: 0.98rem;
    }

    .gallery-item {
        border-radius: 12px;
    }
}


/* Impact Stats */
.impact-stat {
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

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

.impact-stat h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 1rem 0;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), url('../images/cta-bg.jpg') no-repeat center center;
    background-size: cover;
    color: white;
}

/* Footer */
footer {
    background-color: var(--dark-color);
}

footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-color) !important;
}

.social-links a {
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-3px);
}

/* Animations */
[data-aos] {
    pointer-events: none;
}

[data-aos].aos-animate {
    pointer-events: auto;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .hero-section {
        min-height: 500px;
        height: 70vh;
    }

    .impact-stat h3 {
        font-size: 2rem;
    }
}

@media (max-width: 992px) {
    .hero-section {
        min-height: 400px;
        height: 60vh;
        text-align: center;
    }

    .hero-section .container {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    .impact-stat {
        padding: 1.5rem;
    }

    .cta-section {
        padding: 2rem 0;
    }

    footer .row>div {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 100px 0 40px;
        text-align: center;
    }

    .contact-info,
    .contact-form {
        margin-bottom: 2rem;
    }

    .map-container {
        height: 300px;
    }

    .hero-section {
        min-height: 300px;
        height: 50vh;
        text-align: center;
    }

    .hero-section .container {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    .impact-stat {
        margin-bottom: 1.5rem;
    }

    .cta-section {
        padding: 1.5rem 0;
    }
}

@media (max-width: 576px) {
    .hero-section {
        min-height: 200px;
        height: 40vh;
        padding: 2rem 0;
    }

    .col-md-6 {
        margin-bottom: 1rem;
        padding: 0;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .impact-stat h3 {
        font-size: 1.5rem;
    }

    .cta-section h2 {
        font-size: 1.5rem;
    }

    .cta-section p {
        font-size: 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    .footer .row>div {
        margin-bottom: 1rem;
    }
}

/* Make all images responsive */
img, .img-fluid {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Responsive containers */
.container, .container-fluid {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

/* Custom Button Styles */
.btn {
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

.btn-success:hover {
    background-color: #157347;
    border-color: #157347;
    transform: translateY(-2px);
}

.btn-outline-success {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-success:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Loading Animation */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #157347;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 600px;
    background: url('../images/bg.jpg') no-repeat center center;
    background-size: cover;
    display: flex;
    align-items: center;
    color: white;
    margin-top: 56px;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(20, 83, 45, 0.99) 0%, rgba(20, 83, 45, 0.92) 45%, rgba(20, 83, 45, 0.7) 70%, rgba(20, 83, 45, 0.0) 90%);
    z-index: 2;
    pointer-events: none;
}

.hero-section .container {
    position: relative;
    z-index: 3;
}

.hero-overlay {
    display: none;
}

/* Gallery Styles */
.gallery-item {
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    transition: transform 0.5s ease;
    height: 300px;
    object-fit: cover;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

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

.gallery-overlay h5 {
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.gallery-overlay p {
    transform: translateY(20px);
    transition: transform 0.3s ease 0.1s;
}

.gallery-item:hover .gallery-overlay h5,
.gallery-item:hover .gallery-overlay p {
    transform: translateY(0);
}

/* Gallery Navigation */
#prevGallery,
#nextGallery {
    transition: all 0.3s ease;
}

#prevGallery:hover,
#nextGallery:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateX(-3px);
}

#nextGallery:hover {
    transform: translateX(3px);
}

/* Responsive Gallery */
@media (max-width: 768px) {
    .gallery-item img {
        height: 250px;
    }
}

@media (max-width: 576px) {
    .gallery-item img {
        height: 200px;
    }
}