:root { 
    --unit: 200px; /* Από 80px το πάμε 200px */
    --panel-width: 400px;
}

body, html { 
    margin: 0; 
    padding: 0; 
    background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6));
    background-size: cover, 400px; /* Ρύθμισε το μέγεθος του μοτίβου εδώ */
    background-repeat: repeat;
    background-attachment: fixed;
    background-color: #111; /* Fallback αν αργήσει να φορτώσει */
    width: 100%;
    height: 100%; 
    overflow: hidden; 
    font-family: 'Inter', sans-serif; 
    color: white; 
}
body {
    display: flex;
    flex-direction: column;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5); /* Σκουραίνει το μοτίβο */
    z-index: -1;
}
/* UI ELEMENTS */
#main-logo { position: fixed; top: 40px; left: 40px; z-index: 5000; font-weight: 800; font-size: 1.2rem; letter-spacing: 2px; text-transform: uppercase; pointer-events: none; }
#lang-switcher {
/*    position: fixed;
    top: 25px;
    right: 80px; *//* Προσαρμόστε ανάλογα με το burger menu σας */
 /*   z-index: 2000;*/
    font-family: sans-serif;
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

.lang-btn {
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.lang-btn.active {
    opacity: 1;
    border-bottom: 2px solid #333;
}

.lang-btn:hover {
    opacity: 1;
}

.separator {
    margin: 0 5px;
    color: #ccc;
}
#main-footer { position: fixed; bottom: 30px; left: 0; width: 100%; z-index: 5000; display: flex; justify-content: space-between; padding: 0 40px; box-sizing: border-box; font-size: 0.8rem; }
.social-links a { color: white; text-decoration: none; margin-right: 20px; opacity: 0.6; transition: 0.3s; }

/* CANVAS & MASK LOGIC */
 #viewport {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
    margin: 0;
    padding: 0;
    touch-action: none;
    cursor: grab;

    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}
#container { 
    position: absolute; 
    top: 0;
    left: 0;
    width: 1px; 
    height: 1px; 
    transform-origin: 0 0 !important; 
    display: block;
}

.grid-item { 
    position: absolute; 
    width: var(--unit); 
    height: var(--unit); 
    padding: 4px; 
    box-sizing: border-box; 
    pointer-events: auto; /* Αλλά οι εικόνες μέσα του πιάνουν κανονικά! */
}
/*.inner-content { 
    width: 100%; 
    height: 100%; 
    background: #111; 
    border-radius: 4px; 
    overflow: hidden; 
    cursor: pointer; 
}
.inner-content img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.5s ease, filter 0.5s ease;
}
.inner-content:hover img { 
    filter: brightness(1.1); 
    transform: scale(1.1);
}*/

/*
2.html------------------------------------------
*/
#masonry-grid {
    margin: 80px auto 0 auto; /* Margin top για να αναπνέει κάτω από το logo */
    width: 100%;
    max-width: 100%; /* Πιάνει όλο το πλάτος */
    flex-grow: 1;      /* Παίρνει όλο τον διαθέσιμο χώρο */
    overflow-y: auto;  /* Ενεργοποιεί το κάθετο scroll μόνο εδώ */
    padding: 0;
    /* Smooth scrolling για ωραία αίσθηση */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}
.grid {
    margin: 0 auto;
    max-width: 1400px; /* Ή όσο θέλεις */
}

/* Το κάθε έργο */
.grid2-item {
    width: 33.333%; /* 3 στήλες */
    margin: 0;      /* Μηδενικό margin */
    padding: 0;     /* Μηδενικό padding */
    float: left;
    position: relative;
    overflow: hidden;
}

.grid2-item img {
    display: block; /* Εξαφανίζει το κενό στη βάση της εικόνας */
    width: 100%;
    height: auto;   /* Διατηρεί την αναλογία για το ασύμμετρο εφέ */
    transition: transform 0.5s ease;
}

/* Το Slide-in Μενού */
.project-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 2;
}

/* Τυχαία κατεύθυνση εισόδου μέσω κλάσεων που θα βάζει η JS */
.slide-from-top    { transform: translateY(-100%); }
.slide-from-bottom { transform: translateY(100%); }
.slide-from-left   { transform: translateX(-100%); }
.slide-from-right  { transform: translateX(100%); }

.grid2-item:hover .project-overlay {
    opacity: 1;
    transform: translate(0, 0); /* Μηδενίζει την όποια τυχαία κατεύθυνση */
}

/*.grid2-item:hover img {
    transform: scale(1.05);
}*/

