/* --- CSS VARIABLES & THEME (ΜΠΛΕΓΚΡΙ & ΜΠΟΡΝΤΟ) --- */
:root {
    --primary: #475569;       
    --primary-dark: #263238;  
    --secondary: #be2121;     
    --dark: #0f172a;          
    --light: #f8fafc;         
    --white: #ffffff;
    --gradient: linear-gradient(135deg, #37474f 0%, #546e7a 100%);
    --shadow: 0 10px 30px -10px rgba(0,0,0,0.1);
    --link-grey : #8899a6;
}

/* --- RESET --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden;}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--primary-dark);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

a { text-decoration: none; transition: all 0.3s ease; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* --- UTILITIES --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding { padding: 100px 0; }

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn-primary {
    background: var(--secondary);
    color: var(--white);
}

.btn-primary:hover {
    background: #800000;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(160, 26, 26, 0.3);
}

.btn-outline {
    border: 2px solid var(--white);
    color: var(--white);
    margin-left: 10px;
}

.btn-outline:hover {
    background: var(--white);
    color: var(--primary);
}

header.scrolled .nav-links a.btn-primary {
    color: var(--secondary) !important;
    background: transparent;
    box-shadow: none;
}

/* Hover effect */
header.scrolled .nav-links a.btn-primary:hover {
    background: var(--secondary);
    color: var(--white) !important;
}

/* --- HEADER --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: 0.4s;
    padding: 20px 0;
    background: transparent;
}

header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
    backdrop-filter: blur(10px);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -1px;
}

.logo span { color: var(--secondary); }

header.scrolled .logo { color: var(--primary-dark); }

.nav-links { display: flex; gap: 30px; }

.nav-links a {
    color: var(--white);
    font-weight: 600;
    font-size: 1.0rem;
    position: relative;
}

header.scrolled .nav-links a { color: var(--dark); }

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: var(--secondary);
    transition: 0.3s;
}

.nav-links a:hover::after { width: 100%; }

/* Mobile Menu */
.hamburger { display: none; color: var(--white); font-size: 1.5rem; cursor: pointer; }
header.scrolled .hamburger { color: var(--dark); }

/* --- HERO SECTION --- */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(55, 71, 79, 0.8), rgba(55, 71, 79, 0.7)), url(images/class.avif);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    position: relative;
    padding-top: 60px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    color: rgba(255,255,255,0.9);
    animation: fadeInUp 1.2s ease;
}

/* Waves SVG */
.custom-shape-divider-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
}

.custom-shape-divider-bottom svg {
    position: relative;
    display: block;
    width: calc(123% + 1.3px);
    height: 120px;
    transform: rotateY(180deg);
}

.custom-shape-divider-bottom .shape-fill {
    fill: var(--white);
}

/* --- ABOUT & BIO SECTION --- */
.about-section { position: relative; }

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 15px;
}

.section-header .line {
    width: 80px;
    height: 4px;
    background: var(--secondary);
    margin: 0 auto;
    border-radius: 2px;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p { margin-bottom: 20px; color: #555; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.stat-item {
    text-align: center;
    background: var(--light);
    padding: 20px;
    border-radius: 10px;
}

.stat-item h3 { font-size: 2rem; color: var(--primary); }
.stat-item span { font-size: 0.9rem; font-weight: 600; }

.about-img-wrapper {
    position: relative;
}

.about-img-wrapper img {
    border-radius: 20px;
    box-shadow: 20px 20px 0px rgba(55, 71, 79, 0.2);
}

/* Bio Specific Styles */
.bio-container {
    display: flex;
    align-items: center;
    gap: 50px;
    margin-top: 60px;
    background: var(--light);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.bio-image-box {
    flex: 0 0 300px;
    position: relative;
}

.bio-image-box img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    object-position: center 30%;
    border-radius: 15px;
    border: 4px solid var(--white);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.bio-content h3 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--primary);
}

