/* assets/css/post.css - the styles that used to be written inside post.php (moved 2026-11-15, unchanged). */

/* ---- post.php, block from line 648 ---- */
        /* page-width 2026-08-04
         *
         * This page used to centre its card in a flex body with 10px of
         * padding, and the card added 10px of margin on top of that — about
         * 40px of a phone's width surrendered, with a shadow and rounded
         * corners around what was left. Beside index.php, which runs edge to
         * edge, post.php looked shrunk, because it was.
         *
         * align-items:center did the rest: it centred the card VERTICALLY,
         * so the page floated mid-screen instead of starting at the top like
         * every other page, and a post taller than the screen overflowed off
         * the top where it could not always be scrolled back to.
         *
         * The body now matches index.php exactly: no flex, no padding.
         */
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            min-height: 100vh;
            margin: 0;
            padding: 0;
            overflow-x: hidden;
            box-sizing: border-box;
        }
        
        .prayer-container {
            border-radius: 12px;
            width: 100%;
               /* same cap as index.php's .app-container */
            min-height: 100vh;  /* the white runs the full height, as on the feeds */
            /* page-balance 2026-08-04: min-height alone left a short post
               floating with a wide blank gap beneath it and the footer
               stranded in the middle of it. As a column, the footer can be
               pushed to the foot of the panel, so the space sits BELOW the
               closing line rather than above it. */
            display: flex;
            flex-direction: column;
        }
        
        /* page-balance 2026-08-04: the header was 16px tall-padded with a
           1.8em title, so on a phone it took a deep blue band before the post
           had even started. index.php uses 12px/16px and 1.5em, and sticks to
           the top as you scroll. Same numbers here, so the two pages feel like
           one site. */
        .prayer-header {
            background: linear-gradient(180deg, #3498db, #2c3e50);
            color: white;
            padding: 12px 16px;
            border-radius: 12px 12px 0 0;
            position: sticky;
            top: 0;
            z-index: 1000;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }
        
        .prayer-header h1 {
            margin: 0;
            font-size: 1.5em;
            font-weight: 600;
            /* One line, always — the same rule index.php learned on narrow
               phones, where "Catholic Community" wrapped and doubled the
               header's height. */
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        /* On a phone the card IS the page, so the frame comes off: no
           gutters, no rounded corners, no shadow. On a desktop, where 600px
           sits in a wide window, the card look is right and stays.
           
           PLACEMENT MATTERS: this block must come AFTER .prayer-container and
           .prayer-header, because a media query adds NO specificity — an
           equal-specificity rule further down the file beats it. Sitting
           above them, it was overridden and the banner kept its curved top. */
        @media (max-width: 620px) {
            .prayer-container {
                border-radius: 0;
                box-shadow: none;
            }
            .prayer-header {
                border-radius: 0;
            }
        }
        
        .post-header {
            display: flex;
        }

        /* feed-follow 2026-08-10. Quiet outline, not solid blue - blue is the
           primary-action colour everywhere else on this page, starting with
           Share directly beneath it. */
        .feed-follow-btn {
            flex-shrink: 0;
            align-self: center;
            line-height: 1;
            cursor: pointer;
            white-space: nowrap;
            transition: background 0.15s, color 0.15s, opacity 0.25s;
            -webkit-tap-highlight-color: transparent;
        }
        .feed-follow-btn:active { background: #eaf4fb; }
        .feed-follow-btn[disabled] { opacity: 0.55; }
        .feed-follow-btn.is-done {
            border-color: #cfe3d2;
            color: #4c8a5b;
            opacity: 0;
            pointer-events: none;
        }
        
        .post-header img.profile-pic {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            border: 2px solid #3498db;
            margin-right: 12px;
            object-fit: cover;
            flex-shrink: 0;
        }
        
        .post-header .placeholder-pic {
            border-radius: 50%;
            background: linear-gradient(135deg, #bdc3c7, #7f8c8d);
            flex-shrink: 0;
        }
        
        .post-header-info {
            flex-grow: 1;
        }
        
        .post-header .username {
            color: #2c3e50;
        }

        /* feed-follow 2026-08-11 - HEADER OVERFLOW FIX. Same cause as the
           feeds: the Follow button now shares a header that used to be empty
           on the right, and the name column here is nested one level deeper,
           inside .post-header-info. min-width:0 must be set on BOTH, or the
           outer flex item refuses to shrink and the inner ellipsis never
           engages. */
        /* 2026-08-11: .post-header-info has flex-grow:1, so it fills the
           header and an ellipsised username puts the timestamp hard against
           the Follow button. Same 14px as the feeds. */
        .post-header-info { min-width: 0;  }
        .post-header-info > div:first-child {
            display: flex;
            align-items: baseline;
            gap: 8px;
            min-width: 0;
        }
        .post-header-info > div:first-child > .username {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .post-header-info > div:first-child > .timestamp {
            flex: 0 0 auto;
            white-space: nowrap;
            margin-left: 0;
        }        
        .post-content h3 {
            color: #2c3e50;
        }
        
        /* Enhanced text formatting */
        .prayer-content-wrapper {
            position: relative;
        }
        
        .prayer-content {
            word-wrap: break-word;
            transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
            overflow: hidden;
        }
        
        .prayer-content p {
            margin: 0 0 1em 0;
            line-height: 1.6;
            color: #34495e;
            white-space: pre-wrap;
            word-wrap: break-word;
        }
        
        .prayer-content p:last-child {
            margin-bottom: 0;
        }
        
        .prayer-content.expanded p {
            animation: fadeInParagraph 0.3s ease forwards;
        }
        
        @keyframes fadeInParagraph {
            from { opacity: 0.8; }
            to { opacity: 1; }
        }
        
        .prayer-content a {
            color: #3498db;
            text-decoration: none;
            border-bottom: 1px solid transparent;
            transition: border-color 0.2s;
        }
        
        .prayer-content a:hover {
            border-bottom-color: #3498db;
        }
        
        .prayer-content.preserve-formatting {
            white-space: pre-line;
            word-wrap: break-word;
            font-family: inherit;
            line-height: 1.6;
            font-size: 14px;
            font-size: 15px;
            line-height: 1.8;
        }
        
        .text-fade-overlay {
            position: absolute;
            bottom: 40px;
            left: 0;
            right: 0;
            height: 60px;
            pointer-events: none;
            transition: opacity 0.3s ease;
            background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.95));
        }
        
        .prayer-content.truncated {
            max-height: 130px;
            position: relative;
            overflow: hidden;
        }
        
        .prayer-content.expanded {
            max-height: none;
            animation: expandText 0.5s ease-out;
        }
        
        @keyframes expandText {
            from { opacity: 0.8; }
            to { opacity: 1; }
        }
        
        .prayer-content-wrapper.expanded .text-fade-overlay {
            opacity: 0;
            visibility: hidden;
        }
        
        .view-toggle-btn {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            margin-top: 8px;
            padding: 8px 16px;
            background: linear-gradient(135deg, #f8f9fa, #e9ecef);
            border: 1px solid #dee2e6;
            border-radius: 20px;
            color: #3498db;
            font-size: 0.9em;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            outline: none;
            position: relative;
            overflow: hidden;
        }
        
        .view-toggle-btn::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            background: rgba(52, 152, 219, 0.1);
            border-radius: 50%;
            transform: translate(-50%, -50%);
            transition: width 0.6s, height 0.6s;
        }
        
        .view-toggle-btn:hover::before {
            width: 100px;
            height: 100px;
        }
        
        .view-toggle-btn:hover {
            background: linear-gradient(135deg, #3498db, #2980b9);
            color: white;
            border-color: #2980b9;
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
        }
        
        .view-toggle-btn:active {
            transform: translateY(0);
            box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
        }
        
        .view-toggle-btn i {
            transition: transform 0.3s ease;
            font-size: 0.85em;
        }
        
        .view-toggle-btn[data-expanded="true"] i {
            transform: rotate(180deg);
        }
        
        .view-toggle-btn .btn-text {
            transition: all 0.3s ease;
        }
        
        /* Action Bar */
        .action-bar {
            align-items: center;
        }
        
        .action-btn {
            background: none;
            border: none;
            cursor: pointer;
            text-decoration: none;
            transition: all 0.3s ease;
            display: inline-flex;
            align-items: center;
            position: relative;
            font-family: inherit;
            outline: none;
        }
        
        .action-btn:hover:not(.disabled) {
            background: rgba(52, 152, 219, 0.08);
            color: #3498db;
        }
        
        .action-btn:active:not(.disabled) {
            transform: scale(0.95);
        }
        
        .action-btn.disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
        
        .action-btn i {
            transition: all 0.3s ease;
        }
        
        .action-btn.like-button.liked {
            color: #e74c3c;
        }
        
        .action-btn.like-button.liked i {
            animation: heartBeat 0.8s;
        }
        
        @keyframes heartBeat {
            0% { transform: scale(1); }
            25% { transform: scale(1.3); }
            50% { transform: scale(1.1); }
            75% { transform: scale(1.2); }
            100% { transform: scale(1); }
        }
        
        .action-btn.like-button:hover i {
            transform: scale(1.1);
        }
        
        .action-btn.comment-btn:hover i {
            transform: rotateY(180deg);
        }
        
        .action-btn.share-button:hover i {
            transform: rotate(15deg);
        }
        
        .action-btn.edit-btn {
            color: #27ae60;
        }
        
        .action-btn.edit-btn:hover {
            background: rgba(39, 174, 96, 0.08);
            color: #27ae60;
        }
        
        .action-btn.edit-btn:hover i {
            transform: rotate(-15deg);
        }
        
        .action-btn.delete-btn {
            color: #e74c3c;
        }
        
        .action-btn.delete-btn:hover {
            background: rgba(231, 76, 60, 0.08);
            color: #c0392b;
        }
        
        .action-btn.delete-btn:hover i {
            animation: shake 0.5s;
        }
        
        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            25% { transform: translateX(-3px); }
            75% { transform: translateX(3px); }
        }
        
        /* Comment Section */
        .comment-section {
            margin-top: 12px;
            border-top: 1px solid #bdc3c7;
            padding-top: 12px;
        }
        
        .comment {
            display: flex;
            align-items: flex-start;
            margin: 8px 0;
            padding: 12px;
            border-bottom: 1px solid #e0e0e0;
            background-color: #f9f9f9;
            border-radius: 8px;
            opacity: 0;
            animation: fadeIn 0.3s ease-in forwards;
            position: relative;
            transition: background-color 0.2s;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        .comment:hover {
            background-color: #f1f3f5;
        }
        
        .comment img.profile-pic {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            border: 2px solid #3498db;
            margin-right: 12px;
            object-fit: cover;
            flex-shrink: 0;
        }
        
        .comment .placeholder-pic {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            background: linear-gradient(135deg, #bdc3c7, #7f8c8d);
            margin-right: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #ffffff;
            font-size: 0.9em;
            font-weight: 600;
            flex-shrink: 0;
        }
        
        .comment p {
            color: #2c3e50;
            font-size: 0.9em;
            margin: 0;
            flex-grow: 1;
            line-height: 1.5;
        }
        
        .comment p strong a {
            color: #2c3e50;
            font-weight: 600;
            font-size: 0.9em;
            text-decoration: none;
        }
        
        .comment p strong a:hover {
            text-decoration: underline;
        }
        
        .comment .delete-comment {
            color: #e74c3c;
            font-size: 0.85em;
            cursor: pointer;
            padding: 6px 10px;
            border-radius: 4px;
            transition: background-color 0.2s, transform 0.2s;
            flex-shrink: 0;
            margin-left: 8px;
        }
        
        .comment .delete-comment:hover {
            background-color: #e74c3c33;
        }
        
        .comment .delete-comment:active {
            transform: scale(0.95);
        }
        
        .comment-form {
            display: flex;
            align-items: center;
            gap: 12px;
            position: relative;
            margin-top: 12px;
        }
        
        .comment-form input[type="text"] {
            flex-grow: 1;
            padding: 10px 48px 10px 16px;
            border: 1px solid #bdc3c7;
            border-radius: 24px;
            font-size: 0.9em;
            outline: none;
            min-height: 48px;
            background-color: #f4f7fa;
        }
        
        .comment-form input[type="submit"] {
            background-color: #3498db;
            color: white;
            padding: 10px 16px;
            border: none;
            border-radius: 24px;
            cursor: pointer;
            font-size: 0.9em;
            min-height: 48px;
            position: absolute;
            right: 8px;
            transition: transform 0.2s;
        }
        
        .comment-form input[type="submit"]:active {
            transform: scale(0.95);
        }
        
        .comment-form .loading {
            display: none;
            position: absolute;
            right: 16px;
            font-size: 0.9em;
            color: #7f8c8d;
        }
        
        .comment-profile-link {
            text-decoration: none;
            display: inline-block;
            border-radius: 50%;
            transition: transform 0.2s ease, opacity 0.2s ease;
            cursor: pointer;
            flex-shrink: 0;
            margin-right: 12px;
        }
        
        .comment-profile-link:hover {
            transform: scale(1.05);
            opacity: 0.9;
        }
        
        .comment-profile-link:active {
            transform: scale(0.98);
        }
        
        .comment-profile-link img.profile-pic,
        .comment-profile-link .placeholder-pic {
            display: block;
            margin-right: 0;
        }
        
        .comment-profile-link:hover img.profile-pic,
        .comment-profile-link:hover .placeholder-pic {
            box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3);
        }
        
        /* View More Button */
        .view-more {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            margin-top: 8px;
            padding: 8px 16px;
            background: linear-gradient(135deg, #f8f9fa, #e9ecef);
            border: 1px solid #dee2e6;
            border-radius: 20px;
            color: #3498db;
            font-size: 0.9em;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            outline: none;
            justify-content: center;
            align-items: center;  
            overflow: hidden;
        }
        
        .view-more::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            background: rgba(52, 152, 219, 0.1);
            border-radius: 50%;
            transform: translate(-50%, -50%);
            transition: width 0.6s, height 0.6s;
        }
        
        .view-more:hover::before {
            width: 100px;
            height: 100px;
        }
        
        .view-more:hover {
            background: linear-gradient(135deg, #3498db, #2980b9);
            color: white;
            border-color: #2980b9;
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
        }
        
        .view-more:active {
            transform: translateY(0);
            box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
        }
        
        .view-more i {
            transition: transform 0.3s ease;
            font-size: 0.85em;
        }
        
        /* Image Carousel Styles */
        .image-carousel {
            position: relative;
            overflow: hidden;
            background: #000;
        }
        
        .carousel-container {
            position: relative;
            width: 100%;
            /* ig-carousel 2026-08-01: fallback only - JS sets the real frame
               from the FIRST slide's proportions, clamped 1.91:1..4:5. */
            aspect-ratio: 1 / 1;
            overflow: hidden;
        }
        
        .carousel-track {
            display: flex;
            transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            height: 100%;
        }
        
        .carousel-slide {
            min-width: 100%;
            height: 100%;
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #ffffff;
        }
        
        .carousel-slide img {
            height: auto;
            cursor: pointer;
            position: relative;
            z-index: 1;
        }

        /* ig-carousel 2026-08-01: near-matches (within 10%) fill the frame;
           anything further off shows WHOLE on a blurred copy of itself. */
        .image-carousel .carousel-slide.fit-cover img {
            width: 100% !important; height: 100% !important;
            max-width: 100% !important; max-height: 100% !important;
            object-fit: cover !important;
        }
        .image-carousel .carousel-slide.fit-blur img {
            width: 100% !important; height: 100% !important;
            max-width: 100% !important; max-height: 100% !important;
            object-fit: contain !important;
        }
        .carousel-slide .slide-blur {
            position: absolute; inset: 0;
            background-size: cover; background-position: center;
            filter: blur(24px); transform: scale(1.18);
        }
        
        .carousel-nav {
            position: absolute; top: 50%; transform: translateY(-50%);
            background: rgba(0, 0, 0, 0.35); color: #fff; border: none;
            width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
            display: flex; align-items: center; justify-content: center;
            z-index: 2; opacity: 0;
            transition: opacity 0.2s ease, background 0.2s ease;
        }
        .carousel-container:hover .carousel-nav { opacity: 1; }
        @media (hover: none), (pointer: coarse) {
            .carousel-nav { display: none !important; }
        }
        
        .carousel-nav:hover { background: rgba(0, 0, 0, 0.6); }
        
        .carousel-nav.prev {
            left: 10px;
        }
        
        .carousel-nav.next {
            right: 10px;
        }
        
        /* ig-carousel 2026-08-01: dots moved off the media, below it. */
        .carousel-dots {
            display: flex; justify-content: center; align-items: center;
            gap: 6px; padding: 8px 0 2px;
        }
        .carousel-dots .cdot {
            width: 6px; height: 6px; border-radius: 50%;
            background: #c9ced6; cursor: pointer;
            transition: transform 0.2s ease, background 0.2s ease;
        }
        .carousel-dots .cdot.active { background: #3498db; }
        .carousel-dots .cdot.cdot-sm { transform: scale(0.55); }
        .image-counter {
            position: absolute; top: 12px; right: 12px;
            background: rgba(0, 0, 0, 0.6); color: white;
            padding: 3px 10px; border-radius: 20px; font-size: 0.8em;
            z-index: 2; opacity: 0; pointer-events: none;
            transition: opacity 0.3s ease;
        }
        .image-counter.show { opacity: 1; }
        
        
        
        /* Single Image Styles */
        .single-image-container {
            position: relative;
            overflow: hidden;
            cursor: pointer;
            transition: transform 0.3s ease;
        }
        
        .single-image-container:hover {
            transform: scale(0.98);
        }
        
        .single-image-container img {
            height: auto;
        }
        
        /* Lightbox Styles */
        .lightbox {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.95);
            z-index: 10000;
            align-items: center;
            justify-content: center;
        }
        
        .lightbox.active {
            display: flex;
        }
        
        .lightbox-content {
            position: relative;
            max-width: 90%;
            max-height: 90%;
        }
        
        .lightbox-content img {
            max-width: 100%;
            max-height: 90vh;
            object-fit: contain;
        }
        
        .lightbox-close {
            position: absolute;
            top: 20px;
            right: 40px;
            color: white;
            font-size: 2em;
            cursor: pointer;
            z-index: 10001;
        }
        
        .lightbox-nav {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(255, 255, 255, 0.2);
            border: none;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            cursor: pointer;
            color: white;
            font-size: 1.5em;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
        }
        
        .lightbox-nav:hover {
            background: rgba(255, 255, 255, 0.3);
        }
        
        .lightbox-nav.prev {
            left: 20px;
        }
        
        .lightbox-nav.next {
            right: 20px;
        }
        
        /* Video Container Styles */
        .video-container {
            position: relative;
            background: #000;
            overflow: hidden;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            align-items: center;
            justify-content: center;
            aspect-ratio: 16 / 9;
        }
        
        .video-container.vertical {
            aspect-ratio: 9 / 16;
            max-height: 500px;
            max-width: 300px;
            margin-left: auto;
            margin-right: auto;
        }
        
        .video-container.square {
            aspect-ratio: 1 / 1;
            max-width: 400px;
            margin-left: auto;
            margin-right: auto;
        }
        
        .video-container:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
        }
        
        .video-container:active {
            transform: scale(0.98);
        }
        
        .video-placeholder {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 2;
            transition: all 0.4s ease;
        }
        
        .video-container:hover .video-placeholder {
            background: linear-gradient(135deg, 
                rgba(44, 62, 80, 0.8) 0%, 
                rgba(52, 152, 219, 0.75) 50%,
                rgba(155, 89, 182, 0.8) 100%);
        }
        
        .play-button-wrapper {
            position: relative;
            width: 90px;
            height: 90px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .play-button-ring {
            position: absolute;
            width: 100%;
            height: 100%;
            border: 3px solid rgba(255, 255, 255, 0.3);
            border-radius: 50%;
            animation: ringPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
        }
        
        @keyframes ringPulse {
            0%, 100% { 
                transform: scale(1); 
                opacity: 1;
            }
            50% { 
                transform: scale(1.05); 
                opacity: 0.8;
            }
        }
        
        .play-button {
            position: relative;
            width: 70px;
            height: 70px;
            background: linear-gradient(135deg, #ff6b6b, #ee5a24);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 15px rgba(238, 90, 36, 0.4);
            transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            z-index: 2;
        }
        
        .video-container:hover .play-button {
            transform: scale(1.1);
            background: linear-gradient(135deg, #ff7979, #ff6348);
        }
        
        .play-icon {
            width: 0;
            height: 0;
            border-style: solid;
            border-width: 15px 0 15px 25px;
            border-color: transparent transparent transparent #ffffff;
            margin-left: 5px;
            filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2));
            transition: all 0.3s ease;
        }
        
        .video-title-overlay {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            padding: 20px;
            background: linear-gradient(to top, 
                rgba(0, 0, 0, 0.8) 0%,
                rgba(0, 0, 0, 0.4) 50%,
                transparent 100%);
            color: white;
            font-size: 0.9em;
            font-weight: 500;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
        }
        
        .video-container.playing .video-placeholder {
            opacity: 0;
            pointer-events: none;
        }
        
        .video-container .lazy-video {
            width: 100%;
            height: 100%;
            display: block;
            object-fit: contain;
            background: #000;
            opacity: 0;
            transition: opacity 0.5s ease;
            position: absolute;
            top: 0;
            left: 0;
        }
        
        .video-container.playing .lazy-video {
            opacity: 1;
        }
        
        .video-loading-spinner {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 60px;
            height: 60px;
            display: none;
            z-index: 3;
        }
        
        .video-container.loading .video-loading-spinner {
            display: block;
        }
        
        .video-loading-spinner::after {
            content: '';
            display: block;
            width: 50px;
            height: 50px;
            margin: 5px;
            border-radius: 50%;
            border: 4px solid rgba(255, 255, 255, 0.3);
            border-top-color: #ffffff;
            animation: spin 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
        }
        
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        
        .navigation {
            padding: 16px;
            color: #34495e;
            font-size: 0.9em;
            border-top: 1px solid #bdc3c7;
            background-color: #f9f9f9;
            border-radius: 0 0 12px 12px;
            margin-top: auto;   /* sits at the foot of the panel, never mid-screen */
            text-align: center;
        }
        
        .navigation a {
            color: #3498db;
            text-decoration: none;
            margin: 0 8px;
            transition: color 0.2s;
        }
        
        .navigation a:hover {
            color: #2c3e50;
        }
        
        /* Modal Styles */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.7);
            backdrop-filter: blur(6px);
            z-index: 2000;
            align-items: center;
            justify-content: center;
            padding: 15px;
            box-sizing: border-box;
            animation: fadeInModal 0.3s ease-out;
        }
        
        @keyframes fadeInModal {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        
        .modal-content {
            background-color: #ffffff;
            width: 100%;
            max-height: 85vh;
            box-sizing: border-box;
            transform: translateY(30px);
            animation: slideUp 0.3s ease-out forwards;
        }
        
        @keyframes slideUp {
            to { transform: translateY(0); }
        }
        
        /* Enhanced Comments Modal Styling */
        .comments-modal-content {
            max-height: 80vh;
            overflow: hidden;
            padding: 0;
            position: relative;
            display: flex;
            flex-direction: column;
            background: #ffffff;
        }
        
        .comments-modal-content h3 {
            background: linear-gradient(135deg, #667eea 0%, #4682b4 100%);
            color: white;
            padding: 20px 24px;
            margin: 0;
            font-size: 1.3em;
            font-weight: 600;
            text-align: center;
            position: sticky;
            top: 0;
            z-index: 100;
            box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
            border-radius: 16px 16px 0 0;
            backdrop-filter: blur(10px);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
        }
        
        .comments-modal-content h3::before {
            content: '💬';
            font-size: 1.2em;
            animation: pulse 2s infinite;
        }
        
        /* Comments Container with Blue Scrollbar */
        #comments-modal-list {
            flex: 1;
            overflow-y: auto;
            padding: 20px;
            background: linear-gradient(180deg, #f8f9fc 0%, #ffffff 100%);
            position: relative;
            min-height: 200px;
            scroll-behavior: smooth;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: thin;
            scrollbar-color: #3498db #e8f4fd;
        }
        
        #comments-modal-list::-webkit-scrollbar {
            width: 8px;
        }
        
        #comments-modal-list::-webkit-scrollbar-track {
            background: #e8f4fd;
            border-radius: 10px;
            margin: 10px 0;
        }
        
        #comments-modal-list::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, #3498db, #2980b9);
            border-radius: 10px;
            transition: all 0.3s;
        }
        
        #comments-modal-list::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(180deg, #2980b9, #2c3e50);
            box-shadow: 0 0 10px rgba(52, 152, 219, 0.3);
        }
        
        /* Enhanced Comment Cards */
        .modal-comment {
            display: flex;
            align-items: flex-start;
            margin: 0 0 16px;
            padding: 16px;
            background: #ffffff;
            border-radius: 16px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
            opacity: 0;
            animation: slideInComment 0.4s ease forwards;
            position: relative;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            border: 1px solid rgba(102, 126, 234, 0.1);
        }
        
        .modal-comment:nth-child(odd) {
            animation-delay: 0.1s;
        }
        
        .modal-comment:nth-child(even) {
            animation-delay: 0.2s;
            background: linear-gradient(135deg, #ffffff 0%, #f8f9fc 100%);
        }
        
        @keyframes slideInComment {
            from { 
                opacity: 0; 
                transform: translateY(20px) scale(0.95);
            }
            to { 
                opacity: 1; 
                transform: translateY(0) scale(1);
            }
        }
        
        .modal-comment:hover {
            transform: translateX(4px);
            box-shadow: 0 4px 16px rgba(102, 126, 234, 0.15);
            border-color: rgba(102, 126, 234, 0.3);
        }
        
        .modal-comment img.profile-pic {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            border: 2px solid transparent;
            background: linear-gradient(white, white) padding-box,
                        linear-gradient(135deg, #667eea, #4682b4) border-box;
            margin-right: 14px;
            object-fit: cover;
            flex-shrink: 0;
            transition: all 0.3s;
        }
        
        .modal-comment:hover img.profile-pic {
            transform: scale(1.05);
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
        }
        
        .modal-comment .placeholder-pic {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            background: linear-gradient(135deg, #667eea, #4682b4);
            margin-right: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #ffffff;
            font-size: 1em;
            font-weight: 700;
            flex-shrink: 0;
            text-transform: uppercase;
            box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
            transition: all 0.3s;
        }
        
        .modal-comment:hover .placeholder-pic {
            transform: scale(1.05) rotate(5deg);
        }
        
        .modal-comment p {
            color: #2c3e50;
            font-size: 0.95em;
            margin: 0;
            flex-grow: 1;
            line-height: 1.6;
            word-wrap: break-word;
            padding-right: 8px;
        }
        
        .modal-comment p strong a {
            background: linear-gradient(135deg, #667eea, #4682b4);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            font-weight: 600;
            font-size: 0.95em;
            text-decoration: none;
            transition: all 0.3s;
            position: relative;
        }
        
        .modal-comment p strong a::after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 0;
            width: 0;
            height: 2px;
            background: linear-gradient(135deg, #667eea, #4682b4);
            transition: width 0.3s;
        }
        
        .modal-comment p strong a:hover::after {
            width: 100%;
        }
        
        .modal-comment .delete-comment {
            color: #e74c3c;
            font-size: 1.2em;
            cursor: pointer;
            padding: 8px;
            border-radius: 50%;
            transition: all 0.3s;
            flex-shrink: 0;
            margin-left: auto;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 32px;
            height: 32px;
            background: rgba(231, 76, 60, 0.1);
        }
        
        .modal-comment .delete-comment:hover {
            background: rgba(231, 76, 60, 0.2);
            transform: rotate(90deg) scale(1.1);
            box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
        }
        
        .modal-comment .delete-comment:active {
            transform: rotate(90deg) scale(0.95);
        }
        
        /* Enhanced Comment Input Form */
        .modal-comment-form {
            display: flex;
            align-items: center;
            gap: 12px;
            position: sticky;
            bottom: 0;
            background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, #ffffff 100%);
            padding: 16px 20px;
            margin: 0;
            margin-bottom: 0;
            border-top: 1px solid rgba(102, 126, 234, 0.2);
            backdrop-filter: blur(10px);
            box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.08);
            z-index: 50;
        }
        
        .modal-comment-form input[type="text"] {
            flex: 1;
            padding: 12px 18px;
            border: 2px solid transparent;
            background: linear-gradient(white, white) padding-box,
                        linear-gradient(135deg, #667eea, #764ba2) border-box;
            border-radius: 25px;
            font-size: 0.95em;
            outline: none;
            min-height: 45px;
            background-color: #f8f9fc;
            transition: all 0.3s;
            font-family: inherit;
        }
        
        .modal-comment-form input[type="text"]:focus {
            background-color: #ffffff;
            box-shadow: 0 4px 16px rgba(102, 126, 234, 0.2);
            transform: translateY(-2px);
        }
        
        .modal-comment-form input[type="text"]::placeholder {
            color: #95a5a6;
            transition: all 0.3s;
        }
        
        .modal-comment-form input[type="text"]:focus::placeholder {
            color: #bdc3c7;
            transform: translateX(5px);
        }
        
        .modal-comment-form input[type="submit"] {
            background: linear-gradient(135deg, #3498db, #2980b9);
            color: white;
            padding: 8px 16px;
            border: none;
            border-radius: 20px;
            cursor: pointer;
            font-size: 0.9em;
            min-height: 25px;
            min-width: 40px;
            max-width: 80px;
            transition: transform 0.2s, background 0.2s;
            box-sizing: border-box;
        }
        
        .modal-comment-form input[type="submit"]:hover {
            background: linear-gradient(135deg, #2980b9, #2c3e50);
        }
        
        .modal-comment-form input[type="submit"]:active {
            transform: scale(0.95);
        }
        
        .modal-comment-form .loading {
            display: none;
            font-size: 0.9em;
            color: #667eea;
            margin-left: 8px;
            flex-shrink: 0;
            animation: fadeInOut 1.5s infinite;
        }
        
        @keyframes fadeInOut {
            0%, 100% { opacity: 0.3; }
            50% { opacity: 1; }
        }
        
        /* Exit Button with Proper Separation */
        .comments-modal-content .exit {
            background: linear-gradient(135deg, #ff6b6b, #ee5a24);
            color: white;
            border: none;
            border-radius: 0 0 16px 16px;
            padding: 16px;
            font-size: 1em;
            font-weight: 600;
            cursor: pointer;
            width: 100%;
            margin: 0;
            margin-top: 0;
            transition: all 0.3s;
            box-shadow: 0 -2px 10px rgba(238, 90, 36, 0.2);
            position: relative;
            overflow: hidden;
            text-transform: uppercase;
            letter-spacing: 1px;
            border-top: 2px solid rgba(238, 90, 36, 0.3);
            flex-shrink: 0;
        }
        
        .comments-modal-content .exit::before {
            content: '×';
            position: absolute;
            right: 20px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 1.5em;
            opacity: 0.7;
            transition: all 0.3s;
        }
        
        .comments-modal-content .exit:hover {
            background: linear-gradient(135deg, #ff5252, #ff6348);
            box-shadow: 0 -4px 16px rgba(238, 90, 36, 0.3);
            letter-spacing: 2px;
        }
        
        .comments-modal-content .exit:hover::before {
            opacity: 1;
            transform: translateY(-50%) rotate(90deg);
        }
        
        .comments-modal-content .exit:active {
            transform: scale(0.98);
        }
        
        /* Alert Modal */
        .alert-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(5px);
            z-index: 3000;
            align-items: center;
            justify-content: center;
            padding: 20px;
            box-sizing: border-box;
            animation: fadeInAlert 0.3s ease-out;
        }
        
        @keyframes fadeInAlert {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        
        .alert-content {
            background-color: #ffffff;
            border-radius: 16px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
            width: 100%;
            max-width: 400px;
            text-align: center;
            transform: translateY(30px);
            animation: slideUpAlert 0.3s ease-out forwards;
            overflow: hidden;
        }
        
        @keyframes slideUpAlert {
            to { transform: translateY(0); }
        }
        
        .alert-header {
            background: linear-gradient(135deg, #3498db, #2980b9);
            color: white;
            padding: 20px;
            border-radius: 16px 16px 0 0;
        }
        
        .alert-header.error {
            background: linear-gradient(135deg, #e74c3c, #c0392b);
        }
        
        .alert-header.success {
            background: linear-gradient(135deg, #27ae60, #2ecc71);
        }
        
        .alert-header.warning {
            background: linear-gradient(135deg, #f39c12, #e67e22);
        }
        
        .alert-icon {
            font-size: 2.5em;
            margin-bottom: 10px;
            display: block;
        }
        
        .alert-title {
            font-size: 1.2em;
            font-weight: 600;
            margin: 0;
        }
        
        .alert-body {
            padding: 25px 20px;
        }
        
        .alert-message {
            color: #2c3e50;
            font-size: 1em;
            line-height: 1.5;
            margin: 0 0 25px 0;
        }
        
        .alert-actions {
            display: flex;
            gap: 12px;
            justify-content: center;
        }
        
        .alert-button {
            background: linear-gradient(135deg, #3498db, #2980b9);
            color: white;
            border: none;
            border-radius: 8px;
            padding: 12px 24px;
            font-size: 1em;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
            min-width: 80px;
        }
        
        .alert-button:hover {
            background: linear-gradient(135deg, #2980b9, #2c3e50);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        }
        
        .alert-button:active {
            transform: translateY(0);
        }
        
        .alert-button.secondary {
            background: linear-gradient(135deg, #bdc3c7, #95a5a6);
        }
        
        .alert-button.secondary:hover {
            background: linear-gradient(135deg, #95a5a6, #7f8c8d);
        }
        
        /* Share Modal Styles */
        #share-modal .modal-content {
            max-width: 420px;
            padding: 0;
            border-radius: 18px;
            overflow: hidden;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
            border: 1px solid #e0e0e0;
        }
        
        #share-modal .modal-content h3 {
            background: linear-gradient(135deg, #3498db, #2980b9);
            color: white;
            margin: 0;
            padding: 20px;
            font-size: 1.2em;
            font-weight: 600;
            text-align: center;
            border-radius: 18px 18px 0 0;
        }
        
        #share-modal textarea {
            width: calc(100% - 32px);
            margin: 20px 16px 16px;
            padding: 14px;
            border: 1px solid #bdc3c7;
            border-radius: 12px;
            font-family: inherit;
            font-size: 0.95em;
            resize: vertical;
            min-height: 80px;
            max-height: 120px;
            background-color: #f8f9fa;
            outline: none;
            transition: border-color 0.2s, background-color 0.2s;
            box-sizing: border-box;
        }
        
        #share-modal textarea:focus {
            border-color: #3498db;
            background-color: #ffffff;
            box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
        }
        
        #share-modal textarea::placeholder {
            color: #95a5a6;
            font-style: italic;
        }
        
        .share-buttons {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            padding: 0 16px 16px;
            margin-bottom: 8px;
        }
        
        .share-buttons button {
            background: linear-gradient(135deg, #ffffff, #f8f9fa);
            color: #2c3e50;
            border: 1.5px solid #e0e0e0;
            border-radius: 10px;
            padding: 12px 8px;
            font-size: 0.9em;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            min-height: 48px;
            position: relative;
            overflow: hidden;
        }
        
        .share-buttons button:hover {
            transform: translateY(-1px);
            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
            border-color: #3498db;
        }
        
        .share-buttons button:active {
            transform: translateY(0);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
        }
        
        .share-buttons .share-internal {
            background: linear-gradient(135deg, #3498db, #2980b9);
            color: white;
            border-color: #2980b9;
            grid-column: 1 / -1;
            font-weight: 600;
        }
        
        .share-buttons .share-internal:hover {
            background: linear-gradient(135deg, #2980b9, #2c3e50);
            border-color: #2c3e50;
        }
        
        .share-buttons .share-copy {
            background: linear-gradient(135deg, #95a5a6, #7f8c8d);
            color: white;
            border-color: #2980b9;
            grid-column: 1 / -1;
            font-weight: 600;
        }
        
        .share-buttons .share-copy:hover {
            background: linear-gradient(135deg, #7f8c8d, #6c7b7d);
            border-color: #6c7b7d;
        }
        
        #share-modal .cancel {
            background: linear-gradient(135deg, #e74c3c, #c0392b);
            color: white;
            border: none;
            border-radius: 0 0 18px 18px;
            padding: 16px;
            font-size: 1em;
            font-weight: 500;
            cursor: pointer;
            width: 100%;
            transition: background 0.2s, transform 0.2s;
            margin: 0;
        }
        
        #share-modal .cancel:hover {
            background: linear-gradient(135deg, #c0392b, #a93226);
        }
        
        #share-modal .cancel:active {
            transform: scale(0.98);
        }
        
        /* Animated Register Button */
        .register-btn-animated {
            background: linear-gradient(135deg, #3498db, #2980b9);
            color: white;
            padding: 8px 16px;
            border-radius: 20px;
            text-decoration: none;
            font-weight: 600;
            font-size: 0.85em;
            overflow: hidden;
            min-width: 120px;
            text-align: center;
            box-shadow: 0 2px 10px rgba(52, 152, 219, 0.25);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            animation: pulse 2s infinite;
            display: inline-block;
            position: relative;
            flex-shrink: 0;
        }
        
        .register-btn-animated:hover {
            background: linear-gradient(135deg, #2980b9, #3498db);
            transform: scale(1.05);
            box-shadow: 0 4px 15px rgba(52, 152, 219, 0.35);
        }
        
        .register-btn-animated:active {
            transform: scale(0.98);
        }
        
        .register-btn-animated .btn-text-1,
        .register-btn-animated .btn-text-2 {
            display: block;
        }
        
        .register-btn-animated .btn-text-1 {
            animation: textSwap1 4s infinite;
        }
        
        .register-btn-animated .btn-text-2 {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 100%;
            opacity: 0;
            animation: textSwap2 4s infinite;
        }
        
        @keyframes textSwap1 {
            0%, 45% {
                opacity: 1;
            }
            50%, 95% {
                opacity: 0;
            }
            100% {
                opacity: 1;
            }
        }
        
        @keyframes textSwap2 {
            0%, 45% {
                opacity: 0;
            }
            50%, 95% {
                opacity: 1;
            }
            100% {
                opacity: 0;
            }
        }
        
        @keyframes pulse {
            0%, 100% {
                box-shadow: 0 2px 10px rgba(52, 152, 219, 0.25);
            }
            50% {
                box-shadow: 0 2px 15px rgba(52, 152, 219, 0.4);
            }
        }
        
        /* Sparkle effect */
        .btn-sparkle {
            position: absolute;
            top: 50%;
            left: -25%;
            width: 50%;
            height: 100%;
            background: linear-gradient(90deg, 
                transparent, 
                rgba(255, 255, 255, 0.3), 
                transparent);
            transform: translateY(-50%) skewX(-20deg);
            animation: sparkle 3s infinite;
        }
        
        @keyframes sparkle {
            0% {
                left: -25%;
            }
            100% {
                left: 125%;
            }
        }
        
        .join-prayer-btn {
            font-weight: bold;
            text-transform: uppercase;
            letter-spacing: 1px;
        }
        
        .join-prayer-btn:hover {
            transform: translateY(-2px) scale(1.05);
            animation-play-state: paused;
        }
        
        /* Share Button Styles */
        .share-button-container {
            position: relative;
            display: inline-flex;
            align-items: center;
        }
        
        .share-button {
            border: none;
            cursor: pointer;
            align-items: center;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
        }
        
        .share-button::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 50%;
            transform: translate(-50%, -50%);
            transition: width 0.6s, height 0.6s;
        }
        
        .share-button:hover::before {
            width: 300px;
            height: 300px;
        }
        
        .share-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
            background: linear-gradient(135deg, #2980b9, #3498db);
        }
        
        .share-button:active {
            transform: translateY(0);
        }
        
        /* Mobile Responsive */
        @media (max-width: 600px) {
            .action-bar {
                gap: 4px;
            }
            
            .action-btn {
                padding: 8px 12px;
                font-size: 0.9em;
            }
            
            .action-btn i {
                font-size: 1em;
            }
            
            .action-count {
                font-size: 0.8em;
            }
            
            .comment-form {
                flex-direction: row;
            }
            
            .comment-form input[type="text"] {
                font-size: 0.85em;
            }
            
            .comment-form input[type="submit"] {
                font-size: 0.85em;
                padding: 8px 14px;
            }
            
            .post-header {
                position: relative;
                flex-wrap: nowrap;
                align-items: flex-start;
            }
            
            .register-btn-animated {
                position: absolute;
                top: 8px;
                right: 0;
                padding: 6px 12px;
                font-size: 0.75em;
                min-width: 90px;
                margin-left: 0;
            }
            
            .register-btn-animated:hover {
                transform: scale(1.02);
            }
            
            .post-header-info {
                flex-grow: 1;
                padding-right: 100px;
            }
        }
        
        /* Tablet styling */
        @media (min-width: 601px) and (max-width: 768px) {
            .register-btn-animated {
                padding: 7px 14px;
                font-size: 0.8em;
                min-width: 110px;
            }
        }
        
        /* Ensure proper spacing on desktop */
        @media (min-width: 769px) {
            .post-header {
                display: flex;
                align-items: center;
                gap: 12px;
            }
            
            .post-header-info {
                flex-grow: 1;
            }
        }
        
        .register-btn-animated.sparkle-burst {
            animation: sparkleBurst 1s ease-out;
        }
        
        @keyframes sparkleBurst {
            0%, 100% {
                transform: scale(1);
            }
            50% {
                transform: scale(1.08);
                filter: brightness(1.2);
            }
        }
    
.share-buttons .share-tochat {
    grid-column: 1 / -1;
    font-weight: 600;
}

/* 2026-07-29: quotations and lists in post bodies (includes/format_text.php) */
.fq { margin: 8px 0; padding: 6px 0 6px 14px; border-left: 3px solid #bcd6ea;
      color: #4a6072; font-style: italic; }
.fl { margin: 8px 0 8px 22px; padding: 0; }
.fl li { margin-bottom: 5px; }
.view-all-comments {
    padding: 2px 16px 12px;
    color: #8a929c;
    font-size: 0.92em;
    text-decoration: none;
}
.view-all-comments:hover { color: #5f6a76; }

/* Feed media cap (ported 2026-08-01 - this page never received it):
   media never exceeds ~3/4 of the screen, images scale down whole. */
.post-content img,
.single-image-container img,
.carousel-container,
.video-container video,
.video-container .lazy-video {
    max-height: 72vh !important;
}
.post-content img,
.single-image-container img {
    width: auto !important;
    max-width: 100% !important;
    margin-left: auto;
    margin-right: auto;
    display: block;
    object-fit: contain;
}
    /* youtube-embed 2026-08-01: facade image, play button, player */
    /* the facade IS the native .video-placeholder - no thumbnail, full
       visual parity with uploaded videos until the member taps play */
    .video-container.yt-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; z-index: 3; }
/* The two white bars get the same glaze as the cards, without the diagonal band: they
   are too thin to show it. A bright edge, gentle shading and a soft shadow do the work. */
html body .top-nav { margin: -10px -10px 12px; border-bottom: 0; background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 55%, #f3f6f9 100%); box-shadow: inset 0 1px 0 #ffffff, inset 0 -1px 0 rgba(150,170,190,.16), 0 3px 8px rgba(23,43,77,.09); }
/* Hidden from the eye, kept for screen readers. */
.feed-container > h2 { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#posts-container .post {
    padding: 14px 14px 0;
    border-radius: 18px;
    color: #2c3e50;
    background-color: #ffffff;
    background-image: linear-gradient(112deg, rgba(255,255,255,0) 12%, #ffffff 28%, rgba(255,255,255,0) 46%), linear-gradient(168deg, #ffffff 0%, #fbfcfd 60%, #f6f9fb 100%);
    box-shadow: inset 0 1px 0 #ffffff, inset 0 -1px 2px rgba(150,170,190,.2), 0 1px 1px rgba(23,43,77,.09), 0 8px 20px rgba(23,43,77,.13);
}

/* Header: picture without the ring, name above the time. */
#posts-container .post-header { margin-bottom: 10px; }
#posts-container .post-header img.profile-pic,
#posts-container .post-header .placeholder-pic { width: 44px; height: 44px; border: 0; object-fit: cover; }
#posts-container .post-header .profile-pic-link { margin-right: 10px; }
#posts-container .post-header > div { flex-direction: column; align-items: flex-start; gap: 1px; margin-right: 10px; }
#posts-container .post-header > div > .username { max-width: 100%; font-size: 15.5px; font-weight: 700; }
#posts-container .post-header > div > .timestamp { font-size: 12.5px; color: #5d7485; }

/* Text sits on the card itself, cut at a whole line. */
#posts-container .post-content h3 { margin: 0 0 6px; font-size: 17.5px; line-height: 1.3; font-weight: 700; }
#posts-container .prayer-content-wrapper { margin: 0; }
#posts-container .prayer-content.preserve-formatting { margin: 0; padding: 0; border-left: 0; background: none; color: #2c3e50; font-size: 15.5px; line-height: 23px; }
#posts-container .prayer-content.truncated { max-height: 92px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
#posts-container .prayer-content.expanded { max-height: none; }
#posts-container .prayer-content a { color: #2c6f9f; }
/* A preview ends in three dots on its last line, with no fade (Nick's choice). */
#posts-container .text-fade-overlay { background: none !important; }
#posts-container .view-toggle-btn,
#posts-container .view-toggle-btn:hover,
#posts-container .view-toggle-btn:active { display: flex; justify-content: flex-start; width: 100%; min-height: 44px; margin: -2px 0 -6px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; transform: none; color: #2c6f9f; font-size: 14.5px; font-weight: 600; }
#posts-container .view-toggle-btn::before { display: none; }
#posts-container .view-toggle-btn i { display: none; }

/* Pictures and every video run the full width of the card. !important on the video
   because the player writes its own max-width when it starts, which would pull the
   frame back in from the edges. An upright video plays centred on its black frame. */
#posts-container .single-image-container,
#posts-container .image-carousel,
#posts-container .video-container { width: calc(100% + 28px); margin: 10px -14px 0; border-radius: 0; box-shadow: none; }
#posts-container .single-image-container,
#posts-container .image-carousel { max-width: none; }
/* video-frame 2026-11-05: the frame stops where the video stops. The page capped the video
   at 72vh but let an upright frame grow to 80vh, leaving a black band under the picture. */
#posts-container .video-container { max-width: none !important; max-height: 72vh !important; }
/* The action row keeps 8px from text, but a picture or wide video meets it directly. */
#posts-container .single-image-container,
#posts-container .video-container { margin-bottom: -8px; }
/* video-frame 2026-11-05: 1px, not 0. Square corners came in with the blank-video reports;
   the slight rounding may keep the phone drawing the video with the page. Not yet proven. */
#posts-container .video-container .lazy-video { border-radius: 1px; }
/* A phone keeps "hover" after a tap, which lifted this band off the bottom edge. */
#posts-container .video-container:hover .video-title-overlay { transform: none; }
#posts-container .single-image-container:hover,
#posts-container .video-container:hover { transform: none; box-shadow: none; }
#posts-container .single-image-container img { margin-top: 0; margin-bottom: 0; border-radius: 0; }
/* A picture too narrow to reach both edges sits on a blurred copy of itself, the way
   albums already do. The neutral colour shows until then, or if the blur cannot run. */
#posts-container .single-image-container { background-color: #eef3f7; }
#posts-container .single-image-container img { position: relative; z-index: 1; }
#posts-container .single-image-container .img-blur { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(20px); transform: scale(1.15); }
#posts-container .carousel-slide img { margin: 0; border-radius: 0; }
#posts-container .carousel-slide { background-color: #ffffff; }

/* Actions: icons spread evenly in one colour, comfortable to tap, no words. */
#posts-container .action-bar { display: flex; flex-wrap: nowrap; justify-content: stretch;     }
#posts-container .action-bar > .action-btn,
#posts-container .action-bar > form { flex: 1 1 0; min-width: 0; display: flex; margin: 0; }
#posts-container .action-bar .action-btn { justify-content: center; width: 100%;  padding: 0 2px;  color: #4d6373;   }
#posts-container .action-bar .action-btn i { font-size: 20px; color: inherit; }
#posts-container .action-bar .action-count { font-size: 14px; font-weight: 600; color: inherit; }
#posts-container .action-bar .action-btn:hover:not(.disabled) { background: rgba(44,111,159,.06); color: #4d6373; }
#posts-container .action-bar .action-btn:active:not(.disabled) { background: rgba(44,111,159,.1); transform: none; }
#posts-container .action-bar .like-button.liked,
#posts-container .action-bar .like-button.liked:hover:not(.disabled) { color: #d93a2b; }
#posts-container .action-bar .delete-btn,
#posts-container .action-bar .delete-btn:hover:not(.disabled) { color: #a4261d; }
/* The comment button already leads to the conversation. */
#posts-container .view-all-comments { display: none; }

/* post.php: one post on a page of its own, so the page behind it takes the card's colour
   and the card sits inside the page instead of being the page. */
html body .prayer-container { background: #e4ebf1; box-shadow: none; }
#posts-container .post-header { gap: 0; }
#posts-container .post-header img.profile-pic,
#posts-container .post-header .placeholder-pic { margin-right: 10px; }
#posts-container .post-header-info { display: flex;   margin: 0 10px 0 0; }
#posts-container .post-header-info .username { font-size: 15.5px; font-weight: 700; }
#posts-container .post-meta { display: flex; align-items: center; gap: 5px; min-width: 0; color: #5d7485; font-size: 12.5px; line-height: 1.3; white-space: nowrap; }
#posts-container .post-meta .timestamp { margin: 0; color: inherit; font-size: inherit; }
#posts-container .post-meta .view-stats { display: inline-flex; align-items: center; gap: 4px; margin: 0; color: inherit; font-size: inherit; }
#posts-container .post-meta .view-stats i { color: inherit; font-size: 11px; }
#posts-container .action-bar .share-button::before { display: none; }

/* ---- post.php, block from line 3301 ---- */
            .quick-join {  padding: 20px 16px; border-radius: 18px; text-align: center; background-color: #fff; background-image: linear-gradient(112deg, rgba(255,255,255,0) 12%, #fff 28%, rgba(255,255,255,0) 46%), linear-gradient(168deg, #fff 0%, #fbfcfd 60%, #f6f9fb 100%); box-shadow: inset 0 1px 0 #fff, inset 0 -1px 2px rgba(150,170,190,.18), 0 1px 1px rgba(23,43,77,.08), 0 3px 9px rgba(23,43,77,.1); }
            .quick-join h2 { margin: 0; padding: 0; border: 0; color: #2c3e50; font-size: 18px; line-height: 1.3; }
            .quick-join p { margin: 8px 0 14px; color: #4d6373; font-size: 14.5px; line-height: 1.45; }
            .quick-join .qj-g { display: flex; justify-content: center; min-height: 46px; }
            .quick-join .qj-alt { display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; color: #2c6f9f; font-size: 14px; font-weight: 600; text-decoration: none; }
            .quick-join .qj-alt.btn { padding: 0 18px; border-radius: 22px; background: #2c7cb8; color: #fff; }
            .quick-join .qj-login { margin: 4px 0 0; font-size: 13.5px; }
            .quick-join .qj-login a { color: #2c6f9f; }
            .quick-join .qj-apps { margin-top: 14px; padding-top: 14px; border-top: 1px solid #e3eaf0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }
            .quick-join .qj-apps span { flex: 1 0 100%; color: #5b7a91; font-size: 13px; }
            .quick-join .qj-apps a { display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 16px; border-radius: 12px; background: #1f2d3a; color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; }
            .quick-join .qj-apps a i { font-size: 17px; }
        
