/* FLEXBOX LAYOUT FIX */
#page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 1024px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

#body {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  overflow: visible; /* Dodane, aby obramowanie nie było przycinane */
}

#footer {
  flex-shrink: 0;
  position: relative;
  bottom: auto;
  width: 100%;
}

/* RESET */
h1, h2, h3, h4, p { 
  margin: 0; 
} 

h1 { 
  font-size: 1.9em; 
}

h2 { 
  font-size: 1.1em; 
}

h3 { 
  font-size: 1em;   
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-size: medium; 
  color: maroon; 
  font-family: verdana, arial, sans-serif; 
  overflow-x: hidden; /* Zapobiega poziomej scrollbarce */
}

form { 
  margin: 0; 
}

table {
  border: 0px solid green; 
  padding: 5px; 
  width: 100%;
}

th { 
  background: green; 
  color: white; 
  padding: 5px;
}

td { 
  border: 1px solid green; 
  padding: 5px; 
}

/* TOOLS */
.float-divider  { 
  clear: both; 
  height: 1px; 
  font-size: 1px; 
  line-height: 1px; 
}

.screenreader-only { 
  position: absolute; 
  left: -9999px; 
  top: -9999px; 
  width: 1px; 
  height: 1px; 
  overflow: hidden; 
} 

.hidden { 
  position: absolute; 
  top: -99999px; 
  left: -99999px; 
  width: 1px; 
  height: 1px; 
  overflow: hidden; 
}

/* LINKS */
a:link, a:visited, a:active { 
  text-decoration: none; 
  color: maroon; 
}  

a:hover { 
  color: black; 
  text-decoration: underline; 
}

/* TEXT */
.message { 
  text-align: left; 
  font-size: 0.7em; 
}

.copyright { 
  text-align: center; 
  font-size: 0.8em; 
}

/* SECTION */
.section { 
  margin-top: 10px; 
  font-size: 0.8em; 
  border: 1px solid green; 
}

.section h3 { 
  text-indent: 10px; 
  padding: 2px 0; 
  border-bottom: 1px solid green; 
  background: url("../theme/g1.jpg") repeat-x left bottom; 
  position: relative; 
}

.section p { 
  margin: 5px 10px; 
}

#section1 p { 
  column-count: 2;  
}

/* BUTTONS */
.button { 
  background: url("../theme/button.gif") no-repeat left top; 
  border: none; 
  width: 85px; 
  height: 26px; 
  font-weight: bold; 
  vertical-align: -2px; 
  margin: 0; 
  padding: 0; 
  cursor: pointer;
}

.button:hover { 
  color: blue; 
  position: relative; 
  top: 1px; 
  left: 1px; 
}

/* POPRAWIONE ZAKŁADKI (TABS) - PEŁNA SZEROKOŚĆ Z WIDOCZNYM OBRAMOWANIEM */
.tabs-container {
  text-align: left;
  position: relative;
  min-height: 300px;
  margin-bottom: 20px;
  overflow: visible; /* Zapobiega przycinaniu obramowania */
}

ul.tabs {
  position: relative;
  display: flex;
  width: 100%;
  padding: 0;
  margin: 0;
  border-bottom: 1px solid green;
  margin-bottom: 10px;
  list-style: none;
  z-index: 20;
}

ul.tabs li {
  flex: 1;
  text-align: center;
}

ul.tabs .tab-label {
  display: block;
  border: 1px solid green;
  margin: 0;
  padding: 2px 0;
  background: white url("../theme/g1.jpg") repeat-x left bottom;
  font-weight: normal;
  cursor: pointer;
  position: relative;
}

ul.tabs li.selected .tab-label {
  border-bottom: 1px solid white;
  top: 1px;
  padding-bottom: 4px;
  padding-top: 2px;
  border-top: 2px solid green;
  margin-top: -2px;
  background: white url("../theme/g2.jpg") repeat-x left top;
  font-weight: bold;
}

/* KLUCZOWA POPRAWKA */
ul.tabs .tab-content {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: 100%;
  text-align: left;
  border: 1px solid green;
  border-top: none;
  padding: 15px;
  box-sizing: border-box;
  display: none;
  background: white;
  z-index: 10;
  min-height: 300px;
  height: auto;
  margin: 0 auto;
  max-width: 1024px;
}

ul.tabs li.selected .tab-content {
  display: block;
  text-align: left;
}

.tab-content-placeholder {
  min-height: 300px;
  visibility: hidden;
  width: 100%;
}

