/* ========== GLOBAL ========== */
* {
    box-sizing: border-box;
}

body {
    background: #eaf6fb;
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    color: #333;
}

/* ========== BUTTON STYLES ========== */
button,
a.new-initiative-btn,
.submit-btn,
.comment-btn,
.like-btn,
.btn-like,
.edit-btn,
.btn-edit,
.header-btn,
.header-btn-outline,
.btn-back-home,
.btn,
.btn.primary,
.preview-remove {
    display: inline-block;
    padding: 10px 22px;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    background: #1976d2;
    color: #fff !important;
    box-shadow: 0 2px 6px rgba(25, 118, 210, 0.06);
    transition: background 0.15s, color 0.15s, box-shadow 0.15s, transform 0.08s;
    outline: none;
}

button:active,
a.new-initiative-btn:active,
.submit-btn:active,
.comment-btn:active,
.like-btn:active,
.btn-like:active,
.edit-btn:active,
.btn-edit:active,
.header-btn:active,
.header-btn-outline:active,
.btn-back-home:active,
.btn:active,
.preview-remove:active {
    transform: scale(0.97);
}

button:hover,
a.new-initiative-btn:hover,
.submit-btn:hover,
.comment-btn:hover,
.like-btn:hover,
.btn-like:hover,
.edit-btn:hover,
.btn-edit:hover,
.header-btn:hover,
.header-btn-outline:hover,
.btn-back-home:hover,
.btn:hover,
.preview-remove:hover {
    background: #1565c0;
    color: #fff;
    text-decoration: none;
}

/* Secondary (Outline) Buttons */
.header-btn-outline,
.edit-btn,
.btn-edit,
.btn.outline {
    background: #fff;
    color: #1976d2 !important;
    border: 1.5px solid #1976d2;
    box-shadow: none;
}

.header-btn-outline:hover,
.edit-btn:hover,
.btn-edit:hover,
.btn.outline:hover {
    background: #e3f2fd;
    color: #1565c0 !important;
    border-color: #1565c0;
}

button:disabled,
.submit-btn:disabled,
.btn:disabled {
    background: #cfd8dc;
    color: #909eac !important;
    cursor: not-allowed;
    box-shadow: none;
}

/* ========== HEADER ========== */
.site-header {
    background: #1976d2;
    color: #fff;
    padding: 12px 24px;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.10);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left a.header-logo {
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #fff !important;
}

.header-left a.header-logo:hover {
    text-decoration: underline;
}

.header-right {
    display: flex;
    gap: 14px;
}

/* ========== FORM ELEMENTS ========== */
label {
    color: #1976d2;
    font-weight: 600;
    margin-bottom: 4px;
}

.input-wrapper {
    display: flex;
    flex-direction: column;
    margin-bottom: 18px;
}

.register-card,
.login-card {
    max-width: 400px;
    margin: 44px auto 0 auto;
    background: #fff;
    border: 1px solid #90caf9;
    border-radius: 12px;
    padding: 36px;
    box-shadow: 0 6px 20px rgba(25, 118, 210, 0.08);
}

.input-blue,
.comment-input,
input[type="text"],
textarea,
select {
    border: 1.5px solid #1976d2;
    border-radius: 8px;
    padding: 10px 12px;
    width: 100%;
    font-size: 1rem;
    background: #fff;
    color: #333;
}

input[type="text"],
textarea,
select {
    margin-bottom: 6px;
}

input[type="file"] {
    margin-top: 4px;
    font-size: 0.95rem;
}

input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #90caf9;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.12);
}

/* Hints and validation messages */
.hint {
    color: #6b7280;
    font-size: 0.86rem;
}

.alert {
    border-radius: 10px;
    padding: 12px 14px;
    margin: 12px 0;
}

.alert-error {
    background: #ffd6d6;
    color: #d32f2f !important;
    border: 1px solid #fc9696;
}

.alert-success {
    background: #e6f7e8;
    color: #198754 !important;
    border: 1px solid #8fd7a2;
}

/* ========== NEW INITIATIVE PAGE ========== */
.new-initiative-container {
    max-width: 900px;
    margin: 44px auto 0 auto;
    padding: 0 18px 28px 18px;
}

.page-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.page-title {
    margin: 0;
    font-size: 2.2rem;
    color: #1976d2;
    font-weight: 700;
}

.back-link {
    text-decoration: none;
    color: #1976d2 !important;
    font-weight: 600;
}

.back-link:hover {
    text-decoration: underline;
}

.initiative-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #fff;
    border: 1.5px solid #90caf9;
    border-radius: 12px;
    padding: 22px 24px;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.08);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
}

