/*
Theme Name: chdutheme_new
Theme URI: https://chmnu.edu.ua
Author: Web Developer
Author URI: https://chmnu.edu.ua
Description: WordPress theme for the Petro Mohyla Black Sea National University website.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: chmnu
*/

:root {
  --blue-900: #00247d;
  --blue-800: #0b3e9c;
  --blue-700: #0b55ce;
  --blue-600: #1a66e1;
  --line: #e5e7eb;
  --shadow-sm: 0 6px 20px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 12px 28px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.16);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --ring: 0 0 0 3px rgba(11, 85, 206, 0.25);
  --transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all .15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all .5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth scrolling */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Respect user preferences for reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes floatY {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
  100% {
    transform: translateY(0);
  }
}
@keyframes glow {
  0% {
    box-shadow: 0 0 0 rgba(11, 85, 206, 0);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(11, 85, 206, 0.12);
  }
  100% {
    box-shadow: 0 0 0 rgba(11, 85, 206, 0);
  }
}

body {
  font-family: sans-serif !important;
  background: #f9fafc;
  color: #0f172a;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Improve focus visibility for accessibility */
*:focus {
  outline: 2px solid var(--blue-600);
  outline-offset: 2px;
}

*:focus:not(:focus-visible) {
  outline: none;
}

*:focus-visible {
  outline: 2px solid var(--blue-600);
  outline-offset: 2px;
}

/* Skip to content link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--blue-700);
  color: #fff;
  padding: 8px 16px;
  z-index: 10000;
  text-decoration: none;
  border-radius: 0 0 4px 0;
}

.skip-link:focus {
  top: 0;
}

/* Improve container responsiveness */
.container {
  width: 100%;
  max-width: 100%;
  padding-left: 15px;
  padding-right: 15px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .container {
    max-width: 750px;
  }
}

@media (min-width: 992px) {
  .container {
    max-width: 970px;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1170px;
  }
}

/* Global image sizing: only apply to content images, not logos/icons */
/* Global image sizing: removed fixed width to prevent display issues */

/* Improve touch targets on mobile */
@media (max-width: 768px) {
  a,
  button {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .top-menu li a,
  .footer-button-list a,
  .footer-button-list-2 a {
    min-height: 44px;
  }
}

/* Prevent text overflow on small screens */
@media (max-width: 480px) {
  h1, h2, h3, h4, h5, h6,
  p, span, a, li {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
}

/* Landscape orientation improvements */
@media (max-width: 768px) and (orientation: landscape) {
  .header-line .logoimg {
    height: 70px;
  }
  .header-line .logotext,
  .header-line .chdu-title,
  .header-line .chdu-title-en {
    font-size: 16px;
  }
  .rslides {
    height: 250px;
  }
}

/* Improve readability on all devices */
@media (min-width: 1440px) {
  body {
    font-size: 16px;
  }
  .p-text-size {
    font-size: 17px;
    line-height: 1.6;
  }
}

  /* High DPI screens optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .header-line .logoimg {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* ========================================
   ADDITIONAL IMPROVEMENTS
   ======================================== */

/* Performance optimizations */
.category-news-element-img-wrapper img,
.category-standart-block img,
.news-wrapper img {
  content-visibility: auto;
  contain-intrinsic-size: 200px;
}

/* Improve image loading - styles for lazy loaded images */
.news-wrapper img[loading="lazy"],
.p-text-size img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s;
}

.news-wrapper img[loading="lazy"].loaded,
.p-text-size img[loading="lazy"].loaded,
.news-wrapper img.loaded,
.p-text-size img.loaded {
  opacity: 1;
}

/* Fade in animation for images */
.news-wrapper img,
.p-text-size img {
  transition: opacity 0.3s ease;
}

/* Better form styling */
input[type="text"],
input[type="email"],
input[type="search"],
input[type="url"],
input[type="tel"],
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  margin: 0;
}

input:disabled,
textarea:disabled,
select:disabled,
button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Improve button accessibility */
button,
input[type="button"],
input[type="submit"] {
  cursor: pointer;
  font-family: inherit;
}

button:disabled,
input[type="button"]:disabled,
input[type="submit"]:disabled {
  cursor: not-allowed;
}

/* Loading states */
.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}

.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--blue-600);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

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

/* Improve link contrast for accessibility */
a[href] {
  color: var(--blue-700);
}

a[href]:hover {
  color: var(--blue-800);
  text-decoration: underline;
}

/* Print styles */
@media print {
  .header-line,
  .top-menu-wrapper,
  .menuButton,
  .footer-row,
  .bottom-menu-wrapper,
  .slider,
  .translate-button {
    display: none !important;
  }
  
  body {
    background: #fff;
    color: #000;
  }
  
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }
  
  img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }
  
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }
}

/* Selection styling */
::selection {
  background: var(--blue-600);
  color: #fff;
}

::-moz-selection {
  background: var(--blue-600);
  color: #fff;
}

/* Scrollbar styling for webkit browsers */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--blue-700);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--blue-800);
}

/* Improve empty state styling */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #6b7280;
}

.empty-state h3 {
  margin-bottom: 0.5rem;
  color: #374151;
}

/* Better contrast for important text */
.important-text {
  font-weight: 600;
  color: #111827;
}

/* Utility classes for spacing */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }

/* Screen reader only text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Improve table responsiveness in print */
@media print {
  .p-text-size table,
  table {
    width: 100% !important;
    page-break-inside: auto;
  }
  
  .p-text-size table tr {
    page-break-inside: avoid;
    page-break-after: auto;
  }
}

.tabs-nav-items {
  margin-top: 5px !important;
}
a,
a:focus,
a:hover,
a:active {
  outline: none;
}
article {
  margin-bottom: 20px;
}

/* Wrapper and layout responsiveness */
.wrapper {
  width: 100%;
  max-width: 100%;
  padding: 0 15px;
  margin: 0 auto;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .wrapper {
    padding: 0 20px;
  }
}

@media (min-width: 1200px) {
  .wrapper {
    padding: 0 40px;
  }
}

