/* ============================================
   Projects Gallery Styles - Woodworking Dynamics
   SIMPLIFIED - USING BOOTSTRAP GRID
   ============================================ */

/* Projects Gallery Section */
.projects-gallery-section {
    padding: 80px 0;
    background: #f8f8f8;
}

    /* Section Title */
    .projects-gallery-section .section-title {
        margin-bottom: 50px;
    }

        .projects-gallery-section .section-title h2 {
            color: #2c2c2c;
            margin-bottom: 20px;
        }

        .projects-gallery-section .section-title p {
            color: #666666;
            font-size: 16px;
            max-width: 700px;
            margin: 0 auto;
            line-height: 1.8;
        }

/* Portfolio Filter Menu */
.portfolio-filter-menu {
    margin-bottom: 50px;
    text-align: center;
}

    .portfolio-filter-menu ul {
        list-style: none;
        padding: 0;
        margin: 0;
        display: inline-flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        background: #ffffff;
        padding: 10px;
        border-radius: 50px;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    }

    .portfolio-filter-menu li {
        display: inline-block;
    }

.filter-btn {
    padding: 12px 30px;
    background: transparent;
    color: #666666;
    border: 2px solid transparent;
    border-radius: 25px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'Plus Jakarta Sans', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

    .filter-btn:hover {
        color: #999900;
        background: rgba(153, 153, 0, 0.05);
    }

    .filter-btn.active {
        background: #999900;
        color: #ffffff;
        border-color: #999900;
        box-shadow: 0 4px 15px rgba(153, 153, 0, 0.3);
    }

/* Portfolio Grid - BOOTSTRAP HANDLES LAYOUT */
.portfolio-grid {
    margin-top: 40px;
}

/* Portfolio Item - BOOTSTRAP COLUMN */
.portfolio-item {
    margin-bottom: 30px;
}

/* Portfolio Card - INNER WRAPPER */
.portfolio-card {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    background: #ffffff;
    animation: fadeInUp 0.6s ease;
}

    .portfolio-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* Portfolio Image - UNIFORM HEIGHT */
.portfolio-image {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 350px;
    background-color: #f5f5f5;
}

    .portfolio-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        transition: transform 0.5s ease;
    }

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

/* Portfolio Overlay */
.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient( to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.7) 70%, rgba(0, 0, 0, 0.9) 100% );
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: flex-end;
    padding: 30px;
}

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

/* Portfolio Info */
.portfolio-info {
    width: 100%;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.portfolio-card:hover .portfolio-info {
    transform: translateY(0);
}

.portfolio-info h3 {
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.portfolio-info p {
    color: #999900;
    font-size: 14px;
    margin: 0 0 15px 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Portfolio Link */
.portfolio-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #999900;
    color: #ffffff;
    border-radius: 50%;
    font-size: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(153, 153, 0, 0.4);
}

    .portfolio-link:hover {
        background: #808000;
        transform: scale(1.1) rotate(90deg);
        box-shadow: 0 6px 20px rgba(153, 153, 0, 0.6);
    }

/* ============================================
   Custom Image Modal Lightbox
   ============================================ */

.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content-wrapper {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

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

.modal-content {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

#modalCaption {
    margin-top: 20px;
    text-align: center;
    color: #fff;
    font-size: 18px;
    font-weight: 500;
    padding: 15px 30px;
    background-color: rgba(153, 153, 0, 0.9);
    border-radius: 5px;
    max-width: 80%;
}

/* Modal close button */
.modal-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #fff;
    font-size: 45px;
    font-weight: 300;
    cursor: pointer;
    z-index: 10000;
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(153, 153, 0, 0.8);
    border-radius: 50%;
    line-height: 1;
}

    .modal-close:hover,
    .modal-close:focus {
        background-color: #999900;
        transform: rotate(90deg);
    }

/* Modal navigation buttons */
.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(153, 153, 0, 0.8);
    color: #fff;
    border: none;
    font-size: 30px;
    cursor: pointer;
    padding: 20px;
    z-index: 10000;
    transition: all 0.3s ease;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
}

    .modal-nav:hover {
        background-color: #999900;
        transform: translateY(-50%) scale(1.1);
    }

.modal-prev {
    left: 30px;
}

.modal-next {
    right: 30px;
}

/* CTA Section */
.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
    position: relative;
    overflow: hidden;
}

    .cta-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: 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='%23999900' 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.3;
    }

