/**
 * Custom Portfolio Plugin - Frontend Styles
 * Professional portfolio grid and single page styles
 */

/* ==========================================================================
   1. ARCHIVE PAGE - PORTFOLIO GRID
   ========================================================================== */

.cpp-archive-wrapper {
    padding: 60px 0;
    background: #f8f9fa;
}

.cpp-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Archive Header */
.cpp-archive-header {
    text-align: center;
    margin-bottom: 50px;
    padding: 40px 0;
    background: #ffffff;
    border-bottom: 1px solid #e5e5e5;
}

.cpp-archive-title {
    font-size: 42px;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}

.cpp-archive-description {
    font-size: 16px;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Filter Navigation */
.cpp-filter-nav {
    text-align: center;
    margin-bottom: 40px;
}

.cpp-filter-btn {
    background: #ffffff;
    border: 2px solid #e5e5e5;
    padding: 10px 24px;
    margin: 5px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    border-radius: 30px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cpp-filter-btn:hover,
.cpp-filter-btn.active {
    background: #1a1a1a;
    color: #ffffff;
    border-color: #1a1a1a;
}

/* Portfolio Grid */
.cpp-portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.cpp-portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #ffffff;
}

.cpp-portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.cpp-portfolio-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Portfolio Image */
.cpp-portfolio-image {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 aspect ratio */
    overflow: hidden;
    background: #f0f0f0;
}

.cpp-portfolio-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.cpp-portfolio-item:hover .cpp-portfolio-image img {
    transform: scale(1.1);
}

.cpp-no-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
}

/* Hover Overlay */
.cpp-portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.cpp-portfolio-item:hover .cpp-portfolio-overlay {
    opacity: 1;
}