@media (max-width: 767px) {
  article {
    margin-bottom: 16px;
  }
  .wrapper {
    padding: 0 12px;
  }
}

.category-standart-block h3 {
  margin-top: 0;
}
.category-events-time {
  padding-top: 40px;
  position: relative;
  display: block;
  z-index: 3;
  padding-left: 13px;
}
.category-events-month {
  left:-5px;
  position: relative;
  display: block;
  font-size: 10px;
  text-align: center;
  z-index: 3;
}
.category-events-day {
  left:-5px;
  text-align: center;
  position: relative;
  display: block;
  z-index: 3;
  color: #0b3e9c !important;
  font-size: 40px;
  line-height: 40px;
}
.category-events-time::before {
  content: " ";
  position: absolute;
  left: 10px;
  top: -12px;
  background: url(/wp-content/themes/chdutheme_new/calendar.png);
  background-size: 100% 100%;
  width: 95px;
  height: 110px;
  z-index: 0;
}

.chdu-title {
  width: 100%;
  max-width: 1000px;
  margin-top: -5px;
  padding-top: 0px;
  font-size: 42px;
  font-weight: 700;
  line-height: 1.2;
  color: #000;
}
.chdu-title-en {
  width: 100%;
  max-width: 1000px;
  margin-top: 0;
  padding-top: 27px;
  font-size: 42px;
  font-weight: 700;
  line-height: 1.2;
  color: #000;
}

.news-wrapper p {
  font-size: 16px !important;
  letter-spacing: .3px !important;
  line-height: 1.6 !important;
  font-family: sans-serif !important;
  margin-bottom: 1em;
}
.news-wrapper span {
  font-size: 16px !important;
  letter-spacing: .3px !important;
  line-height: 1.6 !important;
  font-weight: 400 !important;
  font-family: sans-serif !important;
}
.news-wrapper p:last-child {
  margin-bottom: 0;
}
.news-wrapper img {
  position: relative !important;
  display: block !important;
  text-align: center !important;
  width: 100% !important;
  max-width: 100% !important;
  transform: none !important;
  left: auto !important;
  box-shadow: 0 0 56px -13px rgba(0, 0, 0, 0.35);
  height: auto !important;
  margin: 15px auto !important;
  border-radius: 12px;
}

a {
  text-decoration: none;
  cursor: pointer;
  color: inherit;
  transition: color var(--transition-fast);
}

a:hover {
  text-decoration: none;
}

a:focus-visible {
  outline: 2px solid var(--blue-600);
  outline-offset: 2px;
  border-radius: 2px;
}
a h1,
h2,
h3,
h4,
h5,
h6 {
  transition: .4s;
}
.category-events-element-title a {
  color: #0b55ce;
}
.hideLogo {
  display: none;
}

.homepage h2 {
  font-size: 38px;
  font-weight: 700;
  color: #000;
  position: relative;
  padding-left: 15px;
  margin: 35px 0 20px;
  letter-spacing: 0.5px;
  line-height: 1.3;
  text-shadow: none;
  transition: var(--transition);
}

.menuButton {
  border-bottom: 1px solid #0b3e9c;
  z-index: 999999;
  width: 100%;
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  height: 50px;
  font-size: 30px;
  transition: .4s;
  background: #fff;
}
.menuButton a {
  color: #0f172a;
  cursor: pointer;
}
.menuButton .glyphicon {
  position: absolute;
  top: 8px;
  right: 15px;
}
.menuButtonDefault {
  background: #fff !important;
}
.menuButtonDefault .glyphicon {
  color: #0b3e9c !important;
}
.menuButtonScroll {
  background: #0b3e9c !important;
}
.menuButtonScroll .glyphicon {
  color: #fff !important;
}

.translate-button {
  background: #0b55ce;
  color: #fff;
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  text-decoration: none;
  transition: var(--transition);
  animation: glow 2.5s ease infinite;
}
.translate-button:hover {
  background: #0b3e9c;
  transform: translateY(-1px);
}
.ogoloshenya_thumbnail img {
  position: relative;
  display: block;
  border: 1px solid #f0f0f0;
  padding: 5px;
  width: 75%;
  left: 50%;
  transform: translate(-50%, 0);
  height: auto;
  border-radius: 10px;
}

.categories-design h3 {
  color: #0b55ce !important;
  border-top: 1px solid rgba(11, 85, 206, 0.4);
  border-bottom: 1px solid rgba(11, 85, 206, 0.4);
  padding: 10px 0;
}

.facult-right-column-design {
  color: #fff;
  padding: 10px;
  border-radius: 10px;
  background: linear-gradient(to bottom, #1a66e1, #0b55ce);
  text-align: center;
  font-size: 20px;
  transition: var(--transition);
}
.facult-right-column-design:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}
.facult-right-column-list {
  list-style: square;
  margin: 0;
  padding-left: 20px;
}

.right-faculty-menu-news-element img,
.right-faculty-menu-news-elements img {
  border: 1px solid #d8d8d8;
  padding: 5px;
  display: block;
  position: relative;
  height: auto;
  width: 100%;
  box-shadow: 0 0 56px -13px rgba(0, 0, 0, 0.25);
  border-radius: 10px;
}
.right-faculty-menu-news-elements img {
  width: 60%;
  margin-top: 15px;
  margin-bottom: 15px;
}

.language_toggle {
  position: absolute;
  right: 15px;
  top: 90px;
  z-index: 9999999;
}
.language_toggle li {
  list-style: none;
  display: inline-block;
  margin: 0 5px;
}

.faculty-row {
  margin-top: 20px;
}
.error404-row {
  padding: 4vh 0;
}

