/* Projects Layout */
.projects-container {
    padding: 180px 6% 100px;
    background-color: rgb(7, 7, 52)
}

.portfolio-header {
    text-align: center;
    margin-bottom: 80px;
}

.title-reveal {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    color: var(--white);
    margin-bottom: 20px;
}

.subtitle {
    font-weight: 300;
    opacity: 0.6;
    max-width: 600px;
    margin: 0 auto;
}

/* Navbar - Visas direkt */
.navbar.immediate {
    display: flex; justify-content: space-between; align-items: center;
    padding: 30px 6%; position: fixed; width: 100%; z-index: 1000;
    background: linear-gradient(to bottom, rgba(49, 103, 183, 0.256), transparent);
}

.logo { font-family: 'Playfair Display', serif; font-size: 1.8rem; letter-spacing: 3px; }
.dot { color: var(--gold); }
.nav-menu { display: flex; gap: 30px; }
.nav-item { text-decoration: none; color: white; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 2px; opacity: 0.7; }
.nav-item.active { color: var(--gold); opacity: 1; }

/* Grid System */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.project-item {
    position: relative;
    border-radius: 40px; /* Mycket runda hörn för lyxkänsla */
    overflow: hidden;
    height: 450px;
    background: var(--deep-blue);
}

.project-item.featured {
    grid-column: span 2;
    height: 600px;
}

.project-item.wide {
    grid-column: span 2;
    height: 400px;
}

/* Image Wrapper */
.image-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}

/* Overlay Effect */
.project-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(5, 7, 10, 0.9), transparent);
    opacity: 0;
    display: flex;
    align-items: flex-end;
    padding: 50px;
    transition: 0.5s ease;
}

.project-item:hover .project-overlay {
    opacity: 1;
}

.project-item:hover img {
    transform: scale(1.08);
}

.overlay-info span {
    color: var(--gold);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 2px;
}

.overlay-info h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin: 10px 0 20px;
}

.view-case {
    color: white;
    text-decoration: none;
    font-size: 0.8rem;
    border-bottom: 1px solid var(--gold);
    padding-bottom: 5px;
}

/* Responsivitet */
@media (max-width: 900px) {
    .portfolio-grid { grid-template-columns: 1fr; }
    .project-item.featured, .project-item.wide { grid-column: span 1; height: 400px; }
    .title-reveal { font-size: 2.5rem; }
}
@media (max-width: 768px) {
    /* Gör att projektbilderna staplas en och en */
    .matrix-grid {
        grid-template-columns: 1fr !important;
        padding: 0 20px;
    }

    .matrix-item {
        margin-bottom: 30px;
    }

    .matrix-img img {
        height: 300px; /* Fast höjd på mobilen för att det ska se snyggt ut */
        object-fit: cover;
    }
}
@media (max-width: 768px) {
    .desktop-menu { display: none !important; }
    .hamburger { display: flex !important; }
    
    .mobile-menu.active {
        right: 0 !important;
    }
}
/* Modal Bakgrund */
.modal {
    display: none; 
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Mörk genomskinlig bakgrund */
    backdrop-filter: blur(5px);
}

/* Modal Rutan */
.modal-content {
    background-color: #1a1a1a;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #333;
    width: 80%;
    max-width: 800px;
    border-radius: 15px;
    position: relative;
    color: white;
    font-family: 'Inter', sans-serif;
}

/* Stäng-knappen */
.close-modal {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 35px;
    cursor: pointer;
    color: #888;
}

.close-modal:hover { color: white; }

/* Bilden i modalen */
.modal-image {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 20px;
}

.project-tags span {
    background: #333;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-right: 10px;
}
.logo-link {
    text-decoration: none; /* Tar bort understrykning */
    color: inherit;        /* Gör att länken använder samma färg som loggan redan har */
    display: inline-block; /* Gör att hela loggan blir en klickbar yta */
}

.logo-link:hover {
    opacity: 0.8;          /* Ger en liten visuell feedback när man håller musen över */
    transition: 0.3s;
}