@font-face{
    font-family: 'MyFont';
    src:url(fonts/IrishGrover_Regular.ttf) format('truetype');
}
body {
    background-color: #d5cdcd;
    margin: 0;
    
    min-height: 100vh; /* Πάντα 100% του ύψους της οθόνης */
    display: flex;
    flex-direction: column;
}
main {
    flex: 1;
    
    /* Λίγο κενό κάτω για να μην κολλάει στο footer */
    padding-bottom: 40px; 
}
a{
    transition: all 0.2s ease-in-out;
}
nav ul{
    list-style: none;
    background-color: #d5cdcd;
    display: flex;
    justify-content: end;
    align-items: center;
    margin: 0;
    padding: 0;

}
h2{
    font-family:'MyFont';
}
h4{
    font-size: larger;
}
nav a{
    margin: 10px;
    text-decoration: none;
    font-weight:bolder;
    color: rgb(133, 101, 101);
    display: block;
    padding: 5px;
}
a:hover{
    color: rgb(197, 45, 45);
}
h3{
font-weight: bold;
}
.wrap_head{
    display: flex;
    justify-content:space-between;
    align-items: center;
    padding: 0 20px;
    background-color: #d5cdcd;
}
.filter-bar{
    width: 90%;
    margin: 30px auto;
    padding: 20px;
background-color: #f1f1f1;
border-radius: 8px;
box-shadow: o 2px 5px rgba(0, 0, 0,0.1);
text-align: center;
}
.filter-bar h3{
    margin-top: 0;
    font-family: 'MyFont',sans-serif;
    font-size: 1.5em;
    color: #383434;
}
.filter-form{
    display: flex;
    gap: 10px;
}
.filter-form input[type="text"],.filter-form select{
    flex: 1;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #ccc
    border-radius 5px;
}
.filter-form button{
    padding: 12px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;

}
.filter-form button:hover{
    background-color: #0056b3;
}
main section{
    text-align: center;
    margin: 20px 0;
    padding: 28px 0;
}
main section a{
    background-color: #007bff;
    color: white;
    padding: 12px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1.1em;
}
main section a:hover{
    background-color: #0056b3;
    color:white;
}

.categories{
    list-style:none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: 90%;
    margin: 20px auto;
    gap: 10px;
    padding: 0;
    align-items: flex-start; 
    
    
}
.category{
    border: 1px solid #838080;
    background-color: rgb(204, 169, 116);
    flex: 1 1 250px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);

    position: relative;
    
}
.category h2{
background-color: #383434;
color: white;
padding: 10px;
margin: 0;
text-align: center;
font-size: 1.2em;
}
.category h2 a{
    color: white;
    text-decoration: none;
}
.category h2 a i {
    margin-right: 10px;
    font-size: 0.9em;
}
/* ΝΕΟΣ ΚΑΝΟΝΑΣ ΓΙΑ ΤΟ SUBMENU */
.submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    
    /* Αλλαγή 1: Όχι πια absolute. Να πιάνει κανονικό χώρο. */
    position: static; 
    
    /* Αλλαγή 2: Πάντα ορατό από την αρχή */
    opacity: 1;
    visibility: visible;
    max-height: none; /* Να έχει όσο ύψος χρειάζεται */
    
    width: 100%;
    background-color:rgb(204, 169, 116); /* Το χρώμα της κάρτας σου */
    
    /* Μια διαχωριστική γραμμή από τον τίτλο */
    border-top: 1px solid #383434;
}

/* Μια νέα κλάση για όταν θέλουμε να το κρύψουμε */
.submenu.closed {
    display: none;
}

/* Αλλαγή 3: Ο δείκτης του ποντικιού να δείχνει ότι είναι clickable */
.category h2 {
    cursor: pointer;
    user-select: none; /* Να μην μαρκάρεται το κείμενο */
}

