/* abledallfoundation/main/static/main/css/style.css */

/* Custom Variables for AAF Colors (aligned with brochure) */
:root {
    --aaf-green: #0b5044;     /* Deep Forest Green - Primary from brochure */
    --aaf-vibrant-green: #4CAF50; /* Vibrant Green/Lime from brochure's wave element */
    --aaf-teal: #26A69A;      /* Muted Teal/Blue-Green for accents and links */
    --aaf-light-bg: #F5F5F5;  /* Light grey for general backgrounds */
    --aaf-dark-text: #333333;
    --aaf-light-text: #FFFFFF;
    --navbar-bg: #dbfdea; /* New navbar background color */
    --hero_gradient: linear-gradient(rgba(1, 92, 9, 0.65), rgba(38, 166, 154, 0.45));
}

/* Import Animate.css for animations (used on homepage sections) */
@import url("https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css");

/* Base Styles & Typography */
body {
    font-family: 'Open Sans', sans-serif;
    color: var(--aaf-dark-text);
    line-height: 1.6; /* Increased for better readability */
    background-color: var(--aaf-light-bg); /* Use light background variable */
    min-height: 100vh; /* Ensure body takes full viewport height for sticky footer effect */
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    color: var(--aaf-green); /* Use deep green for headings */
    margin-bottom: 0.5em;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: var(--aaf-teal); /* Use teal for links */
    transition: all 0.3s ease;
    position: relative; /* For underline animation */
}

a:hover {
    color: #1a7d72; /* Darker teal on hover */
}

/* Link Underline Hover Effect */
a:hover::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: currentColor; /* Matches the current text color */
    animation: underlineExpand 0.3s ease-out forwards; /* 'forwards' keeps the end state */
}

@keyframes underlineExpand {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

/* Navbar Customization */
.aaf-navbar {
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    background-color: var(--navbar-bg) !important; /* Use new navbar background variable */
}

/* Specific styling for the navbar-brand to ensure proper logo alignment and spacing */
.navbar-brand {
    padding-top: .3125rem; /* Standard Bootstrap padding for brand */
    padding-bottom: .3125rem; /* Standard Bootstrap padding for brand */
    margin-right: 1rem; /* Standard Bootstrap margin */
    height: 56px; /* A common height for navbars, ensures vertical space */
    display: flex; /* Helps center the logo vertically */
    align-items: center; /* Centers logo vertically */
}

/* Logo Image Sizing within the navbar-brand */
.navbar-brand .logo-height {
    height: 40px; /* Specific height for the logo image */
    width: auto; /* Maintain aspect ratio */
    vertical-align: middle; /* Ensures proper alignment within flex container */
}

/* This class is now primarily for the text fallback if logo fails or for other text branding */
.aaf-logo-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.7em;
    color: var(--aaf-green) !important; /* Main logo text color */
}

.aaf-logo-text span { /* Subtitle part of the text logo */
    font-size: 0.6em;
    color: var(--aaf-dark-text) !important; /* Subtitle color */
    vertical-align: middle;
    margin-left: 5px;
}

.aaf-navbar .nav-link {
    color: var(--aaf-dark-text) !important;
    font-weight: 600;
    margin-right: 15px;
    transition: color 0.3s ease;
}

.aaf-navbar .nav-link:hover {
    color: var(--aaf-teal) !important; /* Teal on hover */
}

