/*
Theme Name: Fedniy Simple
Theme URI: https://techfedniy.com/
Author: Ayman M.
Author URI: https://ayamaansi.com/
Description: A simple and responsive WordPress theme designed for Fedniy Tech platform.
Version: 3.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fedniy-simple
*/

/* Section 0: CSS Variables & Reset */
:root {
  --primary: #0d1128;
  --primary-light: #1a237e;
  --accent: #FFA200;
  --accent-hover: #e69100;
  --secondary: #2c7be5;
  --text-color: #333;
  --text-light: #666;
  --light-bg: #f8f9fa;
  --card-bg: #ffffff;
  --border-color: #e8e8e8;
  --font-family: 'Cairo', 'Noto Sans', sans-serif;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  color: var(--text-color);
  background-color: var(--light-bg);
  direction: rtl;
}

a {
  text-decoration: none;
  color: var(--secondary);
  transition: var(--transition);
}

a:hover {
  color: var(--primary);
}

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

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.container-full-width {
  width: 100%;
  padding: 0 15px;
}

/* Section 1: Top Bar */
.topbar {
  background-color: var(--primary);
  color: #fff;
  padding: 6px 0;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  direction: rtl;
}

.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
}

.top-social a {
  color: #fff;
  font-size: 16px;
  margin-left: 12px;
}

.top-social a:hover {
  color: var(--accent);
}

.top-contact {
  color: #fff;
  display: inline-flex;
  gap: 5px;
  flex-direction: row-reverse;
  align-items: center;
}

.top-contact i {
  color: var(--accent);
}

.top-contact .txt {
  direction: ltr;
  unicode-bidi: plaintext;
}

/* Section 2: Main Header & Navigation */
.site-header {
  background: url('assets/img/hero-bg-v2.jpg') center/cover no-repeat;
  position: relative;
  min-height: 450px;
}

.site-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(13,17,40,0.7), rgba(26,35,126,0.6));
  z-index: 1;
}

.site-header.header-scrolled {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  min-height: auto;
  padding: 10px 0;
  background: rgba(13,17,40,0.95);
  backdrop-filter: blur(12px);
  z-index: 1000;
  animation: fadeInUp 0.3s ease;
}

.site-header.header-scrolled::before {
  display: none;
}

.site-header.header-scrolled .hero-content {
  display: none;
}

.site-header.header-scrolled .site-brand img {
  height: 50px;
}

.site-header-inner {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  direction: rtl;
  padding: 10px 15px;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-brand img {
  height: 200px;
  width: auto;
  transition: var(--transition);
}

.site-brand .site-title {
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  text-decoration: none;
}

.site-brand .site-description {
  display: none;
}

.main-navigation {
  display: flex;
  align-items: center;
}

.main-navigation ul, .main-menu {
  list-style: none;
  display: flex;
  gap: 25px;
  margin: 0;
  padding: 0;
}

.main-navigation a, .main-menu a {
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  z-index: 11;
}

.main-navigation a:hover, .main-menu a:hover {
  color: var(--accent);
}

.btn-login {
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  z-index: 11;
  text-decoration: none;
  font-weight: 600;
}

.btn-login:hover {
  background: var(--accent-hover);
  color: #fff;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: transparent;
  border: none;
  z-index: 1100;
  cursor: pointer;
  padding: 0;
}

.hamburger span {
  width: 30px;
  height: 3px;
  background: #fff;
  border-radius: 10px;
  transition: var(--transition);
  transform-origin: 1px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(2px, -2px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(2px, 2px);
}

/* Section 3: Mobile Navigation */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -300px;
  width: 280px;
  height: 100vh;
  background: white;
  z-index: 1050;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  padding: 80px 20px 30px;
  box-shadow: -5px 0 15px rgba(0,0,0,0.1);
}

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

.mobile-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.mobile-nav-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
}

.mobile-nav-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-color);
}

.mobile-nav ul, .mobile-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 0;
  margin: 0;
}

.mobile-nav a, .mobile-menu a {
  display: block;
  color: var(--primary);
  font-size: 1.1rem;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

.mobile-login {
  margin-top: 20px;
  text-align: center;
  display: block;
}

.mobile-menu-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Section 4: Hero Section */
.hero-content {
  padding: 40px 0;
  text-align: center;
  position: relative;
  z-index: 5;
}

.hero-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 15px;
}

