@import url("https://fonts.googleapis.com/css?family=Rubik:300,300i,400,400i,700,700i&display=swap");

*{
  font-family: Rubik ;
} 

body {
    background-color: #f8f9fa;
    margin-top: 20px;
    animation: fadeIn 1s ease-in-out;
    overflow-x: hidden;
  }
  
  #menu {
    background: #003366;
    background: linear-gradient(to bottom,  #003366,  #004085);
    height: 45px;
    border-radius: 10px;
  }
  #menu ul, #menu li {
    margin: 0 auto;
    padding: 0;
    list-style: none
  }
  #menu ul {
    width: 100%;
    text-align: center;
  }
  #menu li {
    display: inline-block;
    position: relative;
  }
  #menu a {
    display: block;
    line-height: 45px;
    padding: 0 14px;
    text-decoration: none;
    color: #FFFFFF;
    font-size: 16px;
  }
  #menu a.dropdown-arrow:after {
    content: "\25BE";
    margin-left: 5px;
  }
  #menu li a:hover {
    color: #004085;
    background: #F2F2F2;
  }
  #menu input {
    display: none;
    margin: 0;
    padding: 0;
    height: 45px;
    width: 100%;
    opacity: 0;
    cursor: pointer
  }
  #menu label {
    display: none;
    line-height: 45px;
    text-align: center;
    position: absolute;
    left: 35px
  }
  #menu label:before {
    font-size: 1.6em;
    color: #FFFFFF;
    content: "\2261"; 
    margin-left: 20px;
  }
  #menu ul.sub-menus{
    height: auto;
    overflow: hidden;
    width: 170px;
    background: #444444;
    position: absolute;
    z-index: 99;
    display: none;
  }
  #menu ul.sub-menus li {
    display: block;
    text-align: left;
    width: 100%;
  }
  #menu ul.sub-menus a {
    color: #FFFFFF;
    font-size: 16px;
  }
  #menu li:hover ul.sub-menus {
    display: block
  }
  #menu ul.sub-menus a:hover{
    background: #F2F2F2;
    color: #444444;
  }
  @media screen and (max-width: 800px){
    #menu {position:relative}
    #menu ul {background:#444444;position:absolute;top:100%;right:0;left:0;z-index:3;height:auto;display:none;text-align:left;}
    #menu ul.sub-menus {width:100%;position:static;}
    #menu ul.sub-menus a {padding-left:30px;}
    #menu li {display:block;float:none;width:auto;}
    #menu input, #menu label {position:absolute;top:0;left:0;display:block}
    #menu input {z-index:4}
    #menu input:checked + label {color:#FFFFFF}
    #menu input:checked + label:before {content:"\00d7"}
    #menu input:checked ~ ul {display:block}
  }
  
  .container {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(30px);
    animation: slideUp 0.6s ease-out;
  }
  
  h1, h2 {
    color: #003366;
    text-align: center;
    font-size: 2.2em;
    animation: fadeInUp 0.5s ease-in-out;
    margin-bottom: 15px;
  }
  
  .section-title {
    background-color: #f0f4f8;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 1.4em;
    margin-top: 30px;
    text-align: center;
    border-left: 5px solid #004085;
    opacity: 0;
    animation: fadeInUp 0.7s ease-in-out forwards;
  }
  
  .code-section {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e3e3e3;
    margin-top: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    opacity: 0;
    animation: fadeInUp 0.8s ease-in-out 0.4s forwards;
  }
  
  .code {
    font-family: "Courier New", Courier, monospace;
    background-color: #e9ecef;
    padding: 20px;
    border-radius: 6px;
    overflow-x: auto;
    transition: all 0.3s ease-in-out;
  }
  

  .example-button {
    margin: 15px;
    background-color: #004085;
    color: #ffffff;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s, transform 0.3s ease;
  }
  
  .example-button:hover {
    background-color: #003366;
    transform: scale(1.08);
  }
  
  header {
    background-color: #f8f9fa;
    padding: 25px;
    border-bottom: 3px solid #6c757d;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.6s ease-out;
  }
  
  .text-center {
    text-align: center;
    color: #6c757d;
    font-size: 1.1rem;
  }
  
  table {
    width: 90%;
    margin: 20px auto;
    border-collapse: collapse;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.8s ease-in-out;
  }
  
  th, td {
    border: 1px solid #dee2e6;
    padding: 10px 15px;
    text-align: center;
    transition: background-color 0.3s ease;
  }
  
  th {
    background-color: #004085;
    color: #ffffff;
  }
  
  caption {
    caption-side: top;
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 1.2rem;
  }
  
  /* TOC Section Styling */
  #toc {
    background-color: #e9ecef;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
  }
  
  #toc h2 {
    color: #004085;
    font-size: 1.7em;
    margin-bottom: 20px;
    text-align: center;
  }
  
  #toc ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
  }
  
  #toc ul li {
    margin: 12px 0;
  }
  
  #toc ul li a {
    text-decoration: none !important;
    font-size: 1.2em;
    color: #004085;
    transition: color 0.3s ease, padding-left 0.3s ease;
    padding-left: 0;
  }
  
  #toc ul li a:hover {
    color: #003366;
    padding-left: 12px;
    background-color: #f8f9fa;
    border-radius: 6px;
  }
  
  /* Animations */
  @keyframes fadeIn {
    0% {
      opacity: 0;
    }
    100% {
      opacity: 1;
    }
  }
  
  @keyframes fadeInUp {
    0% {
      opacity: 0;
      transform: translateY(20px);
    }
    100% {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  @keyframes slideIn {
    0% {
      opacity: 0;
      transform: translateX(-50px);
    }
    100% {
      opacity: 1;
      transform: translateX(0);
    }
  }
  
  @keyframes slideUp {
    0% {
      opacity: 0;
      transform: translateY(30px);
    }
    100% {
      opacity: 1;
      transform: translateY(0);
    }
  }

button {
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    background-color: #ff9800;
    color: white;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
}

button:hover {
    background-color: #e68900;
    transform: scale(1.1);
}

.rtl {
    direction: rtl;
    text-align: right;
}


.code {
  direction: ltr !important;
  text-align: left !important;
}

/* Navigation */
#menu {
  background: linear-gradient(to bottom, #003366, #004085);
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 10px;
  animation: slideInDown 0.8s ease-in-out;
}

#menu li {
  list-style: none;
}

#menu a {
  text-decoration: none;
  color: #fff;
  font-size: 1rem;
  transition: 0.3s;
}