/* --- ΓΕΝΙΚΟ ΣΤΥΛ ΦΟΡΜΑΣ (ΓΙΑ LOGIN/REGISTER/ADD_AD) --- */
.form-container {
    width: 500px; /* Ή όσο πλάτος θέλεις */
    max-width: 90%; /* Σημαντικό για κινητά */
    
    /* Ίδιο στυλ με τη μπάρα αναζήτησης */
    margin: 40px auto; /* 40px πάνω/κάτω, auto για κεντράρισμα */
    padding: 2rem;
    background: #f1f1f1; 
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.form-container h3 {
    margin-top: 0;
    text-align: center;
    font-family: 'MyFont', sans-serif; /* Η γραμματοσειρά σου */
    font-size: 1.5em;
    color: #383434;
}

/* Στυλ για τα πεδία */
.form-container div { 
    margin-bottom: 15px; 
}
.form-container label { 
    display: block; 
    margin-bottom: 5px; 
    font-weight: bold; 
    color: #333;
}
.form-container input[type="text"],
.form-container input[type="email"],
.form-container input[type="password"],
.form-container input[type="number"],
.form-container textarea,
.form-container select {
    width: 95%;
    padding: 14px;      /* Μεγαλύτερο padding για να "αναπνέει" */
    font-size: 17px;    /* Μεγαλύτερο κείμενο για να φαίνεται καθαρά */
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: Arial, sans-serif; /* Για να είναι ευανάγνωστο */
}

/* Στυλ για το κουμπί */
.form-container button {
    width: 100%;
    padding: 12px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1.1em;
}
.form-container button:hover {
    background-color: #0056b3;
}

/* Για τα extra links (π.χ. "Δεν έχετε λογαριασμό;") */
.form-container .form-links {
    text-align: center;
    margin-top: 20px;
}
/* --- ΣΤΥΛ ΥΠΟΣΕΛΙΔΟΥ (FOOTER) --- */
.main-footer {
    background-color: #383434;
    color: white;
    padding: 30px 0;
    margin-top: auto; /* ΑΥΤΟ σπρώχνει το footer τέρμα κάτω αν περισσεύει χώρος */
    text-align: center;
    width: 100%;
}

.footer-content p {
    margin: 0 0 15px 0;
    font-size: 1.1em;
}

.footer-links a {
    color: #d5cdcd; /* Το ανοιχτό χρώμα του background σου */
    text-decoration: none;
    margin: 0 10px;
    font-weight: bold;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
    text-decoration: underline;
}
/* --- ΚΟΥΜΠΙΑ ΚΕΝΤΡΙΚΗΣ ΣΕΛΙΔΑΣ --- */

/* Το κουτί που τα κρατάει */
.action-buttons {
    display: flex;           /* Τα βάζει στη σειρά */
    justify-content: center; /* Τα κεντράρει */
    gap: 20px;               /* Κενό ανάμεσά τους */
    margin: 30px 0;
}

/* Κοινό στυλ και για τα δύο κουμπιά */
.action-buttons a {
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1.1em;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

/* Εφέ όταν περνάει το ποντίκι από πάνω */
.action-buttons a:hover {
    transform: translateY(-2px); /* Σηκώνεται λίγο */
    box-shadow: 0 6px 8px rgba(0,0,0,0.15);
}

/* Το Μπλε Κουμπί (Προσθήκη) */
.btn-main {
    background-color: #007bff;
    color: white;
}
.btn-main:hover {
    background-color: #0056b3;
}

/* Το Δεύτερο Κουμπί (Όλες οι Αγγελίες) */
.btn-secondary {
    background-color: #28a745; /* Πράσινο */
    color: white;
}
.btn-secondary:hover {
    background-color: #218838;
}
/* --- RESPONSIVE DESIGN (ΓΙΑ ΚΙΝΗΤΑ) --- */

/* Όταν η οθόνη είναι μικρότερη από 768px (Tablets & Mobiles) */
@media (max-width: 768px) {

    /* 1. Το Header γίνεται κάθετο */
    .wrap_head {
        flex-direction: column;
        text-align: center;
        padding: 10px;
    }

    /* 2. Το Μενού στοιχίζεται κάθετα */
    .nav_bar ul {
        flex-direction: column;
        gap: 10px;
    }
    
    .nav_bar li {
        margin: 5px 0;
        border-right: none !important; /* Αφαιρούμε τις κάθετες γραμμές */
        border-bottom: 1px solid #ccc; /* Βάζουμε οριζόντιες */
        width: 100%;
    }

    /* 3. Οι Φόρμες πιάνουν όλο το πλάτος */
    .form-container, 
    .results-container,
    .filter-bar {
        width: 95% !important; /* Πιάνουν σχεδόν όλη την οθόνη */
        margin: 10px auto;
        padding: 15px;
    }

    /* 4. Η Αναζήτηση γίνεται κάθετη */
    .filter-form {
        flex-direction: column;
    }
    
    .filter-form input, 
    .filter-form select, 
    .filter-form button {
        width: 100%; /* Κουμπιά και πεδία τέρμα άκρη */
        margin-bottom: 10px;
    }

    /* 5. Πίνακες (Admin/My Ads) -> Scrollable */
    /* Αν ο πίνακας είναι μεγάλος, να scollάρει μόνο αυτός, όχι όλη η σελίδα */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    /* 6. Εικόνες Αγγελιών */
    .ad-item img {
        float: none !important; /* Η εικόνα πάει από πάνω */
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        margin-bottom: 10px;
    }
}
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
    text-align: center;
}
.alert-success {
    color: #3c763d;
    background-color: #dff0d8;
    border-color: #d6e9c6;
}
.alert-error {
    color: #a94442;
    background-color: #f2dede;
    border-color: #ebccd1;
}
/* =========================================
   ΝΕΕΣ ΠΡΟΣΘΗΚΕΣ (UX & RESPONSIVE)
   ========================================= */

/* 1. STICKY HEADER (Το μενού μένει κολλημένο πάνω) */
.wrap_head {
    position: sticky;
    top: 0;
    z-index: 1000; /* Πάντα πάνω από όλα */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); /* Ωραία σκιά */
}

