/* ============================================
   Portfolio Gallery - Uniform Image Sizing
   ============================================ */

/* Make all portfolio images uniform size */
.portfolio-image {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 350px; /* Fixed height for uniform sizing */
    background-color: #f5f5f5;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures images fill the space while maintaining aspect ratio */
    object-position: center;
    transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.05);
}

/* Portfolio overlay styling */
.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(153, 153, 0, 0.9); /* Brand olive-green with opacity */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.portfolio-info {
    text-align: center;
    color: #fff;
}

.portfolio-info h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #fff;
    font-weight: 600;
}

.portfolio-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: #fff;
    color: #999900;
    border-radius: 50%;
    font-size: 20px;
    transition: all 0.3s ease;
}

.portfolio-link:hover {
    background-color: #999900;
    color: #fff;
    transform: scale(1.1);
}

/* ============================================
   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;
}

/* ============================================
   Responsive Adjustments
   ============================================ */

@media (max-width: 991px) {
    .portfolio-image {
        height: 300px;
    }

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

    .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;
    }
}

@media (max-width: 767px) {
    .portfolio-image {
        height: 250px;
    }

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

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

    .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: 575px) {
    .portfolio-image {
        height: 200px;
    }

    .modal-nav {
        display: none !important; /* Hide navigation arrows on very small screens */
    }

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

/* ============================================
   Print Styles
   ============================================ */

@media print {
    .image-modal {
        display: none !important;
    }
}
