/* Brand-inspired styling for Projects Page */

/* Tabs */
.nav-tabs .nav-link {
    background-color: #3a4046;
    color: #ffffff;
    border: none;
    transition: 0.3s;
    font-size: 18px;
}

/* Cards */
.card {
    background-color: #1c1f23;
    border: 1px solid #333;
    color: #ffffff;
}

.card-title {
    color: #ffffff;
}

.card-text {
    color: #ccc;
}

.card .btn-primary {
    background-color: #3a4046;
    border-color: #ff2e2e;
}

.card .btn-primary:hover {
    background-color: #d12626;
    border-color: #d12626;
}

/* Modals */
.brand-modal-content {
    background-color: #1c1f23 !important;
    color: #ffffff;
    border: 1px solid #333;
}

.modal-50-width {
    max-width: 50% !important;
}

/* Modal Backdrop */
.modal-backdrop {
    opacity: 1 !important;
    background-color: #000000 !important;
    z-index: 1040;
}

/* Ensure carousel items/cards have equal height on homepage */
.project-carousel {
    position: relative;
}
.project-carousel .item {
    display: flex;
    align-items: stretch;
    height: 100%;
}
.project-carousel .card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 360px;
    max-height: 360px;
    background-color: #2d3748 !important;
    border: 1px solid #4a5568;
}
.project-carousel .card-img-top {
    height: 200px;
    object-fit: cover;
}
.project-carousel .card-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

/* Make the See More button stick to bottom */
.project-carousel .card-body .mt-auto {
    margin-top: auto;
}

/* Owl nav (prev/next) button fixes for project carousel */
.project-carousel .owl-nav {
    position: absolute;
    bottom: 16px;
    left: 0;
    right: 0;
    pointer-events: none;
    height: 0;
}
.project-carousel .owl-nav .owl-prev,
.project-carousel .owl-nav .owl-next {
    pointer-events: auto;
    position: absolute;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    z-index: 1050;
}
.project-carousel .owl-nav .owl-prev {
    left: 12px;
}
.project-carousel .owl-nav .owl-next {
    right: 12px;
}
.project-carousel .owl-nav .owl-prev span,
.project-carousel .owl-nav .owl-next span {
    font-size: 14px;
}

@media (max-width: 767px) {
    .project-carousel .owl-nav .owl-prev,
    .project-carousel .owl-nav .owl-next {
        width: 28px;
        height: 28px;
    }
    .project-carousel .card-img-top {
        height: 160px;
    }
}

/* Clamp long descriptions to keep card heights uniform */
.project-carousel .card {
    min-height: 420px;
    max-height: 420px; /* fixed height for all cards */
}
.project-carousel .card-body .text-justify,
.project-carousel .card-body .project-desc {
    display: -webkit-box;
    -webkit-line-clamp: 3; /* show max 3 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 991px) {
    .project-carousel .card {
        min-height: 320px;
        max-height: 320px;
    }
}
@media (max-width: 575px) {
    .project-carousel .card {
        min-height: 300px;
        max-height: 300px;
    }
    .project-carousel .card-body .text-justify,
    .project-carousel .card-body .project-desc {
        -webkit-line-clamp: 4;
    }
}
