/* Main Container */
.tbs-archive-container {
    max-width: 1400px;
    /* Wider for modern screens */
    padding: 40px 40px 100px 40px;
    /* Added spacing at bottom */
    margin: 0 auto;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    box-sizing: border-box;
    background-color: #fcfcfc;
    /* Slight bg distinction if needed, or white */
}

.tbs-single-project-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Filters */
.tbs-filters-wrapper {
    margin-bottom: 50px;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    /* Soft shadow */
    border: 1px solid #eee;
}

#tbs-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.tbs-filter-group {
    flex: 1;
    min-width: 220px;
}

.tbs-filter-group select,
.tbs-filter-group input {
    width: 100%;
    height: 50px;
    /* Consistent height */
    padding: 0 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background-color: #fff;
    font-size: 15px;
    color: #333;
    outline: none;
    transition: all 0.2s ease;
    box-shadow: none;
    /* Reset theme specifics */
}

.tbs-filter-group select:focus,
.tbs-filter-group input:focus {
    border-color: #333;
    box-shadow: 0 0 0 2px rgba(51, 51, 51, 0.1);
}

/* Grid */
.tbs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    /* Increased gap */
    margin-bottom: 60px;
    /* Extra space before pagination/footer content */
}

@media (max-width: 992px) {
    .tbs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .tbs-archive-container {
        padding: 0 20px;
    }

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

.tbs-project-card {
    position: relative;
    background: #000;
    border: none;
    border-radius: 12px;
    /* Smooth rounded corners */
    overflow: hidden;
    aspect-ratio: 3 / 4;
    /* Portrait aspect ratio common in modern architectural sites */
    transition: transform 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.tbs-card-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.tbs-card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.tbs-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.tbs-project-card:hover .tbs-card-image img {
    transform: scale(1.15);
    /* Zoom effect */
}

/* Clear Image - Remove Tall Overlay */
.tbs-card-overlay {
    background: none;
    /* Removed gradient to keep image clear */
    height: 0;
}

/* Content Container with Sliding Highlight */
.tbs-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px 25px;
    z-index: 2;
    color: #fff;
    overflow: hidden;
    /* Default dark bar background */
    background: rgba(34, 34, 34, 0.7);
    transition: background 0.3s ease;
    /* Pointer events normal for explicit links */
    backdrop-filter: blur(1px);
}

.tbs-project-img-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
}

.tbs-project-title-link {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

.tbs-project-title-link:hover {
    color: #ddd;
}

/* Sliding Background Effect */
.tbs-card-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(147, 29, 29, 1);
    /* Solid Maroon/Red match */
    transform: translateX(-101%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.tbs-project-card:hover .tbs-card-content::before {
    transform: translateX(0);
}

.tbs-card-title {
    position: relative;
    margin: 0 0 5px;
    font-size: 19px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
    z-index: 2;
}

.tbs-card-location {
    position: relative;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    z-index: 2;
}

.tbs-card-arrow {
    position: absolute;
    bottom: 25px;
    right: 20px;
    opacity: 1;
    color: #fff;
    z-index: 3;
}

.tbs-project-card:hover .tbs-card-arrow {
    opacity: 1;
    transform: translateX(0);
}


/* --- UTILITIES --- */
.tbs-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.tbs-container.narrow {
    max-width: 800px;
}

.tbs-section {
    padding: 80px 0;
}

.tbs-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.tbs-align-center {
    align-items: center;
}

.tbs-col-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 15px;
    box-sizing: border-box;
}

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

.text-white {
    color: #fff;
}

.tbs-section-heading {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 40px;
    color: #333;
    text-transform: capitalize;
}

/* --- HERO SECTION --- */
.tbs-hero-section {
    position: relative;
    height: 60vh;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Parallax effect */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}

.tbs-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.tbs-hero-content {
    position: relative;
    z-index: 2;
}

.tbs-hero-title {
    font-size: 48px;
    font-weight: 700;
    margin: 0 0 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
	color: #fff!important;
}


.tbs-hero-breadcrumb {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 300;
}

/* --- OVERVIEW --- */
.tbs-overview-text {
    font-size: 18px;
    line-height: 1.8;
    color: #555;
    max-width: 900px;
    margin: 0 auto;
}

.tbs-card-location {
    font-size: 14px;
    opacity: 0.9;
    margin-right: auto;
    display: flex;
    align-items: center;
    gap: 5px;
}

.tbs-location-link {
    color: #fcb900;
    /* Gold/Yellow for visibility */
    text-decoration: none;
    font-weight: 600;
    pointer-events: auto;
    /* Re-enable clicks for this link */
    position: relative;
    z-index: 3;
    transition: color 0.2s;
}

.tbs-location-link:hover {
    color: #fff;
    text-decoration: underline;
}

.tbs-card-arrow {
    width: 24px;
    height: 24px;
    color: #fff;
    transform: translateX(0);
    transition: transform 0.3s ease;
    /* pointer-events none inherited */
}

/* --- AT A GLANCE --- */
.tbs-at-glance-section {
    background: #fff;
}

.tbs-glance-details {
    padding-right: 40px;
}

.tbs-glance-table {
    border-top: 2px solid #333;
}

.tbs-glance-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    font-size: 15px;
}

