:root {
    --primary: #111111;
    --accent: #2563eb;
    --success: #059669;
    --border: #e0e0e0;
    --radius: 8px;
}

body {
    background-color: #ffffff;
    color: var(--primary);
    font-family: 'Inter', sans-serif;
    margin: 0;

    /* CHANGE THIS TO 0 so the white background doesn't show below footer */
    padding-bottom: 0;
}



.container-fluid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Helpers for Responsive Text --- */
.d-none-mobile { display: inline; }
.d-show-mobile { display: none; }

/* --- Hero Section --- */
.hero-wrapper {
    background-color: #ffffff;
    padding: 20px 0;
    display: flex;
    justify-content: center;
}

.image-canvas {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.main-photo {
    max-height: 85vh;
    max-width: 100%;
    height: auto;
    display: block;
    cursor: zoom-in;
    object-fit: contain;
}

.main-photo.zoomed {
    max-height: none;
    cursor: zoom-out;
}

/* --- Sticky Meta Bar (Top) --- */
.meta-bar-sticky {
    position: sticky;
    top: 70px; /* Adjust based on your header height */
    z-index: 90;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
    margin-bottom: 0; /* Reduced margin so it sits flush with image or action bar */
}

.meta-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.author-block {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
}

.author-text h4 { margin: 0; font-size: 1rem; font-weight: 600; }
.author-text span { font-size: 0.85rem; color: #666; }

/* --- Action Buttons (Desktop Top Bar) --- */
.action-group { display: flex; gap: 10px; align-items: center; }

.btn-pill {
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    border: 1px solid #d1d1d1;
    background: white;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: #444;
}

.btn-pill:hover { border-color: #111; color: #111; }
.btn-pill.active { color: #e11d48; border-color: #e11d48; background: #fff1f2; }
.btn-pill.active-save { color: var(--accent); border-color: var(--accent); }

.btn-download-main {
    background-color: var(--success);
    color: white;
    border: 1px solid var(--success);
    padding: 10px 24px;
}

.btn-download-main:hover {
    background-color: #047857;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

/* --- Dropdown --- */
.dropdown-wrapper { position: relative; }
.dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 8px;
    background: white;
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 6px;
    width: 200px;
    display: none;
    z-index: 100;
}
.dropdown-menu.show { display: block; }
.dropdown-item {
    display: flex; justify-content: space-between; padding: 12px 16px;
    color: #333; text-decoration: none; font-size: 0.9rem; border-bottom: 1px solid #f0f0f0;
}
.dropdown-item:hover { background-color: #f9f9f9; }

/* --- NEW: Mobile Action Bar (Hidden on Desktop) --- */
.mobile-action-bar {
    display: none; /* Hidden by default */
    justify-content: space-around;
    align-items: center;
    padding: 10px 0;
    background: white;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.mobile-action-btn {
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    color: #555;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.2s;
    width: 25%; /* Equal width distribution */
}

.mobile-action-btn i {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.mobile-action-btn:active {
    background-color: #f5f5f5;
    transform: scale(0.95);
}

.mobile-action-btn.active i { color: #e11d48; }
.mobile-action-btn.active-save i { color: var(--accent); }


/* --- Main Grid Layout --- */
.content-grid {
    display: grid;
    grid-template-columns: 320px 1fr; /* Sidebar fixed width */
    gap: 50px;
    margin-top: 20px;
    align-items: start;
}

/* --- Left Sidebar Styles --- */
.info-sidebar h3 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #111;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
    color: #555;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.tag-item {
    background: #f3f3f3;
    color: #555;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.8rem;
    transition: 0.2s;
}
.tag-item:hover { background: #e0e0e0; }

/* --- Sidebar Comments --- */
.sidebar-comments-section {
    margin-top: 30px;
}

.comment-input-area {
    margin-bottom: 20px;
}

.comment-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    resize: vertical;
    font-family: inherit;
    font-size: 0.9rem;
    margin-bottom: 8px;
    box-sizing: border-box; /* Fix for padding overflow */
}

.post-btn-small {
    background: #111;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
}

.comment-item-compact {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.comment-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}

.comment-content h5 {
    margin: 0 0 2px 0;
    font-size: 0.9rem;
    font-weight: 600;
}

.comment-text {
    margin: 0;
    color: #444;
    line-height: 1.4;
    font-size: 0.85rem;
}

.comment-meta {
    font-size: 0.75rem;
    color: #888;
    margin-top: 4px;
    display: flex;
    gap: 8px;
}

.delete-link { color: #999; cursor: pointer; }
.delete-link:hover { color: red; }

/* --- Masonry Grid (Right Side) --- */
.masonry-wrapper {
    column-count: 3;
    column-gap: 20px;
}

.masonry-card {
    break-inside: avoid;
    margin-bottom: 20px;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
}

.masonry-card img {
    width: 100%;
    display: block;
    transition: transform 0.3s ease;
}

.masonry-card:hover img { filter: brightness(0.9); }







/* ... Previous CSS ... */

/* --- SHARE MODAL STYLES --- */
.share-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.share-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.share-modal-content {
    background: white;
    padding: 24px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.share-modal-overlay.active .share-modal-content {
    transform: scale(1);
}

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

.share-header h3 { margin: 0; font-size: 1.1rem; }
.close-modal-btn { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #666; }

/* Social Icons */
.share-platforms {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 25px;
}

.share-platform-button {
    width: 50px; height: 50px;
    border-radius: 50%;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s;
}
.share-platform-button:hover { transform: translateY(-3px); }

.share-platform-button.facebook { background-color: #1877F2; }
.share-platform-button.twitter { background-color: #1DA1F2; }
.share-platform-button.whatsapp { background-color: #25D366; }

/* Copy Link Area */
.copy-link-wrapper {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.copy-link-wrapper input {
    flex: 1;
    border: none;
    padding: 10px;
    font-size: 0.9rem;
    color: #555;
    outline: none;
}

.copy-link-wrapper button {
    background: #111;
    color: white;
    border: none;
    padding: 0 20px;
    cursor: pointer;
    font-weight: 600;
}

/* --- TOAST NOTIFICATION --- */
.toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 12px;
    position: fixed;
    z-index: 3000;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-size: 0.9rem;
}

.toast.show {
    visibility: visible;
    -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@-webkit-keyframes fadein { from {bottom: 0; opacity: 0;} to {bottom: 30px; opacity: 1;} }
@keyframes fadein { from {bottom: 0; opacity: 0;} to {bottom: 30px; opacity: 1;} }
@-webkit-keyframes fadeout { from {bottom: 30px; opacity: 1;} to {bottom: 0; opacity: 0;} }
@keyframes fadeout { from {bottom: 30px; opacity: 1;} to {bottom: 0; opacity: 0;} }



@media (max-width: 1024px) {
    .content-grid { grid-template-columns: 280px 1fr; gap: 30px; }
    .masonry-wrapper { column-count: 2; }
}

@media (max-width: 768px) {
    .content-grid { grid-template-columns: 1fr; }
    .info-sidebar { order: 2; border-top: 1px solid #eee; padding-top: 30px; }

    .desktop-only { display: none !important; }

    .d-none-mobile { display: none; }
    .d-show-mobile { display: inline; }

    .btn-download-main {
        padding: 15px 65px;
        font-size: 0.85rem;
    }

    .mobile-action-bar { display: flex; } /* Shows the bar below image */

    .hero-wrapper { padding: 10px 0; }

    .mobile-sticky-footer { display: none !important; }
}