/* POPRAWIONE MENU */
.menu { 
  display: inline-block;
  position: relative; 
  z-index: 1; 
  cursor: pointer; 
  white-space: nowrap; 
  vertical-align: top;
  margin-right: 15px;
}

.menu a { 
  font-size: 0.9em; 
  text-decoration: none; 
  color: black; 
}

.menu h3 { 
  display: inline-block;
  margin: 0; 
  padding: 1px 5px; 
  background: url("../theme/g1.jpg") repeat-x left bottom white; 
}

.menu h4 { 
  display: inline; 
  margin: 0; 
}

.menu ul { 
  position: absolute; 
  margin: 0; 
  padding: 0; 
  padding-bottom: 5px; 
  background: url("../theme/g3.jpg") repeat-x left bottom white;  
}

.menu li { 
  margin: 0; 
  padding: 2px 25px; 
  list-style-type: none; 
  color: black; 
}

.menu li img { 
  margin-left: -22px; 
  padding-right: 5px; 
}

.menu li.separator { 
  margin-top: 5px; 
  border-top: 1px solid gray; 
  padding-top: 5px; 
}

.menu li.flyout-trigger { 
  background: url("../theme/flyout2.gif") no-repeat right center; 
} 

.menu h3.hover { 
  background: url("../theme/g2.jpg") repeat-x left top white; 
}

.menu li.hover { 
  background-color: firebrick; 
  color: white; 
}

.menu ul.dropdown { 
  top: 100%;  
  clear: left; 
}

.menu ul.submenu { 
  left: 100%; 
  margin-top: -1.5em; 
  margin-left: -0.3em; 
}

.menu .hidden { 
  left: -99999px; 
  top: -99999px; 
}

.menu h3, .menu ul { 
  border-left: 1px solid green; 
  border-right: 1px solid green; 
  border-top: 1px solid green; 
  border-bottom: 1px solid green; 
}

.menu li.flyout-trigger.hover { 
  background: url("../theme/flyout1.gif") no-repeat right center firebrick; 
}

.menu li.hover > a { 
  color: white; 
}

/* ROLLUP */
.rollup-trigger { 
  cursor: pointer; 
}

.rollup-trigger:hover { 
  color: firebrick; 
}

span.rollup-trigger { 
  font-size: 0.65em; 
  padding-left: 8px; 
  background: url("../theme/hide.gif") no-repeat left top; 
}

span.rolledup { 
  background: url("../theme/show.gif") no-repeat left top; 
}

/* MORE */
.more { 
  text-align: right; 
  font-weight: bold; 
  font-size: 0.8em; 
}

/* LISTS */
ul.block { 
  padding: 0; 
  padding-top: 5px; 
  margin: 0; 
  text-align: left; 
  font-weight: bold;  
}

ul.block li { 
  display: block; 
  padding-left: 10px;  
}

ul.list { 
  padding: 0; 
  padding-left: 20px; 
  margin: 0; 
  text-align: left; 
  font-weight: bold; 
}

ul.list li { 
  padding: 2px 0; 
}

ul.inline { 
  padding: 0; 
  margin: 0; 
  text-align: center; 
}

ul.inline li { 
  display: inline; 
  font-size: 0.8em;  
}

/* PRE-HEADER */
#preheader p { 
  font-size: 0.7em; 
  margin: 0; 
  padding: 3px 0; 
}

#preheader .part1 { 
  float: left;  
  margin-left: 10px;
}

#preheader .part2 { 
  float: right; 
  margin-right: 10px;
}

/* POPRAWIONY HEADER */
#header { 
  width: 100%; 
}

#header .oi { 
  border: 1px solid green; 
  padding: 5px 10px; 
  background: url("../theme/g4.jpg") repeat-x left top;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

#title { 
  flex: 1;
  display: flex;
  align-items: center;
  margin-top: 0px; 
}

#title h1 { 
  margin-right: 0px; 
}

#title .home { 
  margin: 0; 
  padding: 0; 
}

#search { 
  margin-top: 2px; 
  flex-shrink: 0;
}

.szukaj { 
  flex-shrink: 0;
}

#search input { 
  font-size: 0.8em; 
  background-color: white; 
  color: maroon; 
  border: 2px solid green;
}

#formularz { 
  flex-shrink: 0;
}

#formularz input { 
  font-size: 0.8em; 
  background-color: white; 
  color: maroon; 
  border: 2px solid green;
}