.category-news-element-title-2 {
  font-size: 12px;
  text-align: center;
  padding-left: 12px;
  border-top: 3px solid #0b55ce;
  margin: 15px 0 10px;
  line-height: 1.4;
  background: linear-gradient(to bottom, #eef4ff, #fff);
}

.col-category-vstup li {
  list-style: square;
}
.col-category-vstup-image img {
  width: 100%;
  border: 1px solid #e0e0e0;
  padding: 5px;
  height: auto;
  border-radius: 10px;
}
.col-category-vstup a:active,
a:focus {
  color: #0b55ce;
}
.col-category-vstup h4 {
  font-size: 14px;
  line-height: 13px;
  padding: 2px 0;
  margin: -5px;
}

.p-text-size {
  font-size: 16px;
  line-height: 1.7;
  color: #1f2937;
}
.p-text-size p {
  font-size: 16px;
  letter-spacing: .2px;
  line-height: 1.7;
  margin-bottom: 1.25em;
}
.p-text-size p:last-child {
  margin-bottom: 0;
}
.p-text-size ul,
.p-text-size ol {
  line-height: 1.7;
  margin-bottom: 1.25em;
  padding-left: 1.5em;
}
.p-text-size li {
  margin-bottom: 0.5em;
}
.p-text-size h2,
.p-text-size h3,
.p-text-size h4 {
  margin-top: 1.5em;
  margin-bottom: 0.75em;
  line-height: 1.3;
}
.p-text-size img {
  padding: 5px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
}
.p-text-size h1 {
  text-transform: uppercase;
  color: #fff;
  padding: 10px;
  border-radius: 10px;
  background: linear-gradient(to bottom, #1a66e1, #0b55ce);
  text-align: center;
  font-size: 18px;
  transition: var(--transition);
}
.p-text-size table {
  margin: 10px 0;
  border-color: rgba(11, 85, 206, 0.4) !important;
  font-size: 14px;
  font-family: verdana;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #e8eef6;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.p-text-size table th,
tr,
td {
  padding: 10px;
}
.p-text-size table th {
  background: #f5f8ff;
  color: #0f172a;
  font-weight: 700;
}
.p-text-size table th,
.p-text-size table td {
  border-bottom: 1px solid #eef2f7;
}
.p-text-size table tr:last-child td {
  border-bottom: none;
}

/* Desktop: fix table width to 700px, keep mobile fluid */
@media (min-width: 1024px) {
  .p-text-size table,
  table {
    width: 700px;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Large desktop: allow a bit wider tables */
@media (min-width: 1440px) {
  .p-text-size table,
  table {
    width: 900px;
  }
  .header-line {
    padding: 22px max(50px, 8vw);
  }
  .footer-row {
    padding: 68px max(50px, 10vw) 64px;
  }
  .chdu-title,
  .chdu-title-en {
    font-size: 48px;
  }
  .homepage h2 {
    font-size: 42px;
  }
}

/* Extra large screens */
@media (min-width: 1920px) {
  .header-line {
    padding: 24px max(60px, 10vw);
  }
  .footer-row {
    padding: 72px max(60px, 12vw) 68px;
  }
  .container {
    max-width: 1800px;
  }
}

/* Tablet / small desktop: keep fluid width */
@media (max-width: 1023px) {
  .p-text-size table,
  table {
    width: 100%;
    max-width: 100%;
  }
}

/* Mobile: make tables scrollable horizontally to avoid overflow */
@media (max-width: 767px) {
  .p-text-size table,
  table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
}

.faculty-main-person {
  color: #fff;
  padding: 10px;
  border-radius: 10px;
  background: linear-gradient(to bottom, #1a66e1, #0b55ce);
  text-align: center;
  font-size: 20px;
  text-transform: uppercase;
  transition: var(--transition);
}
.faculty-main-person:hover {
  transform: translateY(-1px);
}

.my-bread {
  margin: 5px 0;
}
.my-bread a {
  color: #0b55ce;
}

.black-color {
  color: #000;
}
.black-color a {
  color: #000;
}
.red-color {
  color: #0b55ce;
}
.red-color a {
  color: #0b55ce;
}
.red-background {
  background: #0b3e9c;
}
.gray-color {
  color: #f2f1eb;
}
.gray-color a {
  color: #f2f1eb;
}
.gray-background {
  background: #f2f1eb;
}
.white-color {
  color: #fff;
  display: flex;
  flex-direction: column;
  text-align: center;
  font-size: 18px;
}
.white-color a {
  color: #fff;
}
.white-background {
  background: #fff;
}

.header-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--blue-800);
  padding: 18px 36px;
  color: #fff;
  box-shadow: 0 8px 32px rgba(0, 36, 125, 0.2), 0 2px 8px rgba(0, 0, 0, 0.1);
  border-bottom: 2px solid rgba(255, 255, 255, 0.15);
  position: relative;
  z-index: 1001;
  animation: fadeInDown .4s ease;
  flex-wrap: wrap;
  gap: 24px;
  overflow: hidden;
}
.header-line .logotype {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}
.header-line .logoimg {
  float: none;
  margin: 0;
  height: 110px;
  width: auto;
  transition: transform .3s cubic-bezier(0.4, 0, 0.2, 1), filter .3s ease;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
  position: relative;
}
.header-line .logoimg:hover {
  transform: translateY(-3px) scale(1.03);
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.25));
}
.header-line .logotext {
  position: static;
  margin: 0;
  font-size: 22px;
  height: auto;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: .5px;
  flex: 1;
  min-width: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 1;
}
.header-line .logotext .logotext-1-row {
  font-size: 26px;
  letter-spacing: .7px;
  font-weight: 800;
}
.header-line .chdu-title,
.header-line .chdu-title-en {
  margin: 0;
  font-size: 30px;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: .5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  color: #fff !important;
}
.header-line .chdu-title.logotext-1-row,
.header-line .chdu-title-en.logotext-1-row {
  font-size: 26px;
  letter-spacing: .7px;
  font-weight: 800;
}
.header-line #searchform {
  position: relative;
  top: auto;
  right: auto;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 1;
  flex-shrink: 0;
}
.header-line #searchform::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23888' viewBox='0 0 24 24'%3E%3Cpath d='M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.5;
  z-index: 2;
  pointer-events: none;
  transition: opacity .2s ease;
}
.header-line #searchform:focus-within::before {
  opacity: 0.3;
}
#s {
  margin-right: 0;
  width: 240px;
  max-width: 300px;
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #0f172a !important;
  padding: 12px 16px 12px 44px;
  transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(255, 255, 255, 0.98);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0, 36, 125, 0.15), inset 0 1px 2px rgba(255, 255, 255, 0.8);
  position: relative;
}
#s:focus {
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 6px 24px rgba(0, 36, 125, 0.2), 0 0 0 4px rgba(255, 255, 255, 0.15), inset 0 1px 2px rgba(255, 255, 255, 0.9);
  background: #fff;
  outline: none;
  transform: translateY(-1px);
}
#s::placeholder {
  color: #888;
  font-weight: 400;
}
.header-line #searchsubmit {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  background-image: url(https://chmnu.edu.ua/wp-content/uploads/search2.png);
  background-size: 18px 18px;
  background-position: center;
  background-repeat: no-repeat;
  border: 2px solid rgba(255, 255, 255, 0.3);
  width: 44px;
  height: 44px;
  color: transparent;
  cursor: pointer;
  transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0, 36, 125, 0.2);
  position: relative;
  overflow: hidden;
}
.header-line #searchsubmit::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0;
  transition: opacity .3s ease;
}
.header-line #searchsubmit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 36, 125, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}
.header-line #searchsubmit:hover::before {
  opacity: 1;
}
.header-line #searchsubmit:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 36, 125, 0.2);
}

