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

@media print {
  .header,
  .navigation,
  .footer,
  #backToTop,
  .header-icons {
    display: none;
  }

  .main-content {
    margin: 0;
    padding: 0;
  }

  body {
    background: white;
    color: black;
  }
}

* {
  -webkit-overflow-scrolling: touch;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

img {
  max-width: 100%;
  height: auto;
}

img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

.image-container {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.image-container img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.skeleton {
  background: linear-gradient(
    90deg,
    #f0f0f0 25%,
    #e0e0e0 50%,
    #f0f0f0 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.navigation {
  width: 90%;
  margin-left: auto;
  margin-right: auto;
  left: auto;
}

.container {
  max-width: 1400px;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  z-index: 1000;
  position: relative;
  transition: var(--transition);
}

.mobile-menu-toggle:active {
  transform: scale(0.95);
}

.mobile-menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--text-light);
  border-radius: 3px;
  transition: var(--transition);
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
  display: block;
  opacity: 1;
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: -100%;
  width: 280px;
  max-width: 85%;
  height: 100vh;
  background: var(--nav-bg);
  z-index: 1000;
  overflow-y: auto;
  transition: left 0.3s ease;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
}

.mobile-nav.active {
  left: 0;
}

.mobile-nav-header {
  padding: 1rem;
  background: var(--primary-color);
  color: var(--text-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.mobile-nav-close {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav-close:active {
  transform: scale(0.9);
}

.mobile-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav ul li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav ul li a {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  color: var(--text-light);
  text-decoration: none;
  font-size: 1rem;
  transition: var(--transition);
  min-height: 44px;
}

.mobile-nav ul li a:active {
  background: var(--primary-dark);
  transform: scale(0.98);
}

.mobile-nav ul li a i {
  margin-right: 0.75rem;
  width: 20px;
  text-align: center;
}

.mobile-nav .dropdown-menu {
  display: none !important;
  background: var(--primary-dark);
  padding-left: 1rem;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
  visibility: hidden;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.mobile-nav .dropdown-menu.active {
  display: block !important;
  max-height: 500px;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  opacity: 1;
  visibility: visible;
}

.mobile-nav .dropdown-menu li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-nav .dropdown-menu li a {
  padding-left: 2.5rem;
  font-size: 0.9rem;
}

.mobile-nav .dropdown-toggle {
  position: relative;
}

.mobile-nav .dropdown-toggle::after {
  content: '\f107';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  right: 1.5rem;
  transition: transform 0.3s ease;
}

.mobile-nav .dropdown-toggle.active::after {
  transform: rotate(180deg);
}

body.menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

@media (max-width: 1280px) {
  .header .logo {
    font-size: 1.2rem;
  }
}

@media (max-width: 1024px) {
  .navigation {
    width: 100%;
    max-width: 100%;
    left: 0;
    position: relative;
  }

  .header .logo {
    /*right: 50px;*/
  }

  .header .nav {
    right: 80px;
  }

  .search-container {
    right: 30px;
  }

  .container {
    width: 95%;
  }
}

@media (max-width: 768px) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
    transition-duration: 0.01ms;
  }

  .navigation {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .mobile-nav {
    display: block;
  }

  #backToTop {
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
    bottom: 15px;
    right: 15px;
  }

  .form-group input,
  .form-group textarea {
    font-size: 16px;
    min-height: 44px;
    padding: 12px;
    width: 100%;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: border-color 0.3s;
  }

  .form-group input:focus,
  .form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
  }

  .contact-form input,
  .contact-form textarea {
    font-size: 16px;
    min-height: 44px;
  }

  .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
  }

  button[type="submit"],
  .btn-submit {
    min-height: 48px;
    min-width: 120px;
    font-size: 16px;
    font-weight: 600;
    padding: 12px 24px;
  }

  .btn:active,
  a:active {
    transform: scale(0.98);
  }

  * {
    will-change: auto;
    max-width: 100%;
    box-sizing: border-box;
  }

  body {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    width: 100%;
  }

  html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
  }

  form {
    width: 100%;
  }

  .form-group {
    margin-bottom: 1.5rem;
  }

  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="date"],
  input[type="password"],
  textarea,
  select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 8px;
  }

  select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
  }

  input[type="checkbox"],
  input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    position: relative;
  }

  input[type="checkbox"]:checked,
  input[type="radio"]:checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
  }

  input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
  }

  input[type="radio"] {
    border-radius: 50%;
  }

  input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
  }

  .container {
    width: 100%;
    max-width: 100%;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    box-sizing: border-box;
  }

  .row,
  .flex-row {
    flex-direction: column;
  }

  .card,
  .news-card,
  .story-card,
  .contact-card,
  .course-card {
    width: 100%;
    max-width: 100%;
    margin-bottom: 1.5rem;
    margin-left: 0;
    margin-right: 0;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  table {
    width: 100%;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table thead,
  table tbody,
  table tr {
    display: block;
  }

  table th,
  table td {
    display: block;
    text-align: left;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
  }

  table th {
    font-weight: bold;
    background: var(--bg-light);
  }

  button,
  a,
  input[type="button"],
  input[type="submit"],
  input[type="reset"] {
    min-height: 44px;
    min-width: 44px;
    padding: 0.75rem 1.5rem;
  }

  *:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
  }

  .calendar-weekdays,
  .calendar-weekdays .weekday,
  .calendar-days-grid,
  .calendar-days-grid .calendar-day {
    max-width: none;
  }

  [style*="position: absolute"],
  [style*="position:fixed"] {
    position: relative;
  }

  img,
  picture,
  video:not(.video-player-element),
  iframe,
  embed,
  object {
    max-width: 100%;
    height: auto;
  }

  form,
  .form,
  .contact-form {
    width: 100%;
    max-width: 100%;
  }

  .grid,
  .news-container,
  .stories-container,
  .contact-container,
  .courses-container {
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  .footer,
  .footer-grid {
    width: 100%;
    flex-direction: column;
  }

  .modal,
  .modal-content,
  .popup,
  .popup-content {
    width: 90%;
    max-width: 90%;
    margin: 5% auto;
  }

  .modal-content {
    padding: 15px;
  }

  section,
  .section {
    width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
    overflow: hidden;
    justify-content: center;
    justify-items: center;
  }

  .banner,
  .hero,
  .banner-content,
  .hero-content {
    width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .header .logo {
    font-size: 0.95rem;
    width: 145px;
    bottom: 25px;
  }

  #intro .introduction {
    width: 100%;
    overflow: hidden;
    font-size: 18px;
  }

  #news-events .section {
    width: 100%;
    display: grid;
  }

  .header {
    position: sticky;
    top: 0;
    z-index: 1000;
  }

  .header .container {
    flex-wrap: nowrap;
    padding: 0.75rem 1rem;
  }

  .header .header-icons {
    flex-wrap: wrap;
    gap: 1rem;
    width: 200px;
    position: relative;
    right: 74px;
    top: 17px;
  }

  .search-container {
    width: 100%;
    right: 0;
  }

  .banner {
    height: 33vh;
    padding: 1px;
    top: 0px;
  }

  .banner-content h1 {
    font-size: 2rem;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .news-container,
  .stories-container {
    gap: 30px;
  }

  .news-card,
  .story-card {
    width: 100%;
    max-width: 100%;
  }

  .mobile-nav {
    width: 320px;
  }

  @supports (padding: max(0px)) {
    .header-brand {
      height: 134px;
      position: relative;
      right: 60px;
    }

    .footer {
      padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }

    .mobile-nav {
      padding-top: max(1rem, env(safe-area-inset-top));
    }
  }
}

@media (max-width: 480px) {
  * {
    -webkit-tap-highlight-color: rgba(0, 74, 173, 0.1);
  }

  .header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 88px;
  }

  .header .container {
    flex-direction: row;
    flex-wrap: wrap;
    
    padding: 0.75rem 1rem;
    justify-content: space-between;
    align-items: center;
  }

  .header .logo {
    font-size: 0.85rem;
    position: relative;
    left: 42px;
    top: -2px;
    
  }

  .header-site-title{
    position: relative;
    font-size: 18px;
    right: 10px;
  }

  .header .nav {
    right: 0;
  }

  .header .header-icons {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
    width: auto;
    right: auto;
    top: auto;
  }

   .mobile-menu-toggle{
    position: relative;
    left: 387px;
    top: 10px;
   }

    .header-brand{
    height: 88px;
    position: relative;
    bottom: 70px;
    }

  .search-container {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  #search-input {
    width: 100%;
    font-size: 14px;
    padding: 8px 12px;
  }

  #search-input:focus {
    width: 100%;
  }

  .banner {
    height: 40vh;
    padding-top: 50px;
  }

  .banner-content h1 {
    font-size: 1.5rem;
  }

  .banner-content p {
    font-size: 1rem;
  }

  .section {
    padding: 2rem 1rem;
  }

  .section h2 {
    font-size: 1.5rem;
  }

  .news-card,
  .story,
  .contact-card {
    width: 100%;
    max-width: 100%;
    margin-bottom: 1.5rem;
  }

  .news-container,
  .stories-container,
  .contact-container {
    gap: 20px;
    flex-direction: column;
    align-items: stretch;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .footer .contact-form label {
    right: 0;
  }

  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
  }

  .btn:active {
    transform: scale(0.98);
    transition: transform 0.1s;
  }

  a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0.5rem;
  }

  .contact-form #contactForm {
    padding: 15px;
  }

  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="date"],
  textarea,
  select {
    font-size: 16px;
    min-height: 44px;
    padding: 12px;
    border-radius: 8px;
  }

  input[type="checkbox"],
  input[type="radio"] {
    width: 44px;
    height: 44px;
    margin: 0.5rem;
  }

  img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
  }

  img[loading="lazy"].loaded {
    opacity: 1;
  }

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

  video:not(.video-player-element),
  iframe {
    max-width: 100%;
    height: auto;
  }

  * {
    animation-duration: 0.3s;
    transition-duration: 0.3s;
  }

  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  .container {
    width: 95%;
    max-width: 100%;
    padding: 0 10px;
  }

  .mobile-nav {
    width: 280px;
  }

  *:hover {
    transform: none;
  }
}

@media (max-width: 360px) {
  .header {
    font-size: 0.75rem;
    width: 100%;
    height: 100px;
  }

  .header .container {
    width: 100%;
    height: 100px;
  }

  .header .logo {
    width: 68px;
    top: 12px;
    font-size: 0.75rem;
  }

  .header .header-brand {
    height: 65px;
    position: relative;
    right: 83px;
    bottom: 10px;
  }

  .header .search-container {
    display: none;
  }

  .mobile-menu-toggle {
    left: 287px;
  }

  .header-site-title{
    font-size: 16px;
    width: 392px;
    position: relative;
    top: 14px;
  }
}

