/* Mobile First Design */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f8f9fa;
}

/* Header */
.container-fluid {
    max-width: 100%;
    padding: 0;
}

/* Author Avatar */
.author-avatar img,
.author-avatar div {
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Post Cards - Trading Card Style (Index Page) */
.post-card {
    border-radius: 12px !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
}

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

/* Post Image Container (Index Page) */
.post-image {
    position: relative;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.post-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-image img {
    transform: scale(1.05);
}

.post-image div {
    height: 200px;
    border-radius: 12px 12px 0 0;
}

/* Post Hover Overlay (Index Page) */
.post-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #cacacaa2;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px 12px 0 0;
}

.post-card:hover .post-overlay {
    opacity: 1;
}

.post-overlay i {
    font-size: 2rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Card Content */
.card-title {
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-title a:hover {
    color: #1F26D9 !important;
}

/* Content Preview */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Reaction Buttons */
.reaction-form button {
    border: none !important;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.reaction-form button:hover {
    transform: scale(1.1);
    color: #1F26D9;
}

/*.like-btn:hover {
    color: #28a745 !important;
}

.dislike-btn:hover {
    color: #dc3545 !important;
}*/

.eye, 
.share-btn {
    color: #1F26D9;
    background: transparent;
    border: 0;
}

.eye:hover, 
.share-btn:hover {
    transform: scale(1.1);
}

/* Toast */
.toast {
    background-color: #1f25d9a2;
    color: white;
    border: none;
}

.toast-body {
    padding: 0.75rem 1rem;
    font-weight: 500;
}

/* Loading Animation */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #1f25d9a2;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Dropdown Menu */
.dropdown-menu {
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
    min-width: 160px;
}

.dropdown-item {
    padding: 8px 16px;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

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

.dropdown-item i {
    width: 20px;
}

/* Blog Header */
.bg-white {
    border-bottom: 1px solid #e9ecef;
}

/* Utility Classes */
.shadow-hover {
    transition: box-shadow 0.2s ease;
}

.shadow-hover:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

/* Action Buttons */
.btn-link {
    text-decoration: none !important;
}

.btn-link:hover {
    text-decoration: none !important;
}

/* ================================= */
/* POST DETAIL PAGE STYLES */
/* ================================= */

/* Post Detail Card */
.post-detail-card {
    border-radius: 15px !important;
    overflow: hidden;
    max-width: 100%;
    margin-bottom: 2rem;
}

/* Post Image Container (Detail Page) */
.post-image-container {
    position: relative;
    overflow: hidden;
}

.post-image-container .post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 0; /* Override index page border radius */
}

.post-image-container .post-image:hover {
    transform: scale(1.02);
}

/* Post Title */
.post-title {
    color: #2c3e50;
    line-height: 1.3;
    margin-bottom: 1rem;
}

/* Post Header */
.post-header {
    border-bottom: 1px solid #f1f3f4;
    padding-bottom: 1rem;
}

/* Post Content */
.post-content {
    font-size: 16px;
    line-height: 1.6;
    color: #444;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.post-content p {
    margin-bottom: 1rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.post-content blockquote {
    border-left: 4px solid #1f25d9a2;
    padding-left: 1rem;
    margin: 1rem 0;
    font-style: italic;
    color: #666;
}

.post-content ul,
.post-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.post-content li {
    margin-bottom: 0.25rem;
}

/* Post Actions */
.post-actions {
    background: #fff; /*Background*/
    margin: -1rem -1rem 0;
    padding: 1rem;
    border-radius: 0 0 15px 15px;
}

/* Enhanced Reaction Buttons for Detail Page */
.post-detail-card .reaction-form button {
    transition: all 0.2s ease;
    border-width: 0px;
    padding: 0.375rem 0.75rem;
}

.post-detail-card .like-btn:hover {
    background-color: #D9D61F;
    border-color: #D9D61F;
    color: white;
    transform: translateY(-1px);
}

.post-detail-card .dislike-btn:hover {
    background-color: #D9D61F;
    border-color: #D9D61F;
    color: white;
    transform: translateY(-1px);
}

.dislike-btn {
    color: #1F26D9;
}

.like-btn {
    color: #1F26D9;
}

.btn-sm {
    color:#1F26D9;
    border-color:#1F26D9;
}

.btn-sm:hover {
    background-color: #1F26D9;
    border-color: #1F26D9;
    color: #fff;
}

.post-detail-card .reaction-form button:active {
    transform: translateY(0);
}

/* Loading Animation für AJAX */
.reaction-form.loading button {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.reaction-form.loading button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

/* ================================= */
/* RESPONSIVE DESIGN */
/* ================================= */

/* Small devices */
@media (max-width: 576px) {
    .post-overlay i {
        font-size: 1.5rem;
    }
    
    .card-body {
        padding: 1rem 0.75rem;
    }
    
    .card-title {
        font-size: 0.9rem;
    }
    
    .card-text {
        font-size: 0.8rem;
    }
    
    .reaction-form button {
        font-size: 12px;
    }
    
    /* Post Detail Responsive */
    .post-image-container .post-image {
        height: 250px;
    }
    
    .post-title {
        font-size: 1.5rem;
    }
    
    .post-content {
        font-size: 15px;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .post-detail-card .card-body {
        padding: 1.5rem 1rem;
    }
    
    .post-actions {
        margin: -1rem -1rem 0;
        padding: 1rem;
    }
    
    /* Stack reactions vertically on mobile */
    .post-actions .d-flex {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }
    
    .post-actions .d-flex:first-child {
        flex-direction: row;
        align-items: center;
        justify-content: center;
    }
    
    .reaction-form {
        flex: 1;
    }
    
    .reaction-form button {
        width: 100%;
        justify-content: center;
    }
}

/* Medium devices */
@media (min-width: 576px) {
    .post-image img,
    .post-image div {
        height: 180px;
    }
}

@media (max-width: 768px) {
    .post-image-container .post-image {
        height: 280px;
    }
}

@media (min-width: 768px) {
    .post-image img,
    .post-image div {
        height: 200px;
    }
    
    .container {
        max-width: 720px;
    }
}

/* Large devices */
@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
    
    .post-image img,
    .post-image div {
        height: 220px;
    }
    
    .post-image-container .post-image {
        height: 350px;
    }
    
    .post-content {
        font-size: 17px;
    }
}

/* ================================= */
/* TOUCH INTERACTIONS */
/* ================================= */

/* Enhanced touch interactions for mobile */
.touch-active {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* ================================= */
/* PRINT STYLES */
/* ================================= */

@media print {
    .post-actions,
    .dropdown,
    .btn {
        display: none !important;
    }
    
    .post-detail-card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    .post-image-container .post-image {
        max-height: 400px;
    }
}

/* ================================= */
/* DARK MODE SUPPORT (Optional) */
/* ================================= */
/*
@media (prefers-color-scheme: dark) {
    body {
        background-color: #001E37;
        color: #e9ecef;
    }
    
    .bg-white {
        background-color: #2c3e50 !important;
    }
    
    .card {
        background-color: #132347;
        color: #e9ecef;
    }
    
    .post-content {
        color: #e9ecef;
    }
    
    .post-title {
        color: #f8f9fa;
    }
    
    .post-header {
        border-bottom-color: #495057;
    }
    
    .post-actions {
        background: #343a40;
    }
    
    .dropdown-menu {
        background-color: #495057;
        border: 1px solid #6c757d;
    }
    
    .dropdown-item {
        color: #e9ecef;
    }
    
    .dropdown-item:hover {
        background-color: #6c757d;
    }
}
*/