/* Desktop alignment for cleaner header layout */
@media (min-width: 1024px) {
  .header-line {
    flex-wrap: nowrap;
    gap: 32px;
    padding: 20px max(40px, 6vw);
  }
  .header-line .logotype {
    flex: 0 0 auto;
  }
  .header-line .logotext {
    flex: 1 1 auto;
    text-align: left;
  }
  .header-line #searchform {
    margin-left: auto;
    flex-shrink: 0;
  }
  #s {
    width: 260px;
  }
  .footer-row {
    padding: 60px max(40px, 8vw) 56px;
  }
  .footer-logo {
    font-size: 28px;
    margin-bottom: 32px;
    letter-spacing: 1.4px;
  }
  .bottom-menu {
    gap: 32px 48px;
    margin-top: 36px;
  }
  .bottom-menu li a {
    font-size: 15px;
  }
  .footer-col,
  .footer-col-2 {
    padding: 28px 0;
  }
  .footer-col-row-2 {
    font-size: 14px;
  }
  .under-bottom-menu {
    margin-top: 36px;
    padding-top: 28px;
  }
  .under-bottom-menu li a {
    font-size: 15px;
  }
  .footer-button-list a,
  .footer-button-list-2 a {
    padding: 16px 18px 16px 24%;
    font-size: 17px;
    margin-top: 14px;
  }
}

.wr-mega-menu {
  font-family: "sans-pro-regular", sans-serif !important;
}
.top-menu-wrapper {
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 999;
}
.top-menu-nav {
  position: relative;
  display: block;
  width: 100%;
}
.top-menu {
  margin: 0;
  padding: 14px 0;
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 28px;
  white-space: nowrap;
  position: relative;
  flex-wrap: wrap;
}
.top-menu li {
  position: relative;
  transition: .4s;
  border-bottom: 2px solid transparent;
}
.top-menu a {
  font-weight: 600;
  font-size: 16px;
  color: #0f172a;
  position: relative;
  transition: var(--transition);
  display: inline-block;
  padding: 4px 2px;
}
.top-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 3px;
  background: var(--blue-600);
  transition: width .25s ease;
  border-radius: 2px;
}
.top-menu a:hover {
  color: #0b55ce;
}
.top-menu li:hover > a::after {
  width: 100%;
}
.top-menu li ul {
  position: absolute;
  top: 100%;
  left: 0;
  transform: translateY(8px);
  width: 260px;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
  backdrop-filter: saturate(120%) blur(8px);
  max-height: 70vh;
  overflow-y: auto;
  overflow-x: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .3s cubic-bezier(0.4, 0, 0.2, 1), transform .3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10000;
  margin-top: 8px;
}
/* Вирівнювання меню вправо для останніх елементів */
.top-menu li:last-child ul,
.top-menu li:nth-last-child(2) ul {
  left: auto;
  right: 0;
}
.top-menu li:last-child ul::before,
.top-menu li:nth-last-child(2) ul::before {
  left: auto;
  right: 24px;
}
.top-menu li:hover > ul,
.top-menu li:focus-within > ul {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.top-menu li ul::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 24px;
  width: 12px;
  height: 12px;
  background: #fff;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  rotate: 45deg;
  z-index: 1;
}
.top-menu li ul li {
  margin: 0;
  padding: 0;
  width: 100%;
  background: transparent;
  border-radius: 10px;
  overflow: hidden;
}
.top-menu li ul li:first-child {
  margin-top: 0;
}
.top-menu li ul li:last-child {
  margin-bottom: 0;
}
.top-menu li ul li a {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  color: #1f2937;
  transition: all .25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  background: transparent;
}
.top-menu li ul li a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--blue-600);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform .25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 0 3px 3px 0;
}
.top-menu li ul li a:hover {
  background: linear-gradient(90deg, #f0f7ff 0%, #e8f2ff 100%);
  color: var(--blue-700);
  padding-left: 20px;
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(11, 85, 206, 0.1);
}
.top-menu li ul li a:hover::before {
  transform: scaleY(1);
}
.top-menu li ul li a:active {
  transform: translateX(1px);
  background: linear-gradient(90deg, #e3edff 0%, #d6e7ff 100%);
}
.top-menu li ul {
  scrollbar-width: thin;
  scrollbar-color: #c8d5f5 transparent;
}
.top-menu li ul::-webkit-scrollbar {
  width: 6px;
}
.top-menu li ul::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 10px;
}
.top-menu li ul::-webkit-scrollbar-thumb {
  background: #c8d5f5;
  border-radius: 10px;
}
.top-menu li ul::-webkit-scrollbar-thumb:hover {
  background: var(--blue-600);
}

.bottom-menu-wrapper {
  min-height: 280px;
  margin-top: 20px;
}
.bottom-menu {
  width: 100%;
  position: relative;
  margin: 0;
  padding: 0;
  margin-top: 32px;
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 28px 40px;
  z-index: 1;
}
.bottom-menu li {
  padding: 0 12px;
  width: auto;
  display: inline-block;
  position: relative;
  font-size: 13px;
}
.bottom-menu li a {
  letter-spacing: .6px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 14px;
  line-height: 1.2em;
  text-transform: uppercase;
  font-weight: 700;
  position: relative;
  padding: 6px 0;
  transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.bottom-menu li a::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  background: rgba(255, 255, 255, 0.8);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s cubic-bezier(0.4, 0, 0.2, 1);
}
.bottom-menu li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: #fff;
  transition: width .3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}
