:root {
    --primary-color: #2c3e50;
    --accent-color: #d4af37;
    --light-bg: #f8f9fa;
    --text-color: #333;
    --white: #ffffff;
    --error-bg: #ffebee;
    --error-color: #c62828;
    --success-bg: #e8f5e9;
    --success-color: #2e7d32;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--light-bg);
    margin: 0;
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    scroll-behavior: smooth;
}

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; width: 100%; box-sizing: border-box; }

/* Header Public */
header { background: var(--white); box-shadow: 0 2px 10px rgba(0,0,0,0.1); padding: 1rem 0; position: sticky; top: 0; z-index: 1000; }
.navbar { display: flex; justify-content: space-between; align-items: center; }
.logo img { max-height: 50px; }
.nav-links { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; color: var(--primary-color); font-weight: 500; text-transform: uppercase; }
.nav-links a:hover { color: var(--accent-color); }

/* Mobile Menu Toggle */
.menu-toggle { display: none; flex-direction: column; cursor: pointer; gap: 5px; }
.menu-toggle span { width: 25px; height: 3px; background: var(--primary-color); transition: 0.3s; }

@media (max-width: 768px) {
    .menu-toggle { display: flex; }
    .nav-links { display: none; flex-direction: column; position: absolute; top: 80px; left: 0; width: 100%; background: var(--white); padding: 20px; box-shadow: 0 5px 10px rgba(0,0,0,0.1); text-align: center; }
    .nav-links.active { display: flex; }
}

