/**
 * WMSPL Projects Page Stylesheet
 * 100% Custom Child Theme Page Template Styles
 * Desktop: 90% Width Centered | Mobile: 100% Width with 10px Left/Right Padding
 * Features Dual-Image Hover Transition, Category Tabs, and Responsive Grid
 */

/* ==========================================================================
   1. GLOBAL CONTAINER LAYOUT (Desktop 90%, Mobile 100% + 10px padding)
   ========================================================================== */
.wmspl-projects-page {
    width: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #2c2c2c;
    background-color: #ffffff;
    box-sizing: border-box;
}

.wmspl-projects-container {
    width: 90% !important;
    max-width: 90% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .wmspl-projects-container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* ==========================================================================
   2. HERO BANNER & BREADCRUMBS (Matches Contact Page Style Exactly)
   ========================================================================== */
.wmspl-projects-hero {
    position: relative;
    width: 100%;
    min-height: 340px;
    display: flex;
    align-items: flex-end;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    padding-bottom: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.wmspl-projects-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.45) 0%, rgba(15, 23, 42, 0.75) 100%);
    z-index: 1;
}

.wmspl-projects-hero-container {
    position: relative;
    z-index: 2;
    width: 90% !important;
    max-width: 90% !important;
    margin: 0 auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    display: flex;
    justify-content: flex-start;
    box-sizing: border-box;
}

.wmspl-projects-hero-badge-box {
    background-color: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 8px 8px 0 0;
    padding: 20px 28px;
    min-width: 260px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
    border-top: 2px solid #0F8AA6;
    box-sizing: border-box;
}

.wmspl-projects-hero-title {
    margin: 0 0 6px 0;
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
    line-height: 1.2;
    font-family: 'Poppins', sans-serif;
    text-shadow: none;
}

.wmspl-projects-breadcrumbs {
    display: block;
}

.wmspl-breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.wmspl-breadcrumb-item {
    font-size: 13px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
}

.wmspl-breadcrumb-link {
    color: #0F8AA6;
    text-decoration: none;
    transition: color 0.2s ease;
}

.wmspl-breadcrumb-link:hover {
    color: #38bdf8;
    text-decoration: underline;
}

.wmspl-breadcrumb-separator {
    display: flex;
    align-items: center;
    color: #94a3b8;
}

.wmspl-breadcrumb-current {
    color: #ffffff;
    font-weight: 500;
}

@media (max-width: 768px) {
    .wmspl-projects-hero {
        min-height: 260px;
    }
    .wmspl-projects-hero-container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    .wmspl-projects-hero-badge-box {
        width: 100%;
        min-width: auto;
        padding: 16px 20px;
    }
    .wmspl-projects-hero-title {
        font-size: 26px;
    }
}

/* ==========================================================================
   3. SECTION HEADER (Subtitle & Title)
   ========================================================================== */
.wmspl-projects-section {
    padding: 60px 0 50px 0;
    width: 100%;
    background-color: #ffffff;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .wmspl-projects-section {
        padding: 40px 0 35px 0;
    }
}

.wmspl-projects-header {
    text-align: center;
    margin-bottom: 35px;
}

.wmspl-projects-subtitle {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #0F8AA6;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .wmspl-projects-subtitle {
        font-size: 15px;
    }
}

.wmspl-projects-title {
    font-family: 'Poppins', sans-serif;
    font-size: 32px;
    font-weight: 800;
    color: #282828;
    margin: 0;
    line-height: 1.3;
}

@media (max-width: 768px) {
    .wmspl-projects-title {
        font-size: 24px;
    }
}

/* ==========================================================================
   4. STICKY FILTER TABS (Inline on Mobile & Sticky at Top)
   ========================================================================== */
.wmspl-projects-sticky-nav-bar {
    position: sticky;
    top: 108px;
    z-index: 990;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 10px 0 14px 0;
    margin-bottom: 30px;
    box-sizing: border-box;
    transition: top 0.3s ease, box-shadow 0.3s ease;
}

.admin-bar .wmspl-projects-sticky-nav-bar {
    top: calc(108px + 32px);
}

.wmspl-projects-tabs-nav {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 16px;
    margin: 0;
    box-sizing: border-box;
    width: 100%;
}

.wmspl-projects-tab-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 240px;
    padding: 13px 26px;
    border-radius: 8px;
    border: none;
    background-color: rgba(230, 230, 230, 0.91);
    color: #54595f;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    user-select: none;
    box-sizing: border-box;
}

.wmspl-projects-tab-btn:hover {
    background-color: #dedede;
    color: #282828;
}

.wmspl-projects-tab-btn.active {
    background-color: #0F8AA6;
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(15, 138, 166, 0.28);
}

.wmspl-tab-text-line1 {
    font-size: 16px;
    font-weight: 700;
}

.wmspl-tab-text-line2 {
    font-size: 14.5px;
    font-weight: 500;
    opacity: 0.95;
}