/* 2. ΟΜΟΡΦΑ ΜΗΝΥΜΑΤΑ (ALERTS) */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
}
.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}
.alert-error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* 3. RESPONSIVE DESIGN (ΓΙΑ ΚΙΝΗΤΑ & TABLETS) */
@media (max-width: 768px) {

    /* Το Header γίνεται κάθετο */
    .wrap_head {
        flex-direction: column;
        padding: 10px;
        position: relative; /* Στα κινητά ίσως δεν θες sticky αν πιάνει πολύ χώρο */
    }

    /* Το λογότυπο και το σλόγκαν κεντράρονται */
    .wrap_head h2, .wrap_head h4 {
        text-align: center;
        margin: 5px 0;
    }

    /* Το Μενού στοιχίζεται κάθετα */
    .nav_bar ul {
        flex-direction: column;
        width: 100%;
        padding: 0;
    }
    
    .nav_bar li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(0,0,0,0.1);
        padding: 5px 0;
    }

    /* Οι Φόρμες πιάνουν όλο το πλάτος */
    .form-container, 
    .results-container,
    .filter-bar {
        width: 95% !important;
        margin: 10px auto;
        padding: 15px;
        box-sizing: border-box;
    }

    /* Η μπάρα αναζήτησης σπάει σε γραμμές */
    .filter-form {
        flex-direction: column;
    }
    
    .filter-form input, 
    .filter-form select, 
    .filter-form button {
        width: 100%;
        margin-bottom: 10px;
		box-sizing: border-box;
    }

    /* Τα κουμπιά της αρχικής (Προσθήκη/Όλες) */
    .action-buttons {
        flex-direction: column;
        padding: 0 20px;
    }
    .action-buttons a {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }

    /* Εικόνες Αγγελιών στα αποτελέσματα */
    .ad-item img {
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 200px !important;
        margin-bottom: 10px;
    }
    
    /* Gallery εικόνων στο ad_details */
    .form-container div[style*="display:flex"] {
        flex-wrap: nowrap; /* Να κάνει scroll οριζόντια */
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}
/* --- ΔΙΑΦΗΜΙΣΤΙΚΟΙ ΧΩΡΟΙ (AD SPACES) --- */

.ad-space {
    display: block;
    margin: 20px auto;
    text-align: center;
    background-color: #f4f4f4; /* Προσωρινό χρώμα για να το βλέπεις */
    border: 1px dashed #ccc;   /* Προσωρινό περίγραμμα */
    color: #999;
    padding: 10px;
    overflow: hidden; /* Για να μην χαλάει το layout αν η διαφήμιση είναι μεγάλη */
}

/* 1. Leaderboard (Μακρόστενη οριζόντια) */
.ad-leaderboard {
    width: 100%;
    max-width: 728px; /* Τυπικό μέγεθος Google */
    height: 90px;     /* Ύψος Leaderboard */
    line-height: 70px; /* Για κεντράρισμα κειμένου */
}

/* 2. Rectangle (Τετράγωνη) */
.ad-rectangle {
    width: 300px;
    height: 250px;
    line-height: 230px;
}

/* 3. Responsive (Σε κινητά μικραίνει) */
@media (max-width: 768px) {
    .ad-leaderboard {
        max-width: 320px;
        height: 50px; /* Mobile banner height */
        line-height: 30px;
    }
}
.ad-space { display: none; }