/* Custom Buttons (Primary and Outline Secondary) */
.aaf-btn-primary {
    background-color: var(--aaf-vibrant-green); /* Use vibrant green for primary button */
    color: var(--aaf-light-text); /* White text */
    border: 1px solid var(--aaf-vibrant-green);
    border-radius: 25px; /* Rounded corners */
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.aaf-btn-primary:hover {
    background-color: #3b8e3e; /* Slightly darker vibrant green on hover */
    border-color: #3b8e3e;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.2); /* Shadow with primary color */
}

.aaf-btn-outline-secondary {
    background-color: transparent;
    color: var(--aaf-green); /* Use deep green for outline text */
    border: 2px solid var(--aaf-green);
    border-radius: 25px; /* Rounded corners */
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.aaf-btn-outline-secondary:hover {
    background-color: var(--aaf-green); /* Fill with deep green on hover */
    color: var(--aaf-light-text); /* White text on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 77, 64, 0.2); /* Shadow with deep green */
}

/* Main Content Area */
main {
    flex-grow: 1; /* Allows main content to take up available space, pushing footer down */
}
/* Footer Customization */
footer {
    background-color: var(--aaf-green) !important; /* Ensure deep green */
    color: var(--aaf-light-text);
}

/* Styling for the logo in the footer */
.footer-logo-height {
    height: 50px; /* Adjust as needed for your footer logo size */
    width: auto; /* Maintain aspect ratio */
    vertical-align: middle; /* Align with text if present */
    margin-bottom: 8px; /* Spacing below the logo */
}

footer h5 {
    color: var(--aaf-light-text); /* Ensure footer headings are light text */
    font-weight: 700;
}

footer .list-unstyled li a {
    color: rgba(255, 255, 255, 0.7) !important; /* Lighter text for links */
}

footer .list-unstyled li a:hover {
    color: var(--aaf-light-text) !important;
}

footer .social-icons a {
    font-size: 1.6em;
    margin-right: 15px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

footer .social-icons a:hover {
    opacity: 1;
}

footer hr {
    border-color: rgba(255, 255, 255, 0.2) !important;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
}

footer .text-white-50 {
    color: rgba(255, 255, 255, 0.7) !important;
}

footer .text-white-50 a {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: underline;
}

/* Responsive Adjustments (Bootstrap handles most, but custom tweaks) */
@media (max-width: 991.98px) { /* Medium devices (tables) and down */
    .aaf-navbar .navbar-toggler {
        border-color: rgba(0,0,0,.1);
    }
    .aaf-navbar .navbar-collapse {
        background-color: #ffffff; /* Default background for collapsed menu */
        border-top: 1px solid #eee;
        padding-top: 10px;
    }
    .aaf-navbar .nav-link {
        padding: 10px 15px;
    }
    .aaf-navbar .d-flex {
        flex-direction: column;
        align-items: center;
        margin-top: 10px;
    }
    .aaf-btn-primary, .aaf-btn-outline-secondary {
        width: 80%;
        margin-bottom: 10px;
        margin-right: 0 !important;
    }
    footer .col-md-4 {
        text-align: center;
    }
    footer .list-unstyled {
        padding-left: 0;
    }
}

@media (max-width: 575.98px) { /* Small devices (phones) and down */
    .aaf-logo-text span {
        display: none !important; /* Hide "Abled All Foundation" on very small screens, keep "AAF" */
    }
    /* Adjust padding for contact info cards on small screens */
    .contact-info-card {
        padding: 1.5rem !important; /* Reduce padding from p-4 (2rem) */
    }
}

/* Homepage specific styles */

/* Hero Section Specific Styles */
.hero-section {
    /* Updated gradient to reflect brochure's green and teal tones */
    background: var(--hero_gradient), url('/static/main/images/hero_home.png') no-repeat center center/cover;
    min-height: 80vh; /* Make hero section tall */
    padding-top: 100px; /* Adjust for fixed navbar */
    padding-bottom: 80px;
    position: relative;
    overflow: hidden; /* Hide overflow for animations */
    display: flex; /* Added for vertical centering of content */
    align-items: center;
    justify-content: center;
}

.hero-section h1 {
    font-size: 3.8em;
    color: var(--aaf-light-text); /* Use white for contrast on dark background */
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3); /* Add subtle text shadow */
    animation: textGlow 1s ease-in-out infinite alternate; /* Kept text glow */
    position: relative;
    z-index: 2;
}

@keyframes textGlow {
    from { text-shadow: 0 0 10px rgba(255,255,255,0.3); }
    to { text-shadow: 0 0 20px rgba(255,255,255,0.6), 0 0 30px rgba(76, 175, 80, 0.4); }
}

.hero-section p {
    font-size: 1.4em;
    color: var(--aaf-light-text); /* Use white for contrast on dark background */
    max-width: 800px;
    margin: 0 auto 40px;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.2);
    position: relative;
    z-index: 2;
}

.hero-buttons .btn {
    margin: 0 15px;
    position: relative;
    z-index: 3;
    animation: float 2s ease-in-out infinite; /* Moved float animation to here */
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}


/* Scroll Down Indicator (optional, but good for UX on hero sections) */
.hero-scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
    z-index: 10;
}

