.portfolio-hero {
    position: relative;
    width: 100%;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: transparent;
    border-bottom: 3px solid var(--nav-border);
    transition: background 0.4s ease, border-color 0.4s ease;
}

body.light-mode .portfolio-hero {
    background: transparent;
}

.portfolio-hero .hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: url('../images/Banner1.jpg') center center / cover no-repeat;
    opacity: 0.15;
    transition: opacity 0.2s ease;
}

body.light-mode .portfolio-hero .hero-background {
    opacity: 0.15;
}

.portfolio-hero-content {
    position: relative;
    z-index: 5;
    text-align: center;
    max-width: 800px;
    padding: 4rem 2rem;
}

.portfolio-hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.05em;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5), 0 0 40px rgba(26, 35, 126, 0.8);
    transition: color 0.4s ease, text-shadow 0.4s ease;
}

.portfolio-hero-content p {
    font-size: 1.3rem;
    font-family: 'Orbitron', sans-serif;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.03em;
    transition: color 0.4s ease;
}

body.light-mode .portfolio-hero-content h1 {
    color: #000000;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.3), 0 0 40px rgba(100, 181, 246, 0.5);
}

body.light-mode .portfolio-hero-content p {
    color: #000000;
}

.portfolio-filters {
    background: transparent;
    padding: 4rem 2rem 4rem 2rem;
    position: relative;
    z-index: 100;
    transition: background 0.4s ease;
}

.portfolio-filters .filter-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 2rem;
    background: transparent;
    border: 2px solid #b71c1c;
    color: var(--text-primary);
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.4s ease, border-color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease, color 0.4s ease;
}

.filter-btn:hover {
    border-color: #b71c1c;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(183, 28, 28, 0.3);
}

.filter-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 8px rgba(183, 28, 28, 0.3);
}

.filter-btn.active {
    background: #b71c1c;
    color: #ffffff;
    border-color: #b71c1c;
    box-shadow: 0 8px 20px rgba(183, 28, 28, 0.4);
}

.portfolio-grid {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

.no-results-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    color: var(--text-secondary);
}

.no-results-message p {
    margin: 0;
}

.portfolio-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: var(--nav-bg);
    border: 2px solid var(--nav-border);
    transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
    cursor: pointer;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    border-color: var(--hero-gradient-color);
    box-shadow: 0 15px 40px rgba(26, 35, 126, 0.4);
}

.portfolio-image {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.8) 60%, transparent 100%);
    padding: 2rem;
    transform: translateY(60%);
    transition: transform 0.4s ease, background 0.4s ease;
}

.portfolio-item:hover .portfolio-overlay {
    transform: translateY(0);
}

.portfolio-overlay h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
    transition: color 0.4s ease;
}

.portfolio-overlay p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.6;
    transition: color 0.4s ease;
}

.portfolio-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.portfolio-tags span {
    padding: 0.4rem 0.8rem;
    background: rgba(26, 35, 126, 0.8);
    color: #ffffff;
    font-size: 0.8rem;
    font-family: 'Orbitron', sans-serif;
    border-radius: 4px;
    border: 1px solid var(--hero-gradient-color);
    transition: background 0.4s ease, color 0.4s ease, transform 0.4s ease, border-color 0.4s ease;
}

.portfolio-item.hide {
    display: none;
}

.portfolio-item.show {
    animation: fadeInScale 0.5s ease forwards;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.portfolio-cta {
    background: transparent;
    padding: 5rem 2rem;
    text-align: center;
    border-top: none;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.cta-content h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-btn {
    padding: 1rem 2.5rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cta-btn.primary {
    background: #e53935;
    color: #ffffff;
    border: 2px solid #000000;
}

.cta-btn.primary:hover {
    background: #c62828;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(229, 57, 53, 0.4);
}

.cta-btn.secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--nav-border);
}

.cta-btn.secondary:hover {
    border-color: var(--hero-gradient-color);
    background: rgba(26, 35, 126, 0.1);
    transform: translateY(-3px);
}

body.light-mode .portfolio-hero {
    background: transparent;
}

body.light-mode .portfolio-overlay {
}

body.light-mode .portfolio-overlay h3 {
    color: #000000;
}

body.light-mode .portfolio-overlay p {
    color: rgba(0, 0, 0, 0.8);
}

body.light-mode .portfolio-tags span {
    background: rgba(26, 35, 126, 0.15);
    color: #1a237e;
}

body.light-mode .portfolio-filters {
    background: transparent;
}

body.light-mode .cta-btn.primary {
    background: #1976D2;
    border: 2px solid #0D47A1;
    color: #ffffff;
}

body.light-mode .cta-btn.primary:hover {
    background: #1565C0;
    box-shadow: 0 10px 25px rgba(25, 118, 210, 0.4);
}

body.light-mode .filter-btn {
    border-color: #64B5F6;
}

body.light-mode .filter-btn:hover {
    border-color: #64B5F6;
    box-shadow: 0 8px 16px rgba(100, 181, 246, 0.3);
}

body.light-mode .filter-btn:active {
    box-shadow: 0 4px 8px rgba(100, 181, 246, 0.3);
}

body.light-mode .filter-btn.active {
    background: #64B5F6;
    color: #ffffff;
    border-color: #64B5F6;
    box-shadow: 0 8px 20px rgba(100, 181, 246, 0.4);
}

@media (max-width: 768px) {
    .portfolio-hero-content h1 {
        font-size: 2rem;
    }

    .portfolio-hero-content p {
        font-size: 1rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        padding: 2rem 1rem;
        gap: 1.5rem;
    }

    .portfolio-image {
        height: 300px;
    }

    .filter-container {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .cta-content h2 {
        font-size: 1.8rem;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .cta-btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .portfolio-hero {
        min-height: 40vh;
    }

    .portfolio-hero-content h1 {
        font-size: 1.5rem;
    }

    .portfolio-overlay {
        padding: 1.5rem;
    }

    .portfolio-overlay h3 {
        font-size: 1.2rem;
    }
}