.cpp-portfolio-overlay-content {
    text-align: center;
    padding: 20px;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.cpp-portfolio-item:hover .cpp-portfolio-overlay-content {
    transform: translateY(0);
}

.cpp-portfolio-title {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 10px 0;
    letter-spacing: -0.3px;
}

.cpp-portfolio-category {
    display: inline-block;
    font-size: 13px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* No Results */
.cpp-no-results {
    text-align: center;
    padding: 80px 20px;
    background: #ffffff;
    border-radius: 8px;
}

.cpp-no-results h2 {
    font-size: 28px;
    margin-bottom: 15px;
    color: #333;
}

.cpp-no-results p {
    font-size: 16px;
    color: #666;
}

/* Pagination */
.cpp-pagination {
    text-align: center;
    margin-top: 50px;
}

.cpp-pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cpp-pagination a,
.cpp-pagination span {
    display: inline-block;
    padding: 10px 18px;
    background: #ffffff;
    border: 2px solid #e5e5e5;
    border-radius: 5px;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cpp-pagination a:hover,
.cpp-pagination .current {
    background: #1a1a1a;
    color: #ffffff;
    border-color: #1a1a1a;
}


/* ==========================================================================
   SINGLE PORTFOLIO PAGE - 3 COLUMN LAYOUT WITH ANIMATIONS
   ========================================================================== */

.cpp-single-portfolio {
    background: #ffffff;
    padding: 0;
    margin: 0;
}

/* ==========================================================================
   NAVIGATION BUTTONS - RAINBOW BORDER STYLE
   ========================================================================== */

/* Rainbow Border Animation */
@keyframes rotate {
    100% {
        transform: rotate(1turn);
    }
}

/* TOP NAVIGATION - Single "Back to Home" Button */
.cpp-top-nav-buttons {
    background: #ffffff;
    padding: 20px 0;
    border-bottom: 1px solid #e5e5e5;
}

.cpp-top-nav-buttons .cpp-nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 0px;
    display: flex;
    justify-content: flex-start; /* Left aligned */
}

/* BOTTOM NAVIGATION - Previous & Next Buttons */
.cpp-bottom-nav-buttons {
    background: #ffffff;
    padding: 20px 30px;
    border-top: none;
    margin-top: 0;
}

.cpp-nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 0px;
    display: flex;
    justify-content: space-between; /* Left & Right aligned */
    gap: 20px;
}

/* ✅ Force equal width for both buttons */
.cpp-bottom-nav-buttons .cpp-rainbow-btn,
.cpp-bottom-nav-buttons .cpp-rainbow-btn-disabled {
    flex: 0 0 auto; /* ✅ Fixed width */
    min-width: 200px;
    max-width: 200px;
}

.cpp-bottom-nav-buttons .cpp-btn-content {
    width: 100%;
    justify-content: center;
}

/* Rainbow Button Base */
.cpp-rainbow-btn{
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px; /* Border thickness */
    border-radius: 50px;
    overflow: hidden;
    background: transparent;
    text-decoration: none;
    transition: transform 0.3s ease;
    z-index: 0;
}

.cpp-rainbow-btn:hover {
    transform: scale(1.05);
}

.cpp-rainbow-btn:active {
    transform: scale(1);
}


/* Button Content (Inner) */
.cpp-btn-content {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: #000000;
    backdrop-filter: blur(10px);
    border-radius: 50px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: background 0.3s ease;
    white-space: nowrap;
}

.cpp-rainbow-btn:hover .cpp-btn-content {
    background: #313945;
}

/* Icon Styling */
.cpp-nav-icon {
    font-size: 18px;
    line-height: 1;
}

.cpp-nav-text {
    display: inline;
}

/* Disabled State */
.cpp-rainbow-btn-disabled {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    border-radius: 50px;
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.cpp-rainbow-btn-disabled .cpp-btn-content {
    padding: 14px 32px;
    background: rgba(26, 26, 26, 0.5);
    border-radius: 50px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* ==========================================================================
   RESPONSIVE - NAVIGATION BUTTONS
   ========================================================================== */

@media (max-width: 991px) {
    .cpp-top-nav-buttons{
        display: none;
    }
    .cpp-bottom-nav-buttons .cpp-rainbow-btn,
    .cpp-bottom-nav-buttons .cpp-rainbow-btn-disabled {
        flex: 0 0 auto;
        min-width: 180px;
        max-width: 180px;
    }
    .cpp-btn-content {
        padding: 12px 24px;
        font-size: 13px;
        letter-spacing: 1px;
    }

    .cpp-nav-icon {
        font-size: 16px;
    }
}

/* ==========================================================================
   RESPONSIVE - NAVIGATION BUTTONS - MOBILE FIX
   ========================================================================== */

@media (max-width: 767px) {
    .cpp-top-nav-buttons{
        display: none;
    }
    .cpp-bottom-nav-buttons {
        padding: 15px 0;
    }

    .cpp-top-nav-buttons .cpp-nav-container,
    .cpp-bottom-nav-buttons .cpp-nav-container {
        padding: 20px 30px;
        flex-direction: column-reverse; /* ✅ NEXT on top, PREVIOUS on bottom */
        align-items: center;
        gap: 15px;
    }
    
    .cpp-bottom-nav-buttons .cpp-rainbow-btn,
    .cpp-bottom-nav-buttons .cpp-rainbow-btn-disabled {
        flex: 0 0 auto;
        width: 280px; /* ✅ Fixed width on mobile */
        min-width: 280px;
        max-width: 280px;
    }

    .cpp-btn-content {
        padding: 14px 20px;
        font-size: 13px;
        width: 100%;
        justify-content: center;
    }

    .cpp-nav-icon {
        font-size: 16px;
    }
    
    .cpp-nav-text {
        display: inline; /* Show text on tablet */
    }
}

@media (max-width: 575px) {
    .cpp-bottom-nav-buttons .cpp-nav-container {
        padding: 15px 20px;
        gap: 12px;
        flex-direction: column-reverse; /* ✅ NEXT on top, PREVIOUS on bottom */
    }


    .cpp-bottom-nav-buttons .cpp-rainbow-btn,
    .cpp-bottom-nav-buttons .cpp-rainbow-btn-disabled {
        flex: 0 0 auto;
        width: 260px;
        min-width: 260px;
        max-width: 260px;
    }
}
    .cpp-btn-content {
        padding: 14px 20px;
        font-size: 14px;
        letter-spacing: 1.2px;
        gap: 10px;
    }
    
    .cpp-nav-text {
        display: inline;
    }

    .cpp-nav-icon {
        font-size: 16px;
    }

@media (max-width: 479px)
{
    .cpp-bottom-nav-buttons .cpp-nav-container {
        padding: 15px 20px;
        flex-direction: column-reverse;
}

/* ✅ NEW: Force equal width for both buttons */
.cpp-bottom-nav-buttons .cpp-rainbow-btn,
.cpp-bottom-nav-buttons .cpp-rainbow-btn-disabled {
        flex: 0 0 auto;
        width: 240px;
        min-width: 240px;
        max-width: 240px;
}

.cpp-bottom-nav-buttons .cpp-btn-content {
    width: 100%;
    justify-content: center;
}
    
    .cpp-nav-text {
        display: inline;
    }

    .cpp-nav-icon {
        font-size: 16px;
    }
}
/* ==========================================================================
   3-COLUMN HEADER LAYOUT
   ========================================================================== */

.cpp-three-column-header {
    background: #ffffff;
    margin: 0;
    padding: 10px 0;
}

.cpp-header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 20% 60% 20%;
    gap: 0px;
    align-items: start;
}

/* LEFT COLUMN - Title */
.cpp-column-left {
    padding-right: 2px;
    align-self: start;
}

.cpp-brand-title {
    font-size: 25px;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: #1a1a1a;
    letter-spacing: -0.5px;
    line-height: 1.1;
    text-align: left;
}

.cpp-brand-subtitle {
    font-size: 16px;
    color: #666;
    margin: 0;
    font-weight: 400;
    letter-spacing: 0.3px;
    text-align: left;
}

/* CENTER COLUMN - Description */
.cpp-column-center {
    padding: 0 20px;
    text-align: start;
}

.cpp-description-content {
    font-size: 17px;
    line-height: 1.8;
    color: #333;
    text-align: left; /* ✅ CENTER ALIGN */
    margin: 0;
}

.cpp-description-content p {
    margin: 0 0 20px 0;
    text-align: left; /* ✅ CENTER ALIGN paragraphs */
}

.cpp-description-content p:first-child {
    margin-top: 0; /* ✅ First paragraph at top */
}
.cpp-description-content p:last-child {
    margin-bottom: 0;
}

/* RIGHT COLUMN - Meta */
.cpp-column-right {
    padding-left: 20px;
    align-self: start;
}

.cpp-meta-info {
    /* Meta container */
    margin: 0; /* ✅ No margins */
    padding: 0; /* ✅ No padding */
}

.cpp-meta-item {
    display: flex;
    align-items: flex-start;
    margin: 0 0 10px 0;
    gap: 4px;
}

.cpp-meta-item:last-child {
    margin-bottom: 0;
}

.cpp-meta-bullet {
    color: #d32f2f;
    font-size: 18px;
    font-weight: bold;
    line-height: 1.4;
    flex-shrink: 0;
    margin: 0;
}

.cpp-meta-label {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 14px;
    min-width: 70px;
    line-height: 1.4;
    margin: 0;
}

.cpp-meta-value {
    color: #d32f2f;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
}
/* ==========================================================================
   TIGHT GALLERY GRID (3 COLUMNS, MINIMAL SPACING) - WITH HOVER OVERLAY
   ========================================================================== */
.cpp-tight-gallery {
    background: #ffffff;
    padding: 0;
    margin: 0;
    width: 100%;
}

.cpp-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 40px;
    width: 100%;
    box-sizing: border-box;
    min-height: auto;
}

.cpp-gallery-item {
    position: relative;
    display: block;
    overflow: hidden;
    background: #ffffff;
    width: 100%;
    height: 0;
    padding-bottom: 75%; /* 4:3 aspect ratio */
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: none;
    margin: 0;
    border: none;
}

.cpp-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.cpp-gallery-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.5s ease, filter 0.4s ease; /* ✅ Added filter transition */
    margin: 0;
    padding: 0;
}

