/**
 * Ergänzende Styles für die mit MathJax umgesetzte Alkanole-Seite
 */

/* Gleiche Styles wie für Alkanale und Alkanone, mit Anpassungen für Alkanole */

/* Moleküldarstellung */
.molecule-display {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}

.molecule-image {
    margin: 0 auto;
    max-width: 400px;
    padding: 15px;
}

.molecule-caption {
    font-style: italic;
    margin-top: 10px;
    color: #666;
}

/* Molekülmodelle */
.molecule-models {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin: 30px 0;
}

.molecule-model {
    text-align: center;
    margin: 15px;
    padding: 15px;
    background-color: #f5f5f5;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 250px;
}

.molecule-model-label {
    margin-top: 10px;
    font-weight: bold;
}

/* Nomenklatur-Beispiele */
.nomenklatur-examples {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    margin: 20px 0;
}

.nomenklatur-example {
    margin: 10px;
    padding: 15px;
    background-color: #f8f8f8;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 300px;
    text-align: center;
}

.nomenklatur-example .formula {
    margin-bottom: 15px;
}

/* Ergebnisbox */
.result-box {
    background-color: #e8f5e9;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    border-left: 4px solid #4caf50;
}

/* Interaktive Sektionen */
.interactive-section {
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    margin: 30px 0;
}

/* Formeltabellen */
.formula-box {
    overflow-x: auto;
    margin: 20px 0;
}

.formula-box table {
    width: 100%;
    border-collapse: collapse;
}

.formula-box th, 
.formula-box td {
    padding: 10px;
    text-align: center;
    border: 1px solid #ddd;
}

.formula-box th {
    background-color: #f0f0f0;
}

.formula-box tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Beispielbox */
.example-box {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #2196f3;
}

.example-title {
    color: #1976d2;
    margin-top: 0;
    font-size: 1.1em;
}

/* Hervorhebungen für chemische Reaktionen */
.reaction-arrow {
    font-size: 1.5em;
    margin: 0 10px;
    color: #555;
    vertical-align: middle;
}

/* Hinweisboxen */
.attention {
    background-color: #fff8e1;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #ffc107;
}


/* Quiz */
.quiz-container {
    margin: 20px 0;
}

