/* Global variables. */
:root {
  /* Set sans-serif & mono fonts */
  --sans-font: "Segoe UI", Verdana, Inter, Arial, Helvetica,
    "Helvetica Neue", sans-serif;
  --mono-font: Inconsolata, Consolas, Menlo, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
  --standard-border-radius: 5px;

  /* Default (light) theme */
  --bg: #FFFFFF;
  --accent-bg: #FFFFFF;
  --text: #0;
  --text-light: #ABABAB;
  --border: #800000;
  --accent: #800000;
  --code: #d81b60;
  --preformatted: #444;
  --marked: #ffdd33;
  --disabled: #efefef;
  --gr: #1ABC9C;
  --ye: #F4D03F;
}
/* tanit.css */
body {
    font-family: 'JetBrains Mono', 'Fira Code', 'segoe UI';
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.main {
    width: 80%;
    max-width: 1200px;
    margin: 20px auto;
    border: 1px solid #800000;
    border-radius: 15px;
    padding: 30px;	
/*  background-color: #fafafa;
    border: 5px solid #C8BFE7;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3); */
    box-sizing: border-box;
}

pre {
    font-family: 'JetBrains Mono', 'Fira Code';
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    display: flex;
    align-items: flex-start;
}
        
@media (max-width: 768px) {
    .main {
        width: 95%;
        padding: 15px;
    }
}
        
h1, h2, h3, h4 {
    font-family: 'Helvetica', 'Arial', sans-serif;
    color: #800000;
    border-bottom: 1px solid #800000;
    padding-bottom: 5px;
}

a {
    color: blue; /* Sets the text color to blue */
  text-decoration: underline; /* Ensures the text is underlined */
}

/* State when the mouse is over the link */
a:hover {
  background-color: gold;       /* New background color on hover */
  color: white;                 /* Optional: change text color for contrast */
}

/* Theorems, Propositions, Corollaries */
.thm, .prop, .cor {
    font-style: italic;
	font-family: "Segoe UI Symbol", "Segoe UI", Inconsolata;
    border-left: 10px solid #73AD21;
    background-color: #ECFCCA;
    padding: 15px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
}
/* Definitions */
.def {
	font-family: "Segoe UI Symbol", "Segoe UI", Inconsolata;
    display: block;
    margin: 1em 0;
    padding: 10px;
	border-left: 10px solid #37BC7D;
	background-color: #ECFCCA;
	border-radius: 0 8px 8px 0;
	box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
}
 
 /* Examples */
.xmpl {
    border-left: 10px solid #ffaa00;
    background-color: #fff4e0;
    padding: 15px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
}
        
/* Exercises */
.exer, .prob {
    background-color: #f2f2f2;
	font-family: "Segoe UI Symbol", "Segoe UI", Inconsolata;
    padding: 15px;
    margin: 20px 0;
    border-left: 10px solid #666;
    border-radius: 0 8px 8px 0;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
}
        
/* Axioms */
    .axiom {
	font-family: "Segoe UI Symbol", "Segoe UI", Inconsolata;
    border-left: 10px solid #8a2be2;
    background-color: #e6d9ff;
    padding: 15px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
}
        
/* Important displayed equations */
.empheq {
    border-radius: 10px;
    border: 2px solid #73AD21;
    padding: 15px;
    margin: 20px 0;
    background-color: #f9fff9;
    text-align: center;
    font-size: 1.2em;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
}
/* Proof environment */
    .proof {
    border-left: 10px solid #999;
    background-color: #f9f9f9;
    padding: 15px;
    margin: 20px 0 20px 20px;
    font-style: normal;
}

.proof::after {
    content: "∎";
    float: right;
    font-size: 1.2em;
    font-weight: bold;
}
        
/* Inline formula styling */
.math-inline {
    background-color: #f0f0f0;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 0.95em;
}
        
/* Formula numbers */
.eqn-number {
    float: right;
    color: #666;
    font-size: 0.9em;
}
 /* Table for derivatives */
    .derivative-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: white;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
}
        
.derivative-table th {
    background-color: #73AD21;
    color: white;
    padding: 10px;
    font-weight: bold;
}
        
.derivative-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #ddd;
    text-align: center;
}
        
.derivative-table tr:hover {
    background-color: #f5f5f5;
}
        
/* Using MathJax's HTML extension for custom classes */
    .highlight-formula {
    background-color: #ffffcc;
    padding: 5px;
    border-radius: 5px;
}
        
/* Responsive design */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }
            
    .derivative-table {
        font-size: 0.9em;
    }
}
		
.nav-button {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 0px;
    text-decoration: none;
    font-family: 'Segoe UI', 'Arial', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.2s ease;
    color: #800000;
    border: 1px solid #800000;
	border-radius: 5px;
    cursor: pointer;
}

