/*
    OSALPF Website Stylesheet
    Author: Gemini AI
*/

/* --- Basic Styles & Utilities --- */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --bg-light: #f8f9fa;
    --text-dark: #343a40;
    --text-light: #ffffff;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

/* General site container for a 1200px max width */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 60px 0;
}

h1, h2, h3 {
    margin-bottom: 20px;
    font-weight: 600;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    color: var(--text-dark);
    margin-bottom: 2rem;
}

p {
    margin-bottom: 15px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 25px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    border-radius: 50px;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--text-light);
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-lg {
    font-size: 1.1rem;
    padding: 15px 30px;
}

/* --- Header --- */
.main-header {
    background: var(--text-light);
    color: var(--text-dark);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-header .logo img {
    height: 50px;
}

.main-nav ul {
    display: flex;
    list-style: none;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    padding: 10px 15px;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: var(--primary-color);
}

.main-nav .btn {
    margin-left: 20px;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--text-dark);
}

/* --- Hero Section --- */
.hero {
    position: relative;
    height: 80vh;
    background: url('/assets/images/hero-bg.jpg') no-repeat center center/cover;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 10px;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
}

.hero .btn {
    margin: 0 10px;
}

/* --- About Preview --- */
.about-preview {
    display: flex;
    align-items: center;
    gap: 40px;
}

.about-preview .about-image {
    flex: 1;
}

.about-preview .about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.about-preview .about-content {
    flex: 1;
}

