/* ================================================
   PORTFOLIO PAGE - Additional Styles
   ================================================ */

/* ====== PORTFOLIO HERO ====== */
.portfolio-hero {
    position: relative;
    padding: 200px 0 120px;
    background: linear-gradient(135deg, #023e8a 0%, #0077b6 100%);
    text-align: center;
    overflow: hidden;
}

.portfolio-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(154, 190, 39, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 40%);
    animation: heroPulse 10s ease-in-out infinite alternate;
}

@keyframes heroPulse {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
    }
}

.portfolio-hero-bg {
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0l25.98 15v30L30 60 4.02 45V15z' fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='1'/%3E%3C/svg%3E");
    background-size: 60px 60px;
    opacity: 0.6;
    animation: bgSlide 60s linear infinite;
}

@keyframes bgSlide {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 60px 60px;
    }
}

.portfolio-hero h1 {
    color: var(--white);
    margin-bottom: 1.5rem;
    position: relative;
    font-size: 3.5rem;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: fadeUp 0.8s ease-out;
}

.portfolio-hero p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.35rem;
    position: relative;
    max-width: 700px;
    margin: 0 auto;
    animation: fadeUp 0.8s ease-out 0.2s backwards;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ====== FILTER TABS (Premium Glassmorphism) ====== */
.portfolio-filters {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    padding: 1.5rem 0;
    position: sticky;
    top: 70px;
    z-index: 100;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(154, 190, 39, 0.1);
    transition: all 0.3s ease;
}

.filter-tabs {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.filter-btn:hover {
    background: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    color: var(--green-lime);
}

.filter-btn.active {
    background: var(--gradient-primary);
    color: var(--text-dark);
    border-color: transparent;
    box-shadow: 0 8px 25px rgba(154, 190, 39, 0.3);
    transform: translateY(-2px);
}

.filter-icon {
    font-size: 1.2rem;
}

.filter-icon-img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    flex-shrink: 0;
}

/* ====== GEOMETRIC GALLERY GRID ====== */
.portfolio-section {
    padding: 60px 0 var(--section-padding);
    background: var(--light-bg);
    position: relative;
}

.masonry-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    grid-auto-flow: dense;
    position: relative;
}

/* Decorative transparent accent (bottom-right) */
.masonry-grid::after {
    content: '';
    position: absolute;
    bottom: 15%;
    right: 8%;
    width: 80px;
    height: 80px;
    border: 3px solid rgba(154, 190, 39, 0.25);
    background: rgba(154, 190, 39, 0.05);
    z-index: 0;
    pointer-events: none;
}

/* ====== GEOMETRIC OVERLAYS (Overlapping Style) ====== */
/* Transparent colored blocks that overlap images */



/* Overlapping Green Blocks */
.portfolio-item:nth-child(5n+1)::after {
    content: '';
    position: absolute;
    top: -30%;
    left: -30%;
    width: 80%;
    height: 80%;
    background: rgba(154, 190, 39, 0.4);
    z-index: 2;
    pointer-events: none;
    backdrop-filter: blur(2px);
    mix-blend-mode: overlay;
}

/* Overlapping Blue Blocks */
.portfolio-item:nth-child(4n+3)::before {
    content: '';
    position: absolute;
    bottom: -20%;
    right: -20%;
    width: 70%;
    height: 100%;
    background: rgba(0, 119, 182, 0.35);
    z-index: 2;
    pointer-events: none;
    backdrop-filter: blur(2px);
    mix-blend-mode: overlay;
}

/* Connecting Lines (White/Light) */
.portfolio-item:nth-child(3n)::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -50%;
    width: 150%;
    height: 150%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    z-index: 3;
    pointer-events: none;
    transform: rotate(45deg);
}

/* Accent Dark Blue Squares */
.portfolio-item:nth-child(7n)::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 10%;
    width: 40px;
    height: 40px;
    background: rgba(2, 62, 138, 0.6);
    z-index: 3;
    pointer-events: none;
}

/* ====== COLORFUL DECORATIVE LINES ====== */

/* Horizontal colored lines */
.portfolio-item:nth-child(2n)::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -30px;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #9abe27, transparent);
    z-index: -1;
    pointer-events: none;
}

.portfolio-item:nth-child(3n)::after {
    content: '';
    position: absolute;
    top: 30%;
    right: -25px;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #0077b6, transparent);
    z-index: -1;
    pointer-events: none;
}

/* Vertical colored lines */
.portfolio-item:nth-child(5n)::before {
    content: '';
    position: absolute;
    bottom: -25px;
    left: 40%;
    width: 3px;
    height: 50px;
    background: linear-gradient(180deg, transparent, #023e8a, transparent);
    z-index: -1;
    pointer-events: none;
}

.portfolio-item:nth-child(4n+1)::after {
    content: '';
    position: absolute;
    top: -25px;
    right: 30%;
    width: 3px;
    height: 50px;
    background: linear-gradient(180deg, transparent, #9abe27, transparent);
    z-index: -1;
    pointer-events: none;
}

/* Diagonal accent lines */
.portfolio-item:nth-child(6n)::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #0077b6 50%, transparent);
    transform: rotate(-45deg);
    z-index: -1;
    pointer-events: none;
}

.portfolio-item:nth-child(7n)::after {
    content: '';
    position: absolute;
    bottom: -15px;
    right: -15px;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #9abe27 50%, transparent);
    transform: rotate(45deg);
    z-index: -1;
    pointer-events: none;
}

/* Cross connectors in gaps */
.portfolio-item:nth-child(8n+4)::before {
    content: '+';
    position: absolute;
    top: -20px;
    left: -20px;
    font-size: 24px;
    font-weight: 300;
    color: rgba(154, 190, 39, 0.3);
    z-index: -1;
    pointer-events: none;
}

/* Small accent dots */
.portfolio-item:nth-child(9n+2)::after {
    content: '';
    position: absolute;
    top: -10px;
    right: -10px;
    width: 8px;
    height: 8px;
    background: #0077b6;
    border-radius: 50%;
    opacity: 0.4;
    z-index: -1;
    pointer-events: none;
}

.portfolio-item:nth-child(10n+5)::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: -10px;
    width: 8px;
    height: 8px;
    background: #9abe27;
    border-radius: 50%;
    opacity: 0.4;
    z-index: -1;
    pointer-events: none;
}