.nav-button:hover {
  background: #800000;
  font-weight: bold;
  color: white;
  border-color: #800000;
  border-radius: 5px;
  cursor: pointer;	
}

/* Stile per la pagina corrente */
.nav-button.active {
    background-color: #e9ecef;
    color: #212529;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        padding: 0.6rem 1rem;
        border-radius: 30px;
    }
    
    .nav-button {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

.unit {
	display: block; /* Change from inline-block */
    width: fit-content;
    margin: 0 auto; 
    padding: 0px 5px;
    font-family: "Segoe UI Symbol", "Segoe UI", Inconsolata;
    font-size: 1.5rem;
    color: #0000FF;
    border: 1px solid #0000FF;
	border-radius: 5px;
	background-color: #ECFCCA;
}

.cite {
  font-family: "Segoe UI", Inconsolata;
  display: block;
  margin: 1em 0;
  padding: 10px;
  border-left: 10px solid #37BC7D;
  border-color: #37BC7D;
  background-color: #ECFCCA;
  border-style: dotted;
  border-radius: 0 4px 4px 0;
}

.snota {
  font-family: "Segoe UI", Inconsolata;
  display: block;
  margin: 1em 0;
}

.footnote {
  font-family: "Segoe UI Symbol", "Segoe UI", Inconsolata;
  display: block;
  margin: 1em 0;
}

.nota {
  font-family: "Segoe UI Symbol", "Segoe UI", Inconsolata;
  display: block;
  margin: 1em 0;
  padding: 10px;
  border-left: 10px solid #37BC7D;
  border-color: #37BC7D;
  background-color: #ECFCCA;
  border-style: dotted;
  border-radius: 0 4px 4px 0;
}

.nota p {
    margin: 0;
}

.nota {
  font-family: "Segoe UI Symbol", "Segoe UI", Inconsolata;
  display: block;
  margin: 1em 0;
  padding: 10px;
  border-left: 10px solid #37BC7D;
  border-color: #37BC7D;
  background-color: #ECFCCA;
  border-style: dotted;
  border-radius: 0 4px 4px 0;
}

.nota p {
    margin: 0;
}

.notabene{
  font-family: "Segoe UI Symbol", "Segoe UI", Inconsolata;
  display: block;
  margin: 1em 0;
  color: black;
  padding: 10px;
  border-left:10px solid #800000;
  line-height:1.6;
  position: relative;
  background:#fff933;
}

.notabene p {
    margin: 0;
}		

.attention {
	font-family: "Segoe UI Symbol", "Segoe UI", Inconsolata;
    display: block;
    margin: 1em 0;
    padding: 10px;
/*    border-left: 8px solid #FF0000; */
	border-color: #FF0000;
    background-color: #FCF3CF;
	border-style: dotted;
    border-radius: 0 4px 4px 0;
}

.attention p {
    margin: 0;
}		

hr {
    color: #800000;
    border-top: 2px solid #800000;
	border-bottom: 2px solid #800000;
}
		
hr.dotted {
border-top: 1px dotted #800000;
border-bottom: 1px dotted #800000;
}

hr.dashed {
border-top: 1px dashed #800000;
border-bottom: 1px dashed #800000
}

hr.sline {
    border-top: 1px solid #800000;
	border-bottom: 1px solid #800000
}

#redColor {
  color: #FF0000;
}
#greenColor {
  color: #45A60C;
}
#blueColor {
  color: #0000FF;
}
#nourColor {
  color: #48C9B0;
}
#jilColor {
  color: #800000;
}
#rimColor {
  color:  #7312C4;
}
#ocraColor {
  color:  #F38F08;
}
.tltip {
  position: relative;
  display: inline-block;
  color:  #F38F08;
}

.tltip .tltiptxt {
  visibility: hidden;
  width: 15em;
  background-color: blue;
  color: yellow;
  text-align: center;
  border-radius: 6px;
  padding: 5px 0;

  /* Position the tooltip */
  position: absolute;
  z-index: 1;
}

.tltip:hover .tltiptxt {
  visibility: visible;
}

div#myboard {
  width: 95%;
  height: 600px;
  margin: 2.5% auto;
}

article, fieldset {
  border: 1px solid #800000;
  padding: 1rem;
  border-radius: 5px;
  margin-bottom: 1rem;
}

article h2:first-child,
section h2:first-child {
  margin-top: 1rem;
}

section {
  border-top: 1px solid #800000;
  border-bottom: 1px solid #800000;
  padding: 2rem 1rem;
  margin: 3rem 0;
}

/* Don't double separators when chaining sections */
section + section,
section:first-child {
  border-top: 0;
  padding-top: 0;
}

section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

/* Format tables */
table {
  border-collapse: collapse;
  margin: 1.5rem 0;
}

