/* Page styles of resources/views/frontend/categories/show.blade.php (moved out of the view) */

/* Hero Section */
.category-hero-icon {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Category Info Card */
.category-icon-large {
    transition: transform 0.3s ease;
}

.category-info-header:hover .category-icon-large {
    transform: scale(1.1);
}

@media (max-width: 991px) {
    .col-lg-4 .card.position-sticky {
        position: relative !important;
        /* the inline top: 80px would shift the card 80px down over the next block (author / topic pages already reset it) */
        top: auto !important;
    }
}

/* Copy button feedback */
.copy-quote-btn {
    position: relative;
    transition: all 0.3s ease;
}

.copy-feedback {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    font-weight: bold;
}

.copy-quote-btn i, .copy-feedback {
    transition: all 0.3s ease;
}

/* Success animation */
.btn-success {
    animation: successPulse 1s ease;
}

@keyframes successPulse {
    0% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.5); }
    70% { box-shadow: 0 0 0 10px rgba(40, 167, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
}

/* Error animation */
.btn-danger {
    animation: errorShake 0.5s ease;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Subcategory Cards */
.subcategory-card {
    transition: all 0.3s ease;
    border: 1px solid transparent;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
}

.subcategory-card:hover {
    transform: translateX(-8px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
    border-color: var(--bs-primary);
    background: linear-gradient(145deg, #ffffff, #f5f8ff);
}

.subcategory-icon i {
    transition: transform 0.3s ease;
}

.subcategory-card:hover .subcategory-icon i {
    transform: scale(1.2);
}

/* Quote Items */
.quote-item {
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 1.25rem;
}

.quote-item:hover {
    background-color: rgba(0,0,0,0.02);
    transform: translateX(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.quote-content p {
    line-height: 1.8;
}

/* Stats Items */
.stat-item {
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.like-stat:hover {
    background-color: rgba(220, 53, 69, 0.1) !important;
}

.like-stat:hover i {
    color: #dc3545 !important;
    transform: scale(1.2);
}

.bookmark-stat:hover {
    background-color: rgba(255, 193, 7, 0.1) !important;
}

.bookmark-stat:hover i {
    color: #ffc107 !important;
    transform: scale(1.2);
}

.comment-stat:hover {
    background-color: rgba(16, 102, 231, 0.1) !important;
}

.comment-stat:hover i,
.comment-stat:hover small {
    color: #1066E7 !important;
}

.sorting-options .btn {
    padding: 8px 10px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    border-radius: 6px !important;
}

/* Author Avatar */
.author-avatar-sm {
    position: relative;
}

.author-avatar-sm::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.quote-item:hover .author-avatar-sm::after {
    opacity: 0.3;
}

.author-avatar-sm img {
    transition: transform 0.3s ease;
}

.quote-item:hover .author-avatar-sm img {
    transform: scale(1.1);
}

/* Toast Notifications */
.toast {
    /*font-family: 'Tajawal', sans-serif;*/
    direction: rtl;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: none;
}

/* Hero Stats */
.hero-stats {
    max-width: 400px;
    margin: 0 auto;
}

.stat-box {
    padding: 0 20px;
    position: relative;
}

.stat-box:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 30px;
    width: 1px;
    background: rgba(255,255,255,0.2);
}

/* Related Categories */
.related-category-card {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.related-category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1) !important;
    border-color: var(--bs-primary);
}

.related-category-card i {
    transition: all 0.3s ease;
}

.related-category-card:hover i {
    transform: scale(1.2);
    color: var(--bs-primary) !important;
}

/* Action Buttons */
.quote-actions .btn {
    transition: all 0.3s ease;
    border-radius: 6px;
}

.quote-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.hover-lift {
    transition: transform 0.3s ease;
}
.hover-lift:hover {
    transform: translateY(-5px);
}
.sticky-top {
    z-index: 10;
}
/* Animations */
@keyframes heartBeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(1); }
    75% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

@keyframes bounceSmall {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.bounce-animation {
    animation: bounceSmall 0.5s ease;
}

/* CTA Section */
.bg-gradient {
    background: linear-gradient(135deg, var(--bs-primary) 0%, #0056b3 100%) !important;
}

.bg-overlay-white {
    background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 100%);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-stats {
        gap: 15px;
    }

    .stat-box {
        padding: 0 10px;
    }

    .stat-box::after {
        display: none;
    }

    .quote-meta {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start !important;
    }

    .quote-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .sticky-top {
        position: static !important;
    }

    .subcategory-card {
        margin: 0 5px;
    }

    .sorting-options .btn {
        padding: 8px 6px;
        font-size: 0.8rem;
    }

    .sorting-options .btn i {
        margin-right: 4px;
    }
}

@media (max-width: 576px) {
    .quote-item {
        padding: 15px;
        margin: 0 5px;
    }

    .quote-content p {
        font-size: 1.1rem !important;
    }

    .quote-actions .btn {
        padding: 6px 10px;
        font-size: 0.85rem;
    }

    .quote-actions .btn span {
        display: none;
    }

    .quote-stats {
        flex-wrap: wrap;
        gap: 10px;
    }

    .sorting-options .col-4 {
        padding: 0 4px;
    }

    .sorting-options .btn {
        padding: 8px 4px;
        font-size: 0.75rem;
    }

    .sorting-options .btn i {
        margin-right: 2px;
        font-size: 0.9rem;
    }
}
