
/* Modern Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Parallax Effect */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Interactive Cards */
.feature-card, .course-card-modern {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.feature-card:hover, .course-card-modern:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* Modern Button Effects */
.btn-modern {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-modern::after {
    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 ease, height 0.6s ease;
}

.btn-modern:hover::after {
    width: 300px;
    height: 300px;
}

/* Loading Animation */
.loading-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-container.hidden {
    opacity: 0;
    pointer-events: none;
}

.road {
    width: 200px;
    height: 4px;
    background: #333;
    position: relative;
    overflow: hidden;
}

.road::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, #fff, transparent);
    animation: road-shine 1.5s infinite;
}

.car-container {
    position: absolute;
    animation: car-move 2s infinite;
}

@keyframes road-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes car-move {
    0% { transform: translateX(-100px); }
    100% { transform: translateX(300px); }
}

/* Modern Navigation */
.navbar-glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.navbar-glass.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

/* Hero Section Animation */
.hero-content {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Shape Blob Animation */
.shape-blob, .shape-blob-2 {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, #4a6cf7, #2651e8);
    opacity: 0.1;
    animation: blob-animate 8s infinite;
}

.shape-blob {
    width: 500px;
    height: 500px;
    top: -200px;
    right: -100px;
}

.shape-blob-2 {
    width: 300px;
    height: 300px;
    bottom: -100px;
    left: -50px;
    animation-delay: 2s;
}

@keyframes blob-animate {
    0% { transform: translate(0px, 0px) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0px, 0px) scale(1); }
}

/* Comment card animations */
.comment-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.comment-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

/* Like button animation */
.like-btn {
    transition: all 0.3s ease;
}

.like-btn:hover {
    background-color: #0d6efd;
    color: white;
}

/* Comment expansion animation */
.comment-expand {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Avatar icon styling */
.avatar-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(13, 110, 253, 0.1);
    border-radius: 50%;
}

/* Comments & Trends Section Styles */
.comment-form {
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.1);
}

.comment-form:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.comment-form .form-control {
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.comment-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.submit-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.submit-btn::after {
    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 ease, height 0.6s ease;
}

.submit-btn:hover::after {
    width: 300px;
    height: 300px;
}

.submit-btn:active {
    transform: scale(0.95);
}

/* Comment Card Styles */
.comment-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    padding: 1.25rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.comment-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

.comment-info {
    flex: 1;
}

.comment-author {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 0.15rem;
}

.comment-date {
    font-size: 0.75rem;
    color: #6c757d;
}

.comment-content {
    color: #495057;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex: 1;
}

.comment-actions {
    display: flex;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    background: #f8f9fa;
    border: none;
    color: #6c757d;
    transition: all 0.2s ease;
    cursor: pointer;
    font-size: 0.8rem;
}

.action-btn:hover {
    background: #e9ecef;
    color: var(--primary-color);
}

.action-btn.like-btn.active {
    background: var(--primary-color);
    color: white;
}

.action-btn i {
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .comment-card {
        padding: 1rem;
    }

    .comment-avatar {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .comment-author {
        font-size: 0.85rem;
    }

    .comment-date {
        font-size: 0.7rem;
    }

    .comment-content {
        font-size: 0.8rem;
    }

    .action-btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

.view-more-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.view-more-btn:hover {
    transform: translateY(-2px);
}

.view-more-btn:active {
    transform: scale(0.95);
}

/* Loading Animation */
.loading-spinner {
    display: none;
    text-align: center;
    padding: 2rem;
}

.loading-spinner.active {
    display: block;
}

.loading-spinner i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.empty-state i {
    font-size: 3rem;
    color: #dee2e6;
    margin-bottom: 1rem;
}

.empty-state h4 {
    color: #495057;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #6c757d;
    margin-bottom: 0;
}

/* Custom column for 5 items per row */
.col-xl-2-4 {
    flex: 0 0 auto;
    width: 20%;
}

/* Comment Card Styles */
.comment-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    padding: 1rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.comment-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
    font-size: 1rem;
}

.comment-info {
    flex: 1;
}

.comment-author {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.8rem;
    margin-bottom: 0.1rem;
}

.comment-date {
    font-size: 0.7rem;
    color: #6c757d;
}

.comment-content {
    color: #495057;
    font-size: 0.8rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    flex: 1;
}

.comment-actions {
    display: flex;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 50px;
    background: #f8f9fa;
    border: none;
    color: #6c757d;
    transition: all 0.2s ease;
    cursor: pointer;
    font-size: 0.75rem;
}

.action-btn:hover {
    background: #e9ecef;
    color: var(--primary-color);
}

.action-btn.like-btn.active {
    background: var(--primary-color);
    color: white;
}

/* Responsive adjustments */
@media (max-width: 1400px) {
    .col-xl-2-4 {
        width: 25%;
    }
}

@media (max-width: 1200px) {
    .col-xl-2-4 {
        width: 33.333333%;
    }
}

@media (max-width: 768px) {
    .col-xl-2-4 {
        width: 50%;
    }

    .comment-card {
        padding: 0.75rem;
    }

    .comment-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }

    .comment-author {
        font-size: 0.75rem;
    }

    .comment-date {
        font-size: 0.65rem;
    }

    .comment-content {
        font-size: 0.75rem;
    }

    .action-btn {
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }
}

@media (max-width: 576px) {
    .col-xl-2-4 {
        width: 100%;
    }
}

/* Comments Container */
.comments-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.comments-header {
    margin-bottom: 2rem;
    text-align: center;
}

.comments-header h3 {
    color: var(--primary-color);
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.comments-header p {
    color: #6c757d;
    font-size: 1rem;
}

#commentsContainer {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.25rem;
    padding: 0.5rem;
}

/* Comment Card Styles */
.comment-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 1.25rem;
    height: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.comment-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-color);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.comment-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.comment-card:hover::before {
    opacity: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-color), #4a90e2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.comment-card:hover .comment-avatar {
    transform: scale(1.1);
}

