/* Enhanced Comments Section Styling */
.comments-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 20px;
    padding: 40px;
    margin: 60px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.comments-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0049ac, #1a5fd9, #377dff);
    border-radius: 20px 20px 0 0;
}

.comments-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.comments-header h3 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.comments-header h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #0049ac, #377dff);
    border-radius: 2px;
}

.comments-count {
    background: linear-gradient(135deg, #0049ac, #377dff);
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-block;
    margin-top: 15px;
    box-shadow: 0 4px 15px rgba(0, 73, 172, 0.3);
}

.comment-item {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.comment-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #0049ac, #377dff);
    border-radius: 0 2px 2px 0;
}

.comment-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 15px;
}

.comment-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #f8f9fa;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.comment-item:hover .comment-avatar {
    border-color: #377dff;
    transform: scale(1.05);
}

.comment-meta {
    flex: 1;
}

.comment-author {
    font-weight: 700;
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 5px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.comment-author:hover {
    color: #377dff;
}

.comment-date {
    font-size: 0.85rem;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 5px;
}

.comment-date i {
    color: #377dff;
    font-size: 0.8rem;
}

.comment-content {
    color: #495057;
    line-height: 1.7;
    font-size: 1rem;
    margin-left: 75px;
    position: relative;
}

.comment-content::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: -20px;
    font-size: 3rem;
    color: #377dff;
    opacity: 0.3;
    font-family: serif;
}

/* Comment Form Styling */
.comment-form-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-top: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 2px solid rgba(0, 73, 172, 0.1);
    position: relative;
    overflow: hidden;
}

.comment-form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0049ac, #377dff);
    border-radius: 20px 20px 0 0;
}

.comment-form-header {
    text-align: center;
    margin-bottom: 30px;
}

.comment-form-header h4 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.comment-form-header p {
    color: #6c757d;
    font-size: 0.95rem;
    margin: 0;
}

.comment-form {
    position: relative;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
    position: relative;
}

.form-control {
    width: 100%;
    /*    padding: 15px 20px;*/
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
    color: #495057;
}

.form-control:focus {
    outline: none;
    border-color: #377dff;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 73, 172, 0.1);
}

.form-control::placeholder {
    color: #adb5bd;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

.submit-btn {
    background: linear-gradient(135deg, #0049ac, #377dff);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 73, 172, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Empty State */
.comments-empty {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.comments-empty i {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 20px;
    display: block;
}

.comments-empty h5 {
    font-size: 1.3rem;
    color: #495057;
    margin-bottom: 10px;
}

.comments-empty p {
    color: #6c757d;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .comments-section {
        padding: 25px;
        margin: 40px 0;
    }

    .comments-header h3 {
        font-size: 1.8rem;
    }

    .comment-item {
        padding: 20px;
    }

    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .comment-content {
        margin-left: 0;
        margin-top: 15px;
    }

    .comment-content::before {
        display: none;
    }

    .form-row {
        flex-direction: column;
        gap: 15px;
    }

    .comment-form-section {
        padding: 25px;
    }
}

@media (max-width: 480px) {
    .comments-section {
        padding: 20px;
    }

    .comment-item {
        padding: 15px;
    }

    .comment-avatar {
        width: 50px;
        height: 50px;
    }

    .comment-form-section {
        padding: 20px;
    }
}

/* Animation for new comments */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.comment-item {
    animation: slideInUp 0.5s ease-out;
}

/* Loading state for form submission */
.submit-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.submit-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}