/* --- Projects Section --- */
.projects-section {
    background: var(--text-light);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.project-card {
    background: var(--bg-light);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-card .card-content {
    padding: 20px;
}

.progress-bar {
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    margin: 10px 0;
}

.progress {
    height: 100%;
    background: var(--success-color);
    border-radius: 5px;
    transition: width 0.5s ease;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

/* --- Testimonials Section --- */
.testimonials-section {
    background: var(--primary-color);
    color: var(--text-light);
}

.testimonials-section h2 {
    color: var(--text-light);
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.2);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
}

.testimonial-card p {
    font-style: italic;
    font-size: 1.1rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: 15px;
    border: 3px solid var(--text-light);
}

.testimonial-author h4 {
    margin-bottom: 5px;
}

.testimonial-author span {
    font-size: 0.9rem;
}

/* --- CTA Section --- */
.cta-section {
    background: var(--bg-light);
    text-align: center;
    padding: 80px 0;
}

.cta-section p {
    max-width: 800px;
    margin: 0 auto 30px;
}

/* --- Footer --- */
.main-footer {
    background: var(--text-dark);
    color: var(--text-light);
    padding: 40px 0;
    font-size: 0.9rem;
}

.main-footer .footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.main-footer h4 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.main-footer ul {
    list-style: none;
}

.main-footer li {
    margin-bottom: 10px;
}

.main-footer a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.main-footer a:hover {
    color: var(--primary-color);
}

.main-footer .social-icons img {
    width: 30px;
    margin-right: 10px;
    transition: transform 0.3s ease;
}

.main-footer .social-icons img:hover {
    transform: scale(1.1);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}


/* --- Responsive Design --- */

/* General responsive typography */
@media screen and (max-width: 992px) {
    h1 {
        font-size: 2.5rem;
    }
    h2 {
        font-size: 2rem;
    }
    h3 {
        font-size: 1.5rem;
    }
}

@media screen and (max-width: 768px) {
    .main-nav {
        display: none;
        width: 100%;
        position: absolute;
        top: 80px; /* Adjust based on header height */
        left: 0;
        background: var(--text-light);
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        padding: 20px 0;
        text-align: center;
    }

    .main-nav.active {
        display: block;
    }

    .main-nav .nav-links {
        flex-direction: column;
    }

    .main-nav .nav-links li {
        margin: 10px 0;
    }

    .main-nav .btn {
        margin: 10px 0;
        width: 80%;
    }

    .hamburger {
        display: block;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .about-preview {
        flex-direction: column;
    }
    
    .project-card img {
        height: 150px; /* Adjust image height on smaller screens */
    }
    
    .testimonial-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .main-footer .footer-col {
        margin-bottom: 20px;
    }
}

/* --- Additions for About & Programs pages --- */
.page-header {
    background: var(--primary-color);
    color: var(--text-light);
    padding: 80px 0;
    text-align: center;
}

.page-header h1 {
    font-size: 3rem;
}

.page-header p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Mission, Vision, Values Section */
.mission-section {
    display: flex;
    justify-content: center;
    gap: 30px;
    text-align: center;
    margin-top: 40px;
}

.mission-item {
    flex-basis: 30%;
    padding: 20px;
    border-radius: 10px;
    background: var(--text-light);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.mission-item img {
    width: 60px;
    margin-bottom: 15px;
}

/* Team Section */
.team-section {
    background: var(--bg-light);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.team-member {
    background: var(--text-light);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.team-member img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 4px solid var(--primary-color);
}

.team-member h4 {
    margin-bottom: 5px;
}

.team-member span {
    display: block;
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

/* All Projects Section */
.all-projects-section {
    padding-top: 40px; /* Adjust spacing */
}

/* Responsive adjustments */
@media screen and (max-width: 992px) {
    .mission-section {
        flex-direction: column;
    }

    .mission-item {
        flex-basis: 100%;
        margin-bottom: 20px;
    }
}

/* --- Additions for Donations Page --- */

.donation-section {
    background: var(--bg-light);
}

.donation-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background: var(--text-light);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box; /* Ensures padding doesn't affect width */
}

.form-group textarea {
    resize: vertical;
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
}

.checkbox-group label {
    margin-bottom: 0;
    font-weight: normal;
}

/* Alert Messages */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.payment-gateway-info {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-top: 20px;
    text-align: center;
}

.btn-lg {
    width: 100%;
    font-size: 1.2rem;
}

/* --- Additions for Contact Page --- */

.contact-section {
    background: var(--bg-light);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
}

.contact-info {
    padding: 20px;
    background: var(--text-light);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.contact-info h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.contact-info p {
    margin-bottom: 10px;
}

.contact-info .social-icons {
    margin-top: 15px;
    margin-bottom: 30px;
}

.map-container {
    margin-top: 20px;
    border-radius: 10px;
    overflow: hidden;
}

.contact-form-container {
    padding: 20px;
    background: var(--text-light);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.contact-form-container h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* Responsive adjustments for Contact Page */
@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .map-container {
        height: 300px;
    }
}

/* Mobile Menu Styles */

/* Base styles for the navigation and hamburger menu */
.main-nav {
    display: flex;
    align-items: center;
    flex-grow: 1;
    justify-content: flex-end;
}

.hamburger-menu {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0;
}

/* Styles for desktop and larger screens */
@media screen and (min-width: 769px) {
    .main-nav {
        display: flex;
    }
    
    .hamburger-menu {
        display: none;
    }
}

/* Styles for mobile and smaller screens */
@media screen and (max-width: 768px) {
    .header-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .main-nav {
        position: fixed;
        top: 0;
        left: -100%; /* Start off-screen */
        width: 100%;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.9);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: left 0.3s ease-in-out;
        z-index: 99; /* Ensure it's on top */
    }

    .main-nav.active {
        left: 0; /* Slide in */
    }

    .main-nav ul {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        list-style: none;
        padding: 0;
    }

    .main-nav a {
        font-size: 1.5rem;
        color: #fff;
    }

    .cta-button {
        display: none; /* Hide desktop button on mobile */
    }

    .hamburger-menu {
        display: block; /* Show hamburger menu on mobile */
        z-index: 100;
        position: relative;
    }

    .hamburger-menu.active i::before {
        content: "\f00d"; /* Change icon to an 'X' */
    }
}


/* --- Statistics Section --- */
.statistics-section {
    background: var(--primary-color);
    color: #fff;
    padding: 60px 0;
    text-align: center;
}

.statistics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.statistic-card {
    padding: 20px;
}

.statistic-card i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.statistic-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.statistics-section p {
    font-size: 1.1rem;
    margin: 0;
}

/* --- Testimonial Slider --- */
.testimonial-slider-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
}

.testimonial-slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.testimonial-card-slide {
    flex: 0 0 100%;
    max-width: 100%;
    text-align: center;
}

.testimonial-slider-container .testimonial-card-slide p {
    font-size: 1.2rem;
    font-style: italic;
    color: #555;
    margin-bottom: 20px;
}

.testimonial-slider-container .testimonial-author {
    justify-content: center;
}

.prev-btn, .next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 50%;
    font-size: 1.5rem;
    z-index: 10;
}

.prev-btn { left: 10px; }
.next-btn { right: 10px; }

/* --- News Section --- */
.news-section {
    padding: 80px 0;
    background-color: #f9f9f9;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.news-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 1rem;
}

.card-content h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.card-content p {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #666;
}

.read-more {
    display: inline-block;
    margin-top: 1rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

.read-more:hover {
    text-decoration: underline;
}

.no-news-message {
    text-align: center;
    font-size: 1.2rem;
    color: #555;
}


/* --- Hero Slider Styles --- */
.hero-slider-section {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.hero-slider-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slider {
    display: flex;
    width: 300%; /* For 3 slides */
    height: 100%;
    transition: transform 0.8s ease-in-out;
}

.hero-slide {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Updated to use the new image path */
    background-image: url('/assets/images/slide/1.jpeg');
}

/* You can add more .hero-slide divs with different background images if needed */
/* For example:
.hero-slide:nth-child(1) { background-image: url('/assets/images/slide/1.jpeg'); }
.hero-slide:nth-child(2) { background-image: url('/assets/images/slide/2.jpg'); }
.hero-slide:nth-child(3) { background-image: url('/assets/images/slide/3.jpg'); }
*/

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 1;
    color: #fff;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 30px;
}

.slider-prev, .slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    font-size: 2rem;
    z-index: 2;
    transition: background 0.3s ease;
}

.slider-prev:hover, .slider-next:hover {
    background: rgba(0, 0, 0, 0.8);
}

.slider-prev { left: 20px; }
.slider-next { right: 20px; }

/* Responsive styles for Hero Slider */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    .hero-content p {
        font-size: 1rem;
    }
}

/*
    --- Styles for a News Article Page ---
    These styles have been added to handle the layout for an individual news article.
*/
.news-article-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 1rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.news-title {
    text-align: center;
    color: #333;
    margin-bottom: 1rem;
}
.news-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}
.news-content {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
    text-align: justify;
}
.news-content p {
    margin-bottom: 1rem;
}
.not-found {
    text-align: center;
    font-size: 1.5rem;
    color: #d9534f;
}

/* --- New Responsive Media Query for Smaller Screens (e.g., mobile) --- */
@media screen and (max-width: 576px) {
    /* Adjustments for a more comfortable mobile experience */
    .container {
        padding: 0 15px;
    }

    section {
        padding: 40px 0;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.8rem;
    }
    
    .btn-lg {
        font-size: 1rem;
        padding: 12px 20px;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero-content p {
        font-size: 0.9rem;
    }
    
    .news-article-container {
        margin: 1rem auto;
        padding: 0.8rem;
    }

    .news-title {
        font-size: 1.5rem;
    }
    
    .news-content {
        font-size: 1rem;
    }

    .contact-grid {
        gap: 20px;
    }

    .donation-form {
        padding: 20px;
    }
}