.cpp-gallery-item:hover img {
    transform: scale(1.08);
    filter: brightness(0.7); /* ✅ Darken image on hover */
}

/* ✅ NEW: Gallery Overlay - Lighter than homepage */
.cpp-gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.2) 0%,
        rgba(0, 0, 0, 0.5) 100%
    ); /* ✅ Lighter gradient overlay */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 2;
    pointer-events: none;
}

.cpp-gallery-item:hover .cpp-gallery-overlay {
    opacity: 1;
}

/* ✅ UPDATED: Hover content with zoom icon */
.cpp-item-hover {
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.cpp-gallery-item:hover .cpp-item-hover {
    transform: scale(1);
}

/* ✅ UPDATED: Zoom icon styling */
.cpp-zoom {
    font-size: 24px;
    color: #ffffff;
    font-weight: 300;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.cpp-gallery-item:hover .cpp-zoom {
    transform: scale(1.15);
    background: rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   RESPONSIVE - GALLERY OVERLAY
   ========================================================================== */

@media (max-width: 768px) {
    .cpp-zoom {
        font-size: 20px;
        width: 45px;
        height: 45px;
    }
    
    .cpp-gallery-overlay {
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.15) 0%,
            rgba(0, 0, 0, 0.4) 100%
        ); /* ✅ Even lighter on mobile */
    }
}

@media (max-width: 576px) {
    .cpp-zoom {
        font-size: 18px;
        width: 40px;
        height: 40px;
    }
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDelay {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideLeft {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Apply Animations */
.animate-fade-in {
    animation: fadeIn 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

.animate-fade-in-delay {
    animation: fadeInDelay 0.8s ease-out 0.4s forwards;
    opacity: 0;
}

.animate-fade-up {
    animation: fadeUp 0.8s ease-out 0.6s forwards;
    opacity: 0;
}

.animate-slide-left {
    animation: slideLeft 0.8s ease-out 0.8s forwards;
    opacity: 0;
}

.animate-scale-in {
    animation: scaleIn 0.6s ease-out forwards;
    opacity: 0;
}

/* ==========================================================================
   MODERN LIGHTBOX - CLEAN POPUP STYLE
   ========================================================================== */

/* Prevent body scroll when lightbox is open */
body.lightbox-open {
    overflow: hidden;
}

/* Lightbox Container */
.cpp-modern-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
}

.cpp-modern-lightbox.active {
    display: flex;
}

/* Dark Overlay */
.cpp-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Semi-transparent black */
    backdrop-filter: blur(10px); /* ✅ Blur effect */
    -webkit-backdrop-filter: blur(10px); /* Safari support */
    animation: fadeInOverlay 0.3s ease;
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Content Container */
.cpp-lightbox-content {
    position: relative;
    z-index: 1000000;
    max-width: 90%;
    max-height: 90%;
    animation: zoomIn 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Image Wrapper */
.cpp-lightbox-image-wrapper {
    background: #ffffff;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    max-width: 1200px;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cpp-lightbox-image {
    max-width: 100%;
    max-height: 75vh;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
}

/* Close Button */
.cpp-lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 40px;
    line-height: 1;
    cursor: pointer;
    padding: 10px;
    transition: all 0.3s ease;
    z-index: 1000001;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cpp-lightbox-close:hover {
    color: #ffffff;
    transform: rotate(90deg);
    opacity: 0.7;
}

/* Navigation Buttons */
.cpp-lightbox-prev,
.cpp-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #1a1a1a;
    font-size: 48px;
    line-height: 1;
    cursor: pointer;
    padding: 20px 15px;
    transition: all 0.3s ease;
    z-index: 1000001;
    border-radius: 4px;
}

/* ✅ ADD HOVER STATE - Keep same background */
.cpp-lightbox-prev:hover,
.cpp-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.9); /* ✅ Same as default */
    color: #1a1a1a; /* ✅ Keep text color */
    transform: translateY(-50%) scale(1.05);/* ✅ Only scale effect */
}

.cpp-lightbox-prev:active,
.cpp-lightbox-next:active {
    transform: translateY(-50%) scale(0.98); /* ✅ Slight press effect */
}

.cpp-lightbox-prev {
    left: 20px;
}

.cpp-lightbox-next {
    right: 20px;
}

/* Image Counter */
.cpp-lightbox-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
    white-space: nowrap;
}

/* ==========================================================================
   LIGHTBOX RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
    .cpp-lightbox-content {
        max-width: 95%;
        max-height: 95%;
    }

    .cpp-lightbox-image-wrapper {
        padding: 15px;
    }

    .cpp-lightbox-close {
        top: -45px;
        font-size: 32px;
        width: 40px;
        height: 40px;
    }

    .cpp-lightbox-prev,
    .cpp-lightbox-next {
        font-size: 36px;
        padding: 15px 10px;
    }

    .cpp-lightbox-prev {
        left: 10px;
    }

    .cpp-lightbox-next {
        right: 10px;
    }

    .cpp-lightbox-counter {
        font-size: 12px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .cpp-lightbox-image-wrapper {
        padding: 10px;
        max-height: 70vh;
    }

    .cpp-lightbox-image {
        max-height: 65vh;
    }

    .cpp-lightbox-prev,
    .cpp-lightbox-next {
        font-size: 28px;
        padding: 10px 8px;
    }

    .cpp-lightbox-close {
        font-size: 28px;
        width: 35px;
        height: 35px;
    }
}



/* ==========================================================================
   RESPONSIVE - SINGLE PORTFOLIO (MOBILE-FIRST)
   ========================================================================== */

/* Desktop First - Base Styles Above */

/* ==========================================================================
   Large Desktop (1400px+) - Default styles above
   ========================================================================== */

/* ==========================================================================
   Medium Desktop (1200px - 1399px)
   ========================================================================== */
@media (max-width: 1399px) {
    .cpp-header-container {
        max-width: 1200px;
        padding: 0 30px;
    }

    .cpp-brand-title {
        font-size: 38px;
    }

    .cpp-description-content {
        font-size: 16px;
    }
}

/* ==========================================================================
   Desktop/Laptop (992px - 1199px)
   ========================================================================== */
@media (max-width: 1199px) {
    .cpp-header-container {
        grid-template-columns: 20% 60% 20%; /* Adjust proportions */
        gap: 0px;
        padding: 0 25px;
    }

    .cpp-brand-title {
        font-size: 36px;
    }

    .cpp-description-content {
        font-size: 15px;
        line-height: 1.7;
    }

    .cpp-gallery-grid {
        gap: 0;
        padding: 20px 30px;
        max-width: 100%;
        min-height: auto;
    }
}

/* ==========================================================================
   RESPONSIVE - SINGLE PORTFOLIO (MOBILE-OPTIMIZED)
   ========================================================================== */

/* ==========================================================================
   Tablet (768px - 991px) - STACK COLUMNS
   ========================================================================== */
@media (max-width: 991px) {
    /* Stack 3 columns vertically */
    .cpp-header-container {
        grid-template-columns: 1fr;
        gap: 0px;
        padding: 0 15px;
    }

    /* Remove column padding */
    .cpp-column-left,
    .cpp-column-center,
    .cpp-column-right {
        padding: 0;
        max-width: 100%;
    }

    /* Title - Center aligned on mobile ✅ */
    .cpp-brand-title {
        font-size: 33px; /* ✅ Increased from 32px */
        text-align: center; /* ✅ CENTER on mobile */
        margin-bottom: 12px;
    }

    .cpp-brand-subtitle {
        font-size: 20px; /* ✅ Increased from 15px */
        text-align: center; /* ✅ CENTER on mobile */
    }

    /* Description - Center aligned */
    .cpp-description-content {
        font-size: 16px; /* ✅ Slightly larger */
        line-height: 1.8;
        text-align: center; /* Keep left for readability */
        padding: 30px 0;
        margin-bottom: 10px;
    }

    .cpp-meta-info {
        display: flex;
        flex-direction: column;
        gap: 0px;
        align-items: baseline; /* ✅ CENTER the container */
        margin: 0 auto; /* ✅ CENTER using auto margins */
        padding: 0;
        width: fit-content;
    }

    .cpp-meta-item {
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        align-items: baseline;
        gap: 8px;
        text-align: center;
        width: 100%;
   }
    .cpp-meta-bullet {
        font-size: 18px;
        color: #d32f2f;
        font-weight: bold;
        flex-shrink: 0;
    }
    
    .cpp-meta-label {
        font-size: 14px;
        font-weight: 600;
        color: #1a1a1a;
        min-width: auto; /* ✅ Remove fixed width */
        white-space: nowrap;
    }
    .cpp-meta-value {
        font-size: 14px;
        font-weight: 700;
        color: #d32f2f;
        white-space: nowrap;
    }

    /* Gallery - 2 columns on tablet */
    .cpp-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0;
        padding: 20px 15px; /* ✅ Reduced padding */
        min-height: auto;
    }

    /* Navigation buttons */
    .cpp-nav-container {
        padding: 0 20px;
    }

    .cpp-nav-btn {
        padding: 12px 24px;
        font-size: 12px;
    }

    .cpp-three-column-header {
        padding: 5px 0; /* ✅ Reduced from 80px */
    }
}
/* ==========================================================================
   Mobile Large (576px - 767px)
   ========================================================================== */
