/* ==========================================================================
   LINA ARCHITECTURE - PROJECTS PAGE CSS
   Premium Portfolio Gallery Experience
   ========================================================================== */

/* ==========================================================================
   SECTION 3.1 — HERO
   ========================================================================== */
.projects-hero {
    position: relative;
    height: 50vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.projects-hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.projects-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.projects-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(28, 43, 58, 0.85) 0%, rgba(28, 43, 58, 0.7) 100%);
}

.projects-hero-content {
    text-align: center;
    color: var(--color-white);
    padding: var(--space-8);
}

.projects-hero-title {
    font-family: var(--font-heading);
    font-size: var(--text-4xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-8);
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.projects-hero-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: var(--space-6);
}

.projects-hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
}

.projects-hero-stat-number {
    font-family: var(--font-heading);
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    color: var(--color-secondary);
}

.projects-hero-stat-label {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.projects-hero-stat-divider {
    display: none;
    width: 1px;
    height: 48px;
    background-color: rgba(255, 255, 255, 0.3);
}

@media (min-width: 768px) {
    .projects-hero {
        height: 50vh;
        min-height: 450px;
    }
    
    .projects-hero-title {
        font-size: var(--text-5xl);
    }
    
    .projects-hero-stats {
        gap: var(--space-10);
    }
    
    .projects-hero-stat-divider {
        display: block;
    }
    
    .projects-hero-stat-number {
        font-size: var(--text-4xl);
    }
}

/* ==========================================================================
   SECTION 3.4 — FEATURED PROJECT SLIDER
   ========================================================================== */
.featured-project-section {
    background-color: var(--color-accent);
}

.featured-project {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8);
    min-width: 0; /* FIX: safety net alongside .featured-gallery's min-width:0 — see comment there */
}

.featured-gallery {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    min-width: 0; /* FIX: prevents grid-blowout. A grid item's default min-width is "auto" (= its content's min-content width). Since .featured-thumbnails now holds fixed-width (110px) flex children, projects with many thumbnails (9-12 images) forced this whole column wider than its 1.2fr track — which stretched .featured-main-image (width:100%) far beyond the intended size, i.e. "the image fills the whole screen" on click. */
}

.featured-main-image {
    position: relative;
    aspect-ratio: 16/10;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(28, 43, 58, 0.2);
}

.featured-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.featured-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--color-white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    font-size: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 10;
}

.featured-nav:hover {
    background-color: var(--color-secondary);
    color: var(--color-white);
    transform: translateY(-50%) scale(1.1);
}

.featured-nav-prev {
    left: var(--space-4);
}

.featured-nav-next {
    right: var(--space-4);
}

.featured-image-counter {
    position: absolute;
    bottom: var(--space-4);
    right: var(--space-4);
    background-color: rgba(28, 43, 58, 0.8);
    color: var(--color-white);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
}

/* --------------------------------------------------------------------------
   FIX: Thumbnails now sit in a SINGLE ROW with horizontal scroll instead
   of wrapping into multiple rows (grid). This is what was causing the
   page to look "stacked/bloated" whenever a project had more than 4 images
   (e.g. the 12-image Interior Design project).
   -------------------------------------------------------------------------- */
.featured-thumbnails {
    display: flex;
    gap: var(--space-3);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding-bottom: var(--space-2); /* room for the scrollbar so it doesn't clip thumbs */
    scrollbar-width: thin;
    scrollbar-color: var(--color-secondary) transparent;
    width: 100%;   /* FIX: forces this row to stay within its parent's width instead of growing to fit all thumbnails */
    max-width: 100%;
}

.featured-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.featured-thumbnails::-webkit-scrollbar-track {
    background: transparent;
}

.featured-thumbnails::-webkit-scrollbar-thumb {
    background-color: var(--color-secondary);
    border-radius: var(--radius-full);
}

.featured-thumb {
    flex: 0 0 auto;       /* NEW: prevents flex items from shrinking to fit — keeps fixed size so overflow triggers scroll */
    width: 110px;         /* NEW: fixed thumbnail width */
    aspect-ratio: 4/3;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 3px solid transparent;
    cursor: pointer;
    padding: 0;
    background: none;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.featured-thumb:hover {
    opacity: 0.9;
}

.featured-thumb.active {
    border-color: var(--color-secondary);
    opacity: 1;
}

.featured-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-content {
    display: flex;
    flex-direction: column;
}

.featured-category {
    display: inline-block;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-secondary);
    margin-bottom: var(--space-3);
}

.featured-title {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--color-primary);
    margin-bottom: var(--space-2);
}

.featured-location {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-base);
    color: var(--color-text-muted);
    margin-bottom: var(--space-6);
}

.featured-location i {
    color: var(--color-secondary);
}

.featured-description {
    margin-bottom: var(--space-6);
}

.featured-description p {
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: var(--color-text-muted);
    margin-bottom: var(--space-4);
}

.featured-description p:last-child {
    margin-bottom: 0;
}

.featured-facts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
    padding: var(--space-6);
    background-color: var(--color-white);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-6);
}

.featured-fact {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.featured-fact-label {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
}

.featured-fact-value {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--color-primary);
}