.hero-title {
  font-size: 48px;
  color: #fff;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  margin-bottom: 20px;
}

.hero-description {
  font-size: 20px;
  color: #fff;
  line-height: 1.8;
  opacity: 0.9;
  margin-bottom: 30px;
}

.btn-hero {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 12px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.btn-hero:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-2px);
}

/* Section 5: About Section */
.about-fedniy {
  padding: 60px 0;
  background: var(--light-bg);
}

.about-fedniy-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 40px;
  direction: rtl;
  padding: 0 15px;
}

.about-img {
  flex: 0 0 45%;
  max-width: 45%;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: var(--shadow-md);
}

.about-img img {
  width: 100%;
  height: auto;
}

.about-text {
  flex: 1;
  max-width: 55%;
}

.about-text h2 {
  font-size: 30px;
  color: var(--primary);
  margin-bottom: 20px;
}

.about-text p {
  font-size: 17px;
  margin-bottom: 15px;
  line-height: 1.7;
}

/* Section 6: Departments */
.departments-section {
  padding: 50px 0;
  text-align: center;
}

.departments-grid {
  max-width: 1200px;
  margin: 40px auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
  padding: 0 15px;
}

.dept-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s, box-shadow 0.3s;
  height: 100%;
}

.dept-card-link:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.dept-card {
  background: #fff;
  padding: 25px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  text-align: center;
  height: 100%;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  z-index: 1;
}

.dept-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  opacity: 0;
  transition: var(--transition);
  z-index: -1;
}

.dept-card:hover::before {
  opacity: 1;
}

.dept-card:hover .dept-icon,
.dept-card:hover h3,
.dept-card:hover p {
  color: #fff;
}

.dept-icon {
  font-size: 40px;
  color: var(--accent);
  margin-bottom: 15px;
  transition: var(--transition);
}

.dept-card h3 {
  font-size: 18px;
  color: var(--primary);
  margin-bottom: 10px;
  transition: var(--transition);
}

.dept-card p {
  font-size: 14px;
  color: #666;
  margin: 0;
  transition: var(--transition);
}

.center-card {
  /* Used for centering if needed, via flex or grid modifications */
}

/* Section 7: Sec Title & Buttons */
.sec-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  display: inline-block;
  position: relative;
  margin-bottom: 20px;
}

.sec-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
}

.btn-more {
  display: inline-block;
  padding: 10px 25px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  transition: var(--transition);
  text-decoration: none;
}

.btn-more:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-2px);
}

/* Section 8: Library Section */
.fedniy-library-section {
  padding: 60px 0;
  text-align: center;
  background: var(--light-bg);
}

.library-sub-title {
  font-size: 1.4rem;
  color: #444;
  margin: 30px auto 15px;
  border-bottom: 2px solid #e0e0e0;
  font-weight: 700;
  display: inline-block;
  padding-bottom: 5px;
}

.fedniy-library-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 15px;
}

.fedniy-book-card {
  background: #fff;
  padding: 15px;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.fedniy-book-card:hover {
  transform: translateY(-5px);
}

.book-thumb {
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: 6px;
  margin-bottom: 15px;
}

.book-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--primary);
}

.book-excerpt {
  font-size: 13px;
  color: #666;
  margin-bottom: 15px;
  flex-grow: 1;
}

.book-actions {
  display: flex;
  justify-content: space-around;
  gap: 8px;
  margin-top: auto;
}

.book-actions a {
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  flex: 1;
}

.book-view {
  background: var(--accent);
  color: #fff !important;
}

.book-view:hover {
  background: var(--accent-hover);
}

.book-download {
  background: #ccc;
  color: var(--text-color) !important;
}

.book-download:hover {
  background: #bbb;
}

.no-file {
  background: #eee;
  color: #999 !important;
  cursor: not-allowed;
}

.library-more {
  margin-top: 30px;
}

/* Section 9: Articles Grid (NEW) */
.fedniy-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 15px;
  text-align: right;
}

.fedniy-article-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s, box-shadow 0.3s;
}

.fedniy-article-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.article-thumb-link {
  display: block;
}

