/* CSS Stylesheet for Project Reference Page */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-color: #1E2A56;
    --dark-charcoal: #2D2D2D;
    --purple-brand: #4C3C88;
    --bg-light: #F8FAFC;
    --text-dark: #0F172A;
    --text-muted: #64748B;
    --border-color: #E2E8F0;
    --white: #FFFFFF;
    --card-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.08), 0 2px 8px -1px rgba(15, 23, 42, 0.04);
    --card-shadow-hover: 0 20px 25px -5px rgba(30, 42, 86, 0.15), 0 10px 10px -5px rgba(30, 42, 86, 0.04);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
}

.project-reference-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 12px 40px 24px;
}

/* Page Header */
.page-title {
    font-size: 38px;
    font-weight: 800;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    text-align: center;
}

.page-description {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto 40px auto;
    text-align: center;
}

/* Search and Filters */
.filter-search-row {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
}

@media (min-width: 768px) {
    .filter-search-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.search-wrapper {
    position: relative;
    width: 100%;
}

@media (min-width: 768px) {
    .search-wrapper {
        width: 320px;
    }
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    font-size: 14px;
    font-family: 'Outfit', sans-serif;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    color: var(--text-dark);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    transition: all 0.25s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 42, 86, 0.1);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 16px;
    height: 16px;
    pointer-events: none;
}

.search-clear {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 16px;
    padding: 4px;
    display: none;
}

.search-clear.active {
    display: block;
}

.filter-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.filter-tabs::-webkit-scrollbar {
    height: 4px;
}

.filter-tabs::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 2px;
}

.filter-tab-btn {
    background: var(--white);
    border: 1px solid var(--border-color);
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    color: var(--text-muted);
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.filter-tab-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-tab-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

/* Category Sections & Banners */
.category-section {
    margin-bottom: 50px;
    transition: all 0.3s ease;
}

.category-banner {
    color: var(--white);
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 24px;
    margin-bottom: 24px;
    display: inline-block;
    min-width: 280px;
    max-width: 100%;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    /* Slanted Diagonal Cut style matching the design */
    clip-path: polygon(0 0, 100% 0, 92% 100%, 0 100%);
}

.category-section.apartments .category-banner {
    background-color: var(--primary-color);
}

.category-section.hotels .category-banner {
    background-color: var(--dark-charcoal);
}

.category-section.other .category-banner {
    background-color: var(--dark-charcoal);
}

.category-section.international .category-banner {
    background-color: var(--purple-brand);
}

/* Grid Layouts */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 20px;
}

@media (min-width: 480px) {
    .cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

@media (min-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .cards-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

/* Multi-category columns for small categories */
.split-sections-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

@media (min-width: 768px) {
    .split-sections-container {
        flex-direction: column;
        width: 100%;
    }
    .split-sections-container .category-section {
        flex: 1;
        margin-bottom: 0;
    }
}

/* Project Cards */
.project-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow-hover);
}

.card-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio like the images of projects in cards */
    overflow: hidden;
}

.card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

/* Bottom Overlay Box */
.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(30, 42, 86, 0.92);
    padding: 10px;
    text-align: center;
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 75px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.card-overlay-developer {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.card-overlay-name {
    font-size: 10px;
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 3px;
    color: #93C5FD;
}

.card-overlay-value {
    font-size: 10px;
    font-weight: 700;
}

/* Card Footer (Brands Supplied) */
.card-footer {
    padding: 10px;
    background-color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid var(--border-color);
    height: 44px;
}

.card-brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 24px;
    width: 100%;
    color: var(--text-dark);
}

/* Brand Text Styling for SVG mockups */
.logo-nobili { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 12px; letter-spacing: 0.25em; text-transform: uppercase; color: #1E2A56; }
.logo-nobili span { font-weight: 300; font-size: 9px; opacity: 0.7; letter-spacing: 0.05em; margin-left: 4px; }
.logo-tece { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 13px; color: #1A365D; }
.logo-tece span { font-weight: 300; font-size: 8px; font-style: italic; color: var(--text-muted); margin-left: 2px;}
.logo-arco { font-family: 'Outfit', sans-serif; font-weight: 800; font-style: italic; font-size: 14px; color: #DC2626; letter-spacing: -0.05em; }
.logo-arco span { font-weight: 400; font-size: 9px; font-style: normal; color: var(--text-muted); margin-left: 2px; }
.logo-geesa { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 13px; letter-spacing: 0.1em; color: #DC2626; }
.logo-geesa span { font-weight: 400; font-size: 9px; color: var(--text-muted); letter-spacing: 0; margin-left: 2px; }
.logo-elkay { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 14px; font-style: italic; color: #2563EB; letter-spacing: 0.05em; }

.logo-subtext {
    font-size: 7px;
    font-weight: 600;
    text-transform: uppercase;
    color: #475569;
    letter-spacing: 0.08em;
}

/* Detail Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 16px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background: var(--white);
    border-radius: 16px;
    max-width: 600px !important;
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    position: relative;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.modal-overlay.active .modal-card {
    transform: translateY(0);
}

.modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(15, 23, 42, 0.05);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    font-size: 16px;
    transition: background 0.2s;
    z-index: 10;
}

.modal-close-btn:hover {
    background: rgba(15, 23, 42, 0.15);
}

.modal-image-wrapper {
    width: 100%;
    height: 250px;
    position: relative;
}

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

.modal-content {
    padding: 24px;
}

.modal-developer {
    font-size: 12px;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.modal-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 16px 0;
    color: var(--text-dark);
}

.modal-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.modal-info-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 2px;
}

.modal-info-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-brand-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-muted);
    font-size: 16px;
}

.empty-state-icon {
    font-size: 40px;
    margin-bottom: 12px;
    color: var(--border-color);
}