/* ============================================================
   ΑΥΤΟΟΡΓΑΝΩΣΗ — Main CSS
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=Source+Sans+3:wght@300;400;600;700;800&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
    --gold:        #c9a84c;
    --gold-light:  #e0c070;
    --gold-dark:   #a8893a;
    --ink:         #1a1a2e;
    --ink-2:       #212140;
    --ink-3:       #2a2a50;
    --text:        #e2e2e2;
    --text-muted:  #8888aa;
    --white:       #ffffff;
    --green:       #2ecc71;
    --red:         #e74c3c;
    --radius:      10px;
    --shadow:      0 8px 30px rgba(0,0,0,0.25);
    --transition:  all 0.25s ease;
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Source Sans 3', sans-serif;
    background: var(--ink);
    color: var(--text);
    line-height: 1.65;
    font-size: 1rem;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--gold-light); }

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    line-height: 1.25;
    color: var(--white);
}

img { max-width: 100%; display: block; }

/* ── Layout ─────────────────────────────────────────────────── */
.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

.page-wrapper {
    max-width: 1140px;
    margin: 48px auto;
    padding: 0 24px 80px;
}

/* ── Navigation ─────────────────────────────────────────────── */
nav {
    background: var(--ink-2);
    padding: 0 30px;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid var(--gold);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.nav-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--gold);
    letter-spacing: 1px;
}

.nav-link {
    color: #ccc;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 4px 2px;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}
.nav-link:hover,
.nav-link.active { color: var(--gold); border-bottom-color: var(--gold); }

.nav-btn {
    color: var(--gold);
    border: 1.5px solid var(--gold);
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    transition: var(--transition);
}
.nav-btn:hover { background: var(--gold); color: var(--ink); }

/* Online badge */
.online-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(46,204,113,0.1);
    color: var(--green);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 800;
    border: 1px solid rgba(46,204,113,0.25);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.pulse-dot {
    width: 7px; height: 7px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(46,204,113,0.7); }
    70%  { box-shadow: 0 0 0 8px rgba(46,204,113,0); }
    100% { box-shadow: 0 0 0 0 rgba(46,204,113,0); }
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 11px 28px;
    border-radius: 7px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-align: center;
    letter-spacing: 0.3px;
}
.btn-gold {
    background: var(--gold);
    color: var(--ink);
}
.btn-gold:hover { background: var(--gold-light); color: var(--ink); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(201,168,76,0.35); }

.btn-dark {
    background: var(--ink-3);
    color: var(--gold);
    border: 1px solid var(--gold);
}
.btn-dark:hover { background: var(--gold); color: var(--ink); }