.bio-subtitle {
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 20px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

/* --- LANGUAGES & PROGRAMS --- */
.languages { background: #f0f4f8; }

.program-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.card {
    background: var(--white);
    border-radius: 15px;
    padding: 40px 30px;
    transition: 0.4s;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient);
}

.card-icon {
    width: 70px;
    height: 70px;
    background: #f0f4f8;
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
}

.flag-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card h3 { margin-bottom: 15px; color: var(--primary-dark); }
.card ul { margin-top: 15px; }
.card ul li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    color: #555;
}
.card ul li i { color: var(--secondary); margin-right: 10px; font-size: 0.8rem; }

/* --- TRAVELS SECTION --- */
.travels {
    background: var(--white);
}

.travels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.travel-item {
    position: relative;
    height: 300px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    cursor: pointer;
}

.travel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

.travel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 20px;
    color: var(--white);
}

.travel-overlay h4 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: var(--white);
}

.travel-overlay p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* --- EXAMS --- */
.exams { text-align: center; background: #f0f4f8; }

.exams-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.exam-logo {
    font-weight: 800;
    font-size: 1.5rem;
    color: #555;
    padding: 20px 40px;
    border: 2px solid #ccc;
    border-radius: 10px;
    transition: 0.3s;
    background: #fff;
}

.exam-logo:hover {
    border-color: var(--secondary);
    color: var(--secondary);
    transform: translateY(-5px);
}

/* --- CONTACT SECTION & MAP --- */
.contact {
    background: var(--dark);
    color: var(--white);
    position: relative;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    margin-bottom: 50px;
}

.contact-info h3 { font-size: 2rem; margin-bottom: 10px; color: var(--white); }
.contact-info p { margin-bottom: 30px; color: #aaa; }

.info-box {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
}

.info-box i {
    color: var(--secondary);
    font-size: 1.5rem;
    margin-right: 20px;
    margin-top: 5px;
}

.info-box h4 { color: var(--white); margin-bottom: 5px; }
.info-box span { color: #ccc; font-size: 0.95rem; }

.contact-form {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    color: var(--dark);
}

.form-group { margin-bottom: 20px; }

.form-group input, .form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    background: #f9f9f9;
    transition: 0.3s;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--secondary);
    background: #fff;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.submit-btn:hover { opacity: 0.9; }

/* MAP STYLE */
.map-title {
    text-align: center;
    font-size: 2rem;
    color: var(--white); /* White text επειδή το φόντο είναι σκούρο */
    margin-bottom: 20px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.map-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--secondary);
    margin: 10px auto 0;
    border-radius: 2px;
}

.map-container {
    width: 100%;
    height: 400px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    margin-top: 10px;
    border: 4px solid var(--white);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* --- FOOTER --- */
footer {
    background: #0b1120;
    color: #8899a6;
    padding: 50px 0 20px;
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 { color: var(--white); margin-bottom: 20px; }

.footer-col ul li { margin-bottom: 10px; }

.footer-col ul li a {
    color: var(--link-grey);
}

.footer-col ul li a:visited {
    color: var(--link-grey);
}

.footer-col ul li a:hover { color: var(--secondary); }

.copyright {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
}

/* --- PHILOSOPHY SECTION STYLE --- */
.philosophy-section {
    background-color: var(--white);
    position: relative;
}

.philosophy-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    background: var(--light); /* Απαλό γκρι φόντο */
    padding: 60px 40px;
    border-radius: 20px;
    position: relative;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border-bottom: 5px solid var(--secondary); /* Μπορντό γραμμή κάτω */
}

.philosophy-content p {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.9;
    font-weight: 500;
}

.philosophy-content strong {
    color: var(--primary);
    font-weight: 700;
}

.quote-icon {
    font-size: 3rem;
    color: var(--secondary); /* Το μπορντό χρώμα */
    opacity: 0.2; /* Να είναι διακριτικό */
    position: absolute;
    top: 20px;
    left: 20px;
}

.quote-icon-small {
    font-size: 2rem;
    color: var(--secondary);
    opacity: 0.2;
    position: absolute;
    bottom: 20px;
    right: 20px;
}

/* Προσαρμογή για κινητά */
@media (max-width: 768px) {
    .philosophy-content {
        padding: 40px 20px;
    }
    .quote-icon { top: 10px; left: 10px; font-size: 2rem; }

    .nav-links {
        position: absolute;
        right: 0;
        top: 80px;
        background: var(--white);
        height: 0;
        width: 100%;
        flex-direction: column;
        align-items: center;
        gap: 0;
        overflow: hidden;
        transition: 0.4s;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    }

    .nav-links.active { height: 350px; padding: 20px 0; }
    
    .nav-links a {
        color: var(--dark);
        padding: 15px;
        width: 100%;
        text-align: center;
    }

    .hamburger { display: block; }

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

    .custom-shape-divider-bottom {
        width: 150%;
    }
    
    .about-content, .contact-container, .bio-container { 
        grid-template-columns: 1fr; 
    }

        /* Add inside @media (max-width: 768px) */
    .about-img-wrapper {
        margin: 0 auto;       /* Centers the wrapper */
        display: block;       /* Ensures it takes up space correctly */
        text-align: center;   /* Centers inline content inside */
    }

    .about-img-wrapper img {
        margin: 0 auto;       /* Centers the actual image tag */
    }
    
    .bio-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 30px; 
    }
    
    .bio-image-box { 
        margin: 0 auto;
        width: 100%;
        max-width: 100%;
        flex: 1 1 auto;
    } 
    
    .about-img-wrapper { 
        order: -1;
        margin-bottom: 30px;
    }
    
    .map-container { height: 300px; }
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- ΕΥΘΥΓΡΑΜΜΙΣΗ MENU --- */
/* Κατεβάζει τα γράμματα (Links) λίγο πιο κάτω, αλλά ΟΧΙ το κουμπί */
.nav-links li a:not(.btn) {
    position: relative;
    top: 13px;  /* Αυξομείωσε αυτό το νούμερο (π.χ. 4px ή 5px) μέχρι να σου αρέσει */
}

/* --- DICTIONARY SECTION --- */
.dictionary-section {
    background: var(--light); /* Ανοιχτό γκρι φόντο */
    border-top: 1px solid #e2e8f0;
}

.dict-wrapper {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-items: left;
    justify-content: space-between;
    gap: 30px;
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-left: 5px solid var(--primary); /* Μπλεγκρι γραμμή αριστερά */
}

.dict-text h2 {
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.dict-text p {
    color: #64748b;
    margin: 0;
}

.dict-search-box {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex: 1;
    min-width: 300px;
}

.dict-search-box input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
}

.dict-search-box input:focus {
    border-color: var(--secondary); /* Μπορντό όταν γράφεις */
}

#dictInput {
    flex: 1;
    min-width: 200px;
}

.dict-select {
    /* 1. Remove the default browser arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 1rem;
    text-align: center;
    outline: none;
    transition: 0.3s;
    background: var(--white);
    color: var(--primary);
    flex: 1;
}

/* Προσαρμογή για κινητά */
@media (max-width: 768px) {
    .dict-wrapper {
        flex-direction: column;
        text-align: center;
    }
    .dict-search-box {
        width: 100%;
        flex-direction: column;
    }
    .dict-search-box button {
        width: 100%;
        justify-content: center;
    }
}

/* --- DROPDOWN MENU STYLE --- */

/* Το κουτί που περιέχει το κουμπί και τη λίστα */
.dropdown {
    position: relative;
    display: inline-block;
}

/* Το βελάκι δίπλα στο "Μενού" */
.dropbtn i {
    margin-left: 5px;
    font-size: 0.8rem;
}

/* Το κρυφό κουτί με τις επιλογές */
.dropdown-content {
    display: none; /* Κρυφό αρχικά */
    position: absolute;
    background-color: var(--white);
    min-width: 220px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 9999;
    top: 100%; /* Εμφανίζεται ακριβώς από κάτω */
    left: 0;
    border-top: 4px solid var(--secondary); /* Μπορντό γραμμή από πάνω */
    border-radius: 0 0 8px 8px;
    padding: 10px 0;
    flex-direction: column;
}

/* Εμφάνιση όταν περνάει το ποντίκι (Hover) */
.dropdown:hover .dropdown-content {
    display: flex;
    animation: fadeInUp 0.3s ease;
}

/* Τα links μέσα στο dropdown */
.dropdown-content li {
    width: 100%;
    display: block;
}

.dropdown-content li a {
    color: var(--primary) !important; /* Μπλεγκρι γράμματα */
    padding: 12px 20px;
    text-decoration: none;
    display: block;
    font-size: 1rem !important; /* Κανονικό μέγεθος */
    text-align: left;
    white-space: nowrap; /* Να μην κόβονται οι λέξεις */
    position: static; /* Αφαιρεί το top:3px που είχαμε βάλει γενικά */
}

/* Όταν περνάς το ποντίκι πάνω από τις υπο-επιλογές */
.dropdown-content li a:hover {
    background-color: #f1f5f9;
    color: var(--secondary) !important; /* Μπορντό γράμματα */
    padding-left: 25px; /* Εφέ κίνησης προς τα δεξιά */
}

/* --- MOBILE FIX ΓΙΑ ΤΟ DROPDOWN --- */
@media (max-width: 768px) {
    .dropdown {
        width: 100%;
        text-align: center;
    }
    
    .dropdown-content {
        position: relative; /* Όχι απόλυτη θέση στο κινητό */
        box-shadow: none;
        background: transparent;
        border: none;
        display: none; /* Θα ανοίγει με hover/tap */
        min-width: 100%;
        padding: 0;
    }
    
    /* Στο κινητό να φαίνονται πάντα ή με tap (εδώ το κάνουμε να φαίνονται στο hover για απλότητα) */
    .dropdown:hover .dropdown-content {
        display: flex;
    }

    .dropdown-content li a {
        color: var(--dark) !important;
        text-align: center;
        padding: 10px;
        font-size: 0.9rem !important;
    }
}
/* --- Vertical Layout for Button & Switch --- */
.action-column {
    display: flex;
    flex-direction: column; /* Κάθετη στοίχιση */
    align-items: center;    /* Κεντράρισμα */
    gap: 8px;               /* Απόσταση μεταξύ κουμπιού και διακόπτη */
    line-height: 1;         /* Για να μην πιάνει περιττό χώρο */
}

/* Στυλ του διακόπτη (ίδιο με πριν, με μικρή προσαρμογή μεγέθους) */
.lang-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0,0,0,0.2); /* Λίγο πιο σκούρο φόντο για αντίθεση */
    padding: 3px 8px;
    border-radius: 20px;
    transform: scale(0.9); /* Το κάνουμε ελαφρώς μικρότερο για να είναι κομψό */
}

