/* Custom styles to enhance Tailwind defaults or add specific elements */
body {
    font-family: 'Inter', sans-serif; /* Using Inter font, common for modern UIs */
    line-height: 1.6;
    color: #333;
    background-color: #f9fafb; /* Light gray background */
}

/* Header styling */
header {
    background-color: #1a202c; /* Dark charcoal */
    color: #ffffff;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
}

header h1 {
    font-size: 2.25rem; /* text-3xl */
    font-weight: 700; /* font-bold */
    color: #fcd34d; /* yellow-300 */
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    header .container {
        flex-direction: row;
    }
    header h1 {
        font-size: 2.5rem; /* text-4xl on larger screens */
        margin-bottom: 0;
    }
}

/* Main content area */
main {
    padding: 2rem 1rem;
    flex-grow: 1;
}

/* Tab Navigation */
.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e2e8f0; /* gray-200 */
    flex-wrap: wrap; /* Allow tabs to wrap on smaller screens */
}

.tab-button {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem; /* text-lg */
    font-weight: 600; /* font-semibold */
    color: #718096; /* gray-500 */
    background-color: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border-bottom: 3px solid transparent;
    white-space: nowrap; /* Prevent text wrapping within button */
}

.tab-button:hover {
    color: #2d3748; /* gray-800 */
    border-color: #a0aec0; /* gray-400 */
}

.tab-button.active {
    color: #3b82f6; /* blue-600 */
    border-color: #3b82f6; /* blue-600 */
}

/* Search and Filter Section */
.search-filter-section, .submission-form-section {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 0.75rem; /* rounded-xl */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.search-filter-section h2, .submission-form-section h2 {
    font-size: 1.75rem; /* text-3xl */
    font-weight: 600; /* font-semibold */
    color: #2d3748; /* gray-800 */
    margin-bottom: 1.5rem;
    text-align: center;
}

.search-filter-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .search-filter-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.search-filter-grid input,
.search-filter-grid select,
.form-group input,
.form-group select,
.form-group textarea,
.form-group input[type="file"] {
    padding: 0.75rem 1rem;
    border: 1px solid #cbd5e0; /* gray-300 */
    border-radius: 0.5rem; /* rounded-lg */
    font-size: 1rem;
    color: #4a5568; /* gray-700 */
    transition: all 0.2s ease-in-out;
    width: 100%; /* Ensure form inputs take full width */
}

.search-filter-grid input:focus,
.search-filter-grid select:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6; /* blue-500 */
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5); /* ring-blue-500 */
}

/* Form Group Styling */
.form-group {
    margin-bottom: 1rem;
}
.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #2d3748;
}
.form-group .hint {
    font-size: 0.875rem;
    color: #718096;
    margin-top: 0.25rem;
}
.form-group .error-message {
    color: #e53e3e;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Form Buttons */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}
.form-actions button {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background-color 0.2s ease-in-out;
}
.btn-primary {
    background-color: #3b82f6; /* blue-600 */
    color: #ffffff;
}
.btn-primary:hover {
    background-color: #2563eb; /* blue-700 */
}
.btn-secondary {
    background-color: #e2e8f0; /* gray-200 */
    color: #4a5568; /* gray-800 */
}
.btn-secondary:hover {
    background-color: #cbd5e0; /* gray-300 */
}
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}


/* Submission Feedback */
.submission-feedback {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    text-align: center;
    font-weight: 500;
}
.submission-feedback.success {
    background-color: #d1fae5; /* green-100 */
    color: #065f46; /* green-800 */
}
.submission-feedback.error {
    background-color: #fee2e2; /* red-100 */
    color: #991b1b; /* red-800 */
}


