/* style.css */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6; /* Light background */
    color: #333;
    line-height: 1.6;
    min-height: 100vh; /* Ensure body takes at least full viewport height */
    display: flex; /* Use flexbox to center content */
    flex-direction: column; /* Stack items vertically */
}

.container {
    width: 90%;
    max-width: 900px; /* Max width for content */
    margin: 20px auto;
    padding: 20px 30px; /* Added horizontal padding */
    background-color: transparent; /* Changed from white to blend with the body */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* Softer shadow */
    border-radius: 10px; /* Rounded corners */
    flex-grow: 1; /* Allow container to grow and push footer down */
}

h1, h2 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

nav {
    background-color: #2c3e50; /* Darker nav background */
    color: white;
    padding: 12px 0; /* Slightly more padding */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative; /* Needed for absolute positioning of the toggle */
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

nav ul li {
    display: inline-block; /* Use inline-block for spacing control */
    margin: 0 15px; /* Increased spacing */
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease; /* Smooth hover effect */
}

nav ul li a:hover {
    color: #3498db; /* Highlight color on hover */
}

/* Form Styles - Applied to .form-container class */
.form-container {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 400px; /* Limit form width */
    margin: 40px auto; /* Center the form */
    text-align: center;
}

.form-container h2 {
    margin-top: 0; /* Remove default top margin */
    margin-bottom: 25px;
    color: #555;
}

.form-group {
    margin-bottom: 20px;
    text-align: left; /* Align labels and inputs left */
}

.form-group label {
    display: block; /* Label on its own line */
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-container textarea { /* Added textarea for consistency */
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box; /* Include padding and border in element's total width */
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus,
.form-container textarea:focus {
    border-color: #3498db; /* Highlight on focus */
    outline: none; /* Remove default outline */
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3); /* Optional subtle shadow on focus */
}

.form-container button,
.form-container input[type="submit"] {
    background-color: #3498db; /* A modern blue */
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.1s ease;
    width: 100%; /* Make button full width on smaller screens */
    margin-top: 10px; /* Add some space above the button */
}

.form-container button:hover,
.form-container input[type="submit"]:hover {
    background-color: #2980b9; /* Darker blue on hover */
}
.form-container button:active,
.form-container input[type="submit"]:active {
     transform: scale(0.98); /* Slightly shrink on click */
}


.error-message {
    color: #e74c3c; /* Reddish error color */
    margin-bottom: 15px;
    font-weight: bold;
}

.success-message {
    color: #28a745; /* Green success color */
    margin-bottom: 15px;
    font-weight: bold;
}

/* Add some spacing below form elements */
.form-container br {
    display: none; /* Hide default br tags */
}


/* --- Existing styles from index.php (ensure these are present) --- */
textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

button {
    background-color: #5cb85c;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: #449d44;
}

#extracted_emails {
    margin-top: 20px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    nav ul li {
        display: block; /* Stack nav items on small screens */
        margin: 10px 0; /* Add vertical space */
    }

    .container {
        padding: 15px; /* Reduce padding on smaller screens */
    }

    .form-container {
        padding: 20px; /* Reduce form padding */
    }
}

/* Mobile Navigation Styles */
.menu-toggle {
    display: none; /* Hide by default on desktop */
    background-color: transparent;
    border: none;
    color: #3498db; /* Changed to blue */
    font-size: 24px;
    cursor: pointer;
    padding: 10px 15px;
    position: absolute; /* Position the toggle button */
    top: 10px;
    right: 10px;
    z-index: 1000; /* Ensure it's above other content */
}

@media (max-width: 768px) { /* Adjust breakpoint as needed */
    .menu-toggle {
        display: block; /* Show toggle button on mobile */
    }

    nav ul.nav-list {
        display: none; /* Hide nav list by default on mobile */
        flex-direction: column; /* Stack nav items vertically */
        position: absolute;
        top: 50px; /* Position below the nav */
        left: 0;
        width: 100%;
        background-color: #2c3e50; /* Match nav background */
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        z-index: 999; /* Ensure it's above content but below toggle */
    }

    nav ul.nav-list.show {
        display: flex; /* Show the nav list when 'show' class is present */
    }

    nav ul.nav-list li {
        margin: 10px 0; /* Add vertical space */
        text-align: center;
    }
}

/* --- Footer Styles --- */
footer {
    background-color: #2c3e50; /* Match nav background */
    color: #ecf0f1; /* Light text color */
    padding: 20px 0;
    margin-top: auto; /* Push footer to the bottom */
    width: 100%;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links ul li {
    display: inline-block;
    margin: 0 15px; /* Use margin for even spacing */
}

.footer-links a {
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #3498db; /* Highlight color on hover */
}

.footer-copyright p {
    margin: 0;
    font-size: 0.9em;
    color: #bdc3c7; /* Slightly dimmer text color */
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        margin-bottom: 15px;
    }

    .footer-links ul li {
        display: block;
        margin: 10px 0;
    }
}

/* --- Info Section Grid Styles --- */
.info-section-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px; /* Space between grid items */
    text-align: left;
}

.info-item h3 {
    color: #3498db; /* Highlight color for headings */
    margin-bottom: 10px;
}

.info-item p {
    line-height: 1.7;
    color: #555;
}

@media (max-width: 768px) {
    .info-section-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
    }
}
