/* Jednotný styl pro všechny HTML soubory - Fyzika a chemie */

:root {
    --primary-color: #005A9C;
    --secondary-color: #00AEEF;
    --accent-color: #FDBB30;
    --bg-color: #f9f9f9;
    --text-color: #333;
    --header-color: #2c3e50;
    --border-color: #e0e0e0;
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
    --formula-bg: #fff3cd;
    --formula-border: #ffc107;
    --result-bg: #d4edda;
    --result-border: #28a745;
    --note-bg: #e8f4fd;
    --note-border: #2196f3;
}

/* Základní styly pro celou stránku */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
}

/* Hlavní kontejner pro obsah */
main {
    max-width: 1100px;
    margin: 20px auto;
    padding: 20px;
}

/* Styly pro hlavičku */
header {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

header h1 {
    margin: 0;
    font-size: 2.8em;
    font-weight: 700;
}

header p {
    margin-top: 10px;
    font-size: 1.2em;
    opacity: 0.9;
}

/* Alternativní styl pro jednoduché stránky bez hlavičky */
.simple-header h1 {
    color: var(--header-color);
    text-align: center;
    font-size: 2.4em;
    margin-bottom: 30px;
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 15px;
}

/* Styly pro nadpisy */
h1 {
    color: var(--header-color);
    text-align: center;
    font-size: 2.4em;
    margin-bottom: 30px;
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 15px;
}

h2 {
    font-size: 2.2em;
    color: var(--header-color);
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 10px;
    margin-top: 40px;
    margin-bottom: 20px;
}

h3 {
    font-size: 1.6em;
    color: var(--primary-color);
    margin-top: 30px;
    margin-bottom: 15px;
}

h4 {
    font-size: 1.3em;
    color: var(--secondary-color);
    margin-top: 25px;
    margin-bottom: 12px;
}

/* Sekce a kontejnery */
.unit-section, .section {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 35px;
    padding: 25px 30px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s ease;
}

.unit-section:hover, .section:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

/* Pro stránky s jednoduchým layoutem bez sekcí */
.simple-layout {
    background-color: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 30px 40px;
    border: 1px solid var(--border-color);
}

/* Schémata a diagramy */
.schema-container {
    text-align: center;
    margin: 25px 0;
    padding: 20px;
    background-color: #f0f8ff;
    border-radius: 8px;
}

.schema-container svg {
    max-width: 100%;
    height: auto;
}

/* Vzorce a rovnice */
.equations, .formula-box, .box {
    margin-top: 20px;
    padding: 20px;
    background-color: var(--formula-bg);
    border: 2px solid var(--formula-border);
    border-radius: 8px;
    font-size: 1.1em;
    overflow-x: auto;
}

.formula-box strong {
    color: #856404;
    font-size: 1.2em;
}

/* Příklady */
.example {
    margin-top: 20px;
    padding: 20px;
    background-color: #fdfdfd;
    border: 1px solid #f0f0f0;
    border-left: 5px solid var(--accent-color);
    border-radius: 5px;
}

/* Výsledky */
.result-box {
    background-color: var(--result-bg);
    border: 2px solid var(--result-border);
    padding: 25px;
    margin-top: 30px;
    border-radius: 10px;
    text-align: center;
}

.result-box p {
    font-size: 1.3em;
    margin: 15px 0;
    font-weight: 500;
}

.result-box span {
    font-weight: bold;
    color: #155724;
    font-size: 1.4em;
}

/* Poznámky */
.note, .intro-box {
    background-color: var(--note-bg);
    border: 1px solid var(--note-border);
    border-left: 4px solid var(--note-border);
    padding: 20px;
    margin: 20px 0;
    border-radius: 6px;
}

.intro-box {
    background-color: #fffbe6;
    border: 1px solid #ffeeba;
    border-left: 5px solid var(--accent-color);
    margin: 30px 0;
    border-radius: 8px;
}

/* Strategie box */
.strategy-box {
    background-color: #fef5e7;
    border: 1px solid #f39c12;
    border-left: 5px solid #f39c12;
    padding: 20px;
    margin: 30px 0;
    border-radius: 8px;
}

/* Tabulky */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 1.1em;
}

th, td {
    border: 1px solid var(--border-color);
    padding: 15px 12px;
    text-align: left;
}

th {
    background-color: #eaf6ff;
    color: var(--primary-color);
    font-weight: 600;
}

tr:nth-child(even) {
    background-color: #f8f9fa;
}

td code, .variable {
    font-weight: bold;
    color: #d6336c;
    background-color: #e3f2fd;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

/* Jednotky a hodnoty */
.unit {
    color: #e74c3c;
    font-style: italic;
    font-weight: 500;
}

.value {
    color: #8e44ad;
    font-weight: bold;
}

/* Kód */
code {
    background-color: #e9ecef;
    padding: 3px 6px;
    border-radius: 4px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

/* Responzivní design */
@media (max-width: 768px) {
    main {
        padding: 15px;
    }
    
    .simple-layout {
        padding: 20px 25px;
    }
    
    header h1, .simple-header h1 {
        font-size: 2em;
    }
    
    h2 {
        font-size: 1.8em;
    }
    
    h3 {
        font-size: 1.4em;
    }
    
    table {
        font-size: 1em;
    }
    
    .unit-section, .section {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    header h1, .simple-header h1 {
        font-size: 1.8em;
    }
    
    h2 {
        font-size: 1.6em;
    }
    
    .unit-section, .section {
        padding: 15px;
    }
}