/* ====== PORTFOLIO ITEM - DIAMOND STYLE ====== */
/* ====== PORTFOLIO ITEM - DIAMOND STYLE ====== */
.portfolio-item {
    position: relative;
    overflow: visible;
    /* Allow overlays to overlap */
    background: transparent;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    z-index: 1;
}

/* Media Container - Holds the Diamond Shape */
.portfolio-media {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* Clips the image to the shape */
    background: var(--white);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-media img,
.portfolio-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Diamond Shapes on Media */
.portfolio-item:not(.video) .portfolio-media {
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    aspect-ratio: 1;
}

.portfolio-item.large .portfolio-media {
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.portfolio-item.video .portfolio-media {
    clip-path: polygon(0 0, 100% 0, 100% 85%, 85% 100%, 0 100%);
    aspect-ratio: 16/9;
}

/* Video Dark Overlay - Shows brand color tint before playing */
.portfolio-item.video .portfolio-media video {
    background: linear-gradient(135deg, rgba(0, 84, 146, 0.3), rgba(10, 31, 20, 0.5));
}

.portfolio-item.video .portfolio-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 84, 146, 0.4), rgba(10, 31, 20, 0.6));
    z-index: 2;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.portfolio-item.video:hover .portfolio-media::after {
    opacity: 0.3;
}

/* Remove clip-path from item container */
.portfolio-item:not(.video) {
    aspect-ratio: 1;
    transform: rotate(0deg);
}

.portfolio-item.large {
    grid-column: span 2;
    grid-row: span 2;
    aspect-ratio: 1;
}

.portfolio-item.video {
    aspect-ratio: 16/9;
    grid-column: span 2;
}

/* Hover effects targeting media */
.portfolio-item:hover {
    z-index: 10;
}

.portfolio-item:hover .portfolio-media {
    transform: scale(1.05);
    box-shadow:
        0 25px 60px rgba(0, 84, 146, 0.25),
        0 0 0 4px rgba(154, 190, 39, 0.3),
        inset 0 0 0 2px rgba(255, 255, 255, 0.6);
}

/* Border glow effect on MEDIA */
.portfolio-media::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(154, 190, 39, 0.3), rgba(0, 84, 146, 0.3));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.portfolio-item:hover .portfolio-media::before {
    opacity: 1;
}

/* Shine Effect on MEDIA */
.portfolio-media::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.4) 100%);
    transform: skewX(-25deg);
    transition: none;
    pointer-events: none;
    z-index: 2;
}

.portfolio-item:hover .portfolio-media::after {
    left: 200%;
    transition: left 0.6s ease-in-out;
}

/* Video Play Button */
.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 5;
    backdrop-filter: blur(5px);
}

.video-play-btn::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.4s ease;
}

.portfolio-item:hover .video-play-btn::before {
    opacity: 1;
    transform: scale(1);
}

.video-play-btn svg {
    width: 32px;
    height: 32px;
    color: var(--green-dark);
    margin-left: 4px;
    transition: transform 0.3s ease;
}

.portfolio-item:hover .video-play-btn {
    transform: translate(-50%, -50%) scale(1.15);
    background: var(--green-lime);
    box-shadow: 0 15px 50px rgba(154, 190, 39, 0.5);
}

.portfolio-item:hover .video-play-btn svg {
    color: var(--white);
    transform: scale(1.1);
}

/* Info Section (hidden in this design) */
.portfolio-info {
    display: none;
}

/* ====== CTA SECTION ====== */
.portfolio-cta-section {
    padding: 80px 0;
    background: var(--gradient-hero);
}

.cta-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

/* ====== SCROLL REVEAL UTILITIES ====== */
.reveal-hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.5, 0, 0, 1), transform 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-hidden.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Premium Selection Style - Matches main style.css */
::selection {
    background: var(--green-lime);
    color: var(--white);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 5px;
    border: 2px solid #f1f1f1;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--green-lime);
}


.cta-content h2 {
    color: var(--white);
    margin-bottom: 1rem;
}

.cta-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 1200px) {
    .masonry-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
}

@media (max-width: 1024px) {
    .masonry-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .portfolio-item.large {
        grid-column: span 2;
        grid-row: span 2;
    }

    .portfolio-item.video {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .portfolio-hero {
        padding: 150px 0 80px;
    }

    .filter-tabs {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    .filter-btn .filter-icon,
    .filter-btn .filter-icon-img {
        display: none;
    }

    .masonry-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .portfolio-item.large {
        grid-column: span 1;
        grid-row: span 1;
    }

    .portfolio-item.video {
        grid-column: span 2;
    }

    .video-play-btn {
        width: 60px;
        height: 60px;
    }

    .video-play-btn svg {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 480px) {
    .filter-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        flex-wrap: nowrap;
    }

    .filter-btn {
        flex-shrink: 0;
    }

    .masonry-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

/* Force Light Mode for Portfolio Page */
body {
    background-color: var(--light-bg);
    color: var(--text-dark);
}