#menu a:hover {
  color: #004085;
  background: #f2f2f2;
  padding: 8px;
  border-radius: 5px;
}

/* Main Content */
.container {
  max-width: 90%;
  margin: 20px auto;
  background-color: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  animation: fadeInUp 1s ease-in-out;
}

h1, h2 {
  text-align: center;
  font-size: 2rem;
  color: #003366;
  animation: fadeInUp 1.2s ease-in-out;
}

@media (max-width: 600px) {
  h1, h2 {
    font-size: 1.5rem;
  }
}

/* Buttons */
.example-button {
  display: block;
  width: 100%;
  max-width: 200px;
  margin: 20px auto;
  background-color: #004085;
  color: #fff;
  padding: 12px;
  border-radius: 6px;
  font-size: 1rem;
  text-align: center;
  transition: 0.3s;
  animation: bounceIn 1.5s ease-in-out;
}

.example-button:hover {
  background-color: #003366;
  transform: scale(1.05);
}

/* Table */
table {
  width: 100%;
  max-width: 800px;
  margin: 20px auto;
  border-collapse: collapse;
  background-color: #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  animation: fadeInUp 1.3s ease-in-out;
}

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

th {
  background-color: #004085;
  color: #fff;
}

@media (max-width: 768px) {
  table {
    display: block;
    overflow-x: auto;
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes bounceIn {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

@media (min-width: 1024px) {  
  img {
    width: 500px;  
  }
}