/* General Section Headings */
.section-heading {
    font-size: 2.5em;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 10px;
    color: var(--aaf-green); /* Consistent heading color (deep green) */
}

/* Pillar Items (What We Do) */
.pillar-item {
    background-color: #fff;
    border-radius: 16px; /* Slightly more rounded */
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    padding: 40px 20px;
    text-align: center;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* Smoother transition */
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(0,0,0,0.1); /* Subtle border */
}

.pillar-item:hover {
    transform: translateY(-10px) scale(1.02); /* More pronounced lift and slight scale */
    box-shadow: 0 14px 28px rgba(0,0,0,0.15), 0 10px 10px rgba(0,0,0,0.1); /* Stronger shadow on hover */
    border-color: var(--aaf-vibrant-green); /* Highlight border on hover */
}

.pillar-icon {
    position: relative;
    margin-bottom: 20px;
}

.pillar-icon .icon-large {
    color: var(--aaf-vibrant-green); /* Use vibrant green for icons */
    font-size: 3.5em; /* Slightly smaller for better fit with circle */
    position: relative;
    z-index: 2;
}

.pillar-icon .icon-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background-color: rgba(76, 175, 80, 0.1); /* Semi-transparent vibrant green circle */
    border-radius: 50%;
    z-index: 1;
}

.pillar-item h3 {
    font-size: 1.6em;
    color: var(--aaf-green);
    margin-bottom: 15px;
}

.pillar-item p {
    font-size: 1em;
    color: var(--aaf-dark-text);
    flex-grow: 1;
}

/* Impact Stories */
.impact-story-card {
    background-color: #fff;
    border-radius: 16px; /* Slightly more rounded */
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* Smoother transition */
    position: relative;
}

.impact-story-card:hover {
    transform: perspective(1000px) rotateX(5deg) translateY(-10px); /* Subtle 3D lift */
    box-shadow: 0 20px 40px rgba(0,0,0,0.2); /* Stronger shadow on hover */
}

.card-image-container {
    overflow: hidden;
    height: 220px;
}

.impact-story-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.impact-story-card:hover img {
    transform: scale(1.1); /* Zoom effect on image hover */
}

.impact-story-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.impact-story-content blockquote {
    font-style: italic;
    font-size: 1.1em;
    color: var(--aaf-dark-text); /* Keep dark text for quotes */
    margin-bottom: 15px;
    flex-grow: 1;
    quotes: "“" "”" "‘" "’"; /* Custom quotes */
}

.impact-story-content blockquote::before {
    content: open-quote;
    font-size: 1.2em;
    color: var(--aaf-teal); /* Use teal for quote marks */
    vertical-align: -0.4em;
    margin-right: 0.1em;
}

.impact-story-content blockquote::after {
    content: close-quote;
    font-size: 1.2em;
    color: var(--aaf-teal); /* Use teal for quote marks */
    vertical-align: -0.4em;
    margin-left: 0.1em;
}

.impact-story-content p.author {
    font-size: 0.9em;
    color: #777; /* Keep subtle grey for author */
    margin-bottom: 15px;
}

