/*
  AfAc Publisher - Premium Design Redux
  Combining Glassmorphism, Micro-animations, and Modern Typography
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;1,600&display=swap');

:root {
  /* Core Colors */
  --color-brand: #0284c7;
  /* Vibrant Blue */
  --color-brand-hover: #0369a1;
  /* Darker Blue */
  --color-brand-light: #e0f2fe;
  /* Very Light Blue */
  --color-accent: #38bdf8;
  /* Bright Cyan */
  --color-accent-glow: rgba(56, 189, 248, 0.4);

  /* Neutrals */
  --color-bg: #f8fafc;
  --color-bg-secondary: #ffffff;
  --color-text-main: #334155;
  --color-text-muted: #64748b;
  --color-heading: #0f172a;

  /* Dark Mode Elements */
  --color-hero-bg: #0f172a;
  --color-hero-text: #f8fafc;

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-serif: 'Playfair Display', serif;

  /* Transitions & Shadows */
  --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 20px var(--color-accent-glow);
}

/* =========================================================================
   Base Resets & Typography
   ========================================================================= */

* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text-main);
  background-color: var(--color-bg);
  line-height: 1.7;
  overflow-x: hidden;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
  color: var(--color-heading);
  font-family: var(--font-sans);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

h1 {
  font-size: 3.5rem;
}

h2 {
  font-size: 2.75rem;
}

h3 {
  font-size: 2rem;
}

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

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

/* Base Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-weight: 600;
  padding: 0.875rem 1.75rem;
  border-radius: 9999px;
  /* Pill shape for modern look */
  transition: var(--transition-smooth);
  text-align: center;
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--color-brand) !important;
  color: #fff !important;
  box-shadow: var(--shadow-sm);
  border: none;
}

.btn-primary:hover {
  box-shadow: var(--shadow-lg);
  background: var(--color-brand-hover) !important;
}

.subheading {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-brand);
  margin-bottom: 1rem;
  display: block;
}

/* =========================================================================
   Navbar & Navigation (Desktop & Mobile)
   ========================================================================= */

.site-nav {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: transparent;
  padding: 1.5rem 0;
  transition: var(--transition-smooth);
}


.site-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100% !important;
}

/* Force override for child pages to stop nav from overlapping the hero */
.site-nav.position-absolute {
  background: transparent;
  margin-top: 0 !important;
}

/* Brighten grey text on cover images globally */
.text-light-opacity-50 {
  color: #f8fafc !important;
  opacity: 1 !important;
  font-weight: 500;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.site-navigation .logo {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  text-transform: none;
  letter-spacing: -0.02em;
}

.site-navigation .logo span {
  color: var(--color-accent);
}

/* Main Site Menu (Desktop) */
.site-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-menu>li {
  position: relative;
  display: inline-block;
}

.site-menu>li>a {
  font-size: 0.95rem;
  font-weight: 600;
  color: #f8fafc;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-menu>li>a:hover,
.site-menu>li.active>a {
  color: var(--color-brand);
}

.site-menu>li>a::after {
  content: '';
  position: absolute;
  bottom: 0px;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--color-brand);
  transition: var(--transition-smooth);
  border-radius: 2px;
}

.site-menu>li>a:hover::after,
.site-menu>li.active>a::after {
  width: 100%;
}

/* CTA Header Button */
.cta-button a {
  background: var(--color-brand-light);
  color: var(--color-brand) !important;
  font-weight: 600;
  padding: 0.5rem 1.25rem !important;
  border-radius: 9999px;
  transition: var(--transition-smooth);
}

.cta-button a:hover {
  background: var(--color-brand);
  color: #fff !important;
}

.cta-button a::after {
  display: none !important;
}

/* Dropdown styling */
.site-menu .has-children>a::before {
  content: '\e313';
  /* Some icon font representation if they use icofont */
  font-family: 'icomoon';
  font-size: 0.7rem;
  margin-left: 0.5rem;
  display: inline-block;
  transition: transform 0.3s;
}

.site-menu .has-children:hover>a::before {
  transform: rotate(-180deg);
}

.site-menu .dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  min-width: 320px;
  padding: 1rem 0;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(0, 0, 0, 0.05);
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: var(--transition-smooth);
  z-index: 1001;
  list-style: none;
}

