/* --- ΒΑΣΙΚΕΣ ΡΥΘΜΙΣΕΙΣ & ΧΡΩΜΑΤΑ --- */
:root {
    --col-history: #2c3e50;  /* Μπλε σκούρο */
    --col-funfact: #f39c12;  /* Πορτοκαλί */
    --col-nature: #27ae60;   /* Πράσινο */
    --col-culture: #8e44ad;  /* Μωβ */
    --col-secret: #c0392b;   /* Κόκκινο */
    
    --text-dark: #2c2c2c;
    --text-light: #f9f7f1;
    --bg-body: #ecf0f1;      /* Ανοιχτό γκρι φόντο */
}

* { box-sizing: border-box; }

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-dark);
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- HEADER & CONTROLS --- */
header {
    text-align: center;
    margin-bottom: 30px;
    width: 100%;
    max-width: 1200px;
}

h1 {
    font-family: 'Comfortaa', cursive;
    color: var(--col-history);
    margin-bottom: 5px;
    font-size: 2.5rem;
}

.subtitle {
    margin-top: 0;
    color: #7f8c8d;
    font-style: italic;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    background: white;
    padding: 20px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 40px;
    margin-top: 20px;
}

.search-ui, .select-ui, .btn-ui {
    padding: 12px 25px;
    border-radius: 30px;
    border: 1px solid #ddd;
    font-family: 'Montserrat';
    font-size: 0.95rem;
    outline: none;
}

.search-ui { min-width: 250px; }

.btn-ui {
    background: var(--col-history);
    color: white;
    cursor: pointer;
    border: none;
    font-weight: bold;
    transition: transform 0.2s;
}

.btn-ui:hover { transform: scale(1.05); }

/* --- GRID ΚΑΡΤΩΝ --- */
.cards-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 35px;
    width: 100%;
    max-width: 1400px;
    padding-bottom: 50px;
}

/* --- FLIP CARD LOGIC --- */
.flip-card {
    background-color: transparent;
    height: 600px; /* Αυξήθηκε λίγο για να χωράνε άνετα τα QR */
    perspective: 1000px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Ωραίο εφέ κίνησης */
    transform-style: preserve-3d;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.is-flipped { transform: rotateY(180deg); }

.front, .back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden; /* Κρύβει την πίσω πλευρά */
    border-radius: 20px;
    padding: 30px;
    display: flex;
    flex-direction: column;
}

/* --- ΜΠΡΟΣΤΙΝΗ ΟΨΗ --- */
.front {
    background: white;
    align-items: center;
    justify-content: center;
    border-top: 12px solid var(--border-color); /* Χρώμα ανά κατηγορία */
}

.icon { font-size: 5.5rem; margin-bottom: 25px; }

.hook-text {
    font-family: 'Comfortaa', cursive;
    font-size: 1.4rem;
    text-align: center;
    line-height: 1.4;
    color: #333;
}

.city-label {
    margin-top: 30px;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: #95a5a6;
    text-transform: uppercase;
}

/* --- ΠΙΣΩ ΟΨΗ --- */
.back {
    transform: rotateY(180deg);
    background: var(--bg-color); /* Gradient από το JS */
    color: white;
    text-align: left;
}

.cat-header {
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.8;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    padding-bottom: 10px;
}

.ans-title {
    font-family: 'Comfortaa', cursive;
    font-size: 1.6rem;
    margin-bottom: 15px;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.body-text {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;      /* Πιάνει όσο χώρο περισσεύει */
    overflow-y: auto;  /* Scroll αν το κείμενο είναι τεράστιο */
    padding-right: 5px; /* Χώρος για τη μπάρα κύλισης */
}

/* Scrollbar styling για το κείμενο */
.body-text::-webkit-scrollbar { width: 4px; }
.body-text::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.5); border-radius: 4px; }

/* --- QR CODES & FOOTER --- */
.footer-content {
    margin-top: auto;
    border-top: 1px solid rgba(255,255,255,0.3);
    padding-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.qr-row {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.qr-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    background: rgba(255,255,255,0.15); /* Ημιδιάφανο πλαίσιο */
    padding: 10px;
    border-radius: 12px;
    transition: transform 0.2s, background 0.2s;
    width: 100px;
}

.qr-item:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.25);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.qr-img {
    width: 65px;
    height: 65px;
    border-radius: 6px;
    background: white;
    padding: 4px;
    margin-bottom: 8px;
}

.qr-label {
    font-size: 0.65rem;
    color: white;
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* --- SITE LINK (Κάτω-κάτω) --- */
.site-link-container { text-align: center; }

.site-link {
    color: white;
    font-family: 'Comfortaa', cursive;
    font-size: 0.85rem;
    text-decoration: none;
    border-bottom: 1px dashed rgba(255,255,255,0.6);
    padding-bottom: 2px;
    transition: all 0.2s;
    opacity: 0.9;
}

.site-link:hover {
    opacity: 1;
    border-bottom: 1px solid white;
    letter-spacing: 1px;
}