/* ============================================
   Brand Cards Enhanced Styling
   Professional & Elegant Card Design
   ============================================ */

/* ============================================
   BRAND CARD CONTAINER
   ============================================ */

.portfolio-item {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.portfolio-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.03) 0%, rgba(118, 75, 162, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
    pointer-events: none;
}


.portfolio-item-wrap {
    position: relative;
    z-index: 1;
}

/* ============================================
   CARD IMAGE SECTION
   ============================================ */

.portfolio-image {
    position: relative;
    overflow: hidden;
    height: 145px;
}

.portfolio-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.portfolio-item:hover .portfolio-image::after {
    opacity: 1;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

/* ============================================
   CARD CONTENT SECTION
   ============================================ */

.portfolio-description {
    padding: 25px;
    position: relative;
}

/* Brand Name */
.portfolio-description h3 {
    font-size: 20px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 12px;
    transition: color 0.3s ease;
    line-height: 1.3;
}

.portfolio-description a:hover h3 {
    color: #667eea;
}



/* ============================================
   ACTION ICONS
   ============================================ */


/* Flex container to align icons horizontally */
.portfolio-description {
    display: flex;
    flex-direction: column;
}

.portfolio-description>br {
    display: none;
}


@keyframes iconBounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

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

    .portfolio-description {
        padding: 20px;
    }

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

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

    .portfolio-description {
        padding: 18px;
    }

    .portfolio-description h3 {
        font-size: 17px;
    }

    .portfolio-description span[data-toggle="tooltip"] {
        width: 36px;
        height: 36px;
        line-height: 36px;
        margin-right: 10px;
    }

    .portfolio-description span[data-toggle="tooltip"] i {
        font-size: 14px;
        line-height: 36px;
    }
}

/* ============================================
   STAGGERED ANIMATION
   ============================================ */

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

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

.portfolio-item {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.portfolio-item:nth-child(1) {
    animation-delay: 0.1s;
}

.portfolio-item:nth-child(2) {
    animation-delay: 0.2s;
}

.portfolio-item:nth-child(3) {
    animation-delay: 0.3s;
}

.portfolio-item:nth-child(4) {
    animation-delay: 0.4s;
}

.portfolio-item:nth-child(5) {
    animation-delay: 0.5s;
}

.portfolio-item:nth-child(6) {
    animation-delay: 0.6s;
}

.portfolio-item:nth-child(7) {
    animation-delay: 0.7s;
}

.portfolio-item:nth-child(8) {
    animation-delay: 0.8s;
}

.portfolio-item:nth-child(9) {
    animation-delay: 0.9s;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.portfolio-description a:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}


/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {

    .portfolio-item,
    .portfolio-image img,
    .portfolio-description span[data-toggle="tooltip"] {
        transition: none;
        animation: none;
    }
}

/* ============================================
   GRID LAYOUT - 2 CARDS PER ROW
   ============================================ */

#portfolio {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

@media (max-width: 767px) {
    #portfolio {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   CONTENT COLUMN WIDTH FOR 2-CARD LAYOUT
   ============================================ */

.content.col-lg-6 {
    flex: 0 0 75%;
    max-width: 75%;
}

@media (max-width: 991px) {
    .content.col-lg-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ============================================
   PAGINATION - NO SHADOW
   ============================================ */

/* Remove card styling from pagination container */
.row.portfolio-item {
    box-shadow: none !important;
    background: transparent !important;
    border: none !important;
    animation: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
}

.row.portfolio-item:hover {
    box-shadow: none !important;
    transform: none !important;
}

.row.portfolio-item::before {
    display: none !important;
}

/* Ensure pagination links don't get card styling */
.pagination,
.pagination a,
.pagination span {
    box-shadow: none !important;
}