/* stylesheets/styles.css */

:root {
    --primary-green: #3c9e41; /* Lighter green for nav and footer */
    --secondary-green: #2e7d32; /* Deep green for nav and footer */
    --accent-red: #d32f2f;    /* Emergency cross red */
    --muted-red: #8c1616; /* Muted gold color for table headers */
    --muted-green: #124a15; /* Muted gold color for table headers */
    --muted-gold: #bf922a; /* Muted gold color for table headers */
    --muted-beige: #947d6a; /* Myted beige color for table headers */
    --text-light: #ffffff;
    --text-dark: #333333;
    --bg-light: #f4f4f4;
}

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

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

/* --- Navigation Header --- */
header {
    background-color: var(--primary-green);
    color: var(--text-light);
    padding: 15px 20px;
    border-bottom: 4px solid var(--accent-red);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-cross {
    color: var(--accent-red);
    font-size: 1.8rem;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-menu li a {
    color: var(--text-light);
    font-weight: bold;
    text-decoration: none;
    font-size: 1.25rem;
    transition: color 0.3s ease;
}

/* Add this new rule for the highlighted state */
.nav-menu li a:hover,
.nav-menu li a.active {
    color: var(--accent-red); /* Highlights the active page in your red theme color */
}

/*.nav-menu li a:hover {
    color: var(--accent-red);
}*/

/* Hamburger Icon */
.hamburger {
    display: none;
    font-size: 2rem;
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
}

/* --- Main Content --- */
main {
    flex: 1; /* Pushes footer to the bottom */
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* --- Footer --- */
footer {
    background-color: var(--primary-green);
    color: var(--text-light);
    text-align: center;
    padding: 20px 10px;
    font-size: 0.85rem;
    border-top: 4px solid var(--accent-red);
}

.footer-links {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    margin: 0 10px;
}

.footer-links a:hover {
    color: var(--accent-red);
}

/* --- Responsive Media Queries --- */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-menu {
        display: none; /* Hidden by default on mobile */
        flex-direction: column;
        width: 100%;
        background-color: var(--primary-green);
        position: absolute;
        top: 60px;
        left: 0;
        padding: 20px 0;
        text-align: center;
    }

    .nav-menu.active {
        display: flex; /* Shown when hamburger is clicked */
    }
}

/* --- Image Slideshow --- */
.slideshow-container {
    max-width: 1000px;
    position: relative;
    margin: 20px auto;
    border: 4px solid var(--primary-green);
    border-radius: 8px;
    background-color: #000; /* Black background in case images are different sizes */
    overflow: hidden;
}

/* Hide the slides by default */
.slide {
    display: none; 
}

/* Ensure images fit the container nicely */
.slide img {
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: cover;
    display: block;
}

/* Next & previous buttons */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0,0,0,0.4);
    text-decoration: none;
}

/* Position the "next" button to the right */
.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

/* Add a red background on hover */
.prev:hover, .next:hover {
    background-color: var(--accent-red);
    color: white;
}

/* Smooth Fading animation */
.fade {
    animation-name: fade;
    animation-duration: 1.5s;
}

@keyframes fade {
    from {opacity: .4}
    to {opacity: 1}
}

/* --- Adjust Heading Spacing --- */
main h1 {
    margin-bottom: 5px; /* Reduces the space below the main heading */
}

main h2 {
    margin-top: 0; /* Removes the extra space above the sub-heading */
    font-weight: normal; /* Optional: makes the subheading look a bit cleaner */
}

/* --- Login & Form Styling --- */
.form-container {
    max-width: 500px;
    margin: 40px auto;
    padding: 30px;
    background-color: #fff;
    border: 2px solid var(--primary-green);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.form-container h2 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-green);
}

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

.form-group label {
    display: block;
    font-size: 1.2rem; /* Large font for readability */
    font-weight: bold;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem; /* Large input text */
    border: 1px solid #ccc;
    border-radius: 4px;
}

.btn-submit {
    width: 100%;
    padding: 15px;
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--text-light);
    background-color: var(--primary-green);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-submit:hover {
    background-color: var(--accent-red);
}

.alert-error {
    color: #fff;
    background-color: var(--accent-red);
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 1.1rem;
}

#caps-warning {
    display: none;
    color: var(--accent-red);
    font-weight: bold;
    font-size: 1.1rem;
    margin-top: 5px;
}

.form-links {
    margin-top: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.form-links a {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: bold;
}

.form-links a:hover {
    text-decoration: underline;
}

/* --- Password Validation Styling --- */
.password-requirements {
    background-color: #f9f9f9;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
}

.validation-list {
    list-style-type: none;
    padding-left: 0;
}

.validation-list li {
    color: var(--accent-red);
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

/* Switches to a green checkmark when the rule is met */
.validation-list li.valid {
    color: var(--primary-green);
}

.validation-list li::before {
    content: "✖ ";
}

.validation-list li.valid::before {
    content: "✔ ";
}

/* The giant success checkmark */
#success-checkmark {
    display: none;
    font-size: 6rem;
    color: var(--primary-green);
    text-align: center;
    margin: 20px 0;
    animation: popIn 0.5s ease-out forwards;
}

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    80% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 20px 0;
    font-size: 1.1rem;
    font-weight: bold;
}

.checkbox-group input[type="checkbox"] {
    width: 25px;
    height: 25px;
    margin-top: 2px;
}

/* --- Contact Page Success Message --- */
.alert-success {
    color: var(--primary-green);
    background-color: #e8f5e9;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid var(--primary-green);
    border-radius: 4px;
    font-weight: bold;
    font-size: 1.1rem;
    text-align: center;
}

/* --- Resource Directory Cards --- */
.resource-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 40px;
    justify-content: center;
}

.resource-card {
    background: #fff;
    border-top: 5px solid var(--primary-green);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 30px;
    width: 100%;
    max-width: 350px;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.resource-card h3 {
    color: var(--primary-green);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.resource-card p {
    font-size: 1.15rem;
    line-height: 1.6;
    margin-bottom: 25px;
    flex-grow: 1; /* Pushes the button to the bottom of the card */
}

/* Red variation for the church cleaning card */
.resource-card.red-card {
    border-top-color: var(--accent-red);
}

.resource-card.red-card h3 {
    color: var(--accent-red);
}

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

.btn-submit.red-btn:hover {
    background-color: #b71c1c; /* A slightly darker red for the hover state */
}