/* ==============================
   MAIN CONTAINER
================================= */

.main-container {
    flex: 1;
    display: flex;
    flex-direction: column;   /* stack vertically */
    align-items: center;      /* center horizontally */
    gap: 40px;                /* space between cards */
    padding: 40px 20px;
}

/* ==============================
   CARD
================================= */

.card {
    width: 100%;
    max-width: 800px;   /* controls overall card width */
    min-width: 500px;   /* ensures consistent minimum width */
    background: var(--card-bg);
    backdrop-filter: blur(14px);
    border-radius: 20px;
    padding: 60px 80px;
    box-shadow:
        0 10px 30px rgba(31, 61, 43, 0.08),
        0 0 0 1px rgba(95, 143, 107, 0.08);
    transition: 0.2s ease;
}

/* Centered card (index page) */
.card--centered {
    text-align: center;
}

/* Content card (about, documents, etc.) */
.card--content {
    text-align: left;
    max-width: 720px;
    margin: 0 auto;
    box-shadow: none;
//    padding: 60px 80px;
}

.card:hover {
    transform: translateY(-0px);
    box-shadow:
        0 18px 45px rgba(31, 61, 43, 0.12),
        0 0 0 1px rgba(95, 143, 107, 0.12);
}


/* LOGIN FORM */
.login-card {
    max-width: 420px;
    width: 100%;
}

.auth-info-card {
    max-width: 480px;
    width: 100%;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.alert-error {
    background: #fdecea;
    color: #8a1f1f;
    border: 1px solid #f5c2c2;
}

.alert-success {
    background: #eaf7ef;
    color: #1f5133;
    border: 1px solid #b8e0c7;
}

.resend-wrapper {
    margin-top: 20px;
}


/* ==============================
   TYPOGRAPHY
================================= */

.card h1,
.card h2,
.card h3,
.card h4,
.card h5,
.card h6 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 12px;
}

.card h1 { font-size: 2.2rem; }
.card h2 { font-size: 1.8rem; }
.card h3 { font-size: 1.3rem; }
.card h4 { font-size: 1.1rem; }
.card h5 { font-size: 1rem; }
.card h6 { font-size: 0.9rem; }

.card p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* ==============================
   CARD HEADER
================================= */

.card-header {
    margin-bottom: 30px;
}

.card-header h2 {
    margin-bottom: 30px;
}

/* ==============================
   SECTIONS
================================= */

.card section {
    margin-bottom: 30px;
}

/* ==============================
   BOARD LIST
================================= */

.board-list {
    list-style: none;
    padding: 0;
    margin-top: 10px;
}

.board-list li {
    padding: 6px 0;
    border-bottom: 1px solid rgba(31, 61, 43, 0.1);
}

.board-list li:last-child {
    border-bottom: none;
}

/* ==============================
   LOGO (INDEX PAGE ONLY)
================================= */

.logo {
    max-width: 280px;
    margin-bottom: 30px;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.04);
}


/* ==============================
   PROFILE FORM
================================= */
.profile-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

input:disabled {
    background: rgba(31, 61, 43, 0.05);
    cursor: not-allowed;
}

.text-muted {
    color: var(--text-muted);
    margin-bottom: 15px;
}




/* ==============================
   CONTACT FORM
================================= */

.card-intro {
    margin-bottom: 30px;
    color: var(--text-muted);
}

/* Form layout */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Group */
.form-group {
    display: flex;
    flex-direction: column;
}

.form-group--consent {
  margin-top: 1rem;
}

/* Labels */
.form-group label {
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--green-dark);
}

/* Inputs & textarea */
.form-group input,
.form-group textarea {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(31, 61, 43, 0.15);
    font-family: inherit;
    font-size: 1rem;
    transition: 0.2s ease;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--green-light);
    box-shadow: 0 0 0 3px rgba(95, 143, 107, 0.15);
}

/* Button */
.btn-primary {
    background: var(--green-medium);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
}

  /* Remove horizontal container padding */
  .main-container {
    padding-left: 0;
    padding-right: 0;
  }

  /* Let card stretch fully */
//  .card {
//    margin-left: 0;
//    margin-right: 0;
//    max-width: 100%;
//    border-radius: 0;
//  }

//    box-shadow: none;
//  }
// transition: 0.2s ease;
//}

.btn-primary:hover {
    background: var(--green-dark);
}