.site-menu .has-children:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(10px);
}

.site-menu .dropdown li a {
  display: block;
  padding: 0.6rem 1.5rem;
  font-size: 0.9rem;
  color: var(--color-text-main);
  font-weight: 500;
}

.site-menu .dropdown li a:hover {
  background: var(--color-brand-light);
  color: var(--color-brand);
  padding-left: 1.8rem;
}

/* Burger Icon for Mobile */
.burger {
  display: none;
  position: relative;
  width: 30px;
  height: 20px;
  cursor: pointer;
  z-index: 2001;
}

.burger span,
.burger::before,
.burger::after {
  position: absolute;
  content: '';
  width: 100%;
  height: 2px;
  background: var(--color-heading);
  transition: 0.3s;
}

.burger::before {
  top: 0;
}

.burger span {
  top: 9px;
}

.burger::after {
  top: 18px;
}

.burger.active::before {
  transform: rotate(45deg);
  top: 9px;
}

.burger.active span {
  opacity: 0;
}

.burger.active::after {
  transform: rotate(-45deg);
  top: 9px;
}

@media (max-width: 991.98px) {
  .site-menu {
    display: none !important;
  }

  .burger {
    display: inline-block;
  }
}

/* The Mobile Menu Overlay */
.site-mobile-menu {
  width: 300px;
  position: fixed;
  right: 0;
  z-index: 2000;
  padding-top: 20px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  height: calc(100vh);
  transform: translateX(100%);
  box-shadow: -10px 0 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.4s cubic-bezier(0.8, 0, 0.2, 1);
  display: flex !important;
  flex-direction: column;
}

.offcanvas-menu .site-mobile-menu {
  transform: translateX(0);
}

body.offcanvas-menu {
  overflow: hidden;
}

/* Dark backdrop when mobile menu is open */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
  z-index: 1999;
}

body.offcanvas-menu::after {
  opacity: 1;
  visibility: visible;
}

.site-mobile-menu-header {
  padding: 0 20px;
  text-align: right;
}

.site-mobile-menu-close {
  display: inline-block;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--color-heading);
}

.site-mobile-menu-body {
  overflow-y: auto;
  padding: 20px;
  flex-grow: 1;
}

/* Style the cloned navigations inside mobile menu */
.site-mobile-menu-body .site-nav-wrap {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-mobile-menu-body .site-nav-wrap>li {
  display: block;
  margin-bottom: 1rem;
}

.site-mobile-menu-body .site-nav-wrap>li>a {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-heading);
  padding: 0.5rem 0;
}

.site-mobile-menu-body .site-nav-wrap .dropdown {
  list-style: none;
  padding-left: 1rem;
  margin-top: 0.5rem;
  border-left: 2px solid var(--color-brand-light);
  display: none;
  /* Handled by bootstrap collapse or navbar.js */
}

.site-mobile-menu-body .site-nav-wrap .dropdown.show {
  display: block;
}

.site-mobile-menu-body .site-nav-wrap .dropdown li a {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text-muted);
  padding: 0.4rem 0;
  display: block;
}

/* =========================================================================
   Hero Section
   ========================================================================= */

.hero {
  position: relative;
  background: radial-gradient(circle at 80% 20%, #1e293b, #0f172a);
  padding: 8rem 0 6rem;
  min-height: 85vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--color-hero-text);
  z-index: 0;
}

.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  /* Overlay to make text legible */
  z-index: 1;
}

/* Glowing aesthetic orb in hero */
.hero::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: var(--color-brand);
  filter: blur(150px);
  opacity: 0.15;
  border-radius: 50%;
  top: -100px;
  right: -100px;
  z-index: 0;
  animation: floatOrb 10s infinite ease-in-out alternate;
}

@keyframes floatOrb {
  0% {
    transform: translate(0, 0);
  }

  100% {
    transform: translate(50px, 50px);
  }
}

.hero>.container {
  position: relative;
  z-index: 10;
}