header.scrolled .lang-switch-wrapper {
    background: rgba(0,0,0,0.05);
}

.lang-label {
    color: var(--white);
    font-size: 0.7rem; /* Μικρότερα γράμματα GR/EN */
    font-weight: 700;
}

header.scrolled .lang-label {
    color: var(--dark);
}

/* --- Switch Base Styles --- */
.switch {
    position: relative;
    display: inline-block;
    width: 30px;  /* Πιο μικρός διακόπτης */
    height: 16px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 10px; width: 10px;
    left: 3px; bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider { background-color: var(--secondary); }
input:focus + .slider { box-shadow: 0 0 1px var(--secondary); }
input:checked + .slider:before { transform: translateX(14px); }

.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }

/* --- Mobile Fix --- */
@media (max-width: 768px) {
    .action-column {
        flex-direction: row; /* Στο κινητό τα θέλουμε δίπλα-δίπλα ή όπως σε βολεύει */
        gap: 20px;
        margin-top: 10px;
    }
    
    .lang-switch-wrapper {
        transform: scale(1); /* Κανονικό μέγεθος στο κινητό */
        background: #eee;
    }
    
    .lang-label { color: var(--dark) !important; }
}


/* --- GALLERY MODAL STYLES --- */
.modal {
    display: none; /* Hidden by default */
    position: fixed; 
    z-index: 2000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
    backdrop-filter: blur(5px);
    animation: fadeIn 0.4s;
}