.bottom-menu li a:hover {
  transform: translateY(-2px);
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.bottom-menu li a:hover::before,
.bottom-menu li a:hover::after {
  width: 100%;
  transform: scaleX(1);
}

.footer-row {
  background: linear-gradient(180deg, var(--blue-900) 0%, var(--blue-800) 25%, var(--blue-700) 60%, var(--blue-600) 100%);
  color: #fff;
  padding: 52px max(20px, 5vw) 48px;
  margin-top: 52px;
  position: relative;
  overflow: hidden;
  animation: fadeInUp .5s ease;
  box-shadow: 0 -4px 24px rgba(0, 36, 125, 0.15);
  border-top: 2px solid rgba(255, 255, 255, 0.1);
}
.footer-row::before {
  content: "";
  position: absolute;
  inset: auto -30% -50% -30%;
  height: 280px;
  background: radial-gradient(70% 140% at 50% 0, rgba(255, 255, 255, 0.12) 0%, transparent 75%);
  pointer-events: none;
}
.footer-row::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}
.footer-logo {
  font-family: century-gothic;
  letter-spacing: 1.2px;
  text-align: center;
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 28px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 1;
  padding-bottom: 16px;
}
.footer-logo::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}
.under-bottom-menu {
  margin: 0;
  padding: 0;
  text-align: center;
  margin-top: 32px;
  position: relative;
  z-index: 1;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}
.under-bottom-menu li {
  display: inline-block;
  margin: 0 12px 8px;
}
.under-bottom-menu li a {
  transition: all .25s cubic-bezier(0.4, 0, 0.2, 1);
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 6px;
  position: relative;
  display: inline-block;
}
.under-bottom-menu li a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  opacity: 0;
  transition: opacity .25s ease;
}
.under-bottom-menu li a:hover {
  color: #fff;
  transform: translateY(-1px);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.under-bottom-menu li a:hover::before {
  opacity: 1;
}
.footer-col {
  padding: 24px 0;
  position: relative;
  z-index: 1;
}
.footer-col-row-2 {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
}
.footer-col-2 {
  padding: 24px 0;
  position: relative;
  z-index: 1;
}

.category-events-month {
  text-transform: uppercase;
  font-weight: 700;
}
.category-events-element-title {
  font-weight: 700;
  color: #0b55ce !important;
}
.category-events-element-title:hover {
  color: #0b55ce !important;
}
.category-news-element {
  margin-top: 22px;
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  animation: floatY 5s ease-in-out infinite;
  will-change: transform;
}
.category-news-element:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.category-news-element:focus-within {
  outline: 2px solid var(--blue-600);
  outline-offset: 2px;
}
.category-news-element img {
  width: 100%;
  height: 350px;
  object-fit: cover;
}
.category-standart-raid .category-standart-block:nth-child(1) {
  margin-top: 0;
}
.category-standart-block {
  margin-top: 10px;
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
  will-change: transform;
}
.category-standart-block:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.category-standart-block:focus-within {
  outline: 2px solid var(--blue-600);
  outline-offset: 2px;
}
.category-standart-block img {
  width: 100%;
  height: 350px;
  border: 1px solid #e0e0e0;
  padding: 5px;
  border-radius: 10px;
  object-fit: cover;
}
.category-news-element-title {
  font-size: 1.42857em;
  padding: 10px 12px;
}
.category-video-block {
  border: 1px solid #f0f0f0;
  padding: 8px;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.rektorat-photo-img {
  float: left;
  margin-right: 20px;
  border: 1px solid #e9e9e9;
  padding: 5px;
  width: 150px;
  height: 210px;
  border-radius: 10px;
}
.rektorat-element {
  height: 210px;
  margin-top: 20px;
  display: block;
  position: relative;
  float: none;
}

.footer-button-list,
.footer-button-list-2 {
  list-style: none;
  margin: 0;
  padding: 0;
  margin-top: 28px;
}
.footer-button-list a,
.footer-button-list-2 a {
  text-align: left;
  width: 100%;
  display: inline-block;
  position: relative;
  padding: 14px 16px 14px 22%;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  margin-top: 12px;
  font-size: 16px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}
.footer-button-list a::before,
.footer-button-list-2 a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));
  opacity: 0;
  transition: opacity .3s ease;
}
.footer-button-list a:hover,
.footer-button-list-2 a:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}
.footer-button-list a:hover::before,
.footer-button-list-2 a:hover::before {
  opacity: 1;
}
.footer-button-list-2 a:last-child {
  margin-bottom: 28px;
}

.faculty-leader {
  border: 1px solid #e9e9e9;
  padding: 5px;
  border-radius: 10px;
}

hr {
  margin: 5px 0;
  border: none;
  border-top: 1px solid var(--line);
}

.box-shadow-inset {
  box-shadow: inset 0 4px 8px -2px rgba(0, 0, 0, 0.2);
}
.box-shadow-inset-2 {
  box-shadow: 0 4px 8px -8px rgba(0, 0, 0, 0.2) inset;
}
.aps-group-horizontal img {
  width: 25px !important;
  height: 25px !important;
}

/* Responsive social icons */
@media (max-width: 768px) {
  .aps-group-horizontal img {
    width: 22px !important;
    height: 22px !important;
  }
}

@media (max-width: 480px) {
  .aps-group-horizontal img {
    width: 20px !important;
    height: 20px !important;
  }
}
.lead {
  font-size: 1.3em;
  line-height: 1.4;
  color: #3f3c30;
}

/* Responsive typography */
@media (max-width: 768px) {
  .lead {
    font-size: 1.2em;
    line-height: 1.35;
  }
}