@media (max-width: 767px) {
    .cpp-three-column-header {
        padding: 5px 0; /* ✅ Reduced padding */
    }

    .cpp-header-container {
        padding: 0 20px; /* ✅ Reduced from 15px */
        gap: 0px;
    }

    /* Title - CENTERED & LARGER ✅ */
    .cpp-brand-title {
        font-size: 30px; /* ✅ Increased from 28px */
        text-align: center; /* ✅ CENTER */
        margin-bottom: 10px;
        line-height: 1.2;
    }

    .cpp-brand-subtitle {
        font-size: 25px; /* ✅ Increased from 14px */
        text-align: center; /* ✅ CENTER */
    }

    /* Description */
    .cpp-description-content {
        font-size: 15px;
        line-height: 1.7;
        padding: 25px 0;
        text-align: center; /* Keep left for readability */
        margin-bottom: 10px;
    }

    .cpp-description-content p {
        margin-bottom: 15px;
    }

    /* Meta - CENTERED ✅ */
    .cpp-meta-info {
        display: flex;
        flex-direction: column;
        gap: 0px;
        align-items: baseline; /* ✅ CENTER the container */
        margin: 0 auto; /* ✅ CENTER using auto margins */
        padding: 0;
        width: fit-content;
    }

    .cpp-meta-item {
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        align-items: baseline;
        gap: 8px;
        text-align: left;
        width: 100%;
   }

    .cpp-meta-label {
        font-size: 14px; /* ✅ Increased from 13px */
        min-width: 70px;
    }

    .cpp-meta-value {
        font-size: 14px; /* ✅ Increased from 14px */
        font-weight: 700;
    }

    .cpp-meta-bullet {
        font-size: 18px;
    }

    /* Gallery - 2 columns */
    .cpp-gallery-grid {
        gap: 0;
        padding: 15px; /* ✅ Reduced padding */
        min-height: auto;
    }

    /* Navigation */
    .cpp-nav-container {
        padding: 0 20px;
    }

    .cpp-nav-btn {
        padding: 10px 20px;
        font-size: 11px;
    }
}