.article-thumb {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.fedniy-article-card:hover .article-thumb img {
  transform: scale(1.05);
}

.article-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.article-category {
  display: inline-block;
  background: var(--secondary);
  color: #fff;
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 20px;
  text-decoration: none;
  margin-bottom: 10px;
  align-self: flex-start;
}

.article-title {
  font-size: 1.1rem;
  margin: 0 0 10px;
  line-height: 1.6;
}

.article-title a {
  color: var(--primary);
  text-decoration: none;
}

.article-title a:hover {
  color: var(--secondary);
}

.article-excerpt {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.7;
  flex-grow: 1;
  margin-bottom: 15px;
}

.article-meta {
  font-size: 0.8rem;
  color: #999;
  margin-bottom: 12px;
}

.article-date {
  margin-left: 10px;
}

.article-read-more {
  color: var(--secondary);
  font-weight: 600;
  text-decoration: none;
  align-self: flex-start;
}

.article-read-more:hover {
  color: var(--primary);
}

/* Section 10: Blog Cards */
.blog-page-header {
  padding: 30px 0;
  text-align: center;
}

.blog-page-header h1 {
  font-size: 32px;
  color: var(--primary);
  margin: 0;
}

.blog-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 25px;
  padding: 20px 15px;
  max-width: 1200px;
  margin: 0 auto;
}

.blog-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.blog-card-thumb {
  display: block;
  height: 200px;
  overflow: hidden;
}

.blog-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.blog-card:hover .blog-card-thumb img {
  transform: scale(1.05);
}

