/*
 * Pitt Meadows Air Park Stylesheet
 * Corporate Colors:
 * - #f1f3e8 (Off White - Page Background)
 * - #1f354d (Dark Blue)
 * - #426640 (Green)
 * - #ead8b0 (Sunshine)
 * - #c29540 (Orange)
 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f1f3e8;
    color: #1f354d;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.site-header {
    background-color: #1f354d;
    color: white;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.header-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.7;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.header-left,
.header-right {
    flex: 0 0 auto;
}

.header-center {
    flex: 1 1 auto;
    text-align: center;
    min-width: 200px;
}

.logo {
    height: 80px;
    width: auto;
}

.header-center h1 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
    color: #ead8b0;
}

.user-welcome {
    font-size: 0.9rem;
    color: #ead8b0;
    margin-top: 0.25rem;
}

/* Header Link Styles */
.change-password-link {
    color: #ead8b0;
    text-decoration: none;
    margin-right: 1.5rem;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.change-password-link:hover {
    color: #c29540;
    text-decoration: underline;
}

/* Button Styles */
.btn-primary,
.btn-secondary,
.btn-download {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    font-weight: 500;
}

.btn-primary {
    background-color: #c29540;
    color: white;
}

.btn-primary:hover {
    background-color: #a67d35;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background-color: #426640;
    color: white;
}

.btn-secondary:hover {
    background-color: #355230;
}

.btn-download {
    background-color: #1f354d;
    color: white;
    text-decoration: none;
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-download:hover {
    background-color: #2a4767;
}

/* Main Content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
}

.content-section {
    background-color: white;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.content-section h2 {
    color: #1f354d;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid #c29540;
}

.content-section p {
    margin-bottom: 1rem;
    color: #1f354d;
}

/* Listings Grid */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.listing-card {
    background-color: #f1f3e8;
    border: 2px solid #ead8b0;
    border-radius: 6px;
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.listing-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.listing-card h3 {
    color: #1f354d;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.listing-description {
    font-size: 0.95rem;
    color: #1f354d;
    margin-bottom: 1rem;
    min-height: 80px;
}

.listing-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #426640;
    margin-bottom: 0.5rem;
}

.listing-type {
    background-color: #c29540;
    color: white;
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Contact Info */
.contact-info {
    padding: 1rem;
    background-color: #f1f3e8;
    border-radius: 6px;
}

.contact-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f354d;
    margin-bottom: 0.5rem;
}

.contact-email a {
    color: #426640;
    text-decoration: none;
}

.contact-email a:hover {
    text-decoration: underline;
}

/* Directors Grid */
.directors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
}

.director-card {
    text-align: center;
}

.director-photo {
    margin-bottom: 1rem;
}

.placeholder-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: #426640;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    margin: 0 auto;
}

.director-card h3 {
    color: #1f354d;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.director-position {
    color: #c29540;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.director-contact a {
    color: #426640;
    text-decoration: none;
    font-size: 0.9rem;
}

.director-contact a:hover {
    text-decoration: underline;
}

/* Documents List */
.documents-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.document-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    background-color: #f1f3e8;
    border-radius: 6px;
    border-left: 4px solid #426640;
    gap: 1rem;
    flex-wrap: wrap;
}

.document-info {
    flex: 1 1 300px;
}

.document-item h3 {
    color: #1f354d;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.document-item p {
    color: #1f354d;
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Contacts List */
.contacts-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.contact-card {
    padding: 1.25rem;
    background-color: #f1f3e8;
    border-radius: 6px;
    border-top: 3px solid #c29540;
}

.contact-card h3 {
    color: #1f354d;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.contact-role {
    color: #426640;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.contact-detail {
    font-size: 0.9rem;
}

.contact-detail a {
    color: #1f354d;
    text-decoration: none;
}

.contact-detail a:hover {
    color: #426640;
    text-decoration: underline;
}

/* Footer */
.site-footer {
    background-color: #1f354d;
    color: #ead8b0;
    text-align: center;
    padding: 1.5rem;
    margin-top: auto;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(31, 53, 77, 0.8);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    background-color: #1f354d;
    color: #ead8b0;
    padding: 1.5rem;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close {
    color: #ead8b0;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.close:hover {
    color: #c29540;
}

.modal-body {
    padding: 2rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #1f354d;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ead8b0;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #c29540;
}

.error-message {
    background-color: #ffebee;
    color: #c62828;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    display: none;
    border-left: 4px solid #c62828;
}

.error-message.show {
    display: block;
}

.success-message {
    background-color: #e8f5e9;
    color: #2e7d32;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    display: none;
    border-left: 4px solid #2e7d32;
}

.success-message.show {
    display: block;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.form-actions button {
    flex: 1;
}

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

    .header-left,
    .header-center,
    .header-right {
        width: 100%;
    }

    .header-right {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }

    .change-password-link {
        margin-right: 0;
    }

    .header-center h1 {
        font-size: 1.5rem;
    }

    .logo {
        height: 60px;
    }

    .header-image {
        height: 150px;
    }

    .container {
        padding: 1rem;
    }

    .content-section {
        padding: 1.5rem;
    }

    .content-section h2 {
        font-size: 1.5rem;
    }

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

    .directors-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1.5rem;
    }

    .placeholder-photo {
        width: 100px;
        height: 100px;
        font-size: 1.5rem;
    }

    .document-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-download {
        width: 100%;
        text-align: center;
    }

    .contacts-list {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .modal-content {
        margin: 20% auto;
        width: 95%;
    }
}

@media (max-width: 480px) {
    .header-center h1 {
        font-size: 1.25rem;
    }

    .btn-primary,
    .btn-secondary {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .listing-price {
        font-size: 1.25rem;
    }

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