.modal-content {
    position: relative;
    margin: 5% auto;
    padding: 20px;
    width: 90%;
    max-width: 1000px;
    text-align: center;
}

.modal-content h2 {
    color: var(--white);
    margin-bottom: 30px;
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    z-index: 2001;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--secondary);
    text-decoration: none;
    cursor: pointer;
}

/* Gallery Grid inside Modal */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.gallery-grid img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
    border: 2px solid transparent;
}

.gallery-grid img:hover {
    transform: scale(1.05);
    border-color: var(--secondary);
    z-index: 10;
}

/* Animation */
@keyframes fadeIn {
    from {opacity: 0} 
    to {opacity: 1}
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .modal-content { margin: 20% auto; width: 95%; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .close-modal { top: 10px; right: 20px; }
}

/* --- LIGHTBOX STYLES (FULL SCREEN) --- */
.lightbox {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 3000; /* Must be higher than the Gallery Modal (2000) */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95); /* Very dark background */
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90vh;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    border: 2px solid #fff;
    border-radius: 4px;
    object-fit: contain;
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #fff;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    z-index: 3001;
}

.close-lightbox:hover {
    color: var(--secondary);
}

/* --- LIGHTBOX WRAPPER --- */
.lightbox-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px; /* Space between arrows and image */
    max-width: 95%;
    max-height: 95vh;
}

