
/**
 * Root variables for theming.
 * Based on design.md
 */
:root {
    --primary-background: #040273;
    --primary-foreground: #eee;
    --contrast-background: #57918f;
    --contrast-foreground: #eee8a9;

    /* Additional theme variables */
    --page-background: #fdfdfd;
    --text-color: #222;
    --border-color: #ccc;
    --border-radius: 4px;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --spacing-unit: 1rem;
}

/**
 * Global styles and resets
 */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--page-background);
    color: var(--text-color);
    margin: 0;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    width: 800px;
    margin: 0 auto;
    padding: calc(var(--spacing-unit) * 2);
    /* border-style: solid; */
    /* border-width: 0 1px; */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    flex-grow: 1;
}

h1, h2, h3 {
    line-height: 1.2;
}

a {
    color: var(--primary-background);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/**
 * Form element styling for a clean and intuitive interface.
 */
form {
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 1.5);
}

label {
    font-weight: bold;
    margin-bottom: -1rem; /* Reduce space between label and input */
}

input[type="text"],
input[type="number"],
input[type="file"],
textarea,
select {
    width: 100%;
    padding: calc(var(--spacing-unit) * 0.75);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
}

input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary-background);
    outline-offset: 2px;
}

button[type="submit"] {
    background-color: var(--primary-background);
    color: var(--primary-foreground);
    border: none;
    padding: calc(var(--spacing-unit) * 0.75) calc(var(--spacing-unit) * 1.5);
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    align-self: flex-start; /* Don't stretch the button */
    transition: background-color 0.2s ease-in-out;
}

button[type="submit"]:hover {
    background-color: #284db8; /* A slightly darker shade for hover */
}

/* Remove default line breaks after labels for better spacing control with gap */
label + br {
    display: none;
}

/**
 * Site Header
 */
.site-header {
    background-color: var(--page-background);
    border-bottom: 1px solid var(--border-color);
    padding: 0 var(--spacing-unit);
    
}

.header-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-color);
    text-decoration: none;
}

.site-header nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: var(--spacing-unit);
}

/**
 * Site Footer
 */
.site-footer {
    background-color: #f2f2f2;
    color: #666;
    text-align: center;
    padding: calc(var(--spacing-unit) * 2);
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.site-footer p {
    margin: 0.5rem 0;
}

/**
 * Homepage specific styles
 */
.hero {
    background-color: var(--primary-background);
    background: linear-gradient(116deg,rgba(4, 2, 115, 1) 0%, rgba(31, 29, 122, 1) 67%);
    color: var(--primary-foreground);
    padding: calc(var(--spacing-unit) * 4) calc(var(--spacing-unit) * 2);
    text-align: center;
    margin: calc(var(--spacing-unit) * -2) calc(var(--spacing-unit) * -2) var(--spacing-unit);
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    background-color: var(--contrast-background);
    color: var(--contrast-foreground);
    padding: var(--spacing-unit) calc(var(--spacing-unit) * 2);
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: transform 0.2s ease;
}

.cta-button:hover {
    transform: scale(1.05);
    text-decoration: none;
}

.prospect-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: calc(var(--spacing-unit) * 2);
    margin-top: calc(var(--spacing-unit) * 2);
}

.prospect-card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-unit);
    text-align: center;
}

.prospect-card img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

/**
 * Form Error Styling
 */
.form-errors {
    color: #d8000c;
    background-color: #ffbaba;
    border: 1px solid #d8000c;
    border-radius: var(--border-radius);
    padding: var(--spacing-unit);
    margin-bottom: var(--spacing-unit);
}

.field-error {
    color: #d8000c;
    font-size: 0.9em;
    margin-top: -1rem; /* Pull error message closer to the input */
    min-height: 1em; /* Prevent layout shift when errors appear/disappear */
}

/**
 * Prospect Detail Page Styles
 */
.prospect-gallery {
    margin: calc(var(--spacing-unit) * 2) 0;
    outline: none; /* Remove default focus outline, we'll add our own */
}

.prospect-gallery:focus-within {
    box-shadow: 0 0 0 2px var(--primary-background);
    border-radius: var(--border-radius);
}

.main-image-container img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-unit);
}

.supporting-image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-unit);
}

.supporting-image-item img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--border-radius);
}

/**
 * Profile Page Styles
 */
.prospect-list {
    list-style: none;
    padding: 0;
    margin-top: var(--spacing-unit);
}

.prospect-list li {
    background-color: #f9f9f9;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-unit);
    margin-bottom: var(--spacing-unit);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.prospect-list .prospect-title {
    font-weight: bold;
    flex-grow: .7;
}

.prospect-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-unit);
}

.prospect-meta {
    font-size: 0.9em;
    color: #666;
    text-align: right;
}

.status-draft {
    font-style: italic;
}

.delete-button {
    background-color: #d9534f;
    color: white;
    border: none;
    padding: 0.4em 0.8em;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9em;
}

.delete-button:hover {
    background-color: #c9302c;
}

.edit-button {
    background-color: #f0ad4e;
    color: white;
    border: none;
    padding: 0.4em 0.8em;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9em;
    text-decoration: none;
}

.edit-button:hover {
    background-color: #ec971f;
    text-decoration: none;
}

th, th {
    padding: .5rem;
}