.view-btn {
    padding: 10px 20px;
    border: 1px solid white;
    background: transparent;
    color: white;
    cursor: pointer;
    margin-top: 15px;
    text-transform: uppercase;
}
/*
-------------------------------------------------
*/
/* UI BUTTONS */
/* Το κουμπί με Glassmorphism */
.ui-btn { 
    position: fixed; 
    z-index: 11000; 
    cursor: pointer; 
        background: rgba(255, 255, 255, 0.36) !important;
    backdrop-filter: blur(25px) saturate(180%) brightness(110%) !important; 
    -webkit-backdrop-filter: blur(25px) saturate(180%) brightness(110%) !important;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    width: 55px; 
    height: 55px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.3); 
    flex-direction: column; 
    gap: 4px;
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

#main-burger-btn { 
    top: 30px; 
    right: 30px; 
}
#left-burger-btn { 
    top: 30px; 
    left: 30px; 
    display: none;
    position: absolute; /* Βγαίνουν από το flow του flexbox */
    z-index: 10010;
}
#close-project { 
    top: 30px; 
    right: 30px; 
    /*color: #000;*/ 
    font-size: 22px; 
    font-weight: bold; 
}

/* Οι γραμμές */
.line { 
    width: 22px; 
    height: 2px; 
    background: #fff; 
    transition: all 0.3s ease; /* Για να κουνιούνται ομαλά */
}

/* ΤΟ ANIMATION: Όταν προστίθεται η κλάση .open μέσω JS */
#main-burger-btn.open .line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

#main-burger-btn.open .line:nth-child(2) {
    opacity: 0;
}

#main-burger-btn.open .line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* PANELS & OVERLAYS */
#main-nav-overlay { 
    position: fixed; 
    inset: 0; 
    background: rgba(0,0,0,0.8); 
    backdrop-filter: blur(15px); 
    -webkit-backdrop-filter: blur(15px); 
    z-index: 4000; 
    display: none; 
    opacity: 0; 
    align-items: center; 
    justify-content: center;
    /* Διασφάλιση για κινητά */
    -webkit-appearance: none;
}

.nav-links { 
    list-style: none !important; /* Force αφαίρεση τελείας */
    list-style-type: none !important;
    padding: 0;
    margin: 0;
    text-align: center;
    width: 100%;
}

.nav-links li { 
    list-style: none !important; /* Force αφαίρεση τελείας και στο li */
    list-style-type: none !important;
    margin: 30px 0;
    padding: 0;
}

.nav-links a { 
    color: white; 
    text-decoration: none; 
    font-size: 2.5rem; 
    font-weight: 200; 
    cursor: pointer; 
    transition: opacity 0.3s ease; 
    /* Εμποδίζει το γκρίζο highlight στο πάτημα στα κινητά */
    -webkit-tap-highlight-color: transparent;
}
.nav-links a:hover { 
    opacity: 0.5; /* Γίνεται λίγο πιο αχνό στο hover */
}
.slide-panel { position: fixed; top: 0; width: var(--panel-width); height: 100%; background: rgba(15, 15, 15, 0.98); backdrop-filter: blur(30px); z-index: 12000; left: calc(var(--panel-width) * -1); padding: 100px 40px; box-sizing: border-box; transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1); }
.slide-panel.active { transform: translateX(100%); }
.panel-close-x { 
    position: absolute; 
    top: 30px; 
    right: 25px; 
    width: 45px; 
    height: 45px; 
    background: rgba(255, 255, 255, 0.36) !important;
    backdrop-filter: blur(25px) saturate(180%) brightness(110%) !important; 
    -webkit-backdrop-filter: blur(25px) saturate(180%) brightness(110%) !important;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    font-size: 20px; 
    font-weight: bold; 
    cursor: pointer; 
}

#project-overlay {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 10000;
    display: none; /* Γίνεται flex μέσω JS */
    opacity: 0;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Αποφυγή scroll κατά το zoom */
}
.nav-btn {
    position: absolute; /* Επιστροφή σε absolute σε σχέση με το overlay */
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.36) !important;
    backdrop-filter: blur(25px) saturate(180%) brightness(110%) !important; 
    -webkit-backdrop-filter: blur(25px) saturate(180%) brightness(110%) !important;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    z-index: 10010; 
    cursor: pointer;
    transition: 0.3s;
}

/* Κλείδωμα στις άκρες - Χρήση των πλευρών του overlay */
.nav-btn.prev {
    left: 20px !important;
    right: auto !important;
}

.nav-btn.next {
    right: 20px !important;
    left: auto !important;
}