.btn-danger {
    background: var(--red);
    color: white;
}
.btn-danger:hover { background: #c0392b; transform: translateY(-1px); }

.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-full { width: 100%; display: block; }

/* ── Forms ───────────────────────────────────────────────────── */
.form-group { margin-bottom: 22px; }

label {
    display: block;
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

input, textarea, select {
    width: 100%;
    padding: 13px 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 7px;
    color: var(--white);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    display: block;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(255,255,255,0.07);
    box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}
select option { background: var(--ink-2); }
::placeholder { color: rgba(255,255,255,0.2); }

/* ── Cards ───────────────────────────────────────────────────── */
.card {
    background: var(--ink-2);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: var(--radius);
    padding: 28px;
    transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow); border-color: rgba(201,168,76,0.25); }

.card-gold { border-left: 4px solid var(--gold); }
.card-white { background: #fff; color: var(--ink); border: none; }
.card-white h1, .card-white h2, .card-white h3, .card-white h4 { color: var(--ink); }

/* ── Tables ──────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.07); }

table { width: 100%; border-collapse: collapse; }

thead tr { background: rgba(201,168,76,0.12); border-bottom: 2px solid var(--gold); }
thead th { padding: 14px 16px; font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; color: var(--gold); }

tbody tr { border-bottom: 1px solid rgba(255,255,255,0.05); transition: var(--transition); }
tbody tr:hover { background: rgba(255,255,255,0.03); }
tbody td { padding: 13px 16px; font-size: 0.9rem; color: var(--text); vertical-align: middle; }

/* ── Badges & Tags ───────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-green  { background: rgba(46,204,113,0.15);  color: #2ecc71; }
.badge-gold   { background: rgba(201,168,76,0.15);  color: var(--gold); }
.badge-red    { background: rgba(231,76,60,0.15);   color: #e74c3c; }
.badge-blue   { background: rgba(52,152,219,0.15);  color: #3498db; }
.badge-grey   { background: rgba(255,255,255,0.08); color: #888; }

/* ── Alerts ──────────────────────────────────────────────────── */
.alert { padding: 14px 20px; border-radius: 7px; font-weight: 600; margin-bottom: 20px; }
.alert-success { background: rgba(46,204,113,0.12); color: #2ecc71; border: 1px solid rgba(46,204,113,0.3); }
.alert-error   { background: rgba(231,76,60,0.12);  color: #e74c3c; border: 1px solid rgba(231,76,60,0.3); }
.alert-info    { background: rgba(52,152,219,0.12); color: #3498db; border: 1px solid rgba(52,152,219,0.3); }
.alert-warning { background: rgba(241,196,15,0.12); color: #f1c40f; border: 1px solid rgba(241,196,15,0.3); }

/* ── Section Headers ─────────────────────────────────────────── */
.section-title {
    font-family: 'Playfair Display', serif;
    color: var(--white);
    font-size: 1.9rem;
    border-left: 5px solid var(--gold);
    padding-left: 18px;
    margin-bottom: 30px;
}

.page-title {
    font-family: 'Playfair Display', serif;
    color: var(--gold);
    font-size: 2.4rem;
    margin-bottom: 8px;
}

.divider-gold {
    border: none;
    border-top: 2px solid var(--gold);
    margin: 30px 0;
    opacity: 0.4;
}

/* ── Footer ──────────────────────────────────────────────────── */
footer {
    background: var(--ink-2);
    border-top: 2px solid rgba(201,168,76,0.3);
    padding: 28px 30px;
    text-align: center;
    margin-top: 80px;
}
footer p {
    color: var(--text-muted);
    font-size: 0.85rem;
    letter-spacing: 0.3px;
}
footer a { color: var(--gold-dark); }
footer a:hover { color: var(--gold); }

/* ── Proposal Cards ──────────────────────────────────────────── */
.proposal-card {
    background: var(--ink-2);
    border: 1px solid rgba(255,255,255,0.07);
    border-left: 5px solid var(--gold);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 24px;
    transition: var(--transition);
}
.proposal-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--gold);
}

/* ── Progress Bars ───────────────────────────────────────────── */
.progress-bg { background: rgba(255,255,255,0.08); height: 7px; border-radius: 4px; margin-top: 6px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 4px; transition: width 0.5s ease; }

/* ── Modals ──────────────────────────────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.75);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(3px);
}
.modal-box {
    background: var(--ink-2);
    border: 1px solid rgba(201,168,76,0.3);
    border-radius: 14px;
    padding: 40px;
    max-width: 500px;
    width: 92%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.modal-box h3 { color: var(--gold); margin-bottom: 20px; }

/* ── Utilities ───────────────────────────────────────────────── */
.text-gold   { color: var(--gold); }
.text-muted  { color: var(--text-muted); }
.text-white  { color: var(--white); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-upper  { text-transform: uppercase; letter-spacing: 0.5px; }
.text-sm     { font-size: 0.85rem; }
.text-xs     { font-size: 0.75rem; }

.fw-bold   { font-weight: 700; }
.fw-black  { font-weight: 900; }

.mt-1 { margin-top: 8px; }  .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; } .mt-5 { margin-top: 48px; }
.mb-1 { margin-bottom: 8px; }  .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; } .gap-3 { gap: 24px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 20px; }

.rounded { border-radius: var(--radius); }
.hidden { display: none; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    nav { padding: 0 16px; }
    .page-wrapper { padding: 0 16px 60px; }
    .modal-box { padding: 28px 20px; }
    .page-title { font-size: 1.8rem; }
}

/* ── Mobile Navigation ───────────────────────────────────────── */
.nav-desktop { display: flex; }
.nav-mobile-btn { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-mobile-btn span { display: block; width: 22px; height: 2px; background: #c9a84c; margin: 5px 0; transition: all 0.3s; }

@media (max-width: 768px) {
    /* Header */
    header { height: auto !important; padding: 12px 16px !important; flex-wrap: wrap; gap: 8px; }

    /* Logo row */
    .nav-logo { font-size: 1.1rem !important; }

    /* Online/members badges - μικρότερα */
    .online-badge { font-size: 0.65rem !important; padding: 3px 8px !important; }

    /* Nav - κρύψιμο σε mobile, εμφάνιση ως dropdown */
    nav > div:last-child { display: none; width: 100%; flex-direction: column; gap: 0 !important; background: #1a1a2e; border-top: 1px solid rgba(201,168,76,0.2); padding: 8px 0; }
    nav > div:last-child.open { display: flex; }
    nav > div:last-child a { padding: 10px 16px !important; border-radius: 0 !important; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 0.9rem !important; }

    /* Hamburger */
    .hamburger { display: flex; flex-direction: column; cursor: pointer; padding: 8px; gap: 5px; }
    .hamburger span { display: block; width: 22px; height: 2px; background: #c9a84c; border-radius: 2px; }

    /* Containers */
    .container, .page-wrapper { padding: 0 14px; }
    .eval-wrap, .main-wrapper { padding: 0 14px 40px !important; }

    /* Grids */
    .grid-2, .grid-3, .grid-auto { grid-template-columns: 1fr !important; }
    .scores-row { grid-template-columns: repeat(3,1fr) !important; }
    .info-grid { grid-template-columns: 1fr !important; }

    /* Cards */
    .proposal-card, .p-card { padding: 14px 16px !important; }
    .p-card-title { font-size: 0.95rem !important; white-space: normal !important; }
    .p-card-right { flex-direction: column; gap: 6px !important; }

    /* Tables */
    table { font-size: 0.8rem; }
    thead { display: none; }
    tbody tr { display: block; border: 1px solid rgba(255,255,255,0.07); border-radius: 8px; margin-bottom: 10px; padding: 10px; }
    tbody td { display: flex; justify-content: space-between; padding: 6px 8px !important; border: none !important; }
    tbody td::before { content: attr(data-label); color: #888; font-weight: 700; font-size: 0.72rem; text-transform: uppercase; }

    /* Modals */
    .modal-overlay { padding: 16px !important; align-items: flex-start; }
    .modal-box { padding: 24px 18px !important; margin: 0; }
    .modal-title { font-size: 1.3rem !important; }

    /* Forms */
    input, textarea, select { font-size: 16px !important; } /* Αποτροπή zoom σε iOS */

    /* Profile */
    .profile-header { flex-direction: column !important; text-align: center; }
    .avatar-circle { margin: 0 auto; }

    /* Titles */
    .page-title { font-size: 1.6rem !important; }
    .section-title { font-size: 1.4rem !important; }
    h1 { font-size: 1.6rem !important; }
    h2 { font-size: 1.3rem !important; }
}

@media (max-width: 480px) {
    .score-box { min-width: 55px !important; padding: 6px 10px !important; }
    .score-box .num { font-size: 1.1rem !important; }
    .stat-card .num { font-size: 1.5rem !important; }
}

/* Fix μαύρο κενό κάτω από footer */
html, body { min-height: 100%; background: #0b0b14; }
