:root {
    --smart-portfolio-overlay: rgba(0, 0, 0, 0.7);
    --smart-portfolio-text: #ffffff;
    --smart-portfolio-button-bg: #333333;
    --smart-portfolio-button-hover: #555555;
    --smart-portfolio-button-text: #ffffff;
    --sp-gutter: 25px;
    --columns: 3;
    --columns-tablet: 2;
    --columns-mobile: 1;
}

/* ==================== */
/* COMMON PORTFOLIO STYLES */
/* ==================== */
.smart-portfolio {
    width: 100%;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

.smart-portfolio-items {
    margin: 0;
    padding: 0;
    list-style: none;
    width: 100%;
}

.smart-portfolio-item {
    box-sizing: border-box;
    margin-bottom: var(--sp-gutter);
}

.smart-portfolio-item-inner {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    height: 100%;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgb(162, 240, 224);
}

.smart-portfolio-item:hover .smart-portfolio-item-inner {
    transform: translateY(-6px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.smart-portfolio-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.smart-portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.smart-portfolio-item:hover .smart-portfolio-image img {
    transform: scale(1.05);
}

.smart-portfolio-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.smart-portfolio-item:hover .smart-portfolio-overlay {
    opacity: 1;
}

.smart-portfolio-overlay-content {
    color: #fff;
    text-align: center;
    z-index: 2;
    padding: 20px;
    background-color: #087aae94;
    border-radius: 6px;
}

.smart-portfolio-overlay-content h3 {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 10px;
    color: #ffffff;
}

.smart-portfolio-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.smart-portfolio-title {
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: 600;
    color: #222;
}

.smart-portfolio-title a {
    text-decoration: none !important;
    color: #222;
    transition: color 0.3s;
}

.smart-portfolio-title a:hover {
    color: #0073aa;
}

.smart-portfolio-meta {
    font-size: 14px;
    color: #555;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.meta-label {
    font-weight: 600;
    margin-right: 5px;
    color: #333;
}

/* ==================== */
/* GRID LAYOUT */
/* ==================== */
.smart-portfolio-grid .smart-portfolio-items {
    display: grid;
    grid-template-columns: repeat(var(--columns), 1fr);
    gap: var(--sp-gutter);
}

/* ==================== */
/* SLIDER LAYOUT */
/* ==================== */
.smart-portfolio-slider {
    position: relative;
    padding: 0 60px;
}

.smart-portfolio-slider .smart-portfolio-items {
    position: relative;
    overflow: hidden;
    padding: 10px 0;
}

.smart-portfolio-slider .smart-portfolio-item {
    padding: 0 calc(var(--sp-gutter)/2);
    float: none;
}

/* Slick slider overrides */
.smart-portfolio-slider .slick-list {
    overflow: visible;
    margin: 0 calc(-1 * var(--sp-gutter)/2);
}

.smart-portfolio-slider .slick-track {
    display: flex;
    align-items: stretch;
}

.smart-portfolio-slider .slick-slide {
    height: auto;
    float: none;
    padding: 0 calc(var(--sp-gutter)/2);
}

.smart-portfolio-slider .slick-slide > div {
    height: 100%;
}

.smart-portfolio-slider .slick-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: var(--smart-portfolio-button-bg);
    color: var(--smart-portfolio-button-text);
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
    text-align: center;
}

.smart-portfolio-slider .slick-arrow:hover {
    background: var(--smart-portfolio-button-hover);
}

.smart-portfolio-slider .slick-prev {
    left: 10px;
}

.smart-portfolio-slider .slick-next {
    right: 10px;
}

.smart-portfolio-slider .slick-dots {
    display: flex;
    justify-content: center;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.smart-portfolio-slider .slick-dots li {
    margin: 0 5px;
}

.smart-portfolio-slider .slick-dots button {
    font-size: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.3s ease;
}

.smart-portfolio-slider .slick-dots .slick-active button {
    background: #333;
}

/* ==================== */
/* CAROUSEL LAYOUT */
/* ==================== */
.smart-portfolio-carousel {
    position: relative;
    padding: 0 60px;
}

.smart-portfolio-carousel .smart-portfolio-items {
    position: relative;
    overflow: hidden;
    padding: 10px 0;
}

.smart-portfolio-carousel .smart-portfolio-item {
    padding: 0 calc(var(--sp-gutter)/2);
    float: none;
}

/* Owl Carousel overrides */
.smart-portfolio-carousel .owl-stage {
    display: flex;
    align-items: stretch;
}

.smart-portfolio-carousel .owl-item {
    float: none;
    padding: 0 calc(var(--sp-gutter)/2);
}

.smart-portfolio-carousel .owl-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.smart-portfolio-carousel .owl-prev,
.smart-portfolio-carousel .owl-next {
    pointer-events: all;
    background: var(--smart-portfolio-button-bg);
    color: var(--smart-portfolio-button-text);
    border: none;
    padding: 5px 0px 9px 5px;
    border-radius: 30px;
    font-size: 35px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
    text-align: center;
}

.smart-portfolio-carousel .owl-prev:hover,
.smart-portfolio-carousel .owl-next:hover {
    background: var(--smart-portfolio-button-hover);
}

.smart-portfolio-carousel .owl-prev {
    left: 10px;
}

.smart-portfolio-carousel .owl-next {
    right: 10px;
}

.smart-portfolio-carousel .owl-dots {
    display: flex;
    justify-content: center;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.smart-portfolio-carousel .owl-dot {
    margin: 0 5px;
}

.smart-portfolio-carousel .owl-dot span {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: background 0.3s ease;
}

.smart-portfolio-carousel .owl-dot.active span {
    background: #333;
}

/* ==================== */
/* RESPONSIVE ADJUSTMENTS */
/* ==================== */
@media (max-width: 1024px) {
    .smart-portfolio-grid .smart-portfolio-items {
        grid-template-columns: repeat(var(--columns-tablet), 1fr);
    }
    
    .smart-portfolio-slider .slick-slide,
    .smart-portfolio-carousel .owl-item {
        width: calc(100% / var(--columns-tablet)) !important;
    }
}

@media (max-width: 768px) {
    .smart-portfolio-slider,
    .smart-portfolio-carousel {
        padding: 0 40px;
    }
    
    .smart-portfolio-slider .slick-arrow,
    .smart-portfolio-carousel .owl-prev,
    .smart-portfolio-carousel .owl-next {
        min-width: 80px;
        padding: 8px 15px;
        font-size: 13px;
    }
}

@media (max-width: 600px) {
    .smart-portfolio-grid .smart-portfolio-items {
        grid-template-columns: repeat(var(--columns-mobile), 1fr);
    }
    
    .smart-portfolio-slider .slick-slide,
    .smart-portfolio-carousel .owl-item {
        width: calc(100% / var(--columns-mobile)) !important;
    }
    
    .smart-portfolio-slider,
    .smart-portfolio-carousel {
        padding: 0 30px;
    }
    
    .smart-portfolio-slider .slick-arrow,
    .smart-portfolio-carousel .owl-prev,
    .smart-portfolio-carousel .owl-next {
        min-width: 70px;
        padding: 6px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .smart-portfolio-slider,
    .smart-portfolio-carousel {
        padding: 0 20px;
    }
    
    .smart-portfolio-slider .slick-arrow,
    .smart-portfolio-carousel .owl-prev,
    .smart-portfolio-carousel .owl-next {
        min-width: 60px;
        padding: 5px 10px;
        font-size: 11px;
    }
}

/* ==================== */
/* SINGLE PORTFOLIO PAGE STYLES */
/* ==================== */
.smart-portfolio-single {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: 'Segoe UI', sans-serif;
    color: #333;
}

.portfolio-header {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 40px;
}

.portfolio-featured-image {
    flex: 1 1 45%;
    border-radius: 10px;
    overflow: hidden;
}

.portfolio-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border: 1px solid #ddd;
}

.portfolio-header-text {
    flex: 1 1 50%;
}

.portfolio-title {
    font-size: 2rem;
    margin-bottom: 20px;
    font-weight: 600;
    color: #111;
}

.portfolio-meta {
    background: #f9f9f9;
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 8px;
    font-size: 0.95rem;
}

.portfolio-meta .meta-item {
    margin-bottom: 10px;
}

.portfolio-meta .meta-item:last-child {
    margin-bottom: 0;
}

.portfolio-content {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 40px;
    background-color: white;
    padding: 20px;
    border-radius: 15px;
}

.portfolio-description {
    margin-bottom: 5px;
}

.portfolio-gallery {
    margin-top: 40px;
    padding: 20px;
    background-color: white;
    border-radius: 15px;
}

.portfolio-gallery h3 {
    margin-bottom: 20px;
    font-size: 1.4rem;
    font-weight: 600;
}

.gallery-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.gallery-item img {
    width: 100%;
    border-radius: 5px;
    border: 1px solid #ddd;
    transition: transform 0.3s ease;
}

.gallery-item img:hover {
    transform: scale(1.03);
}

/* Responsive Single Portfolio */
@media (max-width: 768px) {
    .portfolio-header {
        flex-direction: column;
    }

    .portfolio-featured-image, 
    .portfolio-header-text {
        flex: 1 1 100%;
    }
    
    .portfolio-title {
        font-size: 1.5rem;
    }
    
    .portfolio-content {
        padding: 15px;
    }
    
    .gallery-images {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}