/* --- LIGHTBOX IMAGE --- */
.lightbox-img {
    max-width: 85vw; /* Slightly smaller to fit arrows */
    max-height: 85vh;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    border: 2px solid #fff;
    border-radius: 4px;
    object-fit: contain;
}

/* --- LIGHTBOX NAVIGATION ARROWS --- */
.prev, .next {
    cursor: pointer;
    /* Removed: position: absolute, top, left, right */
    width: auto;
    padding: 10px;
    color: white;
    font-weight: bold;
    font-size: 40px;
    transition: 0.3s ease;
    user-select: none;
    text-decoration: none;
    z-index: 3002;
}

.prev:hover, .next:hover {
    color: var(--secondary);
    transform: scale(1.2); /* Slight zoom effect on hover */
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .lightbox-wrapper { gap: 5px; width: 100%; }
    .lightbox-img { max-width: 80vw; } /* Make image smaller to fit arrows on phone */
    .prev, .next { font-size: 24px; padding: 5px; }
}

/* --- LANGUAGE FLAG BUTTONS --- */
.lang-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lang-btn {
    background: none;
    border: 2px solid transparent; /* Invisible border for spacing */
    cursor: pointer;
    padding: 0;
    opacity: 0.5;                /* Dimmed by default */
    transition: all 0.3s ease;
    border-radius: 4px;          /* Slight curve */
    line-height: 0;              /* Removes extra space below image */
}

.lang-btn img {
    width: 28px;                 /* Size of the flag */
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Hover State */
.lang-btn:hover {
    opacity: 1;
    transform: translateY(-2px);
}

/* Active State (Selected Language) */
.lang-btn.active {
    opacity: 1;                  /* Fully visible */
    border-color: var(--secondary); /* Optional: Red border around selected */
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .lang-buttons {
        margin-top: 10px;
    }
    .lang-btn img {
        width: 35px; /* Slightly bigger on mobile for touch */
    }
}