/* Mobile: Strictly Inline Side-by-Side & Sticky Under Mobile Header */
@media (max-width: 768px) {
    .wmspl-projects-sticky-nav-bar {
        top: 100px;
        padding: 8px 0 10px 0;
        margin-bottom: 20px;
    }

    .admin-bar .wmspl-projects-sticky-nav-bar {
        top: calc(100px + 46px);
    }

    .wmspl-projects-tabs-nav {
        display: flex !important;
        flex-direction: row !important; /* Strictly INLINE */
        align-items: stretch !important;
        gap: 8px !important;
        width: 100% !important;
        margin-bottom: 0 !important;
    }

    .wmspl-projects-tab-btn {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        width: 50% !important;
        padding: 10px 6px !important;
        border-radius: 8px !important;
    }

    .wmspl-tab-text-line1 {
        font-size: 13.5px !important;
        font-weight: 700 !important;
        white-space: nowrap !important;
    }

    .wmspl-tab-text-line2 {
        font-size: 11.5px !important;
        font-weight: 500 !important;
        white-space: nowrap !important;
    }
}

/* Tab Panels */
.wmspl-projects-tab-panel {
    display: none;
    width: 100%;
    animation: wmsplFadeIn 0.35s ease forwards;
}

.wmspl-projects-tab-panel.active {
    display: block;
}

@keyframes wmsplFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   5. RESPONSIVE GRID
   ========================================================================== */
.wmspl-projects-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 1024px) {
    .wmspl-projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
}

@media (max-width: 640px) {
    .wmspl-projects-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}

/* ==========================================================================
   6. DYNAMIC PROJECT CARD COMPONENT (Ultra-Smooth Animations Suite)
   ========================================================================== */
@keyframes wmsplCardReveal {
    0% {
        opacity: 0;
        transform: translateY(24px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.wmspl-projects-tab-panel.active .wmspl-project-card {
    animation: wmsplCardReveal 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.wmspl-projects-tab-panel.active .wmspl-project-card:nth-child(1)  { animation-delay: 0.03s; }
.wmspl-projects-tab-panel.active .wmspl-project-card:nth-child(2)  { animation-delay: 0.07s; }
.wmspl-projects-tab-panel.active .wmspl-project-card:nth-child(3)  { animation-delay: 0.11s; }
.wmspl-projects-tab-panel.active .wmspl-project-card:nth-child(4)  { animation-delay: 0.15s; }
.wmspl-projects-tab-panel.active .wmspl-project-card:nth-child(5)  { animation-delay: 0.19s; }
.wmspl-projects-tab-panel.active .wmspl-project-card:nth-child(6)  { animation-delay: 0.23s; }
.wmspl-projects-tab-panel.active .wmspl-project-card:nth-child(7)  { animation-delay: 0.27s; }
.wmspl-projects-tab-panel.active .wmspl-project-card:nth-child(8)  { animation-delay: 0.31s; }
.wmspl-projects-tab-panel.active .wmspl-project-card:nth-child(9)  { animation-delay: 0.35s; }
.wmspl-projects-tab-panel.active .wmspl-project-card:nth-child(10) { animation-delay: 0.39s; }
.wmspl-projects-tab-panel.active .wmspl-project-card:nth-child(11) { animation-delay: 0.43s; }
.wmspl-projects-tab-panel.active .wmspl-project-card:nth-child(12) { animation-delay: 0.47s; }

.wmspl-project-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 450px;
    height: 450px;
    border-radius: 12px;
    border: 1px solid #CCCCCC;
    background-color: #ffffff;
    padding: 16px 20px 22px 20px !important;
    overflow: hidden;
    box-sizing: border-box;
    cursor: pointer;
    transition: transform 0.45s cubic-bezier(0.165, 0.84, 0.44, 1),
                box-shadow 0.45s cubic-bezier(0.165, 0.84, 0.44, 1),
                border-color 0.35s ease;
    will-change: transform, box-shadow;
}

.wmspl-project-card:hover {
    transform: translateY(-8px);
    border-color: #0F8AA6;
    box-shadow: 0 20px 40px -10px rgba(15, 138, 166, 0.22), 
                0 8px 20px -6px rgba(0, 0, 0, 0.08);
}

/* Smooth Light Sheen Reflection Sweep */
.wmspl-project-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        105deg,
        transparent 20%,
        rgba(255, 255, 255, 0.28) 50%,
        transparent 80%
    );
    transform: skewX(-25deg);
    pointer-events: none;
    z-index: 5;
    transition: left 0.85s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.wmspl-project-card:hover::after {
    left: 170%;
}

/* Background Dual-Image Transition (Silky Smooth Ken-Burns Zoom & Crossfade) */
.wmspl-project-card .wmspl-proj-card-bg-primary,
.wmspl-project-card .wmspl-proj-card-bg-secondary {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: bottom center;
    background-repeat: no-repeat;
    pointer-events: none;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: transform, opacity;
}

.wmspl-project-card .wmspl-proj-card-bg-primary {
    z-index: 1;
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.65s cubic-bezier(0.25, 1, 0.5, 1),
                transform 0.85s cubic-bezier(0.25, 1, 0.5, 1);
}

.wmspl-project-card .wmspl-proj-card-bg-secondary {
    z-index: 2;
    opacity: 0;
    transform: scale(1.08);
    transition: opacity 0.65s cubic-bezier(0.25, 1, 0.5, 1),
                transform 0.85s cubic-bezier(0.25, 1, 0.5, 1);
}

.wmspl-project-card:hover .wmspl-proj-card-bg-secondary {
    opacity: 1;
    transform: scale(1);
}

.wmspl-project-card:hover .wmspl-proj-card-bg-primary {
    opacity: 0;
    transform: scale(1.08);
}

.wmspl-project-card.no-secondary-image:hover .wmspl-proj-card-bg-primary {
    opacity: 1;
    transform: scale(1.08);
}

/* Gradient Overlay */
.wmspl-project-card .wmspl-proj-card-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0) 45%, #ffffff 72%);
    z-index: 3;
    pointer-events: none;
    transition: background 0.4s ease;
}

