/* ==========================================================================
   Projects & Architectural Case Studies Stylesheet (Sera Ceramics)
   Fully Responsive & Mobile-Optimized
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
}

.projects-page-wrapper {
    font-family: 'Figtree', sans-serif;
    color: #616161;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    min-width: 0;
}

/* Grand Hero Banner - Responsive Height */
.projects-hero-banner {
    position: relative;
    width: 100%;
    min-height: 420px;
    display: flex;
    align-items: center;
    background-color: #111827;
    overflow: hidden;
    padding: 3.5rem 0;
    box-sizing: border-box;
}

@media (min-width: 640px) {
    .projects-hero-banner {
        min-height: 560px;
        padding: 5rem 0;
    }
}

@media (min-width: 1024px) {
    .projects-hero-banner {
        min-height: 850px;
        height: 85vh;
        max-height: 980px;
        padding: 0;
    }
}

@media (min-width: 1536px) {
    .projects-hero-banner {
        min-height: 920px;
        height: 88vh;
        max-height: 1100px;
    }
}

.projects-hero-banner img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: none;
}

.projects-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.80) 0%, rgba(0, 0, 0, 0.70) 50%, rgba(0, 0, 0, 0.85) 100%);
    z-index: 1;
}

@media (min-width: 768px) {
    .projects-hero-overlay {
        background: linear-gradient(90deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.65) 50%, rgba(0, 0, 0, 0.30) 100%);
    }
}

.projects-hero-content {
    position: relative;
    z-index: 10;
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    width: 100%;
    text-align: left;
    box-sizing: border-box;
}

@media (min-width: 640px) {
    .projects-hero-content {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

@media (min-width: 1024px) {
    .projects-hero-content {
        padding-left: 2.5rem;
        padding-right: 2.5rem;
    }
}

.projects-hero-title {
    font-size: 2.25rem;
    line-height: 1.15;
    font-weight: 600;
    color: #ffffff !important;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

@media (min-width: 480px) {
    .projects-hero-title {
        font-size: 2.75rem;
    }
}

@media (min-width: 640px) {
    .projects-hero-title {
        font-size: 3.5rem;
    }
}

@media (min-width: 768px) {
    .projects-hero-title {
        font-size: 4.25rem;
    }
}

@media (min-width: 1024px) {
    .projects-hero-title {
        font-size: 5.5rem;
    }
}

.projects-hero-subtitle {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #f3f4f6 !important;
    font-weight: 300;
    letter-spacing: 0.01em;
    max-width: 850px;
    margin-top: 0.5rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

@media (min-width: 640px) {
    .projects-hero-subtitle {
        font-size: 1.15rem;
        line-height: 1.75;
        margin-top: 1rem;
    }
}

@media (min-width: 1024px) {
    .projects-hero-subtitle {
        font-size: 1.25rem;
        line-height: 1.85;
    }
}

/* Category Filter Tabs with Safe Scrolling */
.category-filter-scroll-wrapper {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.category-filter-btn {
    transition: all 0.2s ease;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.category-filter-btn.active {
    background-color: #065B95 !important;
    color: #ffffff !important;
    border-color: #065B95 !important;
}

/* Collection & Projects Responsive Grid */
.custom-collection-grid {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

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

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

/* Project Cards */
.project-collection-card,
.custom-collection-grid .bg-white {
    background-color: #ffffff;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.10), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    border-radius: 0px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border: 1px solid #f3f4f6;
    transform: none !important;
    transition: none;
    box-sizing: border-box;
}

.project-collection-card:hover,
.custom-collection-grid .bg-white:hover {
    transform: none !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.10), 0 8px 10px -6px rgba(0, 0, 0, 0.05) !important;
    border-color: #f3f4f6;
}

.project-img-container {
    width: 100%;
    height: 15rem;
    overflow: hidden;
    position: relative;
    background-color: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 640px) {
    .project-img-container {
        height: 18rem;
    }
}

.project-collection-card img,
.custom-collection-grid .bg-white img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    padding: 1rem;
    box-sizing: border-box;
    transform: none !important;
    transition: none !important;
}

.project-collection-card:hover img,
.custom-collection-grid .bg-white:hover img {
    transform: none !important;
}

/* Project Meta Typography matching Sera Standard Scale */
.project-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.35;
    color: #616161;
    margin-bottom: 0.5rem;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
}

.project-desc {
    font-size: 0.875rem;
    line-height: 1.625;
    color: #616161;
    font-weight: 300;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
}

.project-badge {
    display: inline-block;
    background-color: #ebf5fb;
    color: #065B95;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 10px;
    border-radius: 9999px;
    border: 1px solid #d4e6f1;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
}

.project-collection-card * {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Partnership Callout Section */
.partnership-section {
    background-color: #ffffff;
    border-top: 1px solid #e5e7eb;
    padding: 36px 0 60px 0;
    margin-top: 10px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.partnership-btn-primary {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 48px !important;
    padding: 0 28px !important;
    background-color: #065B95 !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    border-radius: 4px !important;
    border: 1px solid #065B95 !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
    transition: background-color 0.2s ease !important;
}

.partnership-btn-primary:hover {
    background-color: #054876 !important;
    color: #ffffff !important;
}

.partnership-btn-secondary {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 48px !important;
    padding: 0 28px !important;
    background-color: #ffffff !important;
    color: #111827 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    border-radius: 4px !important;
    border: 1px solid #d1d5db !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
}

.partnership-btn-secondary:hover {
    background-color: #f9fafb !important;
    border-color: #9ca3af !important;
    color: #111827 !important;
}

@media (max-width: 768px) {
    .projects-hero-banner {
        min-height: 380px;
        padding: 3rem 0;
    }
    .projects-hero-subtitle {
        font-size: 0.95rem;
        line-height: 1.6;
        max-width: 100%;
    }
    .partnership-section {
        padding: 40px 0 45px 0;
        margin-top: 20px;
        margin-bottom: 0;
    }
    .partnership-btn-primary,
    .partnership-btn-secondary {
        width: 100% !important;
    }
}

/* Card Reveal Animation */
@keyframes fadeInUpCard {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-fade-in {
    animation: fadeInUpCard 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