.hero .masthead h1 {
  color: #fff;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.hero .masthead h1 span {
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero .masthead p {
  color: #e2e8f0;
  font-size: 1.15rem;
  margin-bottom: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.hero .masthead a.btn {
  margin-right: 25px;
}

.video-img-wrap {
  position: relative;
  border-radius: 20px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transform: perspective(1000px) rotateY(-5deg);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-img-wrap:hover {
  transform: perspective(1000px) rotateY(0deg) translateY(-10px);
}

.video-img-wrap img {
  border-radius: 12px;
  width: 100%;
  height: auto;
  display: block;
}

/* =========================================================================
   Sections & Layout
   ========================================================================= */

.section {
  padding: 6rem 0;
  background: var(--color-bg);
  position: relative;
}

.section-md {
  padding: 4rem 0;
}

.social-inline {
  width: fit-content;
  background: #495057;
  padding: 1rem 2rem;
  border-radius: 50px;
  box-shadow: var(--shadow-sm);
  margin-top: -2rem;
  position: relative;
  z-index: 20;
}

.social-inline ul {
  margin: 0;
  padding: 0;
  display: flex;
  gap: 2rem;
}

.social-inline a {
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
}

.social-inline a:hover {
  color: var(--color-brand);
}

.social-inline span[class^="icon-"] {
  font-size: 1.25rem;
  color: var(--color-brand);
  padding-right: 5px;
}

/* =========================================================================
   Timeline / Milestones Rewrite (Modern Vertical Flow)
   ========================================================================= */

.timeline-v2 {
  position: relative;
  /*max-width: 1100px;*/
  margin: 0 auto;
  padding: 2rem 0;
  font-family: var(--font-serif);
}

.timeline-v2::after {
  content: '';
  position: absolute;
  width: 4px;
  background-color: var(--color-brand-light);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -2px;
  border-radius: 4px;
}

.timeline-v2-item {
  padding: 20px 40px;
  position: relative;
  background-color: inherit;
  width: 50%;
}

.timeline-v2-item::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  right: -12px;
  background-color: var(--color-brand);
  border: 4px solid var(--color-bg);
  top: 30px;
  border-radius: 50%;
  z-index: 1;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.timeline-v2-item:hover::after {
  transform: scale(1.3);
  box-shadow: 0 0 0 4px var(--color-brand-light);
}

.timeline-v2-item.left {
  left: 0;
}

.timeline-v2-item.right {
  left: 50%;
}

.timeline-v2-item.right::after {
  left: -12px;
}

.timeline-v2-content {
  padding: 30px;
  background-color: var(--color-bg-secondary);
  position: relative;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0, 0, 0, 0.03);
  transition: var(--transition-smooth);
}

.timeline-v2-item:hover .timeline-v2-content {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(2, 132, 199, 0.2);
}

.timeline-v2-date {
  display: inline-block;
  font-weight: 900;
  color: var(--color-brand);
  background: var(--color-brand-light);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  font-variant: small-caps;
  margin-bottom: 1rem;
}

.timeline-v2-content h3 {
  font-size: 1.3rem;
  color: var(--color-heading);
  margin-bottom: 0.75rem;
  font-weight: 800;
}

.timeline-v2-content p {
  color: #000;
  margin: 0;
  font-size: 1rem;
}

/* Mobile responsive timeline */
@media screen and (max-width: 768px) {
  .timeline-v2::after {
    left: 31px;
  }

  .timeline-v2-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }

  .timeline-v2-item::after {
    left: 19px;
  }

  .timeline-v2-item.right {
    left: 0%;
  }
}

/* =========================================================================
   Add Journal (CTA Section)
   ========================================================================= */

.journal-cover {
  width: 300px;
  object-fit: contain;
  margin-bottom: 20px;
}

.bg-img-2.overlay {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  padding: 6rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-xl);
}

.bg-img-2.overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(2, 132, 199, 0.85));
  z-index: 1;
}

.bg-img-2.overlay .intro {
  position: relative;
  z-index: 2;
  max-width: 600px;
  margin: 0 auto;
}