.wmspl-project-card:hover .wmspl-proj-card-overlay {
    background: linear-gradient(rgba(0, 0, 0, 0) 42%, #ffffff 70%);
}

/* Top Row: Location Badge with Smooth Hover Micro-Animation */
.wmspl-project-card .wmspl-proj-card-top {
    position: relative;
    z-index: 4;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    height: 28px;
    width: 100%;
    box-sizing: border-box;
}

.wmspl-proj-location-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #ffffff;
    border-radius: 30px;
    padding: 5px 12px;
    color: #2c2c2c;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    user-select: none;
}

.wmspl-project-card:hover .wmspl-proj-location-badge {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(15, 138, 166, 0.22);
    color: #0F8AA6;
}

.wmspl-proj-pin-icon {
    color: #0F8AA6;
    flex-shrink: 0;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wmspl-project-card:hover .wmspl-proj-pin-icon {
    transform: scale(1.18) translateY(-1px);
}

.wmspl-proj-location-text {
    white-space: nowrap;
}

/* Bottom Row: Content & Actions */
.wmspl-project-card .wmspl-proj-card-bottom {
    position: relative;
    z-index: 4;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
}

.wmspl-proj-title {
    font-family: 'Poppins', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #2c2c2c;
    line-height: 1.35;
    margin: 0 0 6px 0;
    letter-spacing: -0.2px;
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.wmspl-project-card:hover .wmspl-proj-title {
    transform: translateY(-2px);
}

.wmspl-proj-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.wmspl-project-card:hover .wmspl-proj-title a {
    color: #0F8AA6;
}

.wmspl-proj-desc {
    font-family: 'Poppins', sans-serif;
    font-size: 12.5px;
    font-weight: 400;
    color: #666666;
    line-height: 1.45;
    margin: 0 0 14px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

.wmspl-proj-btn-wrap {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.wmspl-proj-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background-color: #ffffff;
    color: #2c2c2c;
    border: 1px solid #CCCCCC;
    border-radius: 30px;
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 14px;
    text-decoration: none;
    line-height: 1.2;
    transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-sizing: border-box;
    letter-spacing: 0.2px;
}

.wmspl-proj-btn-icon {
    display: inline-flex;
    align-items: center;
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.wmspl-proj-btn:hover,
.wmspl-project-card:hover .wmspl-proj-btn {
    background-color: #0F8AA6;
    border-color: #0F8AA6;
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(15, 138, 166, 0.38);
    transform: translateY(-2px);
    padding-right: 16px;
}

.wmspl-project-card:hover .wmspl-proj-btn-icon {
    transform: translateX(3px);
}

.wmspl-no-projects-notice {
    padding: 40px 20px;
    text-align: center;
    background: #f9f9f9;
    border-radius: 8px;
    color: #666666;
    font-size: 15px;
}

/* ==========================================================================
   7. MODULAR OT CONSULTATION CTA BANNER
   ========================================================================== */
.wmspl-projects-cta-section {
    background-color: #f5f9fc;
    padding: 70px 0;
    margin-top: 30px;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .wmspl-projects-cta-section {
        padding: 45px 0;
        margin-top: 20px;
    }
}

.wmspl-projects-cta-box {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    box-sizing: border-box;
}

.wmspl-projects-cta-title {
    font-family: 'Poppins', sans-serif;
    font-size: 30px;
    font-weight: 700;
    color: #282828;
    margin: 0 0 14px 0;
    line-height: 1.3;
}

@media (max-width: 768px) {
    .wmspl-projects-cta-title {
        font-size: 22px;
    }
}

.wmspl-projects-cta-desc {
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    color: #666666;
    line-height: 1.6;
    margin: 0 0 28px 0;
}

.wmspl-projects-cta-btn-wrap {
    display: flex;
    justify-content: center;
}

.wmspl-projects-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #0F8AA6;
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    padding: 13px 32px;
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 4px 14px rgba(15, 138, 166, 0.25);
}

.wmspl-projects-cta-btn:hover {
    background-color: #0b6b81;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 138, 166, 0.38);
    color: #ffffff;
}