/* ==========================================================================
   Mobile Medium (480px - 575px)
   ========================================================================== */
@media (max-width: 575px) {
    .cpp-three-column-header {
        padding: 5px 0; /* ✅ Reduced padding */
    }

    .cpp-header-container {
        padding: 0 15px; /* ✅ Reduced padding */
        gap: 0px;
    }

    /* Title - CENTERED & LARGER ✅ */
    .cpp-brand-title {
        font-size: 30px; /* ✅ Increased from 24px */
        text-align: center; /* ✅ CENTER */
        margin-bottom: 8px;
        line-height: 1.5;
    }

    .cpp-brand-subtitle {
        font-size: 20px; /* ✅ Increased from 13px */
        text-align: center; /* ✅ CENTER */
    }

    /* Description */
    .cpp-description-content {
        font-size: 14px;
        line-height: 1.6;
        padding: 25px 0;
        text-align: center; /* Keep left for readability */
        margin-bottom: 10px;
    }

    /* Meta - CENTERED & STACKED ✅ */
    .cpp-meta-info {
        display: flex;
        flex-direction: column;
        gap: 0px;
        align-items: center; /* ✅ CENTER the container */
        margin: 0 auto; /* ✅ CENTER using auto margins */
        padding: 0;
        width: fit-content;
    }

    .cpp-meta-item {
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        align-items: baseline;
        gap: 8px;
        text-align: left;
        width: 100%;
    }

    .cpp-meta-label {
        font-size: 13px;
        min-width: auto;
    }

    .cpp-meta-value {
        font-size: 14px;
    }
    .cpp-meta-bullet {
        font-size: 18px;
    }
    /* Gallery - Single column */
    .cpp-gallery-grid {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 15px; /* ✅ Reduced padding */
        min-height: auto;
    }

    .cpp-gallery-item {
        padding-bottom: 75%;
    }

    /* Navigation */
    .cpp-nav-btn {
        padding: 8px 16px;
        font-size: 10px;
    }
}

