/* General Styles */
body {
    font-family: Arial, sans-serif;
    color: #000;
    background-color: #ffffff;
    margin: 0;
    padding: 20px; /* Added padding for elegance */
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    box-sizing: border-box;
}

/* Navigation Menu */
.navbar {
    width: 100%;
    background-color: #f9f9f9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* Allow wrapping on small screens */
    gap: 10px; /* Add spacing between items */
    box-sizing: border-box;
}

.navbar a {
    font-family: 'Garamond', 'Times New Roman', serif;
    color: #0000dc;
    text-decoration: none;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    white-space: nowrap; /* Prevent breaking text */
}

.navbar a:hover {
    color: #f01928;
    text-decoration: underline;
}

/* Header */
header {
    font-family: 'Garamond', 'Times New Roman', serif;
    padding: 20px;
    width: 100%;
    background-color: #f9f9f9;
    margin-bottom: 20px;
    box-sizing: border-box;
}

.logo {
    max-width: 330px; /* Väčšie logo na PC */
    height: auto; /* Zachovanie pomeru strán */
}

/* Pre mobilné zariadenia */
@media (max-width: 768px) {
    .logo {
        max-width: 220px; /* Väčšie logo na mobiloch */
    }
}

h1 {
    font-family: 'Garamond', 'Times New Roman', serif;
    color: #f01928;
    font-size: 36px;
    margin: 0;
}

/* Content Styling */
.content {
    max-width: 800px;
    width: 100%;
    padding: 20px;
    color: #333;
    box-sizing: border-box;
}

.content h2 {
    font-family: 'Garamond', 'Times New Roman', serif;
    color: #0000dc;
    font-size: 28px;
    margin: 20px 0;
}

.content a {
    color: #f01928;
    text-decoration: none;
    font-weight: bold;
}

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

/* Theme Container */
.theme-container {
    width: 90%;
    max-width: 800px;
    margin-top: 20px;
}

.theme-header {
    background-color: #f01928;
    color: white;
    padding: 15px;
    cursor: pointer;
    border-radius: 5px;
    margin-top: 10px;
    font-size: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.theme-content {
    display: none;
    overflow: hidden;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-bottom: 10px;
}

/* Table Styling */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    border: 1px solid #ccc;
    padding: 10px;
    text-align: center;
}

th {
    background-color: #f01928;
    color: white;
}

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

/* Responsive Table Styling */
@media (max-width: 600px) {
    table {
        display: block;
        width: 100%;
        overflow-x: auto; /* Enable horizontal scrolling */
        -webkit-overflow-scrolling: touch; /* Smooth scrolling for iOS */
        border: none; /* Remove borders for cleaner mobile look */
    }

    thead {
        display: none; /* Hide table headers on mobile */
    }

    tr {
        display: block; /* Stack rows for small screens */
        margin-bottom: 10px; /* Add spacing between rows */
        border-bottom: 1px solid #ddd; /* Row separator */
    }

    td {
        display: block; /* Stack cells vertically */
        border: none; /* Remove borders around cells */
        padding: 10px; /* Adjust padding */
        text-align: center; /* Center align content */
    }

    td::before {
        content: attr(data-label); /* Use the "data-label" attribute for pseudo-header */
        font-weight: bold;
        display: block; /* Display labels above the content */
        text-align: center; /* Center align labels */
        margin-bottom: 5px; /* Add spacing between label and value */
    }
} 

/* Quiz Container */
#quizContainer {
    display: none; /* Hide the container by default */
    text-align: left;
}

#quizContainer.active {
    display: block; /* Show when active */
    margin: 20px auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 80%;
    max-width: 500px;
    text-align: left;
}

.question {
    margin-bottom: 25px;
    padding: 15px 20px;
    border-bottom: 1px solid #ccc;
  }
  
  .question p {
    font-weight: bold;
    font-size: 20px;
    color: #f01928;
    margin-bottom: 15px;
  }

  .option {
    display: flex;
    align-items: center;
    margin: 10px 0;
  }
  
  .option input[type="radio"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    accent-color: #f01928;
  }
  
  .option label {
    font-size: 16px;
    color: #333;
    cursor: pointer;
  }

#quizContainer label,
#quizContainer input,
#quizContainer button {
    display: block;
    margin: 10px auto;
    font-size: 16px;
}


/* Main Term for Collapsible Sections */
.main-term {
    background-color: white;
    color: #f01928;
    border: 2px solid #f01928;
    padding: 15px;
    cursor: pointer;
    border-radius: 5px;
    margin-top: 10px;
    font-size: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    font-weight: bold;
}

.main-term:hover {
    background-color: #fff6f6;
}

/* modrá farba pre preklad */
.main-term .translation {
    color: #0000dc;
    font-weight: normal;
}

.details p {
    border-bottom: 1px solid #ddd;
    padding: 8px 4px;
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    text-align: left;
  }
  
  .details p:last-child {
    border-bottom: none; /* posledný bez čiary */
  }
  
  .term-word {
    font-weight: bold;
    color: #f01928;
    display: inline-block;
    margin-right: 6px;
  }

.term-definition {
    padding: 10px 20px;
    border-bottom: 1px solid #ccc;
    margin-bottom: 10px;
    font-size: 16px;
    line-height: 1.5;
  }
  
  /* prvé slovo v odstavci tučné */
  .term-definition span.term {
    font-weight: bold;
    display: inline-block;
    margin-right: 6px;
  }

/* Footer */
footer {
    margin-top: 30px;
    font-size: 14px;
    color: #666;
}

/* Responsive Design */
@media (max-width: 600px) {
    .navbar {
        flex-wrap: wrap; /* Allow items to wrap onto new rows */
        justify-content: space-evenly; /* Distribute items evenly */
    }

    .navbar a {
        padding: 8px 12px; /* Slightly smaller padding for compact look */
        font-size: 14px; /* Adjust font size for smaller screens */
    }

    .content {
        padding: 10px; /* Adjust padding for smaller screens */
    }

    .theme-header {
        font-size: 18px; /* Adjust theme header size for mobile */
    }

    .option {
        flex-direction: row; /* Ensure radio and text are side by side */
        text-align: left; /* Align text to the left */
    }

    .option label {
        text-align: left; /* Ensure consistent left alignment */
    }
}

.button {
    background-color: #f01928;
    color: white;
    font-weight: bold;
    font-size: 18px;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 20px;
    transition: background-color 0.2s ease;
    text-align: center;
    font-family: inherit;
  }
  
.button:hover {
    background-color: #d01724;
}

  .image {
    display: block;
    margin: 30px auto;
    max-width: 70%;     /* obmedzí veľkosť na desktopoch */
    height: auto;
    background-color: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    padding: 4px;
  }
  
  /* Responzívne úpravy pre mobilné zariadenia */
  @media (max-width: 600px) {
    .image {
      max-width: 70%;    /* viac miesta pre obrázok na malých displejoch */
      margin: 20px auto;
    }
  }