/* ============================================
   Eco-Tracker - Κύρια Στυλ
   Γενική εμφάνιση, header, footer, accordion, κάρτες, φόρμες, κλπ.
   ============================================ */

/* Γενικά Στυλ */
body {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background-color: #f4f7f6;
    margin: 0;
    padding: 0;
}

/* Header & Navigation */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 50px;
    background: #1a4731;
    color: white;
    flex-wrap: wrap;
    gap: 15px;
}

header .logo img {
    height: 50px;
    width: auto;
}

header nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 10px;
}

header nav ul li a {
    color: #ffffff !important;
    text-decoration: none;
    padding: 8px 15px;
    font-weight: bold;
    transition: color 0.3s;
}

header nav ul li a:hover,
header nav ul li a.active {
    color: #81c784 !important;
    background-color: rgba(255,255,255,0.1);
    border-radius: 20px;
}

.btn-login {
    color: #ffffff !important;
    text-decoration: none;
    border: 1px solid #ffffff;
    padding: 8px 20px;
    border-radius: 20px;
    transition: all 0.3s;
}

.btn-login:hover {
    background-color: #ffffff;
    color: #1a4731 !important;
}

/* Header Right (auth + language) */
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.welcome-user {
    color: white;
    font-size: 14px;
}

.logout-btn {
    background: #d32f2f;
    color: white !important;
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: #b71c1c;
}

/* Language Selector */
.language-selector {
    margin-left: 5px;
}

