/* Back Button */
.back-button {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 20px rgba(52, 152, 219, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    text-decoration: none;
}

.back-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(52, 152, 219, 0.5);
    background: linear-gradient(135deg, #2980b9, #3498db);
}

.back-button:active {
    transform: translateY(1px);
}

.back-button i {
    transition: transform 0.3s ease;
}

.back-button:hover i {
    transform: translateY(-3px);
}

@media (max-width: 768px) {
    .back-button {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

/* Materi Detail Header */
.materi-detail-header {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    padding: 3rem 0 2rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.materi-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.materi-title .arabic-letter {
    font-family: 'Amiri', serif;
    font-size: 2.8rem;
    font-weight: bold;
    line-height: 1;
}

.materi-title h1 {
    font-size: 2rem;
    margin: 0;
}

.materi-detail-header .subtitle {
    font-size: 1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Materi Content */
.materi-content {
    padding: 4rem 0;
    background: #f7fafc;
}

.content-section {
    display: none;
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.content-section.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

.hukum-content {
    display: grid;
    gap: 2rem;
    margin-bottom: 2rem;
}

.hukum-info {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid rgba(52, 152, 219, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.hukum-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #3498db, #2c3e50);
    border-radius: 5px 5px 0 0;
}

.hukum-info:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.hukum-info h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.hukum-info h3::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #3498db;
    border-radius: 50%;
}

.hukum-info p {
    color: #4a5568;
    line-height: 1.8;
    font-size: 1.1rem;
}

.arabic-example {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid rgba(52, 152, 219, 0.1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.arabic-example::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #2ecc71, #27ae60);
    border-radius: 5px 5px 0 0;
}

.arabic-example h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.arabic-example h3::before {
    content: '\f02d';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #2ecc71;
}

.arabic-example p {
    font-family: 'Amiri', serif;
    font-size: 2rem;
    color: #2c3e50;
    margin: 1rem 0;
    line-height: 1.5;
    position: relative;
    display: inline-block;
}

.arabic-example p::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #2ecc71, transparent);
}

.hukum-desc {
    background: rgba(52, 152, 219, 0.1);
    padding: 0.8rem;
    border-radius: 0.5rem;
    color: #2c3e50;
    font-weight: 500;
    text-align: center;
}

/* Reading Steps */
.reading-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.step {
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    background: #f7fafc;
    color: #4a5568;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.step.active {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.step.completed {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -1.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 2px;
    background: #e2e8f0;
}

/* Practice Examples */
.practice-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.example-card {
    background: #f7fafc;
    border-radius: 0.8rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.example-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.example-card h3 {
    color: #3498db;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.example-card .arabic {
    font-family: 'Amiri', serif;
    font-size: 1.8rem;
    color: #2c3e50;
    margin: 1rem 0;
}

.example-card .translation {
    color: #4a5568;
    font-style: italic;
}

/* Step Navigation */
.step-navigation {
    margin-bottom: 3rem;
    position: sticky;
    top: 0;
    z-index: 100;
    background: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.step-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 1rem;
    border-radius: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Test Section */
.test-container {
    margin-top: 2rem;
}

.test-question {
    background: white;
    padding: 1.5rem;
    border-radius: 0.8rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.test-question h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.test-question p {
    color: #4a5568;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.test-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.test-options label {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    background: #f7fafc;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.test-options label:hover {
    background: #edf2f7;
}

.test-options input[type="radio"] {
    width: 1.2rem;
    height: 1.2rem;
    cursor: pointer;
}

.test-result {
    background: white;
    padding: 1.5rem;
    border-radius: 0.8rem;
    margin-top: 2rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.5s ease;
}

.test-result h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.test-result p {
    color: #4a5568;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.result-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    background: #f7fafc;
}

/* Navigation Buttons */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    gap: 1rem;
}

.prev-button,
.next-button,
.finish-button,
.check-button,
.retry-button {
    padding: 1rem 2rem;
    border-radius: 50px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.prev-button {
    background: #f7fafc;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.prev-button:hover {
    background: #e2e8f0;
    transform: translateX(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.next-button {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
}

.next-button:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

.next-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.next-button:hover::after {
    transform: translateX(100%);
}

.finish-button {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
}

.finish-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.3);
}

.finish-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
    transform: translateY(-100%);
    transition: transform 0.6s ease;
}

.finish-button:hover::before {
    transform: translateY(100%);
}

.check-button {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
}

.check-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

.check-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.check-button:hover::after {
    transform: translateX(100%);
}

.retry-button {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.retry-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.3);
}

.retry-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
    transform: translateY(-100%);
    transition: transform 0.6s ease;
}

.retry-button:hover::before {
    transform: translateY(100%);
}

/* Responsive Design */
@media (max-width: 768px) {
    .back-button {
        top: 1rem;
        left: 1rem;
        padding: 0.6rem 1.2rem;
    }

    .materi-detail-header {
        padding: 2.5rem 0 1.5rem;
    }

    .materi-title {
        flex-direction: column;
        gap: 0.5rem;
    }

    .materi-title .arabic-letter {
        font-size: 2.5rem;
    }

    .materi-title h1 {
        font-size: 1.8rem;
    }

    .step-navigation {
        padding: 0.5rem 0;
    }

    .step-indicator {
        flex-direction: column;
        gap: 0.5rem;
    }

    .step {
        width: 100%;
        text-align: center;
    }

    .step:not(:last-child)::after {
        display: none;
    }

    .navigation-buttons {
        flex-direction: column;
    }

    .prev-button,
    .next-button,
    .finish-button,
    .check-button,
    .retry-button {
        width: 100%;
        justify-content: center;
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    .hukum-grid,
    .reading-steps,
    .practice-examples {
        grid-template-columns: 1fr;
    }

    .hukum-info {
        padding: 1.5rem;
    }

    .hukum-info h3 {
        font-size: 1.2rem;
    }

    .hukum-info p {
        font-size: 1rem;
    }

    .arabic-example {
        padding: 1.5rem;
    }

    .arabic-example p {
        font-size: 1.8rem;
    }
} 