/* ===================================
   INTERVIEW PREPARATION STYLES
   =================================== */

/* Topic Cards Grid */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.topic-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.topic-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.topic-card:hover::before {
    transform: scaleX(1);
}

.topic-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
    border-color: var(--primary-color);
}

.topic-card .topic-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
}

.topic-card h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.4rem;
}

.topic-card p {
    color: var(--light-text);
    text-align: center;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.topic-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--light-bg);
    border-radius: 8px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--light-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Detailed Content Sections */
.topic-detail {
    display: none;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    margin-bottom: 30px;
    overflow: hidden;
}

.topic-detail.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.topic-header {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--white-text);
    padding: 40px;
    text-align: center;
    position: relative;
}

.topic-header h1 {
    color: var(--white-text);
    margin-bottom: 15px;
    font-size: 2.5rem;
}

.topic-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.topic-content {
    padding: 50px;
}

.content-section {
    margin-bottom: 50px;
}

.content-section h2 {
    color: var(--primary-color);
    margin-bottom: 25px;
    font-size: 2rem;
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 10px;
}

.content-section h3 {
    color: var(--secondary-color);
    margin: 30px 0 15px;
    font-size: 1.5rem;
}

.content-section h4 {
    color: var(--primary-color);
    margin: 25px 0 10px;
    font-size: 1.2rem;
}

.content-section p {
    color: var(--text-color);
    line-height: 1.8;
    margin-bottom: 20px;
}

.content-section ul {
    margin: 20px 0;
    padding-left: 0;
}

.content-section li {
    color: var(--text-color);
    margin-bottom: 12px;
    padding: 12px 20px;
    background: var(--light-bg);
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    list-style: none;
    position: relative;
}

.content-section li::before {
    content: '▶';
    color: var(--accent-color);
    font-weight: bold;
    position: absolute;
    left: 8px;
}

/* Question Cards */
.questions-container {
    display: grid;
    gap: 25px;
    margin-top: 30px;
}

.question-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.question-card:hover {
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-color);
}

.question-header {
    background: var(--light-bg);
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.question-header:hover {
    background: #e8f4fd;
}

.question-title {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
}

.question-toggle {
    color: var(--primary-color);
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.question-card.active .question-toggle {
    transform: rotate(180deg);
}

.question-content {
    padding: 25px;
    display: none;
    border-top: 2px solid var(--accent-color);
}

.question-card.active .question-content {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; max-height: 0; }
    to { opacity: 1; max-height: 500px; }
}

.answer-content {
    color: var(--text-color);
    line-height: 1.7;
}

.answer-content strong {
    color: var(--primary-color);
}

.answer-content code {
    background: var(--code-bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', monospace;
    color: var(--secondary-color);
}

/* Difficulty Badges */
.difficulty-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 10px;
}

.difficulty-easy {
    background: #d4edda;
    color: #155724;
}

.difficulty-medium {
    background: #fff3cd;
    color: #856404;
}

.difficulty-hard {
    background: #f8d7da;
    color: #721c24;
}

/* Back to Topics Button */
.back-to-topics {
    background: var(--primary-color);
    color: var(--white-text);
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    margin-bottom: 30px;
}

.back-to-topics:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* Responsive Design for Interview Prep */
@media (max-width: 768px) {
    .topics-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .topic-content {
        padding: 30px 20px;
    }
    
    .topic-header {
        padding: 30px 20px;
    }
    
    .topic-header h1 {
        font-size: 2rem;
    }
    
    .content-section h2 {
        font-size: 1.6rem;
    }
    
    .question-header {
        padding: 15px;
    }
    
    .question-content {
        padding: 20px;
    }
    
    .topic-stats {
        flex-direction: column;
        gap: 10px;
    }
}