/* General Body and Container Styles */
:root {
    --primary-color: #8A2BE2; /* BlueViolet */
    --secondary-color: #FF69B4; /* HotPink */
    --accent-color: #FFD700; /* Gold */
    --text-color: #333;
    --light-text-color: #f4f4f4;
    --bg-light: #f9f9f9;
    --bg-dark: #222;
    --border-color: #ddd;
    --header-height: 80px;
}

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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-light);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Header and Navigation */
header {
    background: var(--bg-dark);
    color: var(--light-text-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--light-text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo span {
    color: var(--primary-color);
}

.logo:hover {
    color: var(--primary-color);
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    color: var(--light-text-color);
    text-decoration: none;
    font-weight: bold;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    left: 0;
    bottom: -5px;
    transition: width 0.3s ease-in-out;
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--secondary-color);
}

/* Main Content Area */
main {
    flex: 1; /* Allows main content to grow and push footer down */
    padding: 40px 0;
}

section {
    padding: 40px 0;
    margin-bottom: 30px;
}

h1, h2, h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.8rem; }

p {
    margin-bottom: 15px;
    text-align: justify;
}

/* Buttons */
.btn {
    display: inline-block;
    background: var(--primary-color);
    color: var(--light-text-color);
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* Hero Section (Homepage) */
.hero {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('../images/hero_bg.jpg') no-repeat center center/cover;
    color: var(--light-text-color);
    text-align: center;
    padding: 100px 20px;
    border-radius: 8px;
    margin-bottom: 40px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--accent-color);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Gallery Page */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.gallery-item {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

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

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

.gallery-item-info {
    padding: 15px;
    text-align: center;
}

.gallery-item-info h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--primary-color);
}

/* About Page */
.about-section {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: center;
    margin-bottom: 30px;
}

.about-section.reverse {
    flex-direction: row-reverse;
}

.about-image {
    flex: 1;
    min-width: 300px;
}

.about-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.about-content {
    flex: 2;
    min-width: 300px;
}

.about-content h2, .about-content h3 {
    text-align: left;
}

/* Donate Page */
.donate-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
}

.donate-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    max-width: 350px;
    flex: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.donate-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.donate-card h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.donate-card p {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* Contact Form */
.contact-form-container {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    max-width: 700px;
    margin: 40px auto;
}

.contact-form-container h2 {
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--text-color);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    color: var(--text-color);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.2); /* Primary color with transparency */
    outline: none;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Admin Page */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden; /* Ensures rounded corners apply to content */
}

.admin-table th,
.admin-table td {
    border: 1px solid var(--border-color);
    padding: 12px 15px;
    text-align: left;
}

.admin-table th {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.admin-table tr:nth-child(even) {
    background-color: var(--bg-light);
}

.admin-table tr:hover {
    background-color: #f0f0f0;
}

.admin-table td:last-child {
    font-size: 0.85rem; /* Smaller font for timestamp */
    color: #666;
}

.admin-actions {
    text-align: center;
    margin-top: 20px;
}

.admin-login-form {
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.admin-login-form h2 {
    margin-bottom: 25px;
    color: var(--primary-color);
}

/* Flash Messages */
.flash-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
}

.flash-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash-message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Footer */
footer {
    background: var(--bg-dark);
    color: var(--light-text-color);
    text-align: center;
    padding: 20px 0;
    margin-top: auto; /* Pushes footer to the bottom */
}

footer p {
    margin: 0;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }

    nav ul {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav ul li {
        margin: 0 10px 10px 10px;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .about-section {
        flex-direction: column;
        text-align: center;
    }

    .about-content h2, .about-content h3 {
        text-align: center;
    }

    .donate-card {
        max-width: 100%;
    }

    .admin-table th,
    .admin-table td {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
    .admin-table th:nth-child(3), .admin-table td:nth-child(3), /* Subject */
    .admin-table th:nth-child(5), .admin-table td:nth-child(5) { /* Timestamp */
        display: none; /* Hide less critical columns on small screens */
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 60px 15px;
    }

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

    .hero-content p {
        font-size: 1rem;
    }

    .container {
        width: 95%;
    }

    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.5rem; }

    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

