/* Stili globali e layout del corpo della pagina */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0;
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
}

/* Stili per l'intestazione della pagina */
.header-box {
    width: 100%;
    border: 2px dashed #28a745;
    box-sizing: border-box;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    min-height: 80px;
    border-radius: 8px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
}

.left-image, .right-image {
    max-height: 60px;
    height: auto;
    width: auto;
    max-width: 48%;
    object-fit: contain;
}

.header {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    margin: 0;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.content {
    padding: 30px;
}

/* Stili per le sezioni espandibili */
.section {
    margin-bottom: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.section:hover {
    border-color: #4CAF50;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.2);
}

.section-button {
    width: 100%;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: none;
    padding: 20px;
    font-size: 1.3em;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-button:hover {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.section-button.active {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.arrow {
    transition: transform 0.3s ease;
    font-size: 1.2em;
}

.arrow.rotated {
    transform: rotate(180deg);
}

.section-content {
    display: none;
    padding: 25px;
    background: #fafafa;
    border-top: 1px solid #e0e0e0;
    line-height: 1.8;
}

.section-content.active {
    display: block;
    animation: slideDown 0.3s ease;
}

/* Animazione di scorrimento */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stili per il contenuto e le formule */
h3 {
    color: #4CAF50;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 5px;
}

.formula {
    background: #fff;
    padding: 15px;
    border-left: 4px solid #4CAF50;
    margin: 15px 0;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 1.1em;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.example {
    background: #e8f5e8;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
    border: 1px solid #c8e6c9;
}

.example h4 {
    color: #2e7d32;
    margin-top: 0;
}

.step {
    background: #fff3e0;
    padding: 15px;
    margin: 10px 0;
    border-radius: 5px;
    border-left: 3px solid #ff9800;
}

.highlight {
    background: #fff176;
    padding: 2px 6px;
    border-radius: 3px;
}

/* Stili per i pulsanti di navigazione */
.button-container {
    text-align: center;
    margin-top: 30px;
}

.button-container.flex {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.nav-button {
    display: inline-block;
    padding: 12px 25px;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.nav-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.25);
}

/* Colori specifici per i pulsanti */
.back-button {
    background-color: #4CAF50; /* Verde per l'indice */
}

.back-button:hover {
    background-color: #45a049;
}

.circonferenza-button {
    background-color: #007bff; /* Blu */
}

.circonferenza-button:hover {
    background-color: #0056b3;
}

.ellisse-button {
    background-color: #28a745; /* Verde scuro */
}

.ellisse-button:hover {
    background-color: #218838;
}

.iperbole-button {
    background-color: #dc3545; /* Rosso */
}

.iperbole-button:hover {
    background-color: #c82333;
}

.grafici-button {
    background-color: #ffc107; /* Giallo */
    color: #343a40;
}

.grafici-button:hover {
    background-color: #e0a800;
}
.parabola-button {
    background-color: #FFA500; /* Arancione */
}
.validation-button {
    background-color: #007bff; /* Un blu vivace */
    border-color: #007bff;
}