/* Frontend Styles for Projects Manager v1.0.1 */
/* Theme-friendly Layout - Uses theme colors and styling */

:root {
    --theme-font-family: var(--theme-font-stack-default);
    --theme-font-weight: 400;
    --theme-text-transform: none;
    --theme-text-decoration: none;
    --theme-font-size: 16px;
    --theme-line-height: 1.65;
    --theme-letter-spacing: 0em;
    --theme-button-font-weight: 500;
    --theme-button-font-size: 15px;
    --has-classic-forms: var(--true);
    --has-modern-forms: var(--false);
    --theme-form-field-height: 50px;
    --theme-form-field-border-radius: 15px;
    --theme-form-field-border-initial-color: var(--theme-border-color);
    --theme-form-field-border-focus-color: var(--theme-palette-color-1);
    --theme-form-field-border-width: 2px;
    --theme-form-selection-field-initial-color: var(--theme-border-color);
    --theme-form-selection-field-active-color: var(--theme-palette-color-1);
    --theme-palette-color-1: #ffd800;
    --theme-palette-color-2: #ffc900;
    --theme-palette-color-3: #5a5a5a;
    --theme-palette-color-4: #000000;
    --theme-palette-color-5: #edeff2;
    --theme-palette-color-6: #f9fafb;
    --theme-palette-color-7: #FDFDFD;
    --theme-palette-color-8: #ffffff;
    --theme-text-color: var(--theme-palette-color-3);
    --theme-link-initial-color: var(--theme-palette-color-1);
    --theme-link-hover-color: var(--theme-palette-color-2);
    --theme-selection-text-color: #ffffff;
    --theme-selection-background-color: var(--theme-palette-color-1);
    --theme-border-color: var(--theme-palette-color-5);
    --theme-headings-color: var(--theme-palette-color-4);
    --theme-content-spacing: 1.5em;
    --theme-button-min-height: 50px;
    --theme-button-shadow: none;
    --theme-button-transform: none;
    --theme-button-text-initial-color: #2f2207;
    --theme-button-text-hover-color: #2f2005;
    --theme-button-background-initial-color: var(--theme-palette-color-1);
    --theme-button-background-hover-color: var(--theme-palette-color-2);
    --theme-button-border: none;
    --theme-button-border-radius: 15px;
    --theme-button-padding: 5px 20px;
    --theme-normal-container-max-width: 1290px;
    --theme-content-vertical-spacing: 60px;
    --theme-container-edge-spacing: 90vw;
    --theme-narrow-container-max-width: 750px;
    --theme-wide-offset: 130px;
}

/* Archive Page Layout */
.projects-archive-container {
    display: flex;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.projects-main-content {
    flex: 1;
    min-width: 0; /* Prevents flex item from overflowing */
}

.projects-sidebar {
    flex: 0 0 300px;
    padding: 20px;
    border-radius: 8px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

/* Page Header - Use theme styling */
.page-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--wp--preset--color--foreground, inherit);
    font-weight: 600;
}

.archive-description {
    font-size: 1.1rem;
    color: var(--wp--preset--color--text-secondary, var(--theme-text-color));
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Filter Bar */
.projects-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--theme-palette-color-8);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.filter-buttons {
    display: flex;
    gap: 5px;
    background: var(--theme-palette-color-5);
    padding: 5px;
    border-radius: 25px;
}

.filter-btn {
    padding: 10px 20px;
    border-radius: 20px;
    text-decoration: none;
    color: var(--theme-text-color);
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 14px;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--theme-link-initial-color);
    color: var(--theme-palette-color-8);
    text-decoration: none;
}

.projects-view-toggle {
    display: flex;
    gap: 5px;
}

