/* CSS variables for consistent styling matching screenshots */
:root {
    --ttt-color-primary: #446084;      /* Muted dark green */
    --ttt-color-bg: #f2efe9;           /* Cream / beige background */
    --ttt-color-text-dark: #333333;
    --ttt-color-text-light: #ffffff;
    --ttt-color-text-muted: rgba(255, 255, 255, 0.85);
    --ttt-border-radius-lg: 20px;
    --ttt-border-radius-md: 10px;
    --ttt-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* ==========================================
   COMMON & BANNERS
   ========================================== */
.ttt-projects-wrapper {
    font-family: var(--ttt-font-sans);
    background-color: var(--ttt-color-bg);
    color: var(--ttt-color-text-dark);
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.ttt-projects-wrapper *,
.ttt-projects-wrapper *::before,
.ttt-projects-wrapper *::after {
    box-sizing: inherit;
}

/* Banner Header */
.ttt-projects-banner {
    position: relative;
    background-color: #2b1f1d;
    /* Default background image fallback using a high quality wood texture url */
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('https://images.unsplash.com/photo-1540206395-68808572332f?q=80&w=1200&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.ttt-projects-banner-content h1 {
    color: var(--ttt-color-text-light);
    font-size: 42px;
    font-weight: 700;
    margin: 0 0 10px;
    letter-spacing: 1px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Breadcrumbs bar */
.ttt-projects-breadcrumbs {
    background: #446084;
    padding: 12px 0;
    font-size: 13px;
    color: #f1f1f1;
}
.ttt-projects-breadcrumbs .container {
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 15px;
}
.ttt-projects-breadcrumbs a {
    color: #f1f1f1;
    text-decoration: none;
    transition: opacity 0.2s;
}
.ttt-projects-breadcrumbs a:hover {
    opacity: 0.8;
}
.ttt-projects-breadcrumbs span {
    margin: 0 6px;
    color: #ccc;
}

/* ==========================================
   ARCHIVE / LISTING PAGE
   ========================================== */
.ttt-archive-section {
    padding: 60px 0;
    background-color: var(--ttt-color-bg);
}

.ttt-archive-section .container {
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 15px;
}

.ttt-archive-section h2.section-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--ttt-color-text-dark);
    position: relative;
}

.ttt-projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

/* Project Card layout */
.ttt-project-card {
    display: flex;
    background: var(--ttt-color-primary);
    border-radius: var(--ttt-border-radius-lg);
    overflow: hidden;
    height: 250px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ttt-project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.ttt-project-card-image {
    width: 42%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.ttt-project-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

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

.ttt-project-card-info {
    width: 58%;
    padding: 30px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: var(--ttt-color-text-light);
}

.ttt-project-card-info-top h3 {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--ttt-color-text-light);
}

.ttt-project-card-info-top p.excerpt {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--ttt-color-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ttt-btn-more {
    align-self: flex-start;
    border: 1px solid var(--ttt-color-text-light);
    border-radius: 30px;
    padding: 8px 24px;
    font-size: 13px;
    color: var(--ttt-color-text-light);
    text-decoration: none;
    transition: all 0.3s ease;
}

.ttt-btn-more:hover {
    background: var(--ttt-color-text-light);
    color: var(--ttt-color-primary);
    font-weight: 500;
}

/* ==========================================
   SINGLE / DETAIL PAGE
   ========================================== */
.ttt-detail-section {
    padding: 60px 0;
    background-color: #ffffff;
}

.ttt-detail-section .container {
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 15px;
}

.ttt-detail-row {
    display: flex;
    gap: 50px;
    margin-bottom: 50px;
}

.ttt-detail-col-info {
    width: 33.333%;
}

.ttt-detail-col-desc {
    width: 66.667%;
}

.ttt-info-box {
    background: #F0F4F8;
    padding: 30px;
    border-radius: var(--ttt-border-radius-md);
}

.ttt-info-box h3,
.ttt-detail-col-desc h3 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 20px;
    color: #0A3462;
}

.ttt-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ttt-info-list li {
    margin-bottom: 15px;
    font-size: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.ttt-info-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.ttt-info-list strong {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: #64748B;
    margin-bottom: 4px;
}

.ttt-detail-col-desc .content-body {
    font-size: 15px;
    line-height: 1.8;
    color: #444;
}

/* Gallery / Album Grid */
.ttt-gallery-section {
    border-top: 1px solid #eee;
    padding-top: 50px;
    margin-top: 30px;
}

.ttt-gallery-section h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
}

.ttt-frontend-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.ttt-gallery-image {
    position: relative;
    border-radius: var(--ttt-border-radius-md);
    overflow: hidden;
    aspect-ratio: 4/3;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    cursor: pointer;
}

.ttt-gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.ttt-gallery-image:hover img {
    transform: scale(1.08);
}

.ttt-gallery-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ttt-gallery-image:hover::after {
    opacity: 1;
}

/* ==========================================
   LIGHTBOX BOX
   ========================================== */
.ttt-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ttt-lightbox.active {
    display: flex;
    opacity: 1;
}

.ttt-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 85%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ttt-lightbox-img {
    max-width: 100%;
    max-height: 100vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.ttt-lightbox.active .ttt-lightbox-img {
    transform: scale(1);
}

.ttt-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 35px;
    font-weight: 300;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    z-index: 1000000;
    transition: transform 0.2s;
}

.ttt-lightbox-close:hover {
    transform: scale(1.1);
}

.ttt-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 45px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px 20px;
    z-index: 1000000;
    user-select: none;
    transition: color 0.2s, transform 0.2s;
}

.ttt-lightbox-nav:hover {
    color: #ccc;
}

.ttt-lightbox-prev {
    left: 20px;
}

.ttt-lightbox-next {
    right: 20px;
}

/* ==========================================
   RESPONSIVE STYLES
   ========================================== */
@media (max-width: 991px) {
    .ttt-projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .ttt-detail-row {
        flex-direction: column;
        gap: 30px;
    }

    .ttt-detail-col-info,
    .ttt-detail-col-desc {
        width: 100%;
    }

    .ttt-frontend-gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
}

@media (max-width: 767px) {
    .ttt-projects-banner {
        height: 250px;
    }

    .ttt-projects-banner-content h1 {
        font-size: 28px;
    }

    .ttt-project-card {
        flex-direction: column;
        height: auto;
    }

    .ttt-project-card-image {
        width: 100%;
        height: 200px;
    }

    .ttt-project-card-info {
        width: 100%;
        padding: 20px;
        gap: 20px;
    }

    .ttt-frontend-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .ttt-frontend-gallery {
        grid-template-columns: 1fr;
    }
}