/* Mobil - burada 2'şerli (veya 1'erli) gruplanması normal ve daha okunaklı olur */
@media (max-width: 640px) {
    .featured-facts {
        grid-template-columns: repeat(2, 1fr);
    }
    .featured-fact-label,
    .featured-fact-value {
        white-space: normal; /* mobilde kırılabilsin, taşma olmasın */
    }
    .featured-fact-value {
        font-size: var(--text-lg);
    }

    /* Mobilde thumbnail'ları biraz küçültelim ki daha fazlası aynı anda görünsün */
    .featured-thumb {
        width: 90px;
    }
}
@media (min-width: 1024px) {
    .featured-project {
        grid-template-columns: 1.2fr 1fr;
        gap: var(--space-12);
        align-items: start;
    }
    
    .featured-title {
        font-size: var(--text-3xl);
    }
    
    .featured-facts {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ==========================================================================
   SECTION 3.2 — PROJECTS HEADING
   ========================================================================== */
.filter-section {
    background-color: var(--color-white);
    padding: var(--space-6) 0;
    border-bottom: 1px solid rgba(28, 43, 58, 0.1);
}

.filter-bar {
    display: flex;
    justify-content: center;
    padding: var(--space-2) 0;
}

.filter-heading {
    display: inline-block;
    padding: var(--space-2) var(--space-4);
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--color-primary);
    position: relative;
}

.filter-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 2px;
    background-color: var(--color-secondary);
}

@media (min-width: 768px) {
    .filter-heading {
        padding: var(--space-3) var(--space-5);
        font-size: var(--text-lg);
    }
}

/* ==========================================================================
   SECTION 3.3 — PROJECT GRID
   ========================================================================== */
.projects-grid-section {
    background-color: var(--color-white);
    padding-top: var(--space-12);
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
}

.project-card {
    position: relative;
    background-color: var(--color-white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(28, 43, 58, 0.08);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    opacity: 1;
    transform: translateY(0);
}

.project-card.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    position: absolute;
    visibility: hidden;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(28, 43, 58, 0.15);
}

.project-card-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.project-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

.project-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(28, 43, 58, 0.95) 0%, rgba(28, 43, 58, 0.4) 50%, transparent 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: var(--space-6);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-card:hover .project-card-overlay {
    opacity: 1;
}

.project-card-overlay-content {
    text-align: center;
    color: var(--color-white);
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.project-card:hover .project-card-overlay-content {
    transform: translateY(0);
}

.project-card-title {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    margin-bottom: var(--space-3);
}

.project-card-view {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-secondary);
}

.project-card-badge {
    position: absolute;
    top: var(--space-4);
    left: var(--space-4);
    padding: var(--space-2) var(--space-3);
    background-color: var(--color-secondary);
    color: var(--color-primary);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-full);
    z-index: 10;
}

.project-card-content {
    padding: var(--space-5);
}

.project-card-location {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-2);
}

.project-card-location i {
    color: var(--color-secondary);
    font-size: 12px;
}

.project-card-description {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    line-height: var(--leading-relaxed);
}

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

@media (min-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-8);
    }
}

/* ==========================================================================
   LOAD MORE BUTTON
   ========================================================================== */
.projects-load-more {
    display: flex;
    justify-content: center;
    padding-top: var(--space-12);
}

/* ==========================================================================
   CTA STRIP (from shared styles)
   ========================================================================== */
.cta-strip {
    position: relative;
    padding: var(--space-16) 0;
    overflow: hidden;
}

.cta-strip-background {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--color-secondary) 0%, #d4b896 50%, var(--color-primary) 100%);
    z-index: -1;
}

.cta-strip-background::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.cta-strip-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.cta-strip-title {
    font-family: var(--font-heading);
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    color: var(--color-white);
    margin-bottom: var(--space-4);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.cta-strip-text {
    font-size: var(--text-lg);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-8);
}

.cta-strip .btn-primary {
    background-color: var(--color-white);
    color: var(--color-primary);
    border-color: var(--color-white);
}

.cta-strip .btn-primary:hover {
    background-color: transparent;
    color: var(--color-white);
    border-color: var(--color-white);
}

@media (min-width: 768px) {
    .cta-strip {
        padding: var(--space-20) 0;
    }
    
    .cta-strip-title {
        font-size: var(--text-4xl);
    }
}

/* ==========================================================================
   BREADCRUMB
   ========================================================================== */
.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.breadcrumb-link {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-link:hover {
    color: var(--color-secondary);
}

.breadcrumb-separator {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
}

.breadcrumb-current {
    font-size: var(--text-sm);
    color: var(--color-secondary);
    font-weight: var(--font-medium);
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-card {
    animation: fadeInUp 0.6s ease forwards;
}

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }
.project-card:nth-child(5) { animation-delay: 0.5s; }
.project-card:nth-child(6) { animation-delay: 0.6s; }
.project-card:nth-child(7) { animation-delay: 0.7s; }
.project-card:nth-child(8) { animation-delay: 0.8s; }
.project-card:nth-child(9) { animation-delay: 0.9s; }