/* bruchrechnung.css - Spezifische Styles für den Bruchrechnung-Bereich */

/* Grundlegende Stile für die Darstellung von Brüchen */
.fraction {
    display: inline-block;
    text-align: center;
    vertical-align: middle;
    margin: 0 5px;
}

.fraction .numerator {
    border-bottom: 2px solid #333;
    padding: 0 5px 3px 5px;
    margin-bottom: 2px;
    display: block;
}

.fraction .denominator {
    display: block;
    padding: 3px 5px 0 5px;
}

/* Große, hervorgehobene Brüche für Beispiele */
.fraction-large {
    font-size: 1.8rem;
    margin: 15px 10px;
}

.fraction-large .numerator {
    border-bottom: 3px solid #333;
    padding: 0 8px 5px 8px;
}

/* Bruch-Visualisierung */
.fraction-visual {
    display: inline-block;
    margin: 20px;
    text-align: center;
}

.fraction-circle, .fraction-rectangle {
    margin: 15px auto;
    position: relative;
}

.fraction-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 2px solid #333;
    overflow: hidden;
}

.fraction-rectangle {
    width: 300px;
    height: 80px;
    border: 2px solid #333;
    display: flex;
}
.fraction-part {
    height: 100%;
    display: inline-block;
    box-sizing: border-box;
    border-right: 1px dashed #777;
    flex-grow: 1;
}
.fraction-part:last-child {
    border-right: none;
}
.fraction-part.highlighted {
    background-color: #3498db;
}
.fraction-part.highlighted:nth-child(-n+3) {
    flex-grow: 3;
}

/* Erklärungsboxen für Rechenregeln */
.rule-box {
    background-color: #f0f8ff;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    border-left: 5px solid #3498db;
    position: relative;
}

.rule-title {
    font-size: 1.4rem;
    color: #1e3c72;
    margin-top: 0;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.rule-formula {
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    text-align: center;
    font-family: 'Cambria Math', 'Times New Roman', serif;
    font-size: 1.3rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Beispielboxen */
.example-box {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    border-left: 5px solid #9b59b6;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.example-title {
    color: #8e44ad;
    margin-top: 0;
    display: flex;
    align-items: center;
}

.example-title i {
    margin-right: 10px;
}

/* Schritte in Erklärungen */
.step {
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-left: 5px solid #3498db;
    border-radius: 8px;
    position: relative;
    transition: transform 0.2s;
}

.step:hover {
    transform: translateX(5px);
}

.step-number {
    position: absolute;
    top: -10px;
    left: -10px;
    background-color: #3498db;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}

.step h3 {
    color: #2a5298;
    margin-top: 0;
}

/* Animierte Brüche für interaktive Elemente */
.fraction-animation {
    transition: all 0.5s ease;
}

.fraction-animation:hover {
    transform: scale(1.1);
}

/* Vergleichstabelle für Brüche */
.fraction-comparison {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.fraction-comparison th {
    background-color: #3498db;
    color: white;
    padding: 15px;
    text-align: left;
}

.fraction-comparison td {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.fraction-comparison tr:nth-child(even) {
    background-color: #f5f9ff;
}

/* Tipps und Hinweise */
.tip-box {
    background-color: #fff3cd;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 5px solid #ffc107;
}

.tip-title {
    color: #856404;
    margin-top: 0;
    display: flex;
    align-items: center;
}

.tip-title i {
    margin-right: 10px;
}

/* Übungsaufgaben */
.exercise-container {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    background-color: #f8f9fa;
}

.exercise-title {
    margin-top: 0;
    color: #2a5298;
}

.exercise-options {
    margin-top: 15px;
}

/* Interaktive Elemente */
.interactive-container {
    background-color: #f0f8ff;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: center;
}

.interactive-element {
    display: inline-block;
    margin: 10px;
    cursor: pointer;
}

/* Besondere Hervorhebungen */
.highlight {
    background-color: #fffacd;
    padding: 2px 5px;
    border-radius: 4px;
    font-weight: bold;
    color: #d35400;
}

/* Veranschaulichungen für Erweitern und Kürzen */
.expand-reduce-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
}

.arrow-right {
    font-size: 2rem;
    margin: 0 20px;
    color: #3498db;
}

/* Spielerische Elemente */
.game-container {
    background-color: #e8f4fd;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: center;
}

/* Lösungsbox */
.solution-box {
    background: linear-gradient(135deg, #e8f4fd 0%, #d4e9f7 100%);
    border-radius: 10px;
    padding: 20px;
    border-left: 5px solid #3498db;
    margin: 25px 0;
}

.solution-box h3 {
    color: #2980b9;
    margin-top: 0;
}

/* Verbesserungen für den "Hinweis anzeigen" Link */
.show-hint {
    background: none;
    border: none;
    color: #3498db;
    cursor: pointer;
    font-size: 14px;
    padding: 8px 12px;
    margin-top: 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    border: 1px solid #e0e0e0;
    background-color: #f8f9fa;
}

.show-hint:hover {
    background-color: #eaf2f8;
    color: #2980b9;
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.show-hint:before {
    content: "\f0eb"; /* Glühbirnen-Icon */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 8px;
}

/* Verbesserungen für die Navigation-Buttons am Ende der Seite */
.nav-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    margin: 10px 5px;
    border-radius: 8px;
    background: linear-gradient(to right, #3498db, #2980b9);
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: none;
    min-width: 180px;
}

.nav-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 10px rgba(0, 0, 0, 0.15);
    background: linear-gradient(to right, #2980b9, #3498db);
}

.nav-button i {
    margin-right: 8px;
    font-size: 16px;
}

/* Bei zweitem Button Icon rechts ausrichten */
.nav-button:nth-child(2) i {
    margin-right: 0;
    margin-left: 8px;
    order: 2;
}

/* Hover-Effekt für die Task-Navigation */
.task-navigation {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin: 30px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Responsive Anpassungen für mobile Geräte */
@media (max-width: 768px) {
    .task-navigation {
        flex-direction: column;
    }
    
    .nav-button {
        width: 100%;
        margin: 5px 0;
    }
}

/* Standardeinstellung für alle rule-title Überschriften */
.rule-title {
    color: #164675; /* Dunkelblau für bessere Lesbarkeit */
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.rule-title i {
    margin-right: 10px;
    color: #164675; /* Icon in der gleichen Farbe */
}

/* Hover-Effekt für bessere Interaktivität */
.rule-box:hover .rule-title {
    color: #0d325e; /* Leicht dunkleres Blau beim Hover */
}

/* Erhöhte Spezifität für rule-title */
.container .rule-box .rule-title,
.rule-box h3.rule-title,
h3.rule-title {
    color: #164675 !important; /* Dunkelblau mit !important Flag */
    font-weight: bold;
}

/* Auch für das Icon */
.rule-title i,
.rule-box .rule-title i {
    color: #164675 !important;
}
/* Sicherstellen dass exercise-title in dunkelblau erscheint */
.exercise-title {
    color: #164675 !important;
    font-weight: bold;
}

/* Falls Icons in den Überschriften verwendet werden */
.exercise-title i {
    color: #164675 !important;
    margin-right: 10px;
}