/* User Info (Admin) */
.user-info { display: flex; align-items: center; gap: 15px; }
.logout-btn { background: var(--accent-color); color: var(--white); padding: 8px 15px; text-decoration: none; border-radius: 4px; font-size: 0.9rem; transition: 0.3s; }
.logout-btn:hover { background: #b59020; }

/* Footer */
footer { background: #1a252f; color: #ddd; padding: 40px 0; text-align: center; margin-top: auto; }

/* Common Components */
.btn { padding: 10px 20px; border: none; border-radius: 4px; cursor: pointer; font-weight: bold; color: white; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; font-size: 1rem; }
.btn:hover { opacity: 0.9; }
.btn-primary { background-color: var(--primary-color); }
.btn-accent { background-color: var(--accent-color); }

.card { background: var(--white); padding: 30px; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); margin-bottom: 30px; }

.message { padding: 15px; margin-bottom: 20px; border-radius: 4px; }
.message.error { background: var(--error-bg); color: var(--error-color); }
.message.success { background: var(--success-bg); color: var(--success-color); }

h1, h2, h3, h4 { font-family: 'Playfair Display', serif; color: var(--primary-color); margin-top: 0; }
a { color: var(--primary-color); text-decoration: none; }
a:hover { color: var(--accent-color); }

/* Forms */
input[type="text"], input[type="number"], input[type="password"], textarea, select { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box; font-family: inherit; }

/* --- Law Page Styles (law.php) --- */
.law-header { background: white; padding: 40px; margin: 40px 0; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); border-left: 5px solid var(--accent-color); }
.law-header h1 { font-family: 'Playfair Display', serif; color: var(--primary-color); margin-top: 0; }
.meta-tags { margin-top: 15px; }
.tag { background: #eee; padding: 5px 10px; border-radius: 4px; font-size: 0.9rem; margin-right: 10px; color: #555; }

.article-card { background: white; padding: 30px; margin-bottom: 30px; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.article-title { color: var(--primary-color); border-bottom: 1px solid #eee; padding-bottom: 10px; margin-bottom: 20px; font-family: 'Playfair Display', serif; }

/* Ιεραρχία Κειμένου */
.section-item { margin-bottom: 10px; }
.section-label { font-weight: bold; color: var(--primary-color); margin-right: 5px; }
.sections-level-0 { margin-left: 0; }
.sections-level-1 { margin-left: 20px; margin-top: 10px; }
.sections-level-2 { margin-left: 20px; margin-top: 5px; font-style: italic; }

.back-btn { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; color: var(--primary-color); font-weight: bold; margin-top: 20px; }
.back-btn:hover { color: var(--accent-color); }

/* --- Legislation Page Styles (legislation.php) --- */
.page-header { background: var(--primary-color); color: white; padding: 60px 0; text-align: center; margin-bottom: 40px; }
.page-header h1 { font-family: 'Playfair Display', serif; margin: 0; font-size: 2.5rem; }

/* Search Bar */
.search-container { max-width: 600px; margin: -30px auto 40px; position: relative; z-index: 2; padding: 0 20px; }
.search-form { display: flex; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.search-input { flex: 1; padding: 15px; border: none; border-radius: 4px 0 0 4px; font-size: 1rem; outline: none; }
.search-btn { background: var(--accent-color); color: white; border: none; padding: 0 25px; border-radius: 0 4px 4px 0; cursor: pointer; font-size: 1.2rem; transition: 0.3s; }
.search-btn:hover { background: #b59020; }

/* Laws Grid */
.laws-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; margin-bottom: 60px; }
.law-card { background: white; border-radius: 8px; overflow: hidden; box-shadow: 0 3px 10px rgba(0,0,0,0.05); transition: 0.3s; display: flex; flex-direction: column; border-top: 4px solid var(--primary-color); }
.law-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); border-top-color: var(--accent-color); }
.law-body { padding: 25px; flex: 1; display: flex; flex-direction: column; }
.law-meta { font-size: 0.85rem; color: #666; margin-bottom: 10px; display: flex; justify-content: space-between; }
.law-title { font-family: 'Playfair Display', serif; font-size: 1.25rem; margin: 0 0 15px; color: var(--primary-color); font-weight: bold; }
.law-excerpt { font-size: 0.95rem; color: #555; margin-bottom: 20px; flex: 1; }
.read-more { text-decoration: none; color: var(--accent-color); font-weight: bold; text-transform: uppercase; font-size: 0.9rem; align-self: flex-start; }
.read-more:hover { color: var(--primary-color); }

/* --- Homepage Styles (from index.html) --- */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(44, 62, 80, 0.7), rgba(44, 62, 80, 0.7)), url('https://images.unsplash.com/photo-1487958449943-2429e8be8625?auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding: 0 20px;
}
.hero-content h1 { font-size: 3rem; margin-bottom: 15px; color: var(--white); text-shadow: 2px 2px 4px rgba(0,0,0,0.5); line-height: 1.2; }
.hero-content .subtitle { font-size: 1.2rem; margin-bottom: 10px; letter-spacing: 2px; text-transform: uppercase; }
.hero-content .location { font-size: 1.1rem; margin-bottom: 30px; color: var(--accent-color); font-weight: bold; }
.hero .btn { border: 2px solid var(--accent-color); }
.hero .btn:hover { background: transparent; color: var(--accent-color); }

.section { padding: 80px 0; }
.section-title { text-align: center; margin-bottom: 50px; }
.section-title h2 { font-size: 2.5rem; margin-bottom: 10px; }
.section-title .line { width: 60px; height: 3px; background: var(--accent-color); margin: 0 auto; }

.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.service-card { background: var(--light-bg); padding: 30px; text-align: center; border-radius: 5px; transition: 0.3s; border-bottom: 3px solid transparent; }
.service-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); border-bottom: 3px solid var(--accent-color); }
.service-icon { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 20px; }

.manager-section { background-color: var(--primary-color); color: var(--white); text-align: center; }
.manager-section h2 { color: var(--white); }
.manager-name { font-size: 1.8rem; font-weight: bold; color: var(--accent-color); display: block; margin-top: 10px; }

.contact-grid { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; margin-top: 40px; }
.contact-item { text-align: center; min-width: 200px; }
.contact-item i { font-size: 2rem; color: var(--primary-color); margin-bottom: 15px; }

/* Cookie Banner */
.cookie-banner { position: fixed; bottom: -150px; left: 0; width: 100%; background: var(--primary-color); color: white; padding: 20px; display: flex; justify-content: center; align-items: center; gap: 20px; z-index: 2000; transition: 0.5s; flex-wrap: wrap; }
.cookie-banner.show { bottom: 0; }
.btn-cookie { background: var(--accent-color); color: white; border: none; padding: 8px 20px; cursor: pointer; font-weight: bold; }

@media (max-width: 768px) {
    .hero-content h1 { font-size: 2.2rem; }
    .contact-grid { flex-direction: column; }
}

/* --- Admin Styles (Merged from admin.css) --- */
.back-link { display: inline-block; margin-bottom: 20px; color: #666; text-decoration: none; }
.back-link:hover { color: var(--primary-color); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-weight: bold; margin-bottom: 5px; }

.btn-submit { background: var(--primary-color); color: white; padding: 12px 20px; border: none; border-radius: 4px; cursor: pointer; font-size: 1rem; }
.btn-submit:hover { background: #34495e; }

table { width: 100%; border-collapse: collapse; margin-top: 20px; }
table th, table td { padding: 12px; text-align: left; border-bottom: 1px solid #ddd; }
table th { background-color: #f2f2f2; }
table .actions a { margin-right: 10px; font-size: 1.1rem; }

/* Login Page */
body.login-page { display: flex; justify-content: center; align-items: center; height: 100vh; flex-direction: row; }
.login-card { background: var(--white); padding: 40px; border-radius: 5px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); width: 100%; max-width: 400px; text-align: center; border-top: 4px solid var(--accent-color); }
.login-card .logo img { max-height: 60px; margin-bottom: 20px; }
.login-card h2 { font-family: 'Playfair Display', serif; color: var(--primary-color); margin-bottom: 30px; }
.login-card .form-group { margin-bottom: 20px; text-align: left; }
.login-card .form-group label { display: block; margin-bottom: 8px; color: var(--primary-color); font-weight: 500; }
.login-card .form-group input { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 1rem; box-sizing: border-box; }
.login-card .form-group input:focus { border-color: var(--accent-color); outline: none; }
.login-card .btn { background: var(--primary-color); color: var(--white); padding: 12px; border: none; border-radius: 4px; font-size: 1rem; cursor: pointer; width: 100%; font-weight: bold; text-transform: uppercase; transition: 0.3s; }
.login-card .btn:hover { background: var(--accent-color); }
.login-card .back-link { display: block; margin-top: 20px; color: #666; text-decoration: none; font-size: 0.9rem; }
.login-card .back-link:hover { color: var(--primary-color); }

/* Dashboard */
.welcome-card { background: var(--white); padding: 30px; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); border-left: 5px solid var(--accent-color); margin-bottom: 30px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.dashboard-grid .card { padding: 20px; text-align: center; color: var(--text-color); }
.dashboard-grid .card i { font-size: 2rem; color: var(--primary-color); margin-bottom: 15px; display: block; }
.dashboard-grid .card h3 { margin: 10px 0; }
a.card-link { text-decoration: none; }
a.card-link .card { transition: transform 0.3s, box-shadow 0.3s; }
a.card-link:hover .card { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }

/* View Law */
.header-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.meta-info { color: #666; font-size: 0.9rem; margin-bottom: 20px; }
.meta-tag { background: #eee; padding: 4px 8px; border-radius: 4px; margin-right: 10px; }
.btn-icon { background: none; border: none; cursor: pointer; padding: 0; font-size: 1rem; margin-left: 5px; }
.btn-icon.delete { color: #e74c3c; }
.btn-icon.delete:hover { color: #c0392b; }

/* Manage Article */
.manage-article-form textarea { min-height: 100px; resize: vertical; }
.manage-article-form h2 { border-bottom: 2px solid #d4af37; padding-bottom: 10px; }
.section-container { background: #fff; padding: 15px; border-radius: 5px; margin-bottom: 15px; border: 1px solid #ddd; border-left: 4px solid #2c3e50; }
.section-container .section-container { margin-left: 30px; border-left-color: #d4af37; background: #fcfcfc; }
.section-header { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 0.9rem; font-weight: bold; }
.btn-save { background: #2c3e50; width: 100%; font-size: 1.1rem; margin-top: 20px; }
.btn-save:hover { background: #34495e; }
.btn-add { background: #d4af37; font-size: 0.9rem; }
.btn-remove { background: #c0392b; padding: 4px 8px; font-size: 0.8rem; margin-left: 10px; }
.btn-clean { background: #e0e0e0; color: #333; border: none; padding: 4px 8px; border-radius: 4px; cursor: pointer; font-size: 0.8rem; margin-left: 10px; }
.btn-clean:hover { background: #d0d0d0; }
.btn-add-child { background: #2980b9; padding: 4px 8px; font-size: 0.8rem; }

/* Import FEK */
.import-page h1 { color: #2c3e50; border-bottom: 2px solid #d4af37; padding-bottom: 10px; }
.upload-area { border: 2px dashed #ccc; padding: 40px; text-align: center; margin-bottom: 30px; border-radius: 8px; background: #fafafa; cursor: pointer; transition: 0.3s; }
.upload-area:hover { border-color: #d4af37; background: #fffdf5; }
.upload-area i { font-size: 3rem; color: #aaa; margin-bottom: 10px; }
.preview-section { display: none; margin-top: 30px; border-top: 1px solid #eee; padding-top: 20px; }
.article-preview { background: #f9f9f9; border: 1px solid #ddd; padding: 15px; margin-bottom: 15px; border-radius: 4px; }
.article-preview h4 { margin: 0 0 10px 0; color: #2c3e50; display: flex; justify-content: space-between; }
.article-preview .remove-btn { color: red; cursor: pointer; font-size: 0.9rem; }
.btn-loading { opacity: 0.7; cursor: not-allowed; }
#status-msg { margin-top: 10px; font-weight: bold; color: #666; }

/* --- Image Manager Styles --- */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}
.image-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}
.image-preview {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9f9f9;
    margin-bottom: 10px;
    border: 1px solid #eee;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}
.image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.image-info small {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 5px;
    color: #666;
}
.copy-group {
    display: flex;
    gap: 5px;
}
.copy-group input {
    flex: 1;
    padding: 5px;
    font-size: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 3px;
}
.btn-copy {
    background: #17a2b8;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    padding: 0 8px;
}
.btn-copy:hover { background: #138496; }

/* Image Overlay */
.image-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.2s;
}
.image-preview:hover .image-overlay { opacity: 1; }
.image-overlay i {
    color: white;
    font-size: 2rem;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

/* Modal Styles */
#fullSizeModal {
    display: none; 
    position: fixed; 
    z-index: 10000; 
    left: 0; top: 0;
    width: 100%; height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.9); 
    backdrop-filter: blur(5px);
}
#fullSizeModal .modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    margin-top: 5vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    border-radius: 4px;
}
#fullSizeModal .close {
    position: absolute;
    top: 20px; right: 30px;
    color: #f1f1f1;
    font-size: 40px; font-weight: bold;
    transition: 0.3s; cursor: pointer; z-index: 10001;
}
#fullSizeModal .close:hover { color: #bbb; }