td,
th {
  border: 1px solid var(--border);
  text-align: left;
  padding: 0.5rem;
}

th {
  background-color: var(--accent-bg);
  font-weight: bold;
}

tr:nth-child(even) {
  /* Set every other cell slightly darker. Improves readability. */
  background-color: var(--accent-bg);
}

table caption {
  font-weight: bold;
  margin-bottom: 0.5rem;
}

/* Format forms */
textarea,
select,
input {
  font-size: inherit;
  font-family: inherit;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  color: var(--text);
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--standard-border-radius);
  box-shadow: none;
  max-width: 100%;
  display: inline-block;
}
label {
  display: block;
}
textarea:not([cols]) {
  width: 100%;
}

/* Add arrow to drop-down */
select:not([multiple]) {
  background-image: linear-gradient(45deg, transparent 49%, var(--text) 51%),
    linear-gradient(135deg, var(--text) 51%, transparent 49%);
  background-position: calc(100% - 15px), calc(100% - 10px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 25px;
}

/* checkbox and radio button style */
input[type="checkbox"],
input[type="radio"] {
  vertical-align: middle;
  position: relative;
  width: min-content;
}

input[type="checkbox"] + label,
input[type="radio"] + label {
  display: inline-block;
}

input[type="radio"] {
  border-radius: 100%;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
  background-color: var(--accent);
}

input[type="checkbox"]:checked::after {
  /* Creates a rectangle with colored right and bottom borders which is rotated to look like a check mark */
  content: " ";
  width: 0.18em;
  height: 0.32em;
  border-radius: 0;
  position: absolute;
  top: 0.05em;
  left: 0.17em;
  background-color: transparent;
  border-right: solid var(--bg) 0.08em;
  border-bottom: solid var(--bg) 0.08em;
  font-size: 1.8em;
  transform: rotate(45deg);
}
input[type="radio"]:checked::after {
  /* creates a colored circle for the checked radio button  */
  content: " ";
  width: 0.25em;
  height: 0.25em;
  border-radius: 100%;
  position: absolute;
  top: 0.125em;
  background-color: var(--bg);
  left: 0.125em;
  font-size: 32px;
}

/* Makes input fields wider on smaller screens */
@media only screen and (max-width: 720px) {
  textarea,
  select,
  input {
    width: 100%;
  }
}

/* Set a height for color input */
input[type="color"] {
  height: 2.5rem;
  padding:  0.2rem;
}

/* do not show border around file selector button */
input[type="file"] {
  border: 0;
}

details {
    margin-bottom: 1.5em;
    padding: 0.5em;
    background-color: #f9f9f9;
    border-left: 4px solid #007acc;
    border-radius: 5px;
}

summary {
    font-weight: bold;
    cursor: pointer;
    color: #007acc;
    font-size: 1.1em;
}

.soluzione {
    margin-top: 0.5em;
    padding: 0.5em;
    background-color: #eef;
    border-radius: 5px;
}

.tip {
    background-color: #d4edda;
    border-left: 4px solid #28a745;
    padding: 0.5em;
    margin: 0.5em 0;
    font-style: italic;
}

/* Stili aggiuntivi specifici per questa pagina */
.teorema {
    background-color: #e8f4f8;
    border-left: 4px solid #17a2b8;
    padding: 0.5em;
    margin: 1em 0;
    border-radius: 5px;
}
.definizione {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 0.5em;
    margin: 1em 0;
    border-radius: 5px;
}
.esempio {
    background-color: #f0f0f0;
    border-left: 4px solid #6c757d;
    padding: 0.5em;
    margin: 1em 0;
    border-radius: 5px;
}
.metodo {
    background-color: #d1ecf1;
    border-left: 4px solid #17a2b8;
    padding: 0.5em;
    margin: 1em 0;
}

.JXG_navigation {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.JXG_navigation_button {
    display: inline-block !important;
    width: 24px !important;
    height: 24px !important;
    background-color: #ffffff !important;
    border: 1px solid #cccccc !important;
    margin: 2px !important;
    cursor: pointer !important;
}

.JXG_navigation {
    display: block !important;
    visibility: visible !important;
    position: absolute !important;
    bottom: 10px !important;
    right: 10px !important;
    z-index: 1000 !important;
    background: rgba(255,255,255,0.9) !important;
    padding: 5px !important;
    border-radius: 4px !important;
    text-align: right !important;
}

.JXG_navigation_button {
    display: inline-block !important;
    width: 28px !important;
    height: 28px !important;
    line-height: 28px !important;
    text-align: center !important;
    background: white !important;
    border: 1px solid #ccc !important;
    border-radius: 3px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    color: #333 !important;
    margin: 0 2px !important;
    vertical-align: middle !important;
}

.JXG_navigation_button:hover {
    background: #f0f0f0 !important;
}