.comment-info {
    flex: 1;
    min-width: 0;
}

.comment-author {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.comment-date {
    font-size: 0.85rem;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comment-date i {
    color: var(--primary-color);
}

.comment-content {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #4a5568;
    margin-bottom: 1rem;
}

.comment-content p {
    margin-bottom: 0.5rem;
}

.admin-reply {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    border-left: 3px solid var(--primary-color);
    transition: all 0.3s ease;
}

.admin-reply:hover {
    background: #edf2ff;
    transform: translateX(5px);
}

.admin-reply-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.admin-reply-header i {
    font-size: 0.9rem;
}

.comment-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.action-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f8f9fa;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.action-btn:hover {
    transform: translateY(-2px);
}

.like-btn {
    background: #e7f5ff;
    color: #228be6;
}

.like-btn:hover {
    background: #228be6;
    color: white;
}

.like-btn.active {
    background: #228be6;
    color: white;
}

.reply-btn {
    background: #f8f9fa;
    color: #495057;
}

.reply-btn:hover {
    background: #495057;
    color: white;
}

.action-btn i {
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

.action-btn:hover i {
    transform: scale(1.1);
}

/* Loading Animation */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
    margin-right: 0.5rem;
    display: none;
}

.action-btn.loading .loading-spinner {
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (min-width: 1400px) {
    #commentsContainer {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1399px) {
    #commentsContainer {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1199px) {
    .comments-container {
        max-width: 100%;
        padding: 1.5rem;
    }
    #commentsContainer {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991px) {
    #commentsContainer {
        grid-template-columns: repeat(2, 1fr);
    }
    .comment-card {
        padding: 1rem;
    }
}

@media (max-width: 575px) {
    .comments-container {
        padding: 1rem;
    }
    #commentsContainer {
        grid-template-columns: 1fr;
    }
    .comments-header h3 {
        font-size: 1.5rem;
    }
}

/* Accessibility Improvements */
.action-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

/* Empty State */
.comments-empty {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.comments-empty i {
    font-size: 3rem;
    color: #dee2e6;
    margin-bottom: 1rem;
}

.view-more-card {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border: 1px dashed #dee2e6;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.view-more-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), #4a90e2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.view-more-card:hover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #ffffff, #e9ecef);
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.view-more-card:hover::before {
    opacity: 1;
}

.view-more-content {
    text-align: center;
    width: 100%;
    padding: 0.5rem;
    position: relative;
    z-index: 1;
}

.view-more-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--primary-color);
    border: none;
    padding: 0.35rem 0.75rem;
    font-weight: 500;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    font-size: 0.8rem;
}

.view-more-btn i {
    font-size: 0.8rem;
    margin-right: 0.35rem;
}

.view-more-btn .comment-count {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-left: 0.35rem;
}

.loading-state {
    padding: 0.5rem;
    animation: fadeIn 0.3s ease;
}

.loading-state .spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 0.1em;
}

.loading-state p {
    color: #6c757d;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    animation: fadeIn 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .view-more-card {
        min-height: 50px;
    }
    
    .view-more-btn {
        padding: 0.3rem 0.65rem;
        font-size: 0.75rem;
    }
    
    .view-more-btn i {
        font-size: 0.75rem;
    }
    
    .view-more-btn .comment-count {
        font-size: 0.7rem;
    }
}

#viewMoreComments {
    transition: all 0.2s ease;
    text-decoration: none;
}

#viewMoreComments:hover {
    transform: translateY(-1px);
    text-decoration: underline;
}

#viewMoreComments.loading {
    opacity: 0.7;
    pointer-events: none;
}

#viewMoreComments.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.comment-card {
    display: none;
}

.comment-card:nth-child(-n+8) {
    display: block;
}

.comment-card:nth-child(9) {
    display: none;
}

.comment-card.expanded {
    display: block;
}