.cta-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 50px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 2px solid rgba(153, 153, 0, 0.3);
    position: relative;
    z-index: 1;
    gap: 40px;
    flex-wrap: wrap;
}

.cta-content h2 {
    color: #ffffff;
    font-size: 38px;
    font-weight: 700;
    margin: 0 0 15px 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.cta-content p {
    color: #cccccc;
    font-size: 16px;
    margin: 0;
}

.cta-btn .btn-default {
    padding: 15px 40px;
    background: #999900;
    color: #ffffff;
    border-radius: 5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(153, 153, 0, 0.3);
}

    .cta-btn .btn-default:hover {
        background: #808000;
        transform: translateY(-3px);
        box-shadow: 0 6px 25px rgba(153, 153, 0, 0.5);
    }

/* Responsive Design */

/* Tablet */
@media (max-width: 991px) {
    .portfolio-item {
        margin-bottom: 25px;
    }

    .portfolio-image {
        height: 300px;
    }

    .cta-box {
        flex-direction: column;
        text-align: center;
        padding: 40px 30px;
    }

    .cta-content h2 {
        font-size: 32px;
    }

    .modal-close {
        top: 20px;
        right: 20px;
        font-size: 35px;
        width: 45px;
        height: 45px;
    }

    .modal-nav {
        font-size: 24px;
        padding: 15px;
        width: 50px;
        height: 50px;
    }

    .modal-prev {
        left: 15px;
    }

    .modal-next {
        right: 15px;
    }

    #modalCaption {
        font-size: 16px;
        padding: 12px 20px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .projects-gallery-section {
        padding: 60px 0;
    }

    .portfolio-filter-menu ul {
        flex-direction: column;
        border-radius: 10px;
        gap: 10px;
    }

    .filter-btn {
        width: 100%;
        text-align: center;
        border-radius: 8px;
    }

    .portfolio-item {
        margin-bottom: 20px;
    }

    .portfolio-image {
        height: 250px;
    }

    .portfolio-overlay {
        opacity: 1;
        background: linear-gradient( to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 70%, rgba(0, 0, 0, 0.95) 100% );
    }

    .portfolio-info {
        transform: translateY(0);
    }

        .portfolio-info h3 {
            font-size: 20px;
        }

    .cta-section {
        padding: 60px 0;
    }

    .cta-box {
        padding: 30px 20px;
    }

    .cta-content h2 {
        font-size: 26px;
    }

    .cta-content p {
        font-size: 15px;
    }

    .modal-content-wrapper {
        max-width: 95%;
    }

    .modal-content {
        max-height: 75vh;
    }

    .modal-close {
        top: 15px;
        right: 15px;
        font-size: 30px;
        width: 40px;
        height: 40px;
    }

    .modal-nav {
        font-size: 20px;
        padding: 12px;
        width: 45px;
        height: 45px;
    }

    .modal-prev {
        left: 10px;
    }

    .modal-next {
        right: 10px;
    }

    #modalCaption {
        font-size: 14px;
        padding: 10px 15px;
        max-width: 90%;
    }
}

@media (max-width: 480px) {
    .portfolio-filter-menu {
        margin-bottom: 30px;
    }

    .filter-btn {
        padding: 10px 20px;
        font-size: 13px;
    }

    .portfolio-image {
        height: 200px;
    }

    .portfolio-info h3 {
        font-size: 18px;
    }

    .portfolio-info p {
        font-size: 13px;
    }

    .portfolio-link {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    .cta-content h2 {
        font-size: 22px;
    }

    .modal-nav {
        display: none !important;
    }

    #modalCaption {
        font-size: 13px;
        padding: 8px 12px;
    }
}

/* Loading Animation for Filtered Items */
.portfolio-item.filtering-out {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.portfolio-item.filtering-in {
    animation: filterIn 0.5s ease;
}

@keyframes filterIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

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