.nav-btn:hover {
    background: #fff;
    color: #000;
}

/* Αν το info-panel είναι ανοιχτό, κρύβουμε το αριστερό βέλος για να μην πέφτει πάνω του */
#info-panel.active ~ #project-overlay .nav-btn.prev { opacity: 0; pointer-events: none; }
/* Στυλ για τα στοιχεία μέσα στο info-panel */
.project-meta {
    margin-top: 20px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.project-meta p {
    font-size: 0.85rem;
    color: #888;
    margin: 8px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    justify-content: space-between;
}

.project-meta span {
    color: #fff; /* Ή μαύρο αν το panel σου είναι λευκό */
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
}

#project-description {
    margin-top: 25px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #ccc;
    font-weight: 300;
}
.full-img-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* Η μαγεία του κεντραρίσματος */
    display: flex;
    align-items: center;      /* Κάθετο κέντρο */
    justify-content: center;   /* Οριζόντιο κέντρο */
    
    pointer-events: none;      /* Για να μην "τρώει" τα κλικ των κουμπιών */
}
#full-img {
    position: relative;
    max-width: 90%;
    max-height: 75vh;
    width: auto;
    height: auto;
    object-fit: contain;
    z-index: 10001;
    display: block;
    margin: 0 auto;
    left: 0;
    pointer-events: auto;

    /* Αφήνουμε μόνο το transform στο CSS transition */
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1); 
    will-change: transform, opacity;
    
    /* Ξεκινάει πάντα από 0 για να το ελέγξει το JS */
    opacity: 0; 
}

#full-img[style*="cursor: zoom-in"]:hover {
    transform: scale(1.02);
}
/* Ο Spinner (Loader) */
.full-img-wrapper::after {
    content: "";
    position: absolute;
    width: 45px;
    height: 45px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none; /* Κρυφό μέχρι να μπει το class .loading */
    z-index: 10000;
}

/* Ενεργοποίηση loader */
.full-img-wrapper.loading::after {
    display: block;
}

/* Animation περιστροφής */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.lazy-img {
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.lazy-img.loaded {
    opacity: 1;
}


/* Στο Media Query για κινητά, χαμηλώνουμε λίγο το ύψος για σιγουριά */
/*@media (min-width: 769px) {
    #viewport {
        -webkit-mask-image: url('https://projecteffie.online/uploads/original/kelogo-transparent.svg');
        mask-image: url('https://projecteffie.online/uploads/original/kelogo-transparent.svg');
        -webkit-mask-size: 90% auto;
        mask-size: 90% auto;
    }
}*/
@media (max-width: 768px) {
    #viewport {
        /* Εδώ βάζεις το link για τη mobile μάσκα σου */
        -webkit-mask-image: url('https://projecteffie.online/uploads/original/kelogomobile.svg');
        mask-image: url('https://projecteffie.online/uploads/original/kelogomobile.svg');
        -webkit-mask-size: 80% auto;
        mask-size: 80% auto;
        -webkit-mask-position: 50% 25%;
        mask-position: 50% 25%;
    }
    .nav-btn {
        width: 50px;
        height: 50px;
        font-size: 24px;
        background: rgba(0, 0, 0, 0.6); /* Πιο σκούρο για να ξεχωρίζει στην μικρή οθόνη */
    }
    .nav-btn.prev { left: 10px !important; }
    .nav-btn.next { right: 10px !important; }
    
    /* Σιγουρευόμαστε ότι η εικόνα δεν τα σπρώχνει */
    #full-img {
        max-width: 85%; /* Μειώνουμε λίγο το πλάτος για να μην πέφτει πάνω στα βέλη */
    }
    /* ΔΙΟΡΘΩΣΗ ΓΙΑ ΤΟ MENU ΣΤΑ ΚΙΝΗΤΑ */
    .nav-links a { 
        font-size: 1.8rem; /* Μειώνουμε λίγο το μέγεθος για να χωράνε άνετα οι λέξεις */
        font-weight: 300;  /* Λίγο πιο έντονο για καλύτερη ανάγνωση σε μικρή οθόνη */
    }
    .nav-links li { 
        margin: 20px 0;    /* Μειώνουμε ελάχιστα το κενό ανάμεσα στα links */
    }

    #main-nav-overlay {
        padding: 20px;     /* Προσθέτουμε λίγο "αέρα" γύρω-γύρω */
    }
    .grid2-item {
        width: 50%; /* 2 στήλες στα tablet */
    }    
}
@media (max-width: 480px) {
    .grid2-item {
        width: 100%; /* 1 στήλη στα κινητά */
    }
}