/* Projects Grid Custom Styles - High Visibility Layout */

/* --- Filter Area Header --- */
.project-area-header-split {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
}

.filter-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-tag-btn {
    padding: 12px 30px;
    border: 1px solid #FFEFF9;
    border-radius: 50px;
    background: #fff;
    font-size: 16px;
    font-weight: 400;
    color: #333;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.filter-tag-btn.active {
    background: #000;
    color: #fff;
    border-color: #000;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.filter-tag-btn:hover:not(.active) {
    background: #fff4e8;
    border-color: #ffebf8;
}

/* --- Dropdown Filter Beautification --- */
.custom-filter-dropdown .filter-btn {
    padding: 12px 30px;
    border: 1px solid #FFEFF9;
    border-radius: 50px;
    background: #fff;
    font-size: 15px;
    font-weight: 500;
    color: #e33a7e;
    /* Pink as per image */
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.custom-filter-dropdown .filter-btn i {
    font-size: 14px;
    color: #e33a7e;
}

.custom-filter-dropdown .filter-btn:hover {
    background: #fff4e8;
    border-color: #ffebf8;
}

.filter-menu {
    border-radius: 20px;
    border: 1px solid #FFEFF9;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    padding: 15px;
    margin-top: 10px !important;
}

.filter-menu .dropdown-item {
    border-radius: 12px;
    padding: 10px 20px;
    font-size: 14px;
    color: #333;
    transition: all 0.2s ease;
}

.filter-menu .dropdown-item:hover,
.filter-menu .dropdown-item.active {
    background: #ffebf8;
    color: #e33a7e;
}

/* --- Container Background --- */
.projects-grid-container {
    background: #FFEFF9;
    /* Premium Parchment Background */
    border-radius: 40px;
    padding: 80px 80px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.05);
    margin-top: 20px;
    width: 100% !important;
    box-sizing: border-box !important;
    transition: padding 0.3s ease;
}

/* Responsive Padding for Container */
@media only screen and (max-width: 1400px) {
    .projects-grid-container {
        padding: 60px 60px;
    }
}

@media only screen and (max-width: 1200px) {
    .projects-grid-container {
        padding: 40px 40px;
        border-radius: 30px;
    }
}

@media only screen and (max-width: 991px) {
    .projects-grid-container {
        padding: 30px 25px;
    }
}

.projects-grid-layout {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

/* Intermediate Breakpoints for Fluid Grid */
@media only screen and (max-width: 1200px) {
    .projects-grid-layout {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
}

@media only screen and (max-width: 991px) {
    .projects-grid-layout {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* --- Card Style --- */
.project-box {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    background-color: #fff;
    aspect-ratio: 4 / 3;
    cursor: pointer;
    transition: transform 0.4s ease;
}

.project-box:hover {
    transform: translateY(-5px);
}

.project-box .thumb {
    width: 100%;
    height: 100%;
}

.project-box .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.project-box:hover .thumb img {
    transform: scale(1.05);
}

/* Persistent Gradient Overlay for Readability */
.project-box::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.2) 60%, transparent 100%);
    opacity: 0.7;
    /* Always visible */
    transition: opacity 0.4s ease;
    z-index: 1;
}

.project-box:hover::after {
    opacity: 0.9;
}

/* --- Content Content (Statically Visible) --- */
.project-content-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    opacity: 1;
    /* Always visible */
    visibility: visible;
    transform: translateY(0);
}

/* Info Container */
.project-pills {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 100%;
}