/* ==========================================================================
   Mobile Small (< 480px) - CENTERED & COMPACT
   ========================================================================== */
/* ==========================================================================
   Mobile Small (< 480px) - CENTERED & COMPACT
   ========================================================================== */
@media (max-width: 479px) {
    .cpp-header-container {
        padding: 0 15px;
        gap: 0px;
    }

    /* Title - CENTERED ✅ */
    .cpp-brand-title {
        font-size: 26px;
        text-align: center;
        line-height: 1.2;
    }

    .cpp-brand-subtitle {
        font-size: 14px;
        text-align: center;
    }

    /* Description */
    .cpp-description-content {
        font-size: 14px;
        text-align: center;
        margin-bottom: 10px;
    }

    /* Meta - CENTERED ✅ FIXED */
    .cpp-meta-info {
        display: flex;
        flex-direction: column;
        gap: 0px;
        align-items: center; /* ✅ CENTER the container */
        margin: 0 auto; /* ✅ CENTER using auto margins */
        padding: 0;
        width: fit-content; /* ✅ Shrink to content width */
    }

    .cpp-meta-item {
        display: flex;
        flex-direction: row;
        justify-content: flex-start; /* ✅ Align items to start */
        align-items: baseline;
        gap: 6px;
        text-align: left; /* ✅ Left align text within items */
        width: 100%;
    }

    .cpp-meta-bullet {
        font-size: 18px;
        color: #d32f2f;
        font-weight: bold;
        flex-shrink: 0;
    }

    .cpp-meta-label {
        font-size: 13px;
        font-weight: 600;
        color: #1a1a1a;
        min-width: 70px;
        text-align: left;
    }

    .cpp-meta-value {
        font-size: 14px;
        font-weight: 700;
        color: #d32f2f;
    }

    /* Navigation - Icon only */
    .cpp-nav-btn {
        padding: 8px 12px;
    }

    .cpp-nav-text {
        display: inline;
    }

    .cpp-nav-icon {
        font-size: 18px;
    }

    /* Gallery */
    .cpp-gallery-grid {
        gap: 0;
        padding: 15px;
    }
}

/* ==========================================================================
   Mobile Extra Small (< 360px)
   ========================================================================== */
