/* Public-facing styles for rich-text content produced by CKEditor 5.
   Keeps uploaded images responsive and tables/quotes/captions readable. */

.ck-content {
    line-height: 1.7;
    word-wrap: break-word;
}

.ck-content h1,
.ck-content h2,
.ck-content h3,
.ck-content h4 {
    line-height: 1.25;
    margin: 1.4em 0 0.5em;
    font-weight: 700;
}

.ck-content p {
    margin: 0 0 1em;
}

.ck-content a {
    color: #16a34a;
    text-decoration: underline;
}

.ck-content ul,
.ck-content ol {
    margin: 0 0 1em;
    padding-left: 1.6em;
}

.ck-content li {
    margin: 0.25em 0;
}

.ck-content blockquote {
    margin: 1.2em 0;
    padding: 0.6em 1.2em;
    border-left: 4px solid #22c55e;
    background: rgba(34, 197, 94, 0.06);
    color: #374151;
    font-style: italic;
}

/* Images and figures */
.ck-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.ck-content figure {
    margin: 1.5em 0;
}

.ck-content figure.image {
    display: table;
    clear: both;
    text-align: center;
}

.ck-content figure.image img {
    display: block;
    margin: 0 auto;
}

.ck-content figure.image > figcaption {
    display: table-caption;
    caption-side: bottom;
    padding: 0.5em;
    font-size: 0.9em;
    color: #6b7280;
    text-align: center;
}

/* CKEditor alignment helper classes */
.ck-content .image-style-align-left,
.ck-content figure.image.image-style-align-left {
    float: left;
    margin-right: 1.5em;
    max-width: 50%;
}

.ck-content .image-style-align-right,
.ck-content figure.image.image-style-align-right {
    float: right;
    margin-left: 1.5em;
    max-width: 50%;
}

.ck-content .image-style-align-center,
.ck-content figure.image.image-style-align-center {
    margin-left: auto;
    margin-right: auto;
}

.ck-content figure.image.image-style-side {
    float: right;
    margin-left: 1.5em;
    max-width: 50%;
}

/* Tables */
.ck-content figure.table,
.ck-content table {
    width: auto;
    max-width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    overflow-x: auto;
}

.ck-content table td,
.ck-content table th {
    border: 1px solid #d1d5db;
    padding: 8px 12px;
    text-align: left;
}

.ck-content table th {
    background: #f3f4f6;
    font-weight: 600;
}

.ck-content hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 2em 0;
}

/* Highlight marker from the editor */
.ck-content .marker-yellow { background-color: #fdfd77; }
.ck-content .marker-green { background-color: #62f962; }
.ck-content .marker-pink { background-color: #fc7999; }
.ck-content .marker-blue { background-color: #72cdfd; }

/* ---------------------------------------------------------------------------
   Attachments / downloadable files list (news & event detail pages)
   --------------------------------------------------------------------------- */
.attachments-section {
    margin-top: 40px;
    margin-bottom: 40px;
}

.attachments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    color: #1f2937;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.attachment-item:hover {
    border-color: #22c55e;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.15);
    transform: translateY(-1px);
}

.attachment-ext {
    flex: 0 0 auto;
    min-width: 46px;
    height: 46px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 8px;
}

.attachment-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1 1 auto;
}

.attachment-name {
    font-weight: 600;
    word-break: break-word;
}

.attachment-meta {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.attachment-dl {
    flex: 0 0 auto;
    color: #16a34a;
}
