/* Preparation Platform Custom Styles */

/* Content Styles */
.welcome-content {
    padding: 2rem;
    background-color: #f9f9ff;
    border-radius: 0.5rem;
}

.feature-card {
    background-color: #fff;
    border-radius: 0.5rem;
    padding: 1.5rem;
    height: 100%;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.feature-icon {
    font-size: 2rem;
    color: var(--bs-primary);
    margin-bottom: 1rem;
}

/* Category List Styling */
.categories-list .category-item {
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.categories-list .category-item:hover {
    border-left-color: var(--bs-primary);
    background-color: rgba(13, 110, 253, 0.05);
}

.categories-list .category-item.active {
    border-left-color: var(--bs-primary);
    background-color: rgba(13, 110, 253, 0.1);
    font-weight: 500;
}

/* Content actions alignment fix */
.content-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.content-actions button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 1rem;
    font-size: 0.9rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

/* Enhanced hover effects for save and print buttons */
.content-actions button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Special styling for print button hover */
#print-content-btn {
    position: relative;
    overflow: hidden;
}

#print-content-btn:hover {
    background-color: #f8f9fa;
    border-color: #6366f1;
    color: #6366f1;
}

#print-content-btn:hover i {
    animation: print-bounce 0.6s ease;
}

@keyframes print-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

#print-content-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: linear-gradient(to top, rgba(99, 102, 241, 0.1), transparent);
    transition: height 0.3s ease;
    z-index: -1;
}

#print-content-btn:hover::after {
    height: 100%;
}

/* Enhance save button hover also for consistency */
#save-content-btn:hover {
    background-color: #6366f1;
    color: white;
}

#save-content-btn:hover i {
    animation: save-bounce 0.6s ease;
}

@keyframes save-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px) scale(1.1); }
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
}

.card-header h4 {
    margin-bottom: 0;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}

@media (max-width: 576px) {
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .card-header h4 {
        max-width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .content-actions {
        width: 100%;
        justify-content: space-between;
    }
}

/* Content display area */
#preparation-content {
    min-height: 400px;
    line-height: 1.7;
}

#preparation-content h1, 
#preparation-content h2, 
#preparation-content h3, 
#preparation-content h4, 
#preparation-content h5 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

#preparation-content h2 {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 0.5rem;
}

#preparation-content p {
    margin-bottom: 1rem;
}

#preparation-content ul, 
#preparation-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

#preparation-content code {
    background-color: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 0.2rem;
    font-size: 0.875em;
}

#preparation-content pre {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.3rem;
    overflow-x: auto;
    margin-bottom: 1rem;
}

#preparation-content blockquote {
    border-left: 4px solid var(--bs-primary);
    padding-left: 1rem;
    margin-left: 0;
    color: #6c757d;
}

/* Loading styles */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Practice and Resources sections */
#practice-section, #resources-section {
    transition: all 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .col-lg-3 {
        margin-bottom: 2rem;
    }
}

/* Print styles */
@media print {
    .main-header, .main-footer, .col-lg-3, .card-header, .content-actions {
        display: none !important;
    }
    
    .col-lg-9 {
        width: 100% !important;
    }
    
    .card {
        border: none !important;
        box-shadow: none !important;
    }
    
    .card-body {
        padding: 0 !important;
    }
    
    #preparation-content {
        font-size: 12pt;
        line-height: 1.5;
    }
}

/* Highlighted content */
.highlight-block {
    background-color: #f8f9fa;
    border-left: 4px solid var(--bs-primary);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0.3rem;
}

/* Sample code styling */
.code-sample {
    background-color: #f0f0f0;
    border-radius: 5px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    margin: 1rem 0;
    border: 1px solid #ddd;
}

/* Sample answer styling */
.sample-answer {
    background-color: #e7f5ff;
    border: 1px dashed #4dabf7;
    padding: 15px;
    border-radius: 5px;
    margin: 1rem 0;
}

/* Table styling */
#preparation-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

#preparation-content table th,
#preparation-content table td {
    border: 1px solid #dee2e6;
    padding: 0.5rem;
}

#preparation-content table th {
    background-color: #f8f9fa;
}

#preparation-content table tr:nth-child(even) {
    background-color: #f8f9fa;
}