.quiz-question {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.quiz-options {
    margin-top: 10px;
    padding-left: 20px;
}

.quiz-options label {
    display: block;
    margin-bottom: 8px;
    cursor: pointer;
}

.quiz-results {
    display: none;
    background-color: #e8f5e9;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.correct {
    color: #4caf50;
    font-weight: bold;
}

.incorrect {
    color: #f44336;
    font-weight: bold;
}

/* Hervorhebung für Formeln */
.formula {
    font-family: 'Times New Roman', serif;
    font-size: 1.1em;
}

/* Highlight-Links */
.highlight-link {
    display: flex;
    background-color: #f5f5f5;
    border-radius: 8px;
    margin: 30px 0;
    padding: 20px;
    transition: background-color 0.2s;
}

.highlight-link:hover {
    background-color: #e3f2fd;
}

.highlight-link i {
    font-size: 36px;
    color: #1976d2;
    margin-right: 20px;
    display: flex;
    align-items: center;
}

.highlight-link-content {
    flex: 1;
}

.highlight-link-content h3 {
    margin-top: 0;
    color: #1976d2;
}

.highlight-link-content a {
    display: inline-block;
    color: #1976d2;
    font-weight: 600;
    text-decoration: none;
    margin-top: 10px;
}

.highlight-link-content a:hover {
    text-decoration: underline;
}

/* Hintergrundelemente für den Hero-Bereich */
.hero {
    position: relative;
    overflow: hidden;
}

.bg-element {
    position: absolute;
    opacity: 0.1;
    z-index: -1;
    font-size: 100px;
    font-family: 'Times New Roman', serif;
}

.chem-element-1 {
    top: 30px;
    left: 20px;
    transform: rotate(-15deg);
}

.chem-element-2 {
    bottom: 20px;
    right: 30px;
    font-size: 120px;
    transform: rotate(10deg);
}

.chem-element-3 {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 150px;
    opacity: 0.05;
}

/* Responsives Design für mobile Geräte */
@media (max-width: 768px) {
    .molecule-display {
        flex-direction: column;
    }

    .molecule-models {
        flex-direction: column;
        align-items: center;
    }
    
    .molecule-model {
        width: 90%;
        margin: 10px 0;
    }
    
    .nomenklatur-example {
        width: 90%;
    }
    
    .topic-card {
        width: 100%;
    }
    
    .highlight-link {
        flex-direction: column;
        text-align: center;
    }
    
    .highlight-link i {
        margin-right: 0;
        margin-bottom: 15px;
        justify-content: center;
    }
}

/* Spezifische Anpassungen für Alkanole */
.bg-element.chem-element-1,
.bg-element.chem-element-2,
.bg-element.chem-element-3 {
    color: rgba(76, 175, 80, 0.1); /* Grünlicher Farbton für Alkanole */
}

.result-box {
    border-left-color: #4caf50; /* Grün für Alkanole */
}


/* Canvas-Container für interaktive Tools */
.canvas-container {
    margin: 20px 0;
    text-align: center;
}

/* Controls-Container für Buttons und Inputs */
.controls-container {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.form-control {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.cta-button {
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: #388e3c;
}


/* Ergänzungen für die CSS-Datei für ChemDoodle Integration */

/* Verbesserte Molekül-Container für klare Trennung */
.molecule-container {
    display: flex;
    gap: 20px;
    margin: 20px 0 60px 0; /* Erhöhter Abstand nach unten */
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    width: 100%;
    clear: both;
}

.molecule-item {
    border: 1px solid #ccc;
    padding: 15px 15px 55px 15px; /* Erhöhter Padding am unteren Rand für Button */
    border-radius: 5px;
    background-color: #f9f9f9;
    width: 250px;
    min-height: 300px;
    text-align: center;
    position: relative; /* Wichtig für Button-Positionierung */
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px; /* Abstand zwischen Items */
}

/* Überarbeitete Button-Gestaltung */
.btn-toggle {
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 8px 15px;
    min-width: 150px;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
    white-space: nowrap;
    
    /* Bessere Positionierung innerhalb des Containers */
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    bottom: 15px !important;
    z-index: 10 !important;
    
    /* Übergang für Hover-Effekt */
    transition: background-color 0.3s;
}

.btn-toggle:hover {
    background-color: #45a049;
}

/* Canvas-Stile mit konstanten Größen */
.view-2d, .view-3d {
    width: 200px;
    height: 200px;
    margin: 0 auto 15px auto;
    display: block;
}

.view-3d {
    display: none; /* 3D-Ansicht standardmäßig ausblenden */
}

/* Verbesserte Molekül-Modelle Sektion */
.molecule-models {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin: 30px 0 60px 0; /* Erhöhter Abstand nach unten */
    gap: 20px;
    width: 100%;
    clear: both;
}

.molecule-model {
    text-align: center;
    margin: 15px;
    padding: 15px 15px 55px 15px; /* Erhöhter Padding am unteren Rand für Button */
    background-color: #f5f5f5;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 220px;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.molecule-model h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1em;
    width: 100%;
}

/* Verbesserte Nomenklatur-Beispiele */
.nomenklatur-examples {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    margin: 20px 0 40px 0; /* Verbesserter vertikaler Abstand */
    width: 100%;
}

.nomenklatur-example {
    margin: 10px;
    padding: 15px 15px 55px 15px; /* Erhöhter Padding für Button */
    background-color: #f8f8f8;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 240px;
    text-align: center;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative; /* Wichtig für Button-Positionierung */
}

/* Clearfix Helper */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* Optimiertes Responsive Design */
@media (max-width: 768px) {
    .molecule-container {
        flex-direction: column;
        align-items: center;
        margin-bottom: 40px;
    }
    
    .molecule-item, 
    .molecule-model,
    .nomenklatur-example {
        width: 90%;
        max-width: 300px;
        margin-bottom: 30px; /* Erhöhter Abstand für bessere Lesbarkeit */
    }
    
    .btn-toggle {
        position: absolute;
        bottom: 10px;
        width: 80%;
        min-width: unset;
    }
    
    .molecule-models {
        flex-direction: column;
        align-items: center;
        margin-bottom: 40px;
    }
    
    /* Kleinere Canvas-Größe auf mobilen Geräten */
    .view-2d, .view-3d {
        width: 180px;
        height: 180px;
    }
}

/* Extra Anpassungen für sehr kleine Bildschirme */
@media (max-width: 480px) {
    .view-2d, .view-3d {
        width: 160px;
        height: 160px;
    }
    
    .molecule-item,
    .molecule-model,
    .nomenklatur-example {
        padding: 10px 10px 50px 10px;
    }
    
    .btn-toggle {
        font-size: 13px;
        padding: 7px 12px;
    }
}