.form-group.inline {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.image-preview {
    margin-top: 8px;
    display: none;
    align-items: center;
    gap: 12px;
}

.image-preview img {
    max-height: 140px;
    border-radius: 10px;
    border: 1px solid #e5f2ff;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.08);
}

.preview-remove {
    background: #ef4444;
}

.form-actions {
    display: flex;
    gap: 10px;
}

.btn {
    background: #f7fbff;
    color: #1976d2 !important;
    border: 1.5px solid #90caf9;
}

.btn.primary {
    background: #1976d2;
    color: #fff !important;
    border-color: #1976d2;
}

/* ========== FEED ========== */
.feed-container {
    max-width: 950px;
    margin: 48px auto 0 auto;
    padding: 0 18px;
}

.feed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.feed-title {
    color: #1976d2;
    text-align: center;
    flex: 1;
    font-size: 2.6rem;
    font-weight: 700;
}

.initiatives-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.initiative-card {
    background: #fff;
    border: 1.5px solid #90caf9;
    border-radius: 12px;
    padding: 22px 24px;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.08);
}

.initiative-title {
    color: #1976d2;
    text-align: center;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 1.45rem;
}

.initiative-photo {
    display: block;
    max-width: 92%;
    border-radius: 8px;
    margin: 10px auto 12px auto;
}

.initiative-actions {
    display: flex;
    justify-content: center;
    gap: 13px;
    margin: 10px 0 16px 0;
}

.empty-feed {
    text-align: center;
    color: #6b7280;
    margin-top: 26px;
    font-size: 1.15rem;
}

/* ========== COMMENTS ========== */
.comments {
    margin-top: 20px;
}

.comments-title {
    margin: 12px 0 8px;
    color: #1976d2;
    text-align: center;
    font-size: 1.2rem;
}

.comment {
    background: #eaf4ff;
    border-radius: 6px;
    padding: 9px 12px;
    margin-bottom: 7px;
    font-size: 1rem;
}

.comment-empty {
    color: #6b7280;
    background: #f3f6fb;
    padding: 9px 12px;
    border-radius: 6px;
}

.comment-form {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

/* ========== PROFILE PAGE ========== */
.profile-container {
    max-width: 800px;
    margin: 46px auto 0 auto;
    background: #fff;
    padding: 36px;
    border-radius: 10px;
    border: 1.5px solid #90caf9;
    box-shadow: 0 6px 24px rgba(25, 118, 210, 0.07);
}

.profile-title {
    color: #1976d2;
    text-align: center;
    margin-bottom: 28px;
    font-size: 2.2rem;
    font-weight: 700;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 32px;
    margin-bottom: 36px;
}

.avatar-img {
    width: 124px;
    height: 124px;
    border-radius: 50%;
    object-fit: cover;
    border: 2.5px solid #1976d2;
}

.profile-info p {
    font-size: 1.14rem;
    color: #333;
    margin: 6px 0;
}

.profile-edit-form,
.profile-stats,
.user-posts {
    margin-bottom: 36px;
}

.profile-stats ul {
    list-style-type: none;
    padding: 0;
}

.profile-stats li {
    font-size: 1.07rem;
    margin-bottom: 7px;
}

.post-card {
    border: 1.5px solid #90caf9;
    border-radius: 8px;
    padding: 17px;
    margin-bottom: 14px;
    background: #fafdff;
}

.post-title {
    color: #1976d2;
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.post-content {
    font-size: 1rem;
    color: #444;
    margin-bottom: 8px;
}

.post-date {
    font-size: 0.89rem;
    color: #777;
}

/* ========== ERROR PAGES ========== */
.error-page-container {
    max-width: 600px;
    margin: 100px auto;
    padding: 44px;
    background: #fff;
    border: 1px solid #90caf9;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 14px rgba(25, 118, 210, 0.11);
}

.error-code {
    font-size: 8rem;
    color: #1976d2;
    margin: 0;
}

.error-description {
    font-size: 1.15rem;
    color: #333;
    margin-bottom: 34px;
}

.btn-back-home {
    font-size: 1rem;
    background-color: #1976d2;
    padding: 13px 34px;
    color: #fff !important;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.2s;
    border: none;
}

.btn-back-home:hover {
    background-color: #1565c0;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 560px) {
    .form-actions { flex-direction: column; }
    .page-header { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* Focus rings for accessibility */
.btn:focus,
button:focus,
a:focus {
    outline: 2px solid #90caf9;
    outline-offset: 2px;
}

.form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 .15rem rgba(13,110,253,.25);
}


/* ========== END ========== */