/* Form actions */
.form-actions {
    margin-top: 10px;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.alert-error {
    background: #fdecea;
    color: #8a1f1f;
    border: 1px solid #f5c2c2;
}

/* 2FA-SETUP */
.twofa-card {
    max-width: 520px;
    width: 100%;
}

.qr-wrapper {
    display: flex;
    justify-content: center;
    margin: 25px 0;
}

.qr-wrapper img {
    max-width: 220px;
    border-radius: 16px;
    padding: 10px;
    background: white;
    box-shadow: 0 8px 20px rgba(31, 61, 43, 0.08);
}

.manual-key {
    margin: 15px 0 25px;
    text-align: center;
}

.manual-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.manual-key code {
    background: rgba(31, 61, 43, 0.08);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.twofa-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#token {
    text-align: center;
    letter-spacing: 4px;
    font-weight: 600;
}


/* ==============================
   DOCUMENTS
================================= */

/* ============ LIST ============ */
.document-list {
    list-style: none;
    padding: 0;
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.document-item {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    padding: 20px 24px;
    border: 1px solid rgba(31, 61, 43, 0.08);
    transition: 0.2s ease;
}

.document-item:hover {
    box-shadow: 0 8px 20px rgba(31, 61, 43, 0.08);
}

.document-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    text-decoration: none;
    color: var(--green-dark);

//    margin-bottom: 6px;
}

.document-description {
    margin-bottom: 8px;
    color: var(--text-muted);
}

.document-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.badge {
    display: inline-block;
    font-size: 0.7rem;
    padding: 4px 8px;
//    border-radius: 999px;
    border-radius: 700px;
    margin-top: -8px;
    margin-left: 8px;
    background: rgba(31, 61, 43, 0.08);
}

.badge-new {
    background: var(--green-light);
    color: white;
}

.badge-file {
    background: #ccc;
    color: #333;
    margin-top: -8px;
    margin-bottom: 8px;
    margin-left: 0px;
}

.badge-archived {
    background: #ccc;
    color: #333;
}

.document-actions {
    margin-top: 12px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}




/* ============ LIST ============ */
.document-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--green-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(31, 61, 43, 0.15);
    font-family: inherit;
    font-size: 1rem;
    background: white;
    transition: 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--green-light);
    box-shadow: 0 0 0 3px rgba(95, 143, 107, 0.15);
}

