.qalam-gallery-section { position: relative; overflow: clip; background: #fff; }
.qalam-gallery-section::before { position: absolute; inset-inline: 0; inset-block-start: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(0,167,165,.45), transparent); content: ""; }
.qalam-activity-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 34px; }
.qalam-activity-card { position: relative; min-width: 0; overflow: hidden; border: 1px solid #dbe6e9; border-radius: 8px; background: #fff; box-shadow: 0 14px 34px rgba(7,59,76,.08); transition: transform .65s cubic-bezier(.2,.75,.25,1), box-shadow .65s ease, border-color .65s ease; }
.qalam-activity-card::after { position: absolute; inset-block: -20%; inset-inline-start: -75%; width: 42%; transform: skewX(-18deg); background: linear-gradient(90deg, transparent, rgba(255,255,255,.68), transparent); content: ""; pointer-events: none; transition: inset-inline-start .8s cubic-bezier(.2,.75,.25,1); }
.qalam-activity-card:hover { transform: translateY(-8px); border-color: #b6d5da; box-shadow: 0 24px 55px rgba(7,59,76,.15); }
.qalam-activity-card:hover::after { inset-inline-start: 135%; }
.qalam-activity-open { width: 100%; display: block; border: 0; background: transparent; color: inherit; text-align: start; cursor: pointer; }
.qalam-activity-media { position: relative; aspect-ratio: 3 / 2; display: block; overflow: hidden; background: #dce9ec; }
.qalam-activity-media::after { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 54%, rgba(5,40,50,.58)); content: ""; }
.qalam-activity-media img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .85s cubic-bezier(.2,.75,.25,1), filter .85s ease; }
.qalam-activity-card:hover .qalam-activity-media img { transform: scale(1.055) rotate(.35deg); filter: saturate(1.08) contrast(1.02); }
.qalam-activity-count { position: absolute; z-index: 1; inset-inline-end: 12px; inset-block-end: 11px; display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 4px 9px; border: 1px solid rgba(255,255,255,.34); border-radius: 999px; background: rgba(7,59,76,.76); color: #fff; font-size: .74rem; font-weight: 700; backdrop-filter: blur(8px); }
.qalam-activity-count svg, .qalam-activity-date svg, .qalam-activity-body small svg { width: 16px; height: 16px; }
.qalam-activity-body { min-height: 190px; display: flex; flex-direction: column; align-items: flex-start; padding: 17px; }
.qalam-activity-date { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 9px; color: #15807f; font-size: .76rem; font-weight: 700; }
.qalam-activity-body > strong { color: #073b4c; font-size: 1.08rem; line-height: 1.45; }
.qalam-activity-body > span:not(.qalam-activity-date) { display: -webkit-box; margin-top: 8px; overflow: hidden; color: #617481; font-size: .88rem; line-height: 1.7; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.qalam-activity-body small { display: inline-flex; align-items: center; gap: 7px; margin-top: auto; padding-top: 15px; color: #0f4c5c; font-size: .78rem; font-weight: 800; }
.qalam-activity-body small svg { transition: transform .35s ease; }
.qalam-activity-card:hover .qalam-activity-body small svg { transform: translateX(-4px); }
html[dir="ltr"] .qalam-activity-card:hover .qalam-activity-body small svg { transform: translateX(4px); }
.qalam-album { width: min(1180px, calc(100% - 32px)); max-height: calc(100dvh - 34px); margin: auto; padding: 0; overflow: hidden; border: 1px solid rgba(255,255,255,.3); border-radius: 8px; background: #f7fafb; color: #102331; box-shadow: 0 35px 100px rgba(4,29,37,.35); }
.qalam-album::backdrop { background: rgba(3,28,36,.78); backdrop-filter: blur(7px); animation: qalamBackdropIn .28s ease both; }
.qalam-album[open] { animation: qalamAlbumIn .48s cubic-bezier(.2,.75,.25,1) both; }
.qalam-album-shell { max-height: calc(100dvh - 34px); overflow-y: auto; overscroll-behavior: contain; }
.qalam-album header { position: sticky; inset-block-start: 0; z-index: 3; min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 18px; border-bottom: 1px solid #d8e4e8; background: rgba(255,255,255,.94); backdrop-filter: blur(14px); }
.qalam-album header span { color: #00a7a5; font-size: .72rem; font-weight: 800; }
.qalam-album header h2 { margin-top: 2px; color: #073b4c; font-size: clamp(1.1rem, 2vw, 1.55rem); }
.qalam-album header p { margin-top: 3px; color: #657586; font-size: .8rem; }
.qalam-album-close { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid #cbdade; border-radius: 50%; background: #fff; color: #073b4c; font-family: Arial, sans-serif; font-size: 1.6rem; line-height: 1; cursor: pointer; transition: transform .25s ease, background .25s ease, color .25s ease; }
.qalam-album-close:hover { transform: rotate(90deg); background: #073b4c; color: #fff; }
.qalam-album-grid { columns: 3 280px; column-gap: 12px; padding: 14px; }
.qalam-album-grid figure { position: relative; margin: 0 0 12px; overflow: hidden; break-inside: avoid; border-radius: 6px; background: #e7eff1; }
.qalam-album-grid img { width: 100%; height: auto; display: block; transition: transform .7s cubic-bezier(.2,.75,.25,1), filter .7s ease; }
.qalam-album-grid figure:hover img { transform: scale(1.025); filter: saturate(1.06); }
.qalam-album-grid figcaption { position: absolute; inset-inline: 0; inset-block-end: 0; padding: 28px 11px 10px; transform: translateY(100%); background: linear-gradient(transparent, rgba(5,40,50,.88)); color: #fff; font-size: .76rem; line-height: 1.5; transition: transform .35s ease; }
.qalam-album-grid figure:hover figcaption { transform: none; }
.public-empty-state { grid-column: 1 / -1; padding: 34px; border: 1px dashed #b8cdd4; border-radius: 8px; background: #f6fafb; color: #657586; text-align: center; }
body.has-qalam-dialog { overflow: hidden; }
@keyframes qalamAlbumIn { from { opacity: 0; transform: translateY(22px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes qalamBackdropIn { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 940px) { .qalam-activity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .qalam-activity-grid { grid-template-columns: 1fr; gap: 14px; margin-top: 24px; } .qalam-activity-body { min-height: 165px; } .qalam-album { width: calc(100% - 16px); max-height: calc(100dvh - 16px); } .qalam-album-shell { max-height: calc(100dvh - 16px); } .qalam-album header { padding: 12px; } .qalam-album-grid { columns: 2 145px; padding: 8px; column-gap: 8px; } .qalam-album-grid figure { margin-bottom: 8px; } }
@media (prefers-reduced-motion: reduce) { .qalam-activity-card, .qalam-activity-card::after, .qalam-activity-media img, .qalam-activity-body small svg, .qalam-album[open], .qalam-album::backdrop, .qalam-album-grid img, .qalam-album-grid figcaption { animation: none; transition: none; } }