.blog-card-placeholder {
  height: 100%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.blog-card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-card-category {
  display: inline-block;
  background: var(--secondary);
  color: #fff;
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 20px;
  text-decoration: none;
  margin-bottom: 10px;
  align-self: flex-start;
}

.blog-card-title {
  font-size: 1.1rem;
  margin: 0 0 10px;
  line-height: 1.5;
}

.blog-card-title a {
  color: var(--primary);
  text-decoration: none;
}

.blog-card-title a:hover {
  color: var(--secondary);
}

.blog-card-excerpt {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 15px;
  flex-grow: 1;
}

.blog-card-meta {
  font-size: 0.8rem;
  color: #999;
  margin-bottom: 10px;
}

.blog-card-readmore {
  color: var(--secondary);
  font-weight: 600;
  align-self: flex-start;
}

/* Section 11: Single Post Styles */
.single-post-content {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 15px;
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: var(--shadow-sm);
}

.single-featured-image {
  width: 100%;
  max-height: 400px;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 30px;
}

.single-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.entry-header {
  margin-bottom: 25px;
}

.entry-title {
  font-size: 32px;
  color: var(--primary);
  margin: 0 0 15px;
}

.entry-meta {
  font-size: 14px;
  color: #888;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 15px;
}

.entry-content {
  font-size: 16px;
  line-height: 1.8;
  color: #444;
}

.entry-content h2, .entry-content h3 {
  color: var(--primary);
  margin-top: 30px;
}

.entry-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.entry-tags {
  margin: 20px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.entry-tags a {
  background: var(--light-bg);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  text-decoration: none;
  transition: var(--transition);
}

.entry-tags a:hover {
  background: var(--accent);
  color: #fff;
}

.related-posts-section {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 2px solid var(--border-color);
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.related-post-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.related-post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* Section 12: Archive Page */
.archive-header {
  padding: 40px 0;
  text-align: center;
  background: var(--light-bg);
  margin-bottom: 30px;
}

.archive-title {
  font-size: 32px;
  color: var(--primary);
  margin: 0 0 10px;
}

.archive-description {
  font-size: 16px;
  color: #666;
  max-width: 800px;
  margin: 0 auto;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 25px;
  padding: 20px 15px;
  max-width: 1200px;
  margin: 0 auto;
}

.archive-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.archive-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.archive-card-thumb {
  display: block;
  height: 200px;
  overflow: hidden;
}

.archive-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.archive-card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.archive-card-category {
  display: inline-block;
  background: var(--secondary);
  color: #fff;
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 20px;
  text-decoration: none;
  margin-bottom: 10px;
  align-self: flex-start;
}

.archive-card-title {
  font-size: 1.1rem;
  margin: 0 0 10px;
  line-height: 1.5;
}

.archive-card-title a {
  color: var(--primary);
  text-decoration: none;
}

.archive-card-excerpt {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 15px;
  flex-grow: 1;
}

.archive-card-meta {
  font-size: 0.8rem;
  color: #999;
  margin-bottom: 10px;
}

.archive-card-readmore {
  color: var(--secondary);
  font-weight: 600;
  align-self: flex-start;
}

/* Section 13: 404 Page */
.error-404-page {
  text-align: center;
  padding: 80px 20px;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.error-code {
  font-size: 120px;
  font-weight: 800;
  color: var(--accent);
  text-shadow: 0 4px 10px rgba(0,0,0,0.1);
  animation: pulse 2s infinite;
  margin: 0;
  line-height: 1;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.error-message {
  font-size: 24px;
  color: var(--primary);
  margin: 20px 0;
}

.error-search {
  max-width: 400px;
  margin: 20px auto;
  width: 100%;
}

.error-btn {
  display: inline-block;
  padding: 10px 25px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  margin: 10px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.error-btn:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-2px);
}

/* Section 14: Footer */
.site-footer {
  background-color: var(--light-bg);
}

.contact-banner {
  width: 100%;
  padding: 45px 0;
  background: var(--primary);
  color: #fff;
  text-align: center;
}

.contact-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.contact-title {
  font-size: 28px;
  direction: rtl;
  margin-bottom: 25px;
  color: #fff;
}

.contact-items {
  display: flex;
  justify-content: center;
  gap: 40px;
  direction: rtl;
}

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  flex-direction: row-reverse;
  transition: var(--transition);
}

.contact-item:hover {
  color: var(--accent);
}

.contact-item i {
  color: var(--accent);
  transition: var(--transition);
}

.contact-item:hover i {
  color: #fff;
}

.contact-item a {
  color: #fff;
  text-decoration: none;
}

.contact-item span {
  direction: ltr;
  unicode-bidi: plaintext;
}

.footer-social {
  padding: 20px 0;
  background: rgba(13,17,40,0.9);
  text-align: center;
}

.footer-social a {
  color: #fff;
  font-size: 20px;
  margin: 0 10px;
  transition: var(--transition);
  display: inline-block;
}

.footer-social a:hover {
  color: var(--accent);
  transform: translateY(-3px);
}

.footer-bottom {
  background: #000;
  color: #fff;
  padding: 15px 0;
  text-align: center;
  font-size: 14px;
}

.copyright {
  margin: 0;
}

/* Section 15: Scroll Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Section 16: Skip Link */
.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 9999;
  background: #fff;
  color: var(--primary);
  padding: 10px 15px;
  font-weight: bold;
}

.skip-link:focus {
  left: 50%;
  top: 10px;
  transform: translateX(-50%);
  outline: 2px solid var(--accent);
}

/* Section 17: Page Breadcrumb & Other Pages */
.single-page-content {
  max-width: 900px;
  margin: 40px auto;
  padding: 30px;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.page-breadcrumb {
  margin-bottom: 20px;
  font-size: 14px;
  color: #666;
}

.page-breadcrumb a {
  color: var(--secondary);
  text-decoration: none;
}

.page-breadcrumb a:hover {
  color: var(--primary);
}

/* Section 18: Pagination */
.pagination, .post-navigation {
  padding: 30px 0;
  text-align: center;
  clear: both;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-links a, .nav-links span {
  padding: 10px 15px;
  border: 1px solid var(--border-color);
  background: #fff;
  color: var(--text-color);
  border-radius: 4px;
  text-decoration: none;
  transition: var(--transition);
}

.nav-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.nav-links .current {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Section 19: Responsive Media Queries */
@media (max-width: 1200px) {
  .fedniy-library-grid, .departments-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1099px) {
  .about-fedniy-inner {
    flex-direction: column;
    text-align: center;
  }
  .about-img, .about-text {
    max-width: 100%;
    flex: 0 0 100%;
  }
}

@media (max-width: 768px) {
  .topbar-inner {
    flex-direction: column;
    gap: 10px;
  }
  
  .hamburger {
    display: flex;
  }
  
  .main-navigation, .btn-login {
    display: none;
  }
  
  .hero-title {
    font-size: 32px;
  }
  
  .hero-description {
    font-size: 16px;
  }
  
  .departments-grid, .fedniy-library-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .blog-cards-grid, .archive-grid, .fedniy-articles-grid, .related-posts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 500px) {
  .departments-grid, .fedniy-library-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-items {
    flex-direction: column;
    gap: 20px;
  }
  
  .hero-title {
    font-size: 28px;
  }
  
  .error-code {
    font-size: 80px;
  }
  
  .site-brand img {
    height: 120px;
  }
}
