/* CGPA Calculator Specific Styles */

.subjects-section {
    margin: 25px 0;
}

.subjects-section h3 {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.subject-row {
    background: var(--bg-light);
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.subject-row:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.subject-inputs {
    display: grid;
    grid-template-columns: 1.6fr 1.275fr 0.625fr 0.6fr auto;
    gap: 12px;
    align-items: end;
    max-width: 100%;
    overflow-x: auto;
}

.subject-inputs .input-group:nth-child(3) input {
    max-width: 100px;
}

.subject-inputs .input-group:nth-child(4) input {
    max-width: 95px;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 5px;
    font-weight: 500;
}

.input-group input,
.input-group select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 61, 130, 0.1);
}

.input-group input:read-only {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.btn-remove {
    padding: 10px 15px;
    background-color: #ef4444;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.btn-remove:hover {
    background-color: #dc2626;
}

.btn-add-subject {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

.btn-add-subject:hover {
    background-color: #00529b;
}

.previous-cgpa-section {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 15px;
    margin: 20px 0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Results Section */
.gpa-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.gpa-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.gpa-card.primary {
    background: linear-gradient(135deg, #003d82 0%, #0056b3 100%);
    grid-column: span 1;
}

.gpa-value {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 8px;
}

.gpa-label {
    font-size: 0.9rem;
    opacity: 0.95;
    font-weight: 500;
}

.gpa-scale {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 4px;
}

.performance-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.performance-label {
    font-weight: 600;
    color: var(--text-dark);
}

.performance-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.performance-badge.outstanding {
    background-color: #10b981;
    color: white;
}

.performance-badge.excellent {
    background-color: #3b82f6;
    color: white;
}

.performance-badge.very-good {
    background-color: #8b5cf6;
    color: white;
}

.performance-badge.good {
    background-color: #06b6d4;
    color: white;
}

.performance-badge.average {
    background-color: #f59e0b;
    color: white;
}

.performance-badge.below-average {
    background-color: #ef4444;
    color: white;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
}

.stat-label {
    font-weight: 500;
    color: var(--text-light);
}

.stat-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-dark);
}

.grade-summary-table {
    margin-top: 25px;
}

.grade-summary-table h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.grade-summary-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.grade-summary-table th {
    background-color: var(--primary-color);
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

.grade-summary-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    color: var(--text-dark);
}

.grade-summary-table tbody tr:hover {
    background-color: #f8f9fa;
}

.grade-summary-table tfoot td {
    background-color: #f8f9fa;
    font-weight: 600;
    border-bottom: none;
}

/* Step-by-step Section */
.step-card {
    display: flex;
    gap: 15px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
}

.step-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.step-content h4 {
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.step-content p {
    color: var(--text-light);
    margin-bottom: 12px;
    line-height: 1.6;
}

/* Formula Section */
.formula-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    margin: 30px 0;
}

.formula-section h2 {
    color: var(--text-dark);
    margin-bottom: 15px;
}

.formula-box {
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.formula-box h4 {
    color: var(--primary-color);
    margin-bottom: 12px;
}

.formula-display {
    text-align: center;
    padding: 15px;
    background: #fafafa;
    border-radius: 4px;
    margin: 10px 0;
}

.formula-conversions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.conversion-formula {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
}

.conversion-formula h4 {
    color: var(--primary-color);
    font-size: 0.95rem;
    margin-bottom: 10px;
}

/* Grade Scale Tables */
.grade-scale-section {
    margin: 30px 0;
}

.grade-scale-section h2 {
    color: var(--text-dark);
    margin-bottom: 20px;
}

.scale-table {
    margin-bottom: 30px;
}

.scale-table h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.scale-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.scale-table th {
    background-color: var(--primary-color);
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.scale-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.scale-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Educational Content */
.educational-content {
    margin: 30px 0;
}

.edu-section {
    margin-bottom: 25px;
}

.edu-section h2 {
    color: var(--text-dark);
    margin-bottom: 12px;
    font-size: 1.3rem;
}

.edu-section p {
    color: var(--text-light);
    line-height: 1.7;
}

/* Examples Section */
.examples-section {
    margin: 30px 0;
}

.examples-section h2 {
    color: var(--text-dark);
    margin-bottom: 20px;
}

.example-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.example-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.example-card p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.solution-box {
    background: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
    padding: 15px;
    margin-top: 15px;
}

.solution-box h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* Tips Section */
.tips-section {
    margin: 30px 0;
}

.tips-section h2 {
    color: var(--text-dark);
    margin-bottom: 20px;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.tip-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tip-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tip-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.tip-card p {
    color: var(--text-light);
    line-height: 1.6;
    font-size: 0.95rem;
}

.tip-heading {
    font-weight: 700;
    color: var(--primary-color);
}

/* Expert Section */
.expert-section {
    margin: 3rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    border-radius: 4px;
}

.expert-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.expert-badge svg {
    stroke-width: 3;
}

.expert-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 2rem;
    background: white;
    padding: 2rem;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.expert-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--accent-color);
}

.expert-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.expert-info h3 {
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.expert-title {
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.expert-bio {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.expert-linkedin {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #0077b5;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.expert-linkedin:hover {
    color: #005885;
}

/* FAQ Section */
.faq-section {
    margin-top: 3rem;
    padding: 2rem;
    background-color: white;
    border-radius: 4px;
    box-shadow: var(--shadow);
}

.faq-section h2 {
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.faq-item {
    background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
    padding: 1.5rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.faq-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.faq-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.faq-item p {
    color: #555;
    line-height: 1.7;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .subject-inputs {
        grid-template-columns: 1fr;
    }
    
    .btn-remove {
        width: 100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .gpa-cards {
        grid-template-columns: 1fr;
    }
    
    .gpa-card.primary {
        grid-column: span 1;
    }
    
    .stats-row {
        grid-template-columns: 1fr;
    }
    
    .formula-conversions {
        grid-template-columns: 1fr;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
    
    .scale-table {
        overflow-x: auto;
    }
    
    .grade-summary-table {
        overflow-x: auto;
    }
    
    .expert-section {
        padding: 1rem;
    }
    
    .expert-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .expert-image {
        margin: 0 auto;
    }
    
    .faq-section {
        padding: 1rem;
    }
}