/* Title Styling - No Pill, Static Text */
.project-title-pill {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

.project-title-pill a,
.project-title-pill div {
    color: #fff;
    /* White text for contrast */
    text-decoration: none;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.2;
    display: block;
}

/* Category Tag - Subdued Styling */
.project-category-pill {
    background: transparent;
    padding: 0;
    border: none;
    backdrop-filter: none;
}

.project-category-pill span {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Arrow Button */
.project-content-overlay .arrow-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111;
    font-size: 14px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.project-content-overlay .arrow-btn:hover {
    background: #111;
    color: #fff;
    transform: rotate(-45deg);
}

/* Responsive */
@media only screen and (max-width: 1200px) {
    .projects-grid-container {
        padding: 50px 40px;
    }
}

@media only screen and (max-width: 991px) {
    .project-area-header-split {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        text-align: center;
    }
}

@media only screen and (max-width: 767px) {
    .project-area-header-split {
        margin-bottom: 30px;
        width: 100%;
    }

    /* Horizontal scroll for tags on mobile */
    .filter-tags-list {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 0 15px 15px;
        -webkit-overflow-scrolling: touch;
        width: calc(100% + 30px);
        margin-left: -15px;
        justify-content: flex-start;
        scrollbar-width: none;
        gap: 10px;
    }

    .filter-tags-list::-webkit-scrollbar {
        display: none;
    }

    .filter-tag-btn {
        padding: 8px 18px;
        font-size: 13px;
        white-space: nowrap;
    }

    .projects-filter-wrapper {
        width: 100%;
        display: flex;
        justify-content: center;
        margin-top: 5px;
    }

    .custom-filter-dropdown .filter-btn {
        padding: 10px 22px;
        font-size: 13px;
    }

    /* REDESIGN: Remove bulky styling on mobile */
    .projects-grid-container {
        background: transparent !important;
        padding: 0 15px !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        margin-top: 20px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .projects-grid-layout {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
        row-gap: 30px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .project-box {
        aspect-ratio: auto !important;
        overflow: visible !important;
        background: transparent !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        align-items: center !important;
        /* Center the image link */
        text-align: center !important;
    }

    .project-thumb-link {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        margin-bottom: 0 !important;
    }

    .project-box .thumb {
        aspect-ratio: 4/3 !important;
        border-radius: 12px !important;
        overflow: hidden !important;
        width: 100% !important;
        position: relative !important;
    }

    .project-box:hover {
        transform: none !important;
    }

    /* Disable gradient overlay on mobile */
    .project-box::after {
        display: none !important;
    }

    .project-content-overlay {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        padding: 12px 0 0 !important;
        /* Spacing below image */
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        background: transparent !important;
        width: 100% !important;
        text-align: center !important;
    }

    .project-pills {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        text-align: center !important;
    }

    .project-title-pill {
        display: block !important;
        text-align: center !important;
        width: 100% !important;
    }

    .project-title-pill a,
    .project-title-pill div {
        font-size: 14px !important;
        color: #111 !important;
        font-weight: 500 !important;
        line-height: 1.4 !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        text-align: center !important;
        display: inline-block !important;
        /* For text-align: center on parent */
    }

    /* Hide category on mobile as requested */
    .project-category-pill {
        display: none !important;
    }

    /* Hide arrow button on mobile */
    .project-content-overlay .arrow-btn {
        display: none !important;
    }
}

.project-filter-area {
    display: flex;
    justify-content: center;
}

.project-thumb-link {
    display: block;
    width: 100%;
    height: 100%;
    z-index: 3;
}

/* QuickView Modal */
.project-quickview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.quickview-card {
    background: #fff;
    width: 100%;
    max-width: 350px;
    border-radius: 30px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
    animation: quickviewEntry 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes quickviewEntry {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.quickview-card .close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #111;
    z-index: 10;
    cursor: pointer;
}

/* Nav Buttons */
.quickview-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 14px;
    z-index: 15;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.quickview-nav-btn.prev {
    left: 10px;
}

.quickview-nav-btn.next {
    right: 10px;
}

.quickview-nav-btn:active {
    transform: translateY(-50%) scale(0.9);
    background: #000;
    color: #fff;
}

.quickview-image {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
}

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

.quickview-content {
    padding: 25px;
    text-align: center;
}

.quickview-title {
    font-size: 20px;
    font-weight: 600;
    color: #111;
    margin-bottom: 5px;
}

.quickview-tag {
    font-size: 14px;
    color: #e33a7e;
    font-weight: 500;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quickview-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
    background: #FFEFF9;
    padding: 15px;
    border-radius: 20px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    border-bottom: 1px solid rgba(227, 58, 126, 0.1);
    padding-bottom: 8px;
}

.detail-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-item .label {
    color: #666;
    font-weight: 400;
}

.detail-item .value {
    color: #111;
    font-weight: 500;
}

.view-full-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #000;
    color: #fff;
    padding: 14px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.view-full-btn:active {
    transform: scale(0.95);
    background: #222;
}

/* Transitions */
.fade-enter-active,
.fade-leave-active {
    transition: opacity 0.3s ease;
}

.fade-enter-from,
.fade-leave-to {
    opacity: 0;
}