/* General Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth; /* Smooth scrolling for anchor links */
}

body {
    font-family: 'Arial', sans-serif; /* Modern, clean font */
    line-height: 1.6;
    background-color: #f0f2f5; /* Light grey background for a clean look */
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensure footer stays at the bottom */
}

/* Header Styling */
header {
    background-color: #004080; /* Professional blue */
    color: #ffffff;
    padding: 1em 0; /* Adjusted padding */
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
    position: sticky; /* Sticky header */
    top: 0;
    z-index: 1000;
    display: flex; /* Use flexbox for alignment */
    align-items: center; /* Vertically align items */
    justify-content: center; /* Center items horizontally */
    flex-wrap: wrap; /* Allow wrapping for smaller screens */
}

#club-logo {
    width: 150px; /* Default width, adjust as needed */
    height: 50px;  /* Default height, adjust as needed */
    vertical-align: middle; /* Align with text if inline */
    margin-right: 15px;
    display: none; /* Hidden by default, shown by JS if image loads */
}

header h1 {
    margin: 0; /* Reset margin */
    font-size: 2.5em;
    font-weight: bold;
    margin-left: 15px; /* Add some space if logo is present */
}

/* Navigation Menu Styling */
nav ul {
    list-style-type: none;
    padding: 0.5em 0 0 0; /* Added padding for spacing */
    text-align: center;
}

nav ul li {
    display: inline-block; /* Use inline-block for better spacing control */
    margin: 0 15px;
}

nav ul li a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.1em;
    padding: 0.5em 1em; /* Padding for larger clickable area */
    border-radius: 5px; /* Rounded corners for links */
    transition: background-color 0.3s ease, color 0.3s ease; /* Smooth transition for hover */
}

nav ul li a:hover,
nav ul li a:focus { /* Added focus for accessibility */
    background-color: #0059b3; /* Slightly darker blue on hover */
    color: #e6e6e6; /* Lighter text color on hover */
}

/* Main Content Area */
main {
    flex-grow: 1; /* Allow main content to fill available space */
    padding: 30px 20px; /* More padding for content sections */
    width: 100%;
    max-width: 1200px; /* Max width for content for larger screens */
    margin: 0 auto; /* Center content */
}

/* Section Styling */
section {
    margin-bottom: 30px; /* Increased margin for better separation */
    padding: 30px;
    background-color: #ffffff; /* White background for sections */
    border-radius: 8px; /* Slightly more rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05); /* Softer shadow for sections */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Transition for hover effect */
}

section:hover {
    transform: translateY(-5px); /* Slight lift effect on hover */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1); /* Enhanced shadow on hover */
}

section h2 {
    font-size: 2em;
    margin-bottom: 15px;
    color: #004080; /* Section titles in header blue */
    border-bottom: 2px solid #004080; /* Underline for section titles */
    padding-bottom: 5px;
    display: inline-block;
}

main section p {
    margin-bottom: 1em; /* Consistent spacing for paragraphs */
    /* line-height: 1.7; /* Slightly more line height for readability if desired */
}

main section ul,
main section ol { /* Also target ordered lists for consistency */
    margin-bottom: 1em; /* Consistent spacing after lists */
    padding-left: 20px; /* Default browser padding is often 40px, this is a common adjustment */
}

/* Footer Styling */
footer {
    text-align: center;
    padding: 20px 0; /* Increased padding */
    background-color: #2c3e50; /* Darker, more distinct footer color */
    color: #ecf0f1; /* Lighter text color for footer */
    width: 100%;
    margin-top: auto; /* Pushes footer to the bottom if content is short */
}

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

/* === Application Form Styling (application.html) === */
#membership-form fieldset {
    border: 1px solid #ddd;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    background-color: #f9f9f9;
}

#membership-form legend {
    font-size: 1.2em;
    font-weight: bold;
    color: #004080; /* Match header blue */
    padding: 0 10px;
}

#membership-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

#membership-form input[type="text"],
#membership-form input[type="email"],
#membership-form textarea,
#membership-form select {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    box-sizing: border-box; /* Ensures padding doesn't affect overall width */
}

#membership-form input[type="checkbox"] {
    margin-right: 8px;
    vertical-align: middle;
}

/* Renamed .waiver-text to .legal-text to match application.html */
#membership-form .legal-text p {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 10px;
    max-height: 150px; /* Example: make waiver text scrollable if long */
    overflow-y: auto;
    border: 1px solid #eee;
    padding: 10px;
    background-color: #fff;
}

#membership-form button[type="submit"] {
    background-color: #0059b3; /* Darker blue from nav hover */
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#membership-form button[type="submit"]:hover {
    background-color: #004080; /* Header blue */
}

/* Centering form on application page - applied to section containing the form for better control */
#application-form-section { /* Assuming the form is within a section with this ID in application.html */
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}


/* === Status Message Styling (process_application.php) === */
.status-message {
    padding: 15px 20px;
    margin: 20px auto; /* Centered status messages, adjusted from 20px 0 */
    border-radius: 5px;
    font-size: 1.05em;
    border-left-width: 5px;
    border-left-style: solid;
    max-width: 800px; /* Consistent max-width */
}

.status-message.success {
    background-color: #e7f4e7;
    color: #155724; /* Darker green for better readability */
    border-left-color: #28a745; /* Green border */
}

.status-message.error {
    background-color: #f8d7da;
    color: #721c24; /* Darker red */
    border-left-color: #dc3545; /* Red border */
}

/* Style for the <pre> tag showing submitted data on process_application.php */
/* Assuming process_application.php's main content area is within a section, or directly in main */
/* If process_application.php has <section id="status-section"> then use: */
/* #status-section pre { ... } */
/* For now, using a general approach that might need refinement based on actual HTML of process_application.php */
main section pre {
    background-color: #f3f3f3;
    border: 1px dashed #ccc;
    padding: 15px;
    margin-top: 15px;
    white-space: pre-wrap; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
    max-height: 300px; /* Scroll long content */
    overflow-y: auto;
    border-radius: 4px;
    max-width: 800px; /* Consistent max-width */
    margin-left: auto;  /* Centering the pre block */
    margin-right: auto; /* Centering the pre block */
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        padding: 0.5em 0; /* Reduced header padding on mobile */
    }

    header h1 {
        font-size: 1.8em; /* Slightly reduce if needed */
        margin: 0.2em 0; /* Adjust h1 margin */
    }

    nav ul { /* Target nav ul for consistency in padding/margin reset if needed */
        padding-top: 0.2em; /* Reduce space above nav links if any */
    }

    nav ul li {
        display: block; /* Stack navigation links vertically on smaller screens */
        margin: 2px 0; /* Reduced vertical margin */
    }

    nav ul li a {
        display: block; /* Make links take full width for easier tapping */
        padding: 0.4em 0.8em; /* Reduced vertical padding, kept horizontal padding */
    }

    main {
        padding: 20px 10px;
    }

    section {
        padding: 20px;
    }

    section h2 {
        font-size: 1.8em;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8em;
    }

    nav ul li a {
        font-size: 1em;
    }

    section h2 {
        font-size: 1.6em;
    }

    footer p {
        font-size: 0.8em;
    }
}