@media (max-width: 480px) {
  .lead {
    font-size: 1.1em;
    line-height: 1.3;
  }
}

.category-news-element-img-wrapper {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  height: 350px;
}
.category-news-element-img-wrapper .category-news-element-img img {
  z-index: 1;
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  overflow-x: hidden;
  transition: transform .35s ease;
  height: 350px;
}
.category-news-element:hover .category-news-element-img img {
  transform: scale(1.05);
}

.wp-pagenavi {
  margin-top: 18px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.wp-pagenavi a,
.wp-pagenavi a:link {
  padding: 6px 12px;
  margin: 2px;
  text-decoration: none;
  border: 1px solid var(--blue-700);
  color: #fff;
  background: linear-gradient(180deg, var(--blue-600), var(--blue-700));
  transition: .2s;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.wp-pagenavi a:visited {
  padding: 6px 12px;
  margin: 2px;
  text-decoration: none;
  border: 1px solid var(--blue-700);
  color: #fff;
  background: linear-gradient(180deg, var(--blue-600), var(--blue-700));
}
.wp-pagenavi a:hover {
  filter: brightness(1.06);
}
.wp-pagenavi a:active {
  padding: 6px 12px;
  margin: 2px;
  text-decoration: none;
  border: 1px solid #0066cc;
  color: #0066cc;
  background: #fff;
}
.wp-pagenavi span.pages {
  padding: 6px 12px;
  margin: 2px;
  color: #0f172a;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
}
.wp-pagenavi span.current {
  padding: 6px 12px;
  margin: 2px;
  font-weight: 700;
  border: 1px solid var(--blue-800);
  color: #fff;
  background: var(--blue-800);
  border-radius: 12px;
}
.wp-pagenavi span.extend {
  padding: 6px 12px;
  margin: 2px;
  border: 1px solid var(--line);
  color: #0f172a;
  background: #fff;
  border-radius: 12px;
}

.slider {
  margin-top: 10px;
}
.slider .prev {
  display: block;
  position: absolute;
  left: 8px;
  top: 50%;
  background-image: url(/wp-content/themes/chdutheme_new/img/arrow-left.png),
    linear-gradient(var(--blue-600), var(--blue-700));
  background-size: 100% 100%;
  transform: translateY(-50%);
  z-index: 99;
  text-indent: -999999px;
  padding: 10px;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.slider .next {
  display: block;
  position: absolute;
  right: 8px;
  top: 50%;
  background-image: url(/wp-content/themes/chdutheme_new/img/arrow-right.png),
    linear-gradient(var(--blue-600), var(--blue-700));
  background-size: 100% 100%;
  transform: translateY(-50%);
  z-index: 99;
  text-indent: -999999px;
  padding: 10px;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.slider .prev:hover,
.slider .next:hover {
  filter: brightness(1.06);
  transform: translateY(-52%);
}
.rslides {
  position: relative;
  list-style: none;
  overflow: hidden;
  width: 100%;
  height: 450px;
  padding: 0;
  margin: 0;
}
.rslides li {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  position: absolute;
  display: none;
  width: 100%;
  left: 0;
  top: 0;
}
.rslides li:first-child {
  position: relative;
  display: block;
  float: left;
}
.rslides img {
  display: block;
  height: auto;
  float: left;
  width: 100%;
  transform: translateY(-20%);
  border: 0;
  object-fit: cover;
}

/* Responsive slider */
@media (max-width: 768px) {
  .rslides {
    height: 300px;
  }
  .slider .prev,
  .slider .next {
    width: 40px;
    height: 40px;
    padding: 8px;
  }
}

@media (max-width: 480px) {
  .rslides {
    height: 220px;
  }
  .slider .prev,
  .slider .next {
    width: 36px;
    height: 36px;
    padding: 6px;
  }
  .slider .prev {
    left: 4px;
  }
  .slider .next {
    right: 4px;
  }
}

.alignnone {
  margin: 5px 20px 20px 0;
}
.aligncenter,
div.aligncenter {
  margin: auto;
}
.alignright {
  float: right;
  margin: 5px 0 20px 20px;
}
.alignleft {
  float: left;
  margin: 5px 20px 20px 0;
}
.aligncenter {
  display: block;
  margin: 5px auto;
}
a img.alignright {
  float: right;
  margin: 5px 0 20px 20px;
}
a img.alignnone {
  margin: 5px 20px 20px 0;
}
a img.alignleft {
  float: left;
  margin: 5px 20px 20px 0;
}
a img.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.wp-caption {
  background: #fff;
  border: 1px solid #f0f0f0;
  max-width: 96%;
  padding: 5px 3px 10px;
  text-align: center;
  margin: 10px auto;
}

/* Responsive image captions */
@media (max-width: 768px) {
  .wp-caption {
    max-width: 100%;
    padding: 4px 2px 8px;
  }
  .wp-caption.alignleft,
  .wp-caption.alignright,
  .wp-caption.alignnone {
    float: none;
    margin: 10px auto;
  }
}
.wp-caption.alignnone {
  margin: 5px 20px 20px 0;
}
.wp-caption.alignleft {
  margin: 5px 20px 20px 0;
}
.wp-caption.alignright {
  margin: 5px 0 20px 20px;
}
.wp-caption img {
  border: 0;
  height: auto;
  margin: 0;
  max-width: 98.5%;
  padding: 0;
  width: auto;
  border-radius: 8px;
  object-fit: cover;
}
.wp-caption p.wp-caption-text {
  font-size: 11px;
  line-height: 17px;
  margin: 0;
  padding: 0 4px 5px;
}

.wordpress-post-tabs-skin-simple_gray .ui-tabs .ui-tabs-panel {
  padding: 20px !important;
}
.wordpress-post-tabs-skin-simple_gray .ui-tabs .ui-tabs-nav {
  border: none !important;
}

@font-face {
  font-family: sans-pro-regular;
  src: url(/wp-content/themes/chdutheme_new/fonts/SourceSansPro-Regular.ttf);
}
@font-face {
  font-family: sans-pro-black;
  src: url(/wp-content/themes/chdutheme_new/fonts/SourceSansPro-Black.ttf);
}
@font-face {
  font-family: Roboto;
  src: url(/wp-content/themes/chdutheme_new/fonts/Roboto-Regular.ttf);
}

/* Tablet and small desktop (768px - 1200px) */
@media (min-width: 769px) and (max-width: 1200px) {
  .chdu-title,
  .chdu-title-en {
    font-size: 38px;
    max-width: 900px;
  }
  .category-news-element,
  .category-standart-block {
    margin-top: 20px;
  }
  .category-news-element-title {
    font-size: 1.35em;
  }
  .news-wrapper img {
    width: 75% !important;
  }
  .p-text-size h1 {
    font-size: 20px;
  }
  .homepage h2 {
    font-size: 30px;
  }
}

@media (max-width: 1200px) {
  .header-line {
    padding: 16px 28px;
    gap: 20px;
  }
  .header-line .logotext {
    font-size: 31px;
  }
  .header-line .chdu-title,
  .header-line .chdu-title-en {
    font-size: 31px;
  }
  .header-line .logotext .logotext-1-row {
    font-size: 24px;
  }
  .header-line .logoimg {
    height: 100px;
  }
  #s {
    width: 200px;
    padding: 10px 14px 10px 40px;
  }
  .header-line #searchsubmit {
    width: 40px;
    height: 40px;
  }
  .top-menu {
    gap: 20px;
    padding: 12px 0;
  }
  .top-menu a {
    font-size: 15px;
  }
  .chdu-title,
  .chdu-title-en {
    font-size: 36px;
    padding-top: 0px;
  }
  .category-news-element img,
  .category-standart-block img {
    height: 320px;
  }
  .category-news-element-img-wrapper,
  .category-news-element-img-wrapper .category-news-element-img img {
    height: 320px;
  }
  .faculty-main-person {
    font-size: 18px;
    padding: 12px;
  }
  .facult-right-column-design {
    font-size: 18px;
    padding: 12px;
  }
}

/* Small tablets and large phones (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
  .chdu-title,
  .chdu-title-en {
    font-size: 24px;
    padding-top: 20px;
    max-width: 100%;
  }
  .homepage h2 {
    font-size: 28px;
    margin: 30px 0 15px;
    padding-left: 12px;
  }
  .category-news-element-title {
    font-size: 1.25em;
  }
  .news-wrapper img {
    width: 80% !important;
  }
  .category-news-element img,
  .category-standart-block img {
    height: 280px;
    min-height: 280px;
  }
  .category-news-element-img-wrapper,
  .category-news-element-img-wrapper .category-news-element-img img {
    height: 280px;
  }
  .p-text-size {
    font-size: 15px;
  }
  .p-text-size h1 {
    font-size: 17px;
    padding: 8px;
  }
  .footer-row {
    padding: 40px 20px 36px;
  }
  .footer-logo {
    font-size: 20px;
  }
}

@media (max-width: 768px) {
  .header-line {
    padding: 16px 20px;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .header-line::before,
  .header-line::after {
    display: none;
  }
  .header-line .logotype {
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    gap: 12px;
  }
  .header-line .logoimg {
    height: 85px;
  }
  .header-line .logotext {
    font-size: 18px;
    margin-bottom: 0;
    text-align: center;
  }
  .header-line .chdu-title,
  .header-line .chdu-title-en {
    font-size: 18px;
    text-align: center;
  }
  .header-line .logotext .logotext-1-row {
    font-size: 20px;
  }
  .header-line #searchform {
    width: 100%;
    order: 3;
    margin-top: 4px;
  }
  .header-line #searchform::before {
    left: 14px;
  }
  #s {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border-radius: 14px;
  }
  .header-line #searchsubmit {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }
  .top-menu-wrapper {
    display: none;
  }
  .top-menu-nav {
    z-index: 9999;
    position: fixed;
    display: none;
    width: 100% !important;
    height: 100vh;
    left: 0;
    top: 50px;
    background: #fff;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .top-menu-nav.active {
    display: block;
  }
  .top-menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px 0;
  }
  .top-menu li {
    border-bottom: 1px solid var(--line);
  }
  .top-menu li a {
    padding: 14px 18px;
    font-size: 16px;
  }
  .top-menu li ul {
    position: static;
    transform: none;
    width: 100%;
    max-height: 48vh;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: none;
    border-radius: 0;
    border: none;
    border-top: 1px solid #eef2f7;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    display: none;
    padding: 8px 0;
    background: #f9fafc;
    margin-top: 0;
  }
  .top-menu li.open > ul {
    display: flex;
  }
  .top-menu li ul::before {
    display: none;
  }
  .top-menu li ul li a {
    padding: 12px 32px;
    font-size: 14px;
  }
  .top-menu li ul li a:hover {
    padding-left: 36px;
    background: #eef4ff;
    transform: none;
  }
  .top-menu li ul li a::before {
    display: none;
  }
  #adaptive-footer {
    height: 500px !important;
  }
  .bottom-menu {
    gap: 20px 28px;
    margin-top: 28px;
  }
  .bottom-menu li {
    width: 50% !important;
    padding: 0 8px;
  }
  .bottom-menu li a {
    font-size: 13px;
    padding: 5px 0;
  }
  .footer-row {
    text-align: center !important;
    padding: 44px 24px 40px;
    margin-top: 44px;
  }
  .footer-logo {
    font-size: 22px;
    margin-bottom: 24px;
  }
  .footer-col,
  .footer-col-2 {
    padding: 20px 0;
  }
  .footer-col-row-2 {
    font-size: 12px;
  }
  .under-bottom-menu {
    margin-top: 28px;
    padding-top: 20px;
  }
  .under-bottom-menu li {
    margin: 0 8px 6px;
  }
  .footer-button-list,
  .footer-button-list-2 {
    margin-top: 24px;
  }
  .footer-button-list a,
  .footer-button-list-2 a {
    padding: 12px 14px 12px 18%;
    font-size: 15px;
    margin-top: 10px;
  }
  .category-news-element {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
  #logo-col {
    height: 80px !important;
  }
  #search-col {
    display: none !important;
  }
  .search-line {
    display: none !important;
  }
  #fullwidth-footer {
    display: none !important;
  }
  .mainpage-right-column {
    text-align: center !important;
  }
  .category-standart-block .col-md-4 img {
    height: auto;
    min-height: 150px;
  }
  .category-news-element img {
    height: auto;
    min-height: 150px;
  }
  .category-standart-block img {
    height: auto;
    min-height: 150px;
  }
  .category-events-time::before {
    width: 80px;
    height: 90px;
    left: 50% !important;
    transform: translateX(-50%);
  }
  .category-events-day {
    font-size: 36px;
    line-height: 36px;
  }
  .rektorat-photo-img {
    width: 120px;
    height: auto;
    margin-right: 15px;
  }
}

@media (max-width: 480px) {
  .header-line {
    padding: 14px 16px;
    gap: 12px;
  }
  .header-line .logoimg {
    height: 70px;
  }
  .header-line .logotext {
    font-size: 16px;
    line-height: 1.3;
  }
  .header-line .chdu-title,
  .header-line .chdu-title-en {
    font-size: 16px;
  }
  .header-line .logotext .logotext-1-row {
    font-size: 18px;
  }
  .header-line #searchform::before {
    left: 12px;
    width: 16px;
    height: 16px;
  }
  #s {
    padding: 10px 12px 10px 38px;
    font-size: 14px;
    border-radius: 12px;
  }
  .header-line #searchsubmit {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }
  .menuButton {
    height: 45px;
    font-size: 24px;
  }
  .top-menu-nav {
    top: 45px;
  }
  .translate-button {
    padding: 8px 14px;
    font-size: 13px;
  }
  .bottom-menu {
    gap: 16px 24px;
    margin-top: 24px;
  }
  .bottom-menu li {
    width: 100% !important;
    padding: 0;
    text-align: center;
  }
  .bottom-menu li a {
    font-size: 12px;
    padding: 5px 0;
    letter-spacing: .5px;
  }
  .footer-row {
    padding: 36px 16px 32px;
    margin-top: 40px;
  }
  .footer-row::before {
    inset: auto -40% -60% -40%;
    height: 200px;
  }
  .footer-logo {
    font-size: 20px;
    margin-bottom: 20px;
    letter-spacing: .8px;
    padding-bottom: 14px;
  }
  .footer-logo::after {
    width: 50px;
  }
  .footer-col,
  .footer-col-2 {
    padding: 16px 0;
  }
  .footer-col-row-2 {
    font-size: 11px;
    line-height: 1.5;
  }
  .under-bottom-menu {
    margin-top: 24px;
    padding-top: 16px;
  }
  .under-bottom-menu li {
    margin: 0 6px 6px;
  }
  .under-bottom-menu li a {
    font-size: 12px;
    padding: 3px 6px;
  }
  .footer-button-list,
  .footer-button-list-2 {
    margin-top: 20px;
  }
  .footer-button-list a,
  .footer-button-list-2 a {
    font-size: 14px;
    padding: 12px 12px 12px 16%;
    margin-top: 8px;
    border-radius: 12px;
  }
  .rektorat-photo-img {
    width: 100%;
    float: none;
    margin-right: 0;
    margin-bottom: 15px;
    height: auto;
  }
  .chdu-title,
  .chdu-title-en {
    font-size: 28px;
    padding-top: 20px;
    max-width: 100%;
    line-height: 1.3;
  }
  .homepage h2 {
    font-size: 24px;
    margin: 25px 0 15px;
    padding-left: 12px;
  }
  .category-news-element-title {
    font-size: 1.15em;
    padding: 8px 10px;
  }
  .category-news-element {
    margin-top: 16px;
  }
  .category-standart-block {
    margin-top: 8px;
  }
  .news-wrapper img {
    width: 95% !important;
    margin-top: 12px !important;
    margin-bottom: 12px !important;
  }
  .news-wrapper p,
  .news-wrapper span {
    font-size: 15px !important;
    line-height: 1.4 !important;
  }
  .p-text-size {
    font-size: 14px;
  }
  .p-text-size p {
    font-size: 14px;
    line-height: 1.4;
  }
  .p-text-size h1 {
    font-size: 16px;
    padding: 8px;
  }
  .category-events-day {
    font-size: 32px;
    line-height: 32px;
  }
  .category-events-time::before {
    width: 70px;
    height: 80px;
  }
  .faculty-main-person {
    font-size: 16px;
    padding: 10px 8px;
  }
  .facult-right-column-design {
    font-size: 16px;
    padding: 10px 8px;
  }
  .rektorat-photo-img {
    width: 100%;
    float: none;
    margin-right: 0;
    margin-bottom: 12px;
    height: auto;
  }
  .category-news-element-img-wrapper,
  .category-news-element-img-wrapper .category-news-element-img img {
    height: 240px;
  }
  .category-news-element img,
  .category-standart-block img {
    height: 180px;
    min-height: 180px;
  }
}

/* Very small phones (max-width: 360px) */
@media (max-width: 360px) {
  .header-line {
    padding: 12px 14px;
    gap: 10px;
  }
  .header-line .logoimg {
    height: 60px;
  }
  .header-line .logotext,
  .header-line .chdu-title,
  .header-line .chdu-title-en {
    font-size: 14px;
  }
  .header-line .logotext .logotext-1-row {
    font-size: 16px;
  }
  #s {
    padding: 8px 10px 8px 36px;
    font-size: 13px;
  }
  .header-line #searchsubmit {
    width: 36px;
    height: 36px;
  }
  .chdu-title,
  .chdu-title-en {
    font-size: 24px;
    padding-top: 16px;
  }
  .homepage h2 {
    font-size: 22px;
  }
  .category-news-element-title {
    font-size: 1.1em;
  }
  .footer-row {
    padding: 32px 14px 28px;
  }
  .footer-logo {
    font-size: 18px;
  }
  .bottom-menu li a {
    font-size: 11px;
  }
  .footer-button-list a,
  .footer-button-list-2 a {
    font-size: 13px;
    padding: 10px 10px 10px 14%;
  }
}