.btn-primary {
    background: var(--green-medium);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.btn-primary:hover {
    background: var(--green-dark);
}

.btn-secondary {
    background: rgba(31, 61, 43, 0.08);
    color: var(--green-dark);
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(31, 61, 43, 0.15);
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    flex-wrap: wrap;
}


/* ==============================
   POSTS
================================= */

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.post-filter {
    margin: 20px 0 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.post-filter select {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(31, 61, 43, 0.15);
}

.post-list {
    list-style: none;
    padding: 0;
    margin: 0;
//    display: flex;
//    flex-direction: column;
//    gap: 25px;
}


/* ==============================
   POST BODY IMAGES
================================= */

.post-body {
    line-height: 1.7;
    font-size: 1.05rem;
}

/* Image wrapper */
.post-body .wrap {
    margin: 30px 0;
    text-align: center;
}

/* Actual image */
.post-body .wrap img {
    max-width: 100%;
    height: auto;
    display: inline-block;

    border-radius: 14px;
    box-shadow:
        0 10px 30px rgba(31, 61, 43, 0.10),
        0 0 0 1px rgba(31, 61, 43, 0.05);

    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Subtle hover effect */
.post-body .wrap img:hover {
    transform: translateY(-2px);
    box-shadow:
        0 16px 40px rgba(31, 61, 43, 0.15),
        0 0 0 1px rgba(31, 61, 43, 0.08);
}

.post-item {
    padding: 22px 28px;
    border-radius: 0px;
    background: transparent;

    border-top: 1px solid rgba(31, 61, 43, 0.12);

    transition: 0.2s ease;
}

/* Add bottom line only to last item */
.post-item:last-child {
    border-bottom: 1px solid rgba(31, 61, 43, 0.12);
}

//.post-item {
//    background: rgba(255,255,255,0.65);
//    border-radius: 16px;
//    border-radius: 0px;
//    padding: 24px 28px;

//    border-top: 1px solid rgba(31, 61, 43, 0.12);
//    border-bottom: 1px solid rgba(31, 61, 43, 0.12);

//    transition: 0.2s ease;
    
//}

.post-item:hover {
    background: rgba(255,255,255,0.85);
}

.post-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    text-decoration: none;
    color: var(--green-dark);
}

.post-title:hover {
    color: var(--green-medium);
}

.post-meta--timestamps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
//  color: var(--text-muted);
}

.meta-block {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.meta-divider {
  color: #c5cdc9;
}

/* Author separator dot for desktop */
.meta-date::after {
  content: "·";
  margin: 0 0.4rem;
  color: var(--text-muted);
}

.post-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.meta-author {
  margin-left: -0.2rem;
  color: #76857d;
}

.meta-separator {
    margin: 0 8px;
}

.post-badges {
//    margin-top: 10px;
    margin-top: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge-draft {
    background: #ffe8b3;
    color: #8a5a00;
}

.badge-images {
    background: rgba(31, 61, 43, 0.1);
}

.breadcrumb {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.breadcrumb a {
    text-decoration: none;
    color: var(--green-medium);
}

.breadcrumb-sep {
    margin: 0 2px;
}

/* HERO IMAGE */
.hero img {
    width: 100%;
    border-radius: 16px;
    margin: 25px 0;
}

/* GALLERY GRID */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
}

.gallery img {
    width: 100%;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.2s ease;
}

.gallery img:hover {
    transform: scale(1.03);
}

/* POST COMMENTS */
.comment-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comment {
    padding: 15px 18px;
    background: rgba(255,255,255,0.6);
    border-radius: 12px;
}

.comment-meta {
    font-size: 0.85rem;
    margin-bottom: 6px;
    color: var(--text-muted);
}

/* POST GALLERY FORM */
.gallery-form {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}

.gallery-item {
    background: rgba(255,255,255,0.6);
    border-radius: 14px;
    padding: 12px;
    border: 1px solid rgba(31, 61, 43, 0.08);
}

.gallery-item img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 10px;
}

.gallery-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-xs {
    font-size: 0.75rem;
    padding: 6px 10px;
}


/* ==============================
   CONTACT FORM ITEMS
================================= */
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1.5;
}

.checkbox-label input {
  margin-top: 0.25rem;
}

/* ==============================
   PAGINATION
================================= */

.pagination {
    margin-top: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

/* ==============================
   MAIN FOOTER
================================= */
.site-footer {
  text-align: center;
  padding: 3rem 1rem 2rem;
//  background: #f5f5f5;
  color: #444;
  font-size: 0.95rem;
}

/* Create vertical spacing between blocks */
.site-footer > div {
  margin-bottom: 1.25rem;
}

/* Language selector */
.footer-language a {
  text-decoration: none;
  color: #333;
  margin: 0 0.25rem;
}

.footer-language a:hover {
  text-decoration: underline;
}

/* User section */
.footer-user {
  margin-bottom: 1rem;
}

.footer-user-info {
  margin-bottom: 0.4rem;
}

.footer-user-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;   /* center horizontally */
}

.footer-user-links a {
  text-decoration: none;
  color: #333;
  margin: 0 0.25rem;
  font-weight: 500;
}

.footer-user-links a:hover {
  text-decoration: underline;
}

/* Footer copy slightly muted */
.footer-copy {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: #777;
}

.footer-separator {
  color: #aaa;
}

/* ==============================
   COMMENT FORM
================================= */
.comment-form {
  max-width: 600px;   /* Wider form */
  width: 100%;
}

.comment-form textarea {
  width: 100%;
  padding: 0.75rem;
  font-size: 0.95rem;
  resize: vertical;
  border-radius: 4px;
  border: 1px solid #ccc;
}

.comment-form .form-group {
  margin-bottom: 0.75rem;
}

.comment-form .form-actions {
  display: block;      /* remove horizontal alignment */
}

.comment-form button {
  padding: 0.6rem 1.5rem;
}

/* ==============================
   MOBILE 768px
================================= */

@media (max-width: 768px) {

    .main-container {
      padding-left: 0;
      padding-right: 0;
      border-radius: 0px;
    }

    .card {
        min-width: unset;
        width: 100%;
        padding: 40px 30px;
    }

    .login-card {
        padding: 40px 30px;
    }

    .card h1 { font-size: 1.8rem; }
    .card h2 { font-size: 1.5rem; }
    .card h3 { font-size: 1.2rem; }

    .form-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
    }

  .meta-date::after {
    content: "";
    margin: 0 0.4rem;
    color: var(--text-muted);
  }

  .post-meta--timestamps {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }

  .meta-block {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }

  /* Keep label + date inline */
  .meta-block .meta-label,
  .meta-block .meta-date {
    display: inline;
  }

  .meta-block .meta-author {
    margin-left: 0;
  }

  .meta-divider {
    display: none;
  }

}


/* ==============================
   MOBILE 640px
================================= */

@media (max-width: 640px) {

  body {
    background: #f5f6f5;
  }

  .main-container {
    padding: 0;
    align-items: stretch;
  }

  .card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    border-radius: 0;

    /* 🔥 reduce horizontal padding */
    padding: 30px 16px;
  }

  .card--content {
    box-shadow: none;
  }

  .post-item {
    margin-left: -16px;
    margin-right: -16px;
    border-radius: 0;
  }

}