/* Listing Card */
.listing-card, .cv-card, .my-listing-card {
    background-color: #ffffff;
    border-radius: 0.75rem; /* rounded-xl */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.listing-card:hover, .cv-card:hover, .my-listing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.listing-card img, .cv-card img, .my-listing-card img {
    width: 100%;
    height: 12rem; /* h-48 */
    object-fit: cover;
    transition: transform 0.3s ease-in-out;
}

.listing-card:hover img, .cv-card:hover img, .my-listing-card:hover img {
    transform: scale(1.05);
}

.listing-card-content, .cv-card-content, .my-listing-card-content {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.listing-card-content h3, .cv-card-content h3, .my-listing-card-content h3 {
    font-size: 1.25rem; /* text-xl */
    font-weight: 600; /* font-semibold */
    color: #2d3748; /* gray-800 */
    margin-bottom: 0.5rem;
}

.listing-card-content .category, .cv-card-content .profession, .my-listing-card-content .category, .my-listing-card-content .profession {
    color: #3b82f6; /* blue-600 */
    font-size: 0.875rem; /* text-sm */
    margin-bottom: 0.25rem;
}

.listing-card-content .location, .cv-card-content .location, .my-listing-card-content .location {
    color: #4a5568; /* gray-700 */
    font-size: 0.875rem; /* text-sm */
    margin-bottom: 0.75rem;
}

.listing-card-content .description, .cv-card-content .summary, .my-listing-card-content .description, .my-listing-card-content .summary {
    color: #4a5568; /* gray-700 */
    font-size: 0.9375rem; /* text-base */
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limit to 3 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1; /* Allow description to grow */
}

.listing-card-content button, .cv-card-content button, .my-listing-card-content .actions button {
    background-color: #3b82f6; /* blue-600 */
    color: #ffffff;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background-color 0.2s ease-in-out;
    align-self: flex-start; /* Align button to start */
}

.listing-card-content button:hover, .cv-card-content button:hover, .my-listing-card-content .actions button:hover {
    background-color: #2563eb; /* blue-700 */
}

.my-listing-card-content .actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}
.my-listing-card-content .actions .btn-edit {
    background-color: #28a745; /* Green for edit */
}
.my-listing-card-content .actions .btn-edit:hover {
    background-color: #218838;
}
.my-listing-card-content .actions .btn-delete {
    background-color: #dc3545; /* Red for delete */
}
.my-listing-card-content .actions .btn-delete:hover {
    background-color: #c82333;
}
.my-listing-card-content .status {
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: 0.5rem;
}
.my-listing-card-content .status.verified {
    color: #065f46; /* green-800 */
}
.my-listing-card-content .status.unverified {
    color: #d97706; /* orange-700 */
}


/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.modal-overlay.show {
    opacity: 1;
}

.modal-content {
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    width: 800px; /* Max width for larger screens */
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform 0.3s ease-in-out;
    padding: 1.5rem;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0; /* gray-200 */
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    font-size: 2rem; /* text-3xl */
    font-weight: 700; /* font-bold */
    color: #2d3748; /* gray-800 */
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: #718096; /* gray-500 */
    cursor: pointer;
    transition: color 0.2s ease-in-out;
}

.modal-close-btn:hover {
    color: #4a5568; /* gray-700 */
}

.modal-body img {
    width: 100%;
    height: 16rem; /* h-64 */
    object-fit: cover;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.modal-body p {
    font-size: 1.125rem; /* text-lg */
    color: #4a5568; /* gray-700 */
    margin-bottom: 1rem;
}

.modal-details-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .modal-details-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.modal-details-grid h3 {
    font-size: 1.25rem; /* text-xl */
    font-weight: 600; /* font-semibold */
    color: #2d3748; /* gray-800 */
    margin-bottom: 0.75rem;
}

.modal-details-grid p,
.modal-details-grid li {
    color: #4a5568; /* gray-700 */
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.modal-details-grid p i,
.modal-details-grid li i {
    margin-right: 0.5rem;
    color: #3b82f6; /* blue-600 */
}
.modal-details-grid p .contact-icon {
    color: #10b981; /* green-500 for contact info */
}

.modal-details-grid a {
    color: #3b82f6; /* blue-600 */
    text-decoration: none;
}

.modal-details-grid a:hover {
    text-decoration: underline;
}

.modal-footer {
    text-align: right;
    margin-top: 1.5rem;
}

.modal-footer button {
    background-color: #e2e8f0; /* gray-200 */
    color: #4a5568; /* gray-800 */
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background-color 0.2s ease-in-out;
}

.modal-footer button:hover {
    background-color: #cbd5e0; /* gray-300 */
}

/* Utility classes for layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
}
.grid-listings {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Animations for modal */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0.95); }
    to { transform: scale(1); }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.3s ease-out forwards;
}

/* Hide scrollbar for body when modal is open */
body.modal-open {
    overflow: hidden;
}