.glance-label {
    font-weight: 600;
    color: #777;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
}

.glance-value {
    font-weight: 500;
    color: #333;
    text-align: right;
}

.tbs-glance-image img {
    border-radius: 4px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    height: auto;
}

.tbs-btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 0;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tbs-btn-outline {
    border: 1px solid #333;
    color: #333;
    margin-top: 20px;
}

.tbs-btn-outline:hover {
    background: #333;
    color: #fff;
}

/* --- GALLERY (DARK) --- */
.tbs-gallery-section.dark-mode {
    background: #111;
    color: #fff;
}

.tbs-gallery-section .tbs-section-heading {
    color: #fff;
}

.tbs-gallery-scroller {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px;
    scrollbar-width: thin;
    scrollbar-color: #555 #222;
}

.tbs-gallery-slide {
    height: 400px;
    width: auto;
    border-radius: 4px;
    flex: 0 0 auto;
}

/* --- LOCATION --- */
.tbs-location-section {
    background: #f9f9f9;
}

.tbs-map-wrapper iframe {
    width: 100%;
    height: 450px;
    border: none;
    filter: grayscale(100%);
}

/* --- BOOK NOW FORM --- */
.tbs-contact-form {
    background: #fff;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    margin: 0 -10px;
}

.form-group.half {
    flex: 1;
    padding: 0 10px;
}

.tbs-contact-form input,
.tbs-contact-form textarea {
    width: 100%;
    padding: 15px;
    background: #f4f4f4;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    /* Important fix */
}

.tbs-contact-form input:focus,
.tbs-contact-form textarea:focus {
    background: #fff;
    border-color: #ddd;
    outline: none;
}

.tbs-btn-primary {
    background: #931d1d;
    /* Matches the User's red */
    color: #fff;
    border: none;
    width: 100%;
}

.tbs-btn-primary:hover {
    background: #7a1515;
}

/* Responsive */
@media (max-width: 768px) {
    .tbs-col-6 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 30px;
    }

    .tbs-glance-details {
        padding-right: 0;
        order: 2;
        /* Image on top on mobile? If yes, change order, otherwise keep text first */
    }

    .tbs-glance-image {
        order: 1;
    }

    .tbs-hero-title {
        font-size: 32px;
    }
}


/* Single Project - At A Glance */
.tbs-at-a-glance-section {
    margin: 40px 0;
    padding: 30px;
    background: #f8f8f8;
    border-radius: 8px;
    border-left: 5px solid #333;
}

.tbs-section-title {
    margin-bottom: 25px;
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #333;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.tbs-at-a-glance-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tbs-glance-row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed #ddd;
    padding-bottom: 10px;
}

.tbs-glance-row:last-child {
    border-bottom: none;
}

.tbs-glance-label {
    font-weight: bold;
    color: #555;
    flex: 0 0 40%;
}

.tbs-glance-value {
    color: #333;
    flex: 0 0 55%;
    text-align: right;
}

/* Responsive At A Glance */
@media (max-width: 600px) {
    .tbs-glance-row {
        flex-direction: column;
    }

    .tbs-glance-value {
        text-align: left;
        margin-top: 5px;
    }
}