.view-toggle {
    background: none;
    border: 1px solid var(--theme-border-color);
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-toggle:hover,
.view-toggle.active {
    background: var(--theme-link-initial-color);
    color: var(--theme-palette-color-8);
    border-color: var(--theme-link-initial-color);
}

.view-toggle .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Results Info */
.projects-results-info {
    margin-bottom: 20px;
    padding: 10px 0;
    color: var(--theme-text-color);
    font-size: 14px;
}

/* Grid Container - Improved Grid Layout */
.projects-grid-container {
    display: grid;
    gap: 30px;
    margin-bottom: 40px;
}

/* View Toggle Transitions */
.projects-grid-container {
    transition: all 0.3s ease;
}

.projects-grid-container.view-changing {
    opacity: 0.7;
}

.projects-grid-container .project-card {
    transition: all 0.3s ease;
}

/* Grid View - Responsive grid that doesn't stretch single items */
.projects-grid-container[data-view="grid"] {
    grid-template-columns: repeat(auto-fill, minmax(300px, 400px));
    justify-content: start;
}

/* List View */
.projects-grid-container[data-view="list"] {
    grid-template-columns: 1fr;
    gap: 20px;
}

.projects-grid-container[data-view="list"] .project-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.projects-grid-container[data-view="list"] .project-thumbnail {
    flex: 0 0 200px;
}

.projects-grid-container[data-view="list"] .project-card-content {
    flex: 1;
}

/* Project Card Styling - Theme-friendly */
.project-card {
    background: var(--wp--preset--color--background, var(--theme-palette-color-8));
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    height: fit-content;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--wp--preset--color--border, var(--theme-border-color));
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.project-thumbnail {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.project-thumbnail .project-image-link {
    display: block;
    height: 100%;
}

.project-featured-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .project-featured-image {
    transform: scale(1.05);
}

.project-status {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 14px;
    border-radius: 20px;
    color: var(--theme-palette-color-8);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    z-index: 2;
}

.status-upcoming {
    background: var(--wp--preset--color--success, #3493ff);
}

.status-ongoing {
    background: var(--wp--preset--color--warning, #dba617);
}

.status-completed {
    background: var(--wp--preset--color--secondary, #26fa90);
}

.status-cancelled {
    background: var(--wp--preset--color--error, #d63638);
}

/* Card Content - Theme colors */
.project-card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-card-header {
    margin-bottom: 15px;
}

.project-card-title {
    margin: 0 0 12px;
    font-size: 1.3rem;
    line-height: 1.4;
    font-weight: 600;
}

.project-card-title a {
    text-decoration: none;
    color: var(--wp--preset--color--foreground, inherit);
    transition: color 0.3s ease;
}

.project-card-title a:hover {
    color: var(--wp--preset--color--primary, #2271b1);
}

.project-meta-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    color: var(--wp--preset--color--text-secondary, #666);
}

.project-date-info,
.project-location-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-meta-info .dashicons {
    color: var(--wp--preset--color--primary, #2271b1);
    font-size: 16px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Excerpt */
.project-excerpt {
    flex-grow: 1;
    margin-bottom: 15px;
    line-height: 1.6;
    color: var(--wp--preset--color--text, #555);
}

.project-excerpt p {
    margin: 0;
}

/* Categories */
.project-categories {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-category-tag {
    display: inline-block;
    background: var(--theme-palette-color-5);
    color: var(--theme-link-initial-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.project-category-tag:hover {
    background: var(--theme-link-initial-color);
    color: var(--theme-palette-color-8);
    text-decoration: none;
}

/* Card Footer */
.project-card-footer {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--theme-border-color);
}

.project-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--theme-link-initial-color);
    color: var(--theme-palette-color-8);
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
}

.project-read-more:hover {
    background: var(--theme-link-hover-color);
    color: var(--theme-palette-color-8);
    text-decoration: none;
    transform: translateX(2px);
}

.project-read-more .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* Sidebar Styling */
.projects-sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}


.projects-sidebar .widget-title {
    /* background: var(--wp--preset--color--background-secondary, var(--theme-palette-color-6)); */
    /* border-bottom: 1px solid var(--wp--preset--color--border, var(--theme-border-color)); */
    margin: 0;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 600;
    color: var(--wp--preset--color--foreground, var(--theme-headings-color));
}

.search-field-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.projects-search-form .search-field {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid var(--wp--preset--color--border, var(--theme-border-color));
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    background: var(--wp--preset--color--background, var(--theme-palette-color-8));
    color: var(--wp--preset--color--foreground, inherit);
}

.projects-search-form .search-field:focus {
    outline: none;
    border-color: var(--wp--preset--color--primary, var(--theme-link-initial-color));
}

.projects-search-form .search-submit {
    position: absolute;
    right: 5px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--wp--preset--color--text-secondary, #666);
    transition: color 0.3s ease;
}

.projects-search-form .search-submit:hover {
    color: var(--wp--preset--color--primary, var(--theme-link-initial-color));
}

.projects-search-form .search-submit .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Filter Widget */
.projects-filter-widget .projects-status-filter {
    list-style: none;
    margin: 0;
    padding: 0;
}


.status-filter-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    text-decoration: none;
    color: var(--wp--preset--color--text, #555);
    transition: all 0.3s ease;
}

.status-filter-link:hover {
    /* background: var(--wp--preset--color--background-secondary, var(--theme-palette-color-6)); */
    color: var(--wp--preset--color--primary, var(--theme-link-initial-color));
    text-decoration: none;
}

.status-filter-item.active .status-filter-link {
    color: var(--wp--preset--color--primary, var(--theme-link-initial-color));
}

.status-filter-item.active .status-filter-link:hover {
    color: var(--wp--preset--color--primary-dark, var(--theme-link-hover-color));
}

.status-count {
    /* background: var(--wp--preset--color--background-secondary, var(--theme-palette-color-5)); */
    color: var(--wp--preset--color--text-secondary, var(--theme-text-color));
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-filter-item.active .status-count {
    background: rgba(255,255,255,0.5);
    color: var(--theme-palette-color-4);
}

/* Categories Widget */
.projects-categories-widget .projects-categories-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.category-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--theme-text-color);
    transition: all 0.3s ease;
}

.category-link:hover {
    background: var(--theme-palette-color-6);
    color: var(--theme-link-initial-color);
    text-decoration: none;
}

.category-count {
    color: var(--theme-text-color);
    font-size: 12px;
}

.category-description {
    padding: 0 20px 15px;
    font-size: 13px;
    color: var(--theme-text-color);
    margin: 0;
    line-height: 1.4;
}

/* Upcoming Projects Widget */
.projects-upcoming-widget .upcoming-projects-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.upcoming-project-item {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.upcoming-project-item:last-child {
    border-bottom: none;
}

.upcoming-project-content {
    flex: 1;
}

.upcoming-project-title {
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 1.3;
}

.upcoming-project-title a {
    text-decoration: none;
    color: var(--theme-headings-color);
    font-weight: 500;
}

.upcoming-project-title a:hover {
    color: var(--theme-link-initial-color);
}

.upcoming-project-date {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--theme-text-color);
}

.upcoming-project-date .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: var(--theme-link-initial-color);
}

.upcoming-project-thumb {
    flex: 0 0 50px;
}

.upcoming-project-thumb img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.widget-footer {
    padding: 15px 20px;
    background: var(--theme-palette-color-6);
    border-top: 1px solid var(--theme-border-color);
}

.view-all-upcoming {
    color: var(--theme-link-initial-color);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.view-all-upcoming:hover {
    text-decoration: underline;
}

/* Info Widget */
.projects-info-widget .projects-quick-info {
    padding: 20px;
}

.info-item {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item .dashicons {
    color: var(--theme-link-initial-color);
    font-size: 18px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.info-content strong {
    display: block;
    margin-bottom: 5px;
    color: var(--theme-headings-color);
    font-size: 14px;
}

.info-content p {
    margin: 0;
    font-size: 13px;
    color: var(--theme-text-color);
    line-height: 1.4;
}

/* Archive Links Widget */
.projects-archive-widget .projects-archive-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.projects-archive-links li {
    border-bottom: 1px solid var(--theme-palette-color-5);
}

.projects-archive-links li:last-child {
    border-bottom: none;
}

.projects-archive-links a {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--theme-text-color);
    transition: all 0.3s ease;
}

.projects-archive-links a:hover {
    background: var(--theme-palette-color-6);
    color: var(--theme-link-initial-color);
    text-decoration: none;
}

/* Pagination */
.pagination {
    margin-top: 40px;
    text-align: center;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results .page-title {
    color: #666;
    margin-bottom: 20px;
}

.no-results-actions {
    margin-top: 30px;
}

.no-results-actions .button {
    display: inline-block;
    background: var(--theme-link-initial-color);
    color: var(--theme-palette-color-8);
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
}

.no-results-actions .button:hover {
    background: var(--theme-link-hover-color);
    color: var(--theme-palette-color-8);
    text-decoration: none;
}

/* Projects List Shortcode - Blog Style Layout */
.projects-list-shortcode {
    max-width: 800px;
    margin: 0 auto;
}

.projects-blog-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.project-blog-item {
    display: flex;
    flex-direction: column;
    background: var(--wp--preset--color--background, transparent);
    border-bottom: 1px solid var(--wp--preset--color--border, #e1e1e1);
    padding-bottom: 40px;
}

.project-blog-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.project-featured-image {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
}

.project-image-link {
    display: block;
    transition: opacity 0.3s ease;
}

.project-image-link:hover {
    opacity: 0.9;
}

.project-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.project-blog-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    flex-grow: 1;
}

.project-categories {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.project-blog-title {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.3;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-blog-title a {
    color: var(--wp--preset--color--foreground, var(--theme-headings-color));
    text-decoration: none;
    transition: color 0.3s ease;
}

.project-blog-title a:hover {
    color: var(--wp--preset--color--primary, var(--theme-link-initial-color));
}

.project-blog-excerpt {
    color: var(--wp--preset--color--text, var(--theme-text-color));
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 4.5em; /* 3 lines × 1.5 line-height */
}

.project-blog-excerpt p {
    margin-bottom: 12px;
}

.project-blog-excerpt p:last-child {
    margin-bottom: 0;
}

.project-blog-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--theme-border-color);
}

.project-details-inline {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--wp--preset--color--text-secondary, var(--theme-text-color));
    font-size: 13px;
}

.project-date-meta,
.project-location-meta {
    position: relative;
    padding-left: 18px;
    font-weight: 500;
}

.project-date-meta::before {
    content: "📅";
    position: absolute;
    left: 0;
    font-size: 12px;
}

.project-location-meta::before {
    content: "📍";
    position: absolute;
    left: 0;
    font-size: 12px;
}

/* View All Projects Button */
.projects-view-all {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--wp--preset--color--border, #e1e1e1);
}

.view-all-projects-btn {
    display: inline-block;
    background: var(--wp--preset--color--primary, #2271b1);
    color: var(--wp--preset--color--background, #fff);
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 2px solid var(--wp--preset--color--primary, #2271b1);
}

.view-all-projects-btn:hover {
    background: transparent;
    color: var(--wp--preset--color--primary, #2271b1);
    text-decoration: none;
    transform: translateY(-2px);
}

/* No Projects Found */
.no-projects-found {
    text-align: center;
    padding: 40px 20px;
    color: var(--wp--preset--color--text-secondary, #666);
    font-style: italic;
}

/* Projects Archive - Grid Layout */
.projects-blog-archive {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.projects-blog-archive .project-blog-item {
    display: flex;
    flex-direction: column;
    background: var(--wp--preset--color--background, var(--theme-palette-color-8));
    border: 1px solid var(--wp--preset--color--border, var(--theme-border-color));
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.projects-blog-archive .project-blog-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}

.project-featured-image {
    margin-bottom: 0;
    border-radius: 0;
    overflow: hidden;
    height: 200px; /* Fixed height for consistency */
    position: relative;
}

.project-featured-image .project-image-link {
    display: block;
    height: 100%;
    width: 100%;
}

.project-featured-image .project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.projects-blog-archive .project-blog-item:hover .project-image {
    transform: scale(1.08);
}

.project-blog-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    flex-grow: 1;
}

/* Status Tag and Category Tag Styles for Grid Layout */
.project-status-tag,
.project-category-tag {
    background: var(--wp--preset--color--primary, var(--theme-link-initial-color));
    color: var(--wp--preset--color--background, var(--theme-palette-color-8));
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.project-category-tag {
    background: var(--wp--preset--color--secondary, var(--theme-palette-color-3));
}

.project-status-tag:hover,
.project-category-tag:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

/* Fallback for items without featured images */
.projects-blog-archive .project-blog-item:not(:has(.project-featured-image)) .project-blog-content {
    padding-top: 30px;
}

/* Enhanced shadow and border effects */
.projects-blog-archive .project-blog-item {
    border: 1px solid rgba(0,0,0,0.06);
}

.projects-blog-archive .project-blog-item:hover {
    border-color: rgba(0,0,0,0.1);
}

/* Placeholder for missing featured images */
.project-featured-image:empty::before,
.project-blog-item:not(:has(.project-featured-image))::before {
    content: '';
    display: block;
    height: 200px;
    background: linear-gradient(135deg, var(--theme-palette-color-5), var(--theme-palette-color-6));
    position: relative;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .projects-archive-container {
        flex-direction: column;
        gap: 30px;
    }
    
    .projects-sidebar {
        flex: none;
        position: static;
        order: -1; /* Move sidebar above content on mobile */
    }
    
    .projects-sidebar-content {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    
    /* Grid becomes 2 columns on medium screens */
    .projects-blog-archive {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .projects-archive-container {
        padding: 0 15px;
    }
    
    .projects-filter-bar {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .filter-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .projects-view-toggle {
        justify-content: center;
    }
    
    .projects-grid-container[data-view="grid"] {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .projects-grid-container[data-view="list"] .project-card {
        flex-direction: column;
    }
    
    .projects-grid-container[data-view="list"] .project-thumbnail {
        flex: none;
    }
    
    /* Grid becomes single column on small screens */
    .projects-blog-archive {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .project-featured-image {
        height: 200px; /* Maintain consistent height on mobile */
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .project-card-content {
        padding: 20px;
    }
    
    .projects-sidebar {
        padding: 15px;
    }
    
    .projects-list-shortcode {
        padding: 0 15px;
    }
    
    .projects-blog-list {
        gap: 30px;
    }
    
    .project-blog-item {
        padding-bottom: 30px;
    }
    
    .project-blog-title {
        font-size: 1.5rem;
    }
    
    .project-blog-excerpt {
        font-size: 15px;
    }
    
    .project-details-inline {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .project-categories {
        gap: 6px;
    }
    
    .project-status-tag,
    .project-category-tag {
        font-size: 10px;
        padding: 3px 10px;
    }
    
    .projects-blog-archive {
        gap: 24px;
    }
    
    .projects-blog-archive .project-blog-item {
        padding-bottom: 30px;
    }
}

@media (max-width: 480px) {
    .projects-archive-container {
        padding: 0 10px;
    }
    
    .filter-buttons {
        padding: 3px;
    }
    
    .filter-btn {
        padding: 8px 15px;
        font-size: 13px;
    }
    
    .project-card-content {
        padding: 15px;
    }
    
    .project-card-title {
        font-size: 1.1rem;
    }
    
    .project-blog-title {
        font-size: 1.3rem;
    }
    
    .project-blog-excerpt {
        font-size: 14px;
    }
    
    .project-details-inline {
        font-size: 13px;
    }
    
    .view-all-projects-btn {
        padding: 10px 24px;
        font-size: 13px;
    }
}

/* Single Project Page Styles - Redesigned */
.project-single {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.project-single .project-header {
    text-align: center;
    margin-bottom: 30px;
}

.project-single .project-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--wp--preset--color--foreground, inherit);
    font-weight: 700;
}

.project-status-badge {
    text-align: center;
    margin-bottom: 20px;
}

.project-status-badge .status {
    padding: 10px 25px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Hero Image */
.project-hero-image {
    margin-bottom: 40px;
    text-align: center;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

.project-hero-image .hero-featured-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    display: block;
}

/* Project Details Wrapper - Under the image */
.project-details-wrapper {
    background: var(--wp--preset--color--background, #fff);
    border: 1px solid var(--wp--preset--color--border, #e1e1e1);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

/* Key Details Row */
.project-key-details {
    margin-bottom: 25px;
}

.details-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    background: var(--wp--preset--color--background, #f9f9f9);
    border-radius: 12px;
    border: 1px solid var(--wp--preset--color--border, rgba(0,0,0,0.05));
    transition: all 0.3s ease;
}

.detail-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.detail-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--wp--preset--color--primary, #2271b1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-icon .dashicons {
    color: var(--theme-palette-color-8);
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.detail-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--wp--preset--color--text-secondary, #666);
}

.detail-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--wp--preset--color--foreground, #333);
    line-height: 1.4;
}

.detail-value .contact-link {
    color: var(--wp--preset--color--primary, #2271b1);
    text-decoration: none;
    font-weight: 600;
}

.detail-value .contact-link:hover {
    text-decoration: underline;
}

.date-separator {
    margin: 0 8px;
    color: var(--wp--preset--color--text-secondary, #666);
}

/* Categories Section */
.project-categories-section {
    padding-top: 20px;
    border-top: 1px solid var(--wp--preset--color--border, #e1e1e1);
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.categories-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--wp--preset--color--text-secondary, #666);
    flex-shrink: 0;
}

.project-categories {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.category-tag {
    background: var(--wp--preset--color--primary, var(--theme-link-initial-color));
    color: var(--theme-palette-color-8);
    padding: 6px 12px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.category-tag:hover {
    background: var(--wp--preset--color--primary-dark, var(--theme-link-hover-color));
    color: var(--theme-palette-color-8);
    text-decoration: none;
}

/* Project Content */
.project-content {
    line-height: 1.8;
    font-size: 16px;
    margin-bottom: 40px;
    color: var(--wp--preset--color--text, #555);
}

.project-content h2,
.project-content h3,
.project-content h4 {
    color: var(--wp--preset--color--foreground, inherit);
    margin-top: 30px;
    margin-bottom: 15px;
}

.project-content p {
    margin-bottom: 20px;
}

/* Registration Section */
.project-registration {
    background: linear-gradient(135deg, var(--wp--preset--color--primary-light, #e7f3ff), var(--wp--preset--color--background, #f0f8ff));
    border: 2px solid var(--wp--preset--color--primary, #2271b1);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    margin-bottom: 40px;
}

.project-registration h3 {
    color: var(--wp--preset--color--primary, #2271b1);
    margin-bottom: 15px;
    font-size: 1.4rem;
    font-weight: 600;
}

.registration-description {
    color: var(--wp--preset--color--text, #555);
    margin-bottom: 20px;
    font-size: 16px;
}

.registration-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--wp--preset--color--primary, var(--theme-link-initial-color));
    color: var(--theme-palette-color-8);
    padding: 15px 30px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.registration-btn:hover {
    background: var(--wp--preset--color--primary-dark, var(--theme-link-hover-color));
    color: var(--theme-palette-color-8);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(34, 113, 177, 0.3);
}

.registration-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Project Footer */
.project-footer {
    border-top: 2px solid var(--wp--preset--color--border, #eee);
    padding-top: 30px;
}

.project-navigation {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 20px;
}

.nav-previous,
.nav-next {
    flex: 1;
    max-width: 300px;
}

.nav-next {
    text-align: right;
}

.project-navigation .nav-link {
    display: block;
    color: var(--wp--preset--color--primary, #2271b1);
    text-decoration: none;
    font-weight: 500;
    padding: 15px 20px;
    border-radius: 12px;
    background: var(--wp--preset--color--background, #f9f9f9);
    border: 1px solid var(--wp--preset--color--border, #e1e1e1);
    transition: all 0.3s ease;
}

.project-navigation .nav-link:hover {
    background: var(--wp--preset--color--primary, var(--theme-link-initial-color));
    color: var(--theme-palette-color-8);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.nav-direction {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 5px;
    opacity: 0.8;
}

.nav-title {
    font-size: 14px;
    font-weight: 600;
    display: block;
    line-height: 1.3;
}

.back-to-projects {
    text-align: center;
}

.back-to-projects .back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--wp--preset--color--text-secondary, #666);
    text-decoration: none;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.back-to-projects .back-link:hover {
    color: var(--wp--preset--color--primary, #2271b1);
    text-decoration: none;
    background: var(--wp--preset--color--background, #f9f9f9);
}

.back-to-projects .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

@media (max-width: 768px) {
    .project-single {
        padding: 0 15px;
    }
    
    .project-single .project-title {
        font-size: 2rem;
    }
    
    /* Details grid becomes single column on mobile */
    .details-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .detail-item {
        padding: 12px;
    }
    
    .project-details-wrapper {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    /* Categories section stacks on mobile */
    .project-categories-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    /* Project navigation stacks on mobile */
    .project-navigation {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .nav-previous,
    .nav-next {
        max-width: none;
    }
    
    .nav-next {
        text-align: center;
    }
    
    /* Registration section adjustments */
    .project-registration {
        padding: 20px;
    }
    
    .project-registration h3 {
        font-size: 1.2rem;
    }
    
    .registration-btn {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    /* Hero image adjustments */
    .project-hero-image .hero-featured-image {
        max-height: 300px;
    }
    
    /* Content spacing */
    .project-content {
        font-size: 15px;
        margin-bottom: 30px;
    }
}

@media (max-width: 480px) {
    .project-single .project-title {
        font-size: 1.75rem;
    }
    
    .detail-icon {
        width: 35px;
        height: 35px;
    }
    
    .detail-icon .dashicons {
        font-size: 16px;
        width: 16px;
        height: 16px;
    }
    
    .project-details-wrapper {
        padding: 15px;
    }
    
    .project-hero-image .hero-featured-image {
        max-height: 250px;
    }
    
    .project-registration {
        padding: 15px;
    }
    
    .registration-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Medium screens - 2 columns */
@media (max-width: 1200px) and (min-width: 769px) {
    .projects-blog-archive {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .project-featured-image {
        height: 180px; /* Slightly smaller for medium screens */
    }
}