.bg-img-2.overlay h2 {
  color: #fff;
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

/* =========================================================================
   Footer
   ========================================================================= */

.site-footer {
  background: var(--color-heading);
  color: #94a3b8;
  padding: 2rem 0;
  font-size: 0.95rem;
}

.site-footer .widget h3 {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.site-footer p {
  line-height: 1.8;
}

.site-footer a {
  color: #94a3b8;
}

.site-footer a:hover {
  color: var(--color-brand-light);
  padding-left: 0.25rem;
}

.site-footer .social {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.site-footer .social li a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: #fff;
  transition: var(--transition-smooth);
}

.site-footer .social li a:hover {
  background: var(--color-brand);
  transform: translateY(-3px);
  padding-left: 0;
}

.site-footer .links li {
  margin-bottom: 0.75rem;
}

.site-footer .mt-5 {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  font-size: 0.85rem;
}

/* Preloader */
.loader {
  display: none;
}

.clearfix::after {
  content: "";
  clear: both;
  display: table;
}

/* Custom Header Logo Styling */
.header-logo-img {
  width: 100px;
  margin-right: 15px;
}

.header-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.header-logo-text .afac-text {
  font-variant: small-caps;
}

.header-logo-text .publisher-text {
  color: #fff !important;
}

/* Custom Footer About Widget */
.footer-about-widget {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.footer-about-widget .footer-logo {
  width: 90px;
  flex-shrink: 0;
}

.footer-about-widget .footer-about-text h3 {
  margin-top: 0;
  margin-bottom: 15px;
}

/* =========================================================================
   Secondary Pages & Standard Styling
   ========================================================================= */

.hero.inner {
  padding: 10rem 0 6rem;
  min-height: 50vh;
  background-size: cover;
  background-position: center;
}

.site-section {
  padding: 5rem 0;
}

/* Contact Info Layout */
.contact-info .open-hours,
.contact-info .email {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.contact-info i[class^="icon-"] {
  font-size: 1.5rem;
  color: var(--color-brand);
  margin-top: 5px;
}

.contact-info h4 {
  margin: 0 0 5px 0;
  font-size: 1.1rem;
}

/* =========================================================================
   Premium Cards (Articles & Journals)
   ========================================================================= */

.isotope-card {
  margin-bottom: 30px;
}

.media-entry {
  background: var(--color-bg-secondary);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.media-entry:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
  border-color: rgba(2, 132, 199, 0.2);
}

.media-entry .thumb {
  position: relative;
  display: block;
  overflow: hidden;
  padding: 20px;
  background: var(--color-bg);
}

.media-entry .thumb img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  transition: var(--transition-smooth);
}

.media-entry:hover .thumb img {
  transform: scale(1.05);
}

.media-entry .topleft {
  position: absolute;
  height: auto;
  top: 15px;
  left: 15px;
  background: var(--color-brand);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin: 0;
  box-shadow: var(--shadow-sm);
  z-index: 2;
}

/* No Cover Placeholder */
.no-cover-placeholder {
  width: 160px;
  /* Standard portrait width */
  height: 220px;
  margin: 0 auto;
  /* Center it */
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  color: #94a3b8;
  font-weight: 700;
  letter-spacing: 0.1em;
  font-size: 0.7rem;
  border-radius: 4px;
}

.media-entry:hover .no-cover-placeholder {
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
  color: var(--color-brand);
}

.media-entry .m-body {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.media-entry .date {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-brand);
  margin-bottom: 12px;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.media-entry h3 {
  font-size: 1.1rem;
  margin-bottom: 15px;
  line-height: 1.5;
  font-weight: 700;
  /* Fixed height for 3 lines of title */
  height: 4.5rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
}

.no-height {
  height: auto !important;
}

.media-entry h3 a {
  color: var(--color-heading);
  transition: var(--transition-smooth);
}

.media-entry h3 a:hover {
  color: var(--color-brand);
}

.media-entry p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 0;
  margin-top: auto;
  /* Fixed height for 2 lines of authors */
  height: 2.7rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.5;
}

/* Filter Nav */
.filters ul {
  padding: 0;
  margin: 40px 0 30px 0;
  list-style: none;
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.filters ul li {
  cursor: pointer;
  padding: 8px 20px;
  background: #fff;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.filters ul li:hover,
.filters ul li.active {
  background: var(--color-brand);
  color: #fff;
}

/* Timeline fix */
.timeline-item.start .timeline-marker,
.timeline-item.period .timeline-marker {
  display: none !important;
}

.timeline-item.start .timeline-content,
.timeline-item.period .timeline-content {
  background: transparent;
  box-shadow: none;
  border: none;
}