/* POST-HEADER */
#postheader p { 
  font-size: 0.7em; 
  margin: 0; 
  padding: 3px 0; 
}

#postheader .breadcrumbs { 
  float: left;  
  margin-left: 10px;
}

#postheader .sequential { 
  float: right; 
  margin-right: 10px;
}

#tablica {
  width: 350px;
  height: 200px;
  margin: 30px auto;
  padding: 5px;
  line-height: 1.2;
  color: white;
  font-size: 18px;
  text-align: center;
  background-color: #008000;
  border: 14px solid;
  font-family: 'verdana';
  font-style: italic;
  border-image: url('../theme/blackboard.webp') 10;
  transform: rotate(-7deg);
}
#tablica2 {
  width: 350px;
  height: 200px;
  margin: 30px auto;
  padding: 5px;
  line-height: 1.2;
  color: white;
  font-size: 18px;
  text-align: center;
  background-color: #008000;
  border: 14px solid;
  font-family: 'verdana';
  font-style: italic;
  border-image: url('../theme/blackboard.webp') 10;
  transform: rotate(-7deg);
}
/* POPRAWIONY BODY */
#nav { 
  width: 20%; 
  min-width: 100px; 
  float: none;
}

#nav .oi { 
  padding-right: 10px; 
}

#main { 
  width: 80%; 
  min-width: 600px; 
  margin-top: 10px; 
  font-size: 0.8em; 
  float: none;
  min-height: auto;
}

#main .oi { 
  padding-right: 10px;
  text-align: left;
}

/* FOOTER */
#footer ul.inline li { 
  display: inline-block; 
  margin: 0 10px; 
}

/* COOKIE ALERT */
.cookiealert {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  margin: 0 !important;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  border-radius: 0;
  transform: translateY(100%);
  transition: all 500ms ease-out;
  color: green;
  background: url("../theme/g1.jpg") repeat-x left bottom;
}

.cookiealert.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0%);
  transition-delay: 1000ms;
}

.cookiealert a {
  text-decoration: underline
}

.cookiealert .acceptcookies {
  margin-left: 10px;
  vertical-align: baseline;
}

/* CONTENT SECTIONS */
.usage-section, .structure-section, .signal-words-section, 
.examples-section, .mistakes-section, .practice-section {
  width: 100%;    
  margin-bottom: 20px;
  padding: 10px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.use-case {
  padding: 15px;
  border-left: 4px solid green;
  margin-bottom: 20px;
}

/* RESPONSYWNOŚĆ */
@media (max-width: 768px) {
  #nav, #main {
    width: 100% !important;
    min-width: unset !important;
  }
  
  #title, #search, .szukaj {
    width: 100%;
    flex: 0 0 100%;
    margin-bottom: 10px;
  }
  
  .menu {
    display: block;
    width: 100%;
    margin-bottom: 5px;
  }
  
  ul.tabs {
    flex-direction: column;
  }
  
  ul.tabs li {
    width: 100%;
    margin-bottom: 5px;
  }
  
  .tabs-container {
    min-height: 200px;
  }
  
  .tab-content-placeholder {
    min-height: 200px;
  }
  
  #tablica, #tablica2 {
    width: 90%;
    transform: rotate(-3deg);
  }
}

/* DODATKOWE POPRAWKI */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

#page {
  overflow: hidden;
}

#body {
  position: relative;
}

#footer {
  background: #f8f8f8;
  padding: 15px 0;
  border-top: 1px solid #e7e7e7;
  margin-top: 30px;
}

#footer ul.inline {
  margin-bottom: 10px;
}

#footer .copyright {
  padding-top: 10px;
  border-top: 1px solid #ddd;
  margin-top: 10px;
}

/* ANIMACJE */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.tab-content {
  animation: fadeIn 0.3s ease-in-out;
}

/* DOSTĘPNOŚĆ */
a:focus, button:focus {
  outline: 2px solid #4d90fe;
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  border: 0;
}

/* POPRAWKI DLA WYSOKIEJ KONTRASTOWOŚCI */
@media (prefers-contrast: more) {
  a {
    text-decoration: underline !important;
  }
  
  button, input[type="button"], input[type="submit"] {
    border: 2px solid black !important;
  }
}
.grammar-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.grammar-category {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  text-align: left;
}

.grammar-point {
  background: white;
  padding: 1rem;
  border-left: 4px solid green;
  margin: 1rem 0;
}

.grammar-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  text-align: left;
}

.grammar-table th, .grammar-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.grammar-table th {
  background-color: green;
  color: white;
}
