/* Global Styles */
:root {
    --primary-color: #484848;
    --danger-color: #dc3545;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --border-radius: 8px;
}

/* Primary buttons — same look across join, profile, etc. */
.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--primary-color);
    --bs-btn-border-color: var(--primary-color);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #666666;
    --bs-btn-hover-border-color: #666666;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #3a3a3a;
    --bs-btn-active-border-color: #3a3a3a;
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: var(--primary-color);
    --bs-btn-disabled-border-color: var(--primary-color);
    font-weight: 600;
    font-size: 1rem;
}

html {
    height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    position: relative;
}

main {
    min-height: calc(100vh - 120px);
}

/* Navigation */
.navbar {
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1030;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.5rem;
    color: #484848 !important;
}

.navbar-nav .nav-link {
    color: #484848 !important;
}

.navbar-nav .nav-link:hover {
    color: #666666 !important;
}

.navbar-toggler {
    border-color: #484848;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(72, 72, 72, 0.75)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Dropdown menu */
.dropdown-menu {
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    margin-top: 0.5rem;
    z-index: 1031;
    background-color: white;
}

.dropdown-item {
    color: #484848;
    padding: 0.5rem 1rem;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #484848;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
}

/* Post Card */
.post-card {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    background: white;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.post-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.post-preview-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: top center;
    display: block;
    background: var(--light-color);
}

.post-preview-placeholder {
    width: 100%;
    height: 200px;
    background: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 48px;
}

.post-info {
    padding: 15px;
}

.post-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 5px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-author {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.post-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    border-top: 1px solid #eee;
}

.btn-like {
    display: flex;
    align-items: center;
    gap: 5px;
    border: 1px solid #ddd;
    background: white;
    color: #666;
    transition: all 0.2s;
}

.btn-like:hover {
    background: #f8f9fa;
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.btn-like.liked {
    background: var(--danger-color);
    border-color: var(--danger-color);
    color: white;
}

.like-count-static {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 14px;
}

/* Profile */
.profile-header {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #999;
}

/* Post Detail */
.post-detail-container {
    width: 100%;
}

.post-detail-header {
    background: var(--dark-color);
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.post-content {
    background: white;
}

.post-version {
    min-height: 400px;
}

/* Footer */
.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
}

.footer a {
    color: var(--danger-color);
    text-decoration: none;
}

.footer a:hover {
    color: #bb2d3b;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .profile-header {
        padding: 20px;
    }
    
    .profile-avatar,
    .profile-avatar-placeholder {
        width: 60px;
        height: 60px;
    }
    
    .profile-avatar-placeholder {
        font-size: 24px;
    }
}

/* Verstka.io content styles */
.post-content img {
    max-width: 100%;
    height: auto;
}

.post-content .container {
    max-width: 800px;
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card {
    animation: fadeIn 0.3s ease-out;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