.impact-story-content .read-more {
    color: var(--aaf-teal); /* Use teal for read more links */
    font-weight: 600;
    align-self: flex-start;
    transition: color 0.3s ease;
}
.impact-story-content .read-more:hover {
    color: #1a7d72; /* Darker teal on hover */
}

/* Stats Counter */
.stats-counter-item {
    text-align: center;
    padding: 20px;
}

.counter-number {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--aaf-green), var(--aaf-vibrant-green)); /* Gradient for numbers */
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent; /* Makes text use background-clip */
    margin-bottom: 5px;
}

.stats-counter-item p {
    font-size: 1.2em;
    color: var(--aaf-dark-text);
}

/* Join Us Section */
#join-us {
    background: linear-gradient(135deg, var(--aaf-green) 0%, var(--aaf-teal) 100%); /* Gradient background */
    position: relative;
    overflow: hidden;
}

#join-us::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 60%); /* Subtle radial pulse */
    animation: pulse 8s linear infinite;
}

@keyframes pulse {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Ways to Help Options */
.help-option-card {
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    padding: 40px 20px;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.help-option-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px; /* Top border accent */
    background: linear-gradient(90deg, var(--aaf-green), var(--aaf-vibrant-green));
    z-index: 1;
}

.help-option-icon {
    position: relative;
    margin-bottom: 20px;
}

.help-option-icon .icon-large {
    color: var(--aaf-green); /* Use deep green for help option icons */
    font-size: 4em; /* Slightly larger for impact */
    position: relative;
    z-index: 2;
}

.help-option-card h3 {
    font-size: 1.8em;
    color: var(--aaf-green);
    margin-bottom: 15px;
}

.help-option-card p {
    font-size: 1.1em;
    color: var(--aaf-dark-text);
    flex-grow: 1;
    margin-bottom: 25px;
}

/* News Items (if uncommented in home.html) */
.news-item-card {
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.news-item-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.news-item-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-item-content h3 {
    font-size: 1.4em;
    margin-bottom: 10px;
    color: var(--aaf-green);
}

.news-item-content .news-date {
    font-size: 0.85em;
    color: #888;
    margin-bottom: 15px;
}

.news-item-content p {
    font-size: 1em;
    color: #555;
    flex-grow: 1;
    margin-bottom: 20px;
}

.news-item-content .read-more {
    color: var(--aaf-teal); /* Use teal for news read more links */
    font-weight: 600;
    align-self: flex-start;
    transition: color 0.3s ease;
}
.news-item-content .read-more:hover {
    color: #1a7d72;
}

/* Responsive Adjustments */
@media (max-width: 991.98px) { /* Medium devices (tablets) and down */
    .hero-section {
        padding: 150px 0 100px;
        min-height: unset; /* Allow height to adjust on smaller screens */
    }
    .hero-section h1 {
        font-size: 2.8em;
    }
    .hero-section p {
        font-size: 1.2em;
    }
    .hero-buttons .btn {
        margin: 10px 5px;
    }
    .section-heading {
        font-size: 2em;
    }
    .pillar-item, .impact-story-card, .help-option-card, .news-item-card {
        margin-bottom: 20px; /* Add some space between cards in stacked view */
    }
    .stats-counter-item {
        margin-bottom: 20px;
    }
}

@media (max-width: 575.98px) { /* Small devices (phones) and down */
    .hero-section h1 {
        font-size: 2em;
    }
    .hero-section p {
        font-size: 1em;
    }
    .hero-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .hero-buttons .btn {
        width: 90%;
        margin: 10px 0;
    }
    .section-heading {
        font-size: 1.8em;
    }
    .counter-number {
        font-size: 2.5rem;
    }
}

@media (min-width: 1200px) {
    .hero-section h1 {
        font-size: 5rem;
    }
    .section-heading {
        font-size: 3rem;
    }
}

/* What We Do Section - Mobile Optimization (Reverted to column display) */
@media (max-width: 767.98px) {
    #what-we-do {
        padding: 2rem 0;
    }

    #what-we-do .section-heading {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }

    #what-we-do .lead-sm {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        padding: 0 1rem;
    }

    .pillar-item {
        flex-direction: column; /* Reverted to column for better stacking */
        align-items: center;
        text-align: center;
        padding: 1.5rem;
        margin-bottom: 1rem;
        border-radius: 12px;
    }

    .pillar-icon {
        margin-right: 0; /* Remove horizontal margin */
        margin-bottom: 1rem; /* Add vertical margin */
        min-width: unset; /* Remove min-width constraint */
    }

    .pillar-icon .icon-large {
        font-size: 3.5rem; /* Slightly larger icon */
    }

    .pillar-icon .icon-circle {
        width: 70px; /* Adjust circle size */
        height: 70px;
    }

    .pillar-item h3 {
        font-size: 1.4rem; /* Slightly larger heading */
        margin-top: 0; /* Remove top margin */
        margin-bottom: 0.5rem;
    }

    .pillar-item p {
        font-size: 0.95rem;
    }

    /* Stack cards vertically */
    .pillar-item-wrapper {
        width: 100%;
        max-width: 400px;
        margin: 0 auto 1rem;
    }

    /* Adjust button size */
    #what-we-do .aaf-btn-outline-secondary {
        padding: 0.5rem 1rem;
        font-size: 0.95rem;
    }
}