@media (max-width: 359px) {
    .cpp-brand-title {
        font-size: 25px;
        text-align: center; /* ✅ CENTER */
    }

    .cpp-brand-subtitle {
        font-size: 15px;
        text-align: center; /* ✅ CENTER */
    }

    .cpp-description-content {
        font-size: 13px;
    }

    .cpp-nav-container {
        padding: 0 10px;
    }

    .cpp-gallery-grid {
        padding: 10px; /* ✅ Minimal padding */
        gap: 0;
    }
}
/* ==========================================================================
   RESPONSIVE - SINGLE PAGE
   ========================================================================== */

@media (max-width: 992px) {
    .cpp-single-header-section .cpp-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .cpp-single-title {
        font-size: 42px;
    }

    .cpp-gallery-masonry {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .cpp-single-header-section {
        padding: 60px 0 40px;
    }

    .cpp-single-header-section .cpp-container,
    .cpp-container-narrow,
    .cpp-container-wide {
        padding: 0 20px;
    }

    .cpp-single-title {
        font-size: 36px;
    }

    .cpp-single-subtitle {
        font-size: 16px;
    }

    .cpp-description-section {
        padding: 60px 0;
    }

    .cpp-description-text {
        font-size: 16px;
    }

    .cpp-header-meta {
        padding: 30px 20px;
    }
}

@media (max-width: 576px) {
    .cpp-single-title {
        font-size: 28px;
        letter-spacing: -0.5px;
    }

    .cpp-single-subtitle {
        font-size: 14px;
    }

    .cpp-meta-row {
        flex-direction: column;
        gap: 5px;
    }

    .cpp-gallery-section {
        padding: 0 0 60px;
    }

    .cpp-gallery-masonry {
        gap: 15px;
    }
}
/* ==========================================================================
   5. HOMEPAGE PORTFOLIO GRID - WITH GAPS & IMPROVED HOVER
   ========================================================================== */

.cpp-home-portfolio {
    padding: 15px;
    margin: 0;
    width: 100%;
    background: #ffffff;
}

.cpp-home-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px; /* Added spacing between items */
    margin: 0;
    padding: 5px; /* Added padding around grid */
    width: 100%;
    box-sizing: border-box;
}

.cpp-home-grid[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.cpp-home-grid[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

.cpp-home-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1024 / 700;
    background: #ffffff;
    margin: 0;
    box-shadow: 0 2px 8px #ffffff; /* Subtle shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cpp-home-item:hover {
    /* transform: translateY(-5px); Lift effect on hover */
    box-shadow: 0 8px 20px rgba(38, 37, 37, 0.15);
}

.cpp-home-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    position: relative;
    margin: 0;
    padding: 0;
}

/* Home Image - Full Coverage but smaller */
.cpp-home-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    background: #ffffff;
}

.cpp-home-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.5s ease, filter 0.4s ease;
}

/* On hover - slight zoom + light blur instead of opacity */
.cpp-home-item:hover .cpp-home-image img {
    transform: scale(1.05);
    filter: brightness(0.6); /* Darken image instead of opacity */
}

.cpp-home-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
}

/* Home Overlay - Lighter background, image still visible */
.cpp-home-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.7) 100%
    ); /* Gradient overlay - lighter at top */
    display: flex;
    align-items: flex-end; /* Position content at bottom */
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 10;
    pointer-events: none;
    padding: 0 0 30px 0;
}

.cpp-home-item:hover .cpp-home-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* Content inside overlay - positioned at bottom */
.cpp-home-content {
    text-align: center;
    padding: 20px;
    transform: translateY(20px);
    transition: transform 0.4s ease;
    width: 100%;
}

.cpp-home-item:hover .cpp-home-content {
    transform: translateY(0);
}

/* Brand Name - larger and bolder */
.cpp-home-title {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px 0;
    letter-spacing: 0.5px;
    line-height: 1.3;
    text-transform: capitalize;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); /* Text shadow for better readability */
}

/* Category Tag - with backdrop */
.cpp-home-category {
    display: block;
    font-size: 15px;           /* Only difference */
    color: #ffffff;            /* Same as title */
    margin: 0;
    padding: 0;
    letter-spacing: 0.5px;     /* Same as title */
    line-height: 1.3;
    text-transform: lowercase; /* Same as title */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); /* Same shadow */
}

/* Remove all container padding */
.portfolio-homepage-wrapper {
    margin: 0;
    padding: 0;
}

.portfolio-section {
    margin: 0;
    padding: 0;
}

.container-full {
    max-width: 100%;
    margin: 0;
    padding: 0;
    width: 100%;
}

/* Home Pagination - with better spacing */
.cpp-home-pagination {
    text-align: center;
    padding: 40px 20px 60px;
    margin: 0;
    background: #f5f5f5;
}