.language-dropdown {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.language-dropdown option {
    background: #1a4731;
    color: white;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 80px 20px;
    background: white;
}

.hero h1 {
    font-size: 2.5rem;
    color: #1a4731;
    margin-bottom: 20px;
}

.hero p {
    max-width: 700px;
    margin: 0 auto 30px;
    font-size: 1.2rem;
    color: #555;
}

.hero-actions {
    margin-top: 20px;
}

/* Buttons */
.btn {
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    margin: 10px;
    display: inline-block;
    font-weight: bold;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: #1a4731;
    color: white;
}

.btn-primary:hover {
    background: #0e2e1f;
    transform: translateY(-2px);
}

.btn-secondary {
    border: 2px solid #1a4731;
    color: #1a4731;
    background: transparent;
}

.btn-secondary:hover {
    background: #1a4731;
    color: white;
}

.btn-full {
    width: 100%;
    text-align: center;
}

/* Stats Section */
.stats-section {
    background: linear-gradient(135deg, #1a4731 0%, #2e7d32 100%);
    padding: 60px 20px;
    margin: 40px 0;
}

.stats-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    gap: 30px;
    flex-wrap: wrap;
}

.stat-card {
    text-align: center;
    color: white;
    padding: 20px;
    min-width: 150px;
}

.stat-number {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 18px;
    opacity: 0.9;
}

/* Gallery Section */
.image-gallery {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 50px;
    flex-wrap: wrap;
}

.gallery-item {
    display: block;
    text-decoration: none;
    color: inherit;
    background: white;
    width: 300px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.gallery-caption {
    padding: 20px;
    text-align: center;
}

.gallery-caption h3 {
    margin: 0 0 10px 0;
    color: #1a4731;
}

/* CTA Section */
.cta-section {
    background: #f5f5f5;
    padding: 60px 20px;
    text-align: center;
    margin: 40px 0;
}

.cta-content h2 {
    color: #1a4731;
    font-size: 32px;
    margin-bottom: 20px;
}

.cta-content p {
    max-width: 600px;
    margin: 0 auto 30px;
    color: #666;
    font-size: 18px;
}

/* Accordion (Actions Page) */
.accordion {
    background-color: #e8f5e9;
    color: #1a4731;
    cursor: pointer;
    padding: 18px;
    width: 100%;
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: bold;
    margin-top: 10px;
    transition: background 0.3s;
    border-radius: 8px;
}

.accordion:hover, .accordion.active {
    background-color: #c8e6c9;
}

.panel {
    padding: 20px;
    display: none;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 0 0 8px 8px;
}

.action-count {
    font-size: 14px;
    font-weight: normal;
    margin-left: 10px;
    color: #666;
}

/* Action Cards */
.action-card {
    display: flex;
    border: 1px solid #eee;
    margin-bottom: 15px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.action-card:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.action-card img {
    width: 200px;
    height: 150px;
    object-fit: cover;
}

.card-content {
    padding: 15px;
    flex: 1;
}

.card-content h2 {
    margin: 0 0 10px 0;
    font-size: 1.3rem;
    color: #1a4731;
}

.card-content p {
    margin: 0 0 10px 0;
    color: #555;
}

.action-meta {
    display: flex;
    gap: 15px;
    margin: 10px 0;
    font-size: 14px;
    color: #666;
}

.action-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.empty-msg {
    font-style: italic;
    color: #666;
    padding: 20px;
    text-align: center;
}

/* Action Detail Page */
.detail-hero-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 30px;
}

.detail-content h1 {
    font-size: 2.5rem;
    color: #1a4731;
    margin-bottom: 10px;
}

.short-desc {
    font-size: 1.2rem;
    color: #444;
    margin-bottom: 30px;
    border-left: 4px solid #2e7d32;
    padding-left: 15px;
}

.info-grid {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.info-item {
    flex: 1;
    background: #f1f8e9;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.info-label {
    display: block;
    font-size: 0.8rem;
    color: #666;
    font-weight: bold;
    margin-bottom: 5px;
}

.info-value {
    font-size: 1rem;
    color: #1a4731;
    font-weight: bold;
}

.location-detail, .coordinates {
    background: #f5f5f5;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.full-desc p {
    line-height: 1.8;
    color: #333;
    margin-bottom: 20px;
}

.action-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.submitted-by {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* ---------- Forms (Login, Register, Submit) ---------- */
.auth-box {
    max-width: 500px;
    margin: 60px auto;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    text-align: center;
}

.auth-box h1 {
    color: #1a4731;
    margin-bottom: 10px;
}

.auth-box p {
    color: #666;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

.form-section {
    max-width: 700px;
    margin: 40px auto;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.eco-form {
    display: flex;
    flex-direction: column;
}

.eco-form .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.eco-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.eco-form input,
.eco-form select,
.eco-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

.eco-form input:focus,
.eco-form select:focus,
.eco-form textarea:focus {
    outline: none;
    border-color: #1a4731;
    box-shadow: 0 0 0 2px rgba(26,71,49,0.2);
}

.form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
}

.form-group-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
    margin-bottom: 20px;
    font-size: 0.85rem;
}

.form-group-checkbox input {
    margin-top: 3px;
    width: auto;
}

fieldset {
    border: 1px solid #e0e0e0;
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 5px;
}

legend {
    font-weight: bold;
    color: #1a4731;
    padding: 0 10px;
}

/* Password visibility toggle */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    flex: 1;
    padding-right: 40px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    color: #666;
    transition: color 0.2s;
}

.toggle-password:hover {
    color: #1a4731;
}

.auth-footer {
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 20px;
    font-size: 0.9rem;
}

.auth-footer a {
    color: #2e7d32;
    text-decoration: none;
    font-weight: bold;
}

/* Messages */
.success-message, .error-message, .info-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.success-message {
    background: #e8f5e9;
    border-left: 4px solid #2e7d32;
    color: #1b5e20;
}

.error-message {
    background: #ffebee;
    border-left: 4px solid #c62828;
    color: #b71c1c;
}

.info-message {
    background: #e3f2fd;
    border-left: 4px solid #1976d2;
    color: #0d47a1;
}

/* Footer */
footer {
    background: #1a4731;
    color: white;
    text-align: center;
    padding: 30px;
    margin-top: 50px;
}

footer a {
    color: #a5d6a7;
    text-decoration: none;
    margin: 0 10px;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 15px;
    }
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    .header-right {
        justify-content: center;
    }
    .hero h1 {
        font-size: 1.8rem;
    }
    .hero p {
        font-size: 1rem;
    }
    .info-grid {
        flex-direction: column;
    }
    .action-card {
        flex-direction: column;
    }
    .action-card img {
        width: 100%;
        height: 200px;
    }
    .stats-container {
        flex-direction: column;
        align-items: center;
    }
    .form-row {
        flex-direction: column;
        gap: 10px;
    }
    .detail-hero-image img {
        height: 250px;
    }
    .image-gallery {
        padding: 30px 15px;
    }
    .gallery-item {
        width: 100%;
        max-width: 300px;
    }
}