/* --- Styles for the About Us Page --- */

/* Page Header for About Us */
.page-header-section {
    min-height: 50vh; /* Shorter than main hero, but still impactful */
    padding-top: 100px; /* Account for fixed navbar */
    padding-bottom: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
}

.page-header-section h1 {
    font-size: 3em;
    color: var(--aaf-light-text);
}

.page-header-section p {
    font-size: 1.2em;
    color: var(--aaf-light-text);
    max-width: 700px;
    margin: 0 auto;
}

/* Principle Cards (Mission, Vision, Values) */
.principle-card {
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    padding: 30px;
    text-align: center;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(0,0,0,0.1);
}

.principle-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 14px 28px rgba(0,0,0,0.15), 0 10px 10px rgba(0,0,0,0.1);
    border-color: var(--aaf-vibrant-green);
}

.principle-card .icon-large {
    font-size: 4em;
    color: var(--aaf-vibrant-green); /* Vibrant green for principle icons */
    margin-bottom: 20px;
}

.principle-card h3 {
    font-size: 1.7em;
    color: var(--aaf-green);
    margin-bottom: 15px;
}

.principle-card p {
    font-size: 1em;
    color: var(--aaf-dark-text);
    flex-grow: 1;
}

.principle-card ul {
    text-align: left;
    width: 100%;
    padding-left: 20px;
    color: var(--aaf-dark-text);
}

.principle-card ul li {
    margin-bottom: 8px;
}

.principle-card ul li strong {
    color: var(--aaf-green); /* Highlight strong text in values */
}


/* --- Responsive Adjustments for About Us Page --- */
@media (max-width: 991.98px) {
    .page-header-section {
        min-height: 40vh;
        padding-top: 80px;
        padding-bottom: 40px;
    }
    .page-header-section h1 {
        font-size: 2.5em;
    }
    .page-header-section p {
        font-size: 1em;
    }

    .principle-card {
        margin-bottom: 20px; /* Add spacing when stacked */
    }
}

@media (max-width: 575.98px) {
    .page-header-section {
        min-height: 35vh;
        padding-top: 60px;
        padding-bottom: 30px;
    }
    .page-header-section h1 {
        font-size: 2em;
    }
    .page-header-section p {
        font-size: 0.9em;
    }
    .principle-card {
        padding: 25px;
    }
    .principle-card .icon-large {
        font-size: 3em;
    }
    .principle-card h3 {
        font-size: 1.5em;
    }
    .principle-card p {
        font-size: 0.9em;
    }
}