/* Gallery */
.tbs-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.tbs-gallery-item {
    width: 100%;
    height: auto;
    border-radius: 4px;
    object-fit: cover;
    /* moved here if using img tag directly as item, or useful if background content */
}

/* If tbs-gallery-item is an IMG tag */
.tbs-gallery-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
}

/* --- FAQ SECTION --- */
.tbs-faq-section {
    background: #fff;
    padding: 60px 0;
    margin-top: 40px;
    border-top: 1px solid #eee;
}

.tbs-faq-item {
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}

.tbs-faq-question {
    cursor: pointer;
    padding: 15px 0;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.tbs-faq-question:hover {
    color: #931d1d;
}

.tbs-faq-answer {
    padding: 0 0 20px 0;
    color: #555;
    line-height: 1.6;
}

/* --- SEO CONTENT --- */
.tbs-seo-content {
    margin: 40px 0;
    color: #555;
    line-height: 1.8;
}

.tbs-seo-content h2,
.tbs-seo-content h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #333;
}

/* =========================================
   Theme Compatibility Settings
   ========================================= */

/* Transparent Header (Generic overrides for major themes) */
body.tbs-transparent-header .site-header,
body.tbs-transparent-header #masthead,
body.tbs-transparent-header header.site-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    background: transparent !important;
    box-shadow: none !important;
    border-bottom: none !important;
}

/* Full Width Layout */
body.tbs-layout-full-width .site-content,
body.tbs-layout-full-width #content,
body.tbs-layout-full-width .content-area,
body.tbs-layout-full-width .container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* No Vertical Padding */
body.tbs-no-vertical-padding .site-content,
body.tbs-no-vertical-padding #content,
body.tbs-no-vertical-padding .content-area {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Ensure our own container respects the boxed setting if user chose unboxed */
body.tbs-content-unboxed .tbs-single-project-container {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Hide Theme Title if requested */
body.tbs-hide-title .entry-title,
body.tbs-hide-title .page-title,
body.tbs-hide-title .page-header,
body.tbs-hide-title h1.entry-title {
    display: none !important;
}

/* Enhancing Transparent Header support */
body.tbs-transparent-header .elementor-location-header,
body.tbs-transparent-header .hfeed .site-header {
    background: transparent !important;
    position: absolute;
    width: 100%;
    top: 0;
}


/* Extended Generic Selectors for Theme Compatibility */
body.tbs-transparent-header .site-header,
body.tbs-transparent-header #masthead,
body.tbs-transparent-header header.site-header,
body.tbs-transparent-header #header,
body.tbs-transparent-header .header,
body.tbs-transparent-header .main-header {
    background: transparent !important;
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 999;
}

body.tbs-layout-full-width main#main,
body.tbs-layout-full-width .site-main {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

.tbs-single-page-wrapper {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    box-sizing: border-box;
}


/* Broadly hide typical theme header elements when tbs-hide-title is active */
/* body.tbs-hide-title .page-header-cover,
body.tbs-hide-title .featured-image,
body.tbs-hide-title .wp-block-cover,
body.tbs-hide-title .page-banner,
body.tbs-hide-title .title-section,
body.tbs-hide-title .hero {
    display: none !important;
} */


/* Hide Inteco Theme Page Title on Project Archives */
/* body.post-type-archive-projects .inteco-page-title-wrap,
body.tax-project_location .inteco-page-title-wrap,
body.tax-project_status .inteco-page-title-wrap,
body.tax-project_type .inteco-page-title-wrap {
    display: none !important;
    overflow: hidden !important;
} */
/* Hide Inteco Theme Title on Single Project Pages */
body.single-projects .inteco-page-title-wrap {
    display: none !important;
    visibility: hidden !important;
}


/* Fix Archive Header Overlap & Visibility */
body.post-type-archive-projects .inteco-page-title-wrap,
body.tax-project_location .inteco-page-title-wrap,
body.tax-project_status .inteco-page-title-wrap,
body.tax-project_type .inteco-page-title-wrap {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
}

/* Add spacing in case header is missing or transparent */
body.post-type-archive-projects .tbs-archive-container,
body.tax-project_location .tbs-archive-container,
body.tax-project_status .tbs-archive-container,
body.tax-project_type .tbs-archive-container {
    margin-top: 40px; 
}

