.contact-page {
    position: relative;
    z-index: 2;
    background: transparent;
    padding: 2rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-form-card {
    padding: 2.5rem;
}

.contact-page .card-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.75rem;
}

.contact-page .form-label {
    font-weight: bold;
}

.contact-info-wrapper {
    padding: 1rem 0;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .contact-page {
        padding: 1rem;
        padding-bottom: 120px;
    }

    .contact-form-card {
        padding: 1.5rem;
    }

    .contact-page .col-lg-4 .card:last-child {
        margin-bottom: 2rem;
    }

    .border-end {
        border: none !important;
    }

    .col-md-4 {
        margin-top: 2rem;
        padding-top: 2rem;
    }

    .contact-info-wrapper {
        padding: 0;
    }
}

/* Large Screen Styles */
@media (min-width: 1400px) {
    .contact-form-card {
        padding: 3rem;
    }
}

@media (min-width: 992px) and (max-width: 1399px) {
    .contact-form-card {
        padding: 2.5rem;
    }
}

/* Layout Styles */
.contact-page .row {
    display: flex;
    flex-wrap: wrap;
}

.contact-page .col-lg-4 {
    display: flex;
    flex-direction: column;
}

.contact-page .col-lg-4 .card {
    margin-bottom: 1rem;
}

.contact-page .col-lg-4 .card:last-child {
    margin-bottom: 0;
}

.contact-page .card {
    height: auto;
    margin-bottom: 0;
}

.contact-page .contact-form-card {
    height: auto;
}

.contact-page .card-body {
    padding: 1.5rem;
    height: auto;
}

/* Right Column Card Spacing */
.contact-page .col-lg-5 .card {
    margin-bottom: 1rem;
}

.contact-page .col-lg-5 .card:last-child {
    margin-bottom: 0;
}

.contact-page .col-lg-5 .card-title {
    margin-bottom: 1rem;
}

.contact-page .col-lg-5 .card p {
    margin-bottom: 0.5rem;
}

/* Modal styling for messages - Updated for better theme integration */
.modal-content {
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.modal-header {
    border-bottom-color: var(--border-color);
}

.modal-footer {
    border-top-color: var(--border-color);
}

.modal .alert {
    background-color: transparent;
    border-left: 4px solid;
    border-radius: 0;
    padding: 15px;
    margin-bottom: 0;
}

/* Success alert */
.modal .alert-success {
    border-left-color: #28a745;
}

:root[data-theme="light"] .modal .alert-success {
    color: #155724;
    background-color: rgba(40, 167, 69, 0.15);
}

:root[data-theme="dark"] .modal .alert-success {
    color: #d4edda;
    background-color: rgba(40, 167, 69, 0.25);
}

/* Error alert */
.modal .alert-error,
.modal .alert-danger {
    border-left-color: #dc3545;
}

:root[data-theme="light"] .modal .alert-error,
:root[data-theme="light"] .modal .alert-danger {
    color: #721c24;
    background-color: rgba(220, 53, 69, 0.15);
}

:root[data-theme="dark"] .modal .alert-error,
:root[data-theme="dark"] .modal .alert-danger {
    color: #f8d7da;
    background-color: rgba(220, 53, 69, 0.25);
}

/* Close button */
:root[data-theme="light"] .modal .btn-close {
    filter: none;
}

:root[data-theme="dark"] .modal .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Modal buttons */
.modal .btn-secondary {
    background-color: var(--navbar-bg);
    color: var(--text-color);
    border-color: var(--border-color);
}

.modal .btn-secondary:hover {
    background-color: var(--navbar-shrink-bg);
    color: var(--text-color);
}

/* Form validation styles */
.errorlist {
    color: #e74c3c;
    list-style: none;
    padding-left: 0;
    margin-top: 5px;
    font-size: 0.9rem;
}

.errorlist li {
    padding: 3px 0;
}

.form-control.is-invalid {
    border-color: #e74c3c;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23e74c3c' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23e74c3c' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.required-star:after {
    content: "*";
    color: #e74c3c;
    margin-left: 2px;
}