.cpp-home-pagination .page-numbers {
    display: inline-block;
    padding: 12px 18px;
    margin: 0 5px;
    background: #ffffff;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cpp-home-pagination .page-numbers:hover,
.cpp-home-pagination .page-numbers.current {
    background: #1a1a1a;
    color: #ffffff;
    border-color: #1a1a1a;
    transform: translateY(-2px);
}

.cpp-home-pagination .page-numbers.dots {
    border: none;
    background: transparent;
}

.cpp-home-no-results {
    text-align: center;
    padding: 100px 20px;
    font-size: 18px;
    color: #666;
    background: #f5f5f5;
}

/* Hero Section (Optional) */
.portfolio-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 80px 20px;
    text-align: center;
    color: #ffffff;
    margin: 0;
}

.portfolio-hero h1 {
    font-size: 48px;
    font-weight: 700;
    margin: 0 0 15px 0;
    letter-spacing: -1px;
}

.portfolio-hero p {
    font-size: 18px;
    margin: 0;
    opacity: 0.9;
}

/* ==========================================================================
   RESPONSIVE - HOMEPAGE
   ========================================================================== */

@media (max-width: 1200px) {
    .cpp-home-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 5px;
        padding: 5px;
    }
}

@media (max-width: 992px) {
    .cpp-home-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 5px;
        padding: 5px;
    }
    
    .cpp-home-title {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .cpp-home-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 5px;
        padding: 5px;
    }

    .cpp-home-title {
        font-size: 18px;
    }

    .cpp-home-category {
        font-size: 10px;
        padding: 5px 12px;
    }

    .portfolio-hero h1 {
        font-size: 36px;
    }

    .portfolio-hero p {
        font-size: 16px;
    }
}

@media (max-width: 576px) {
    .cpp-home-grid {
        grid-template-columns: 1fr !important;
        gap: 5px;
        padding: 5px;
    }

    .cpp-home-title {
        font-size: 20px;
    }

    .portfolio-hero {
        padding: 60px 20px;
    }
    
    .cpp-home-content {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .cpp-home-grid {
        grid-template-columns: 1fr !important;
        gap: 5px;
    }
    
    .cpp-home-title {
        font-size: 18px;
    }
}


@media (max-width: 1200px) {
    .cpp-gallery-grid {
        gap: 0;
        padding: 20px 30px;
        max-width: 100%;
    }
}

@media (max-width: 992px) {
    .cpp-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0;
        padding: 20px 30px;
    }
}

@media (max-width: 768px) {
    .cpp-gallery-grid {
        padding: 20px 30px;
        gap: 0;
    }
}

@media (max-width: 576px) {
    .cpp-gallery-grid {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 20px 30px;
    }
    
    .cpp-gallery-item {
        padding-bottom: 75%; /* Keep 4:3 ratio on mobile */
    }
}
/* ==========================================================================
   RESPONSIVE - HOMEPAGE HOVER
   ========================================================================== */

@media (max-width: 992px) {
    .cpp-home-title {
        font-size: 20px;
    }
    
    .cpp-home-category {
        font-size: 10px;
    }
}

@media (max-width: 768px) {
    .cpp-home-title {
        font-size: 18px;
    }
    
    .cpp-home-category {
        font-size: 9px;
    }
    
    .cpp-home-content {
        padding: 15px;
    }
}

@media (max-width: 576px) {
    .cpp-home-title {
        font-size: 20px;
    }
    
    .cpp-home-category {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .cpp-home-title {
        font-size: 18px;
    }
    
    .cpp-home-category {
        font-size: 9px;
    }
}

/* ==========================================================================
   LIGHTBOX LOADING STATE
   ========================================================================== */

.cpp-lightbox-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 10;
}

.cpp-lightbox-loader.active {
    opacity: 1;
    visibility: visible;
}

/* Spinning Circle */
.cpp-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top-color: #1a1a1a;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Image fade-in effect */
.cpp-lightbox-image {
    transition: opacity 0.4s ease;
}

.cpp-lightbox-image.loaded {
    opacity: 1 !important;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .cpp-spinner {
        width: 40px;
        height: 40px;
        border-width: 3px;
    }
}

/* Make all text selectable in single portfolio page */
.cpp-single-portfolio,
.cpp-single-portfolio * {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

/* Specifically target text content areas */
.cpp-brand-title,
.cpp-brand-subtitle,
.cpp-description-content,
.cpp-description-content p,
.cpp-meta-label,
.cpp-meta-value {
    user-select: text !important;
    -webkit-user-select: text !important;
    cursor: text;
}

/* Keep buttons and links with default cursor */
.cpp-rainbow-btn,
.cpp-gallery-item,
.cpp-nav-icon {
    user-select: none;
    -webkit-user-select: none;
    cursor: pointer;
}