/* === GOOGLE FONTS === */
/* Font loaded via <link> in header.php for better performance */

/* === CUSTOM SCROLLBAR === */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #003D7A;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #002a55;
}

/* === SMOOTH SCROLL === */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

/* === BASE STYLES === */
body {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1F2937;
  overflow-x: hidden;
  max-width: 100vw;
}

/* === ACCESSIBILITY - Font sizing === */
body.font-normal {
  font-size: 16px;
}

body.font-large {
  font-size: 18px;
}

body.font-xlarge {
  font-size: 20px;
}

/* === ACCESSIBILITY - Contrast modes === */
body.contrast-normal {
  /* Default colors */
}

body.contrast-high {
  background: #000;
  color: #fff;
}

body.contrast-high a {
  color: #ffff00;
}

body.contrast-yellow-blue {
  background: #00008B;
  color: #FFFF00;
}

body.contrast-black-green {
  background: #000;
  color: #00FF00;
}

/* === CROATIAN CHECKERBOARD PATTERN - RED === */
.checkerboard-bg {
  position: relative;
  background-image:
    linear-gradient(45deg, rgba(220, 20, 60, 0.10) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(220, 20, 60, 0.10) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(220, 20, 60, 0.10) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(220, 20, 60, 0.10) 75%);
  background-size: 100px 100px;
  background-position: 0 0, 0 50px, 50px -50px, -50px 0px;
}

/* === HEADING STYLES === */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
}

/* === BUTTONS === */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s;
  cursor: pointer;
}

.btn-primary {
  background-color: #295ba5;
  color: white;
}

.btn-primary:hover {
  background-color: rgba(41, 91, 165, 0.9);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.btn-secondary {
  background-color: #FF0000;
  color: white;
}

.btn-secondary:hover {
  background-color: rgba(255, 0, 0, 0.9);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* === CARDS === */
.card {
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s;
}

.card:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* === HEADER SCROLL EFFECTS === */

/* Default header (transparent on hero) */
#main-header {
  background-color: transparent;
  transition: all 0.3s ease;
}

/* Scrolled header (white background) */
#main-header.scrolled {
  background-color: white;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-bottom: 2px solid #F3F4F6;
}

/* Navigation links - default (on transparent bg) */
#main-header .nav-link {
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  position: relative;
}

#main-header .nav-link:hover {
  color: rgba(255, 255, 255, 0.8);
}

#main-header .nav-link.active {
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Navigation links - scrolled (on white bg) */
#main-header.scrolled .nav-link {
  color: #1F2937;
  text-shadow: none;
}

#main-header.scrolled .nav-link:hover {
  color: #295ba5;
}

#main-header.scrolled .nav-link.active {
  color: #295ba5;
}

/* Active indicator line */
#main-header .nav-indicator {
  background-color: white;
  position: absolute;
  bottom: -0.25rem;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 9999px;
}

#main-header.scrolled .nav-indicator {
  background-color: #295ba5;
}

/* Hover line animation */
.nav-hover-line {
  position: absolute;
  bottom: -0.25rem;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 9999px;
  background-color: white;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

#main-header.scrolled .nav-hover-line {
  background-color: #295ba5;
}

#main-header .nav-link:hover .nav-hover-line {
  transform: scaleX(1);
}

/* Social Icons */
#main-header .social-icon {
  color: white;
  transition: color 0.3s ease;
}

#main-header .social-icon:hover {
  color: rgba(255, 255, 255, 0.8);
}

#main-header.scrolled .social-icon {
  color: #6B7280;
}

#main-header.scrolled .social-icon:hover {
  color: #295ba5;
}

/* Language Button */
#main-header .lang-btn {
  border-color: rgba(255, 255, 255, 0.5);
  color: white;
  transition: all 0.3s ease;
}

#main-header .lang-btn:hover {
  border-color: white;
}

#main-header.scrolled .lang-btn {
  border-color: #D1D5DB;
  color: #374151;
}

#main-header.scrolled .lang-btn:hover {
  border-color: #295ba5;
}

/* Mobile Menu Icon */
#main-header .mobile-menu-icon {
  color: white;
  position: relative;
  z-index: 70;
}

#main-header .mobile-menu-icon:hover {
  color: rgba(255, 255, 255, 0.8);
}

#main-header.scrolled .mobile-menu-icon {
  color: #374151;
}

#main-header.scrolled .mobile-menu-icon:hover {
  color: #295ba5;
}

/* === MOBILE MENU === */

.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  max-width: 80%;
  height: 100vh;
  background-color: white;
  transition: right 0.3s ease;
  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.2);
  z-index: 60;
  overflow-y: auto;
}

.mobile-menu.open {
  right: 0;
}

.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 40;
  display: none;
  pointer-events: none;
}

.mobile-overlay.show {
  display: block;
  pointer-events: auto;
}

/* === ANIMATIONS === */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-in;
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-out;
}

.js-enabled .animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
}

.animate-on-scroll {
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.js-enabled .animate-on-scroll:not(.visible) {
  animation: fallback-show 0.5s ease-out 3s forwards;
}

/* Bounce animation for scroll indicator */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0) translateX(-50%);
    opacity: 1;
  }
  50% {
    transform: translateY(-20px) translateX(-50%);
    opacity: 0.8;
  }
}

.scroll-indicator {
  animation: bounce 2s ease-in-out infinite;
  left: 50% !important;
  transform: translateX(-50%) !important;
}

/* === HERO SECTION === */

.hero-section {
  position: relative;
  min-height: 100vh;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-img {
  object-position: 50% 50%;
  object-fit: cover;
}

/* Hero carousel */
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.hero-slide.active {
  opacity: 1;
}

/* Carousel indicators */
.carousel-indicator {
  width: 12px;
  height: 12px;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  padding: 0;
  position: relative;
  z-index: 20;
  pointer-events: auto;
}

.carousel-indicator:hover {
  background-color: rgba(255, 255, 255, 0.75);
}

.carousel-indicator.active {
  width: 32px;
  background-color: white;
}

/* === PARTICLE CANVAS === */

#particle-canvas {
  position: absolute;
  inset: 0;
  z-index: 5;
  mix-blend-mode: screen;
  pointer-events: auto;
  touch-action: pan-y pinch-zoom;
}

/* === SCROLL TO TOP === */

#scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  background-color: #295ba5;
  color: white;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  z-index: 40;
  border: none;
}

#scroll-to-top.show {
  opacity: 1;
  visibility: visible;
}

#scroll-to-top:hover {
  background-color: #1e4278;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* === RESPONSIVE === */

@media (max-width: 1024px) {
  .mobile-menu {
    width: 80%;
    max-width: 320px;
  }
}

@media (max-width: 768px) {
  .hero-img {
    object-position: 50% 60%;
  }

  /* Prevent horizontal overflow on mobile */
  section,
  .container,
  article,
  div {
    max-width: 100vw;
  }

  /* Fix video overflow */
  video {
    max-width: 100%;
  }

  /* Fix timeline overflow */
  .timeline {
    padding-left: 10px;
    padding-right: 10px;
  }

  /* Fix any fixed-width elements */
  img {
    max-width: 100%;
    height: auto;
  }
}

/* === FULL-PAGE SECTIONS === */

.fp-section {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* === LINE CLAMP UTILITIES === */

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* === DARK MODE === */

html.dark body {
  background-color: #111827;
  color: #F9FAFB;
}

html.dark .bg-white {
  background-color: #1F2937 !important;
}

html.dark .bg-bg-light {
  background-color: #111827 !important;
}

html.dark .card {
  background-color: #1F2937;
  border-color: #374151;
}

html.dark .text-gray-900,
html.dark .text-gray-800,
html.dark .text-gray-700 {
  color: #F9FAFB !important;
}

html.dark .text-gray-600,
html.dark .text-gray-500 {
  color: #9CA3AF !important;
}

html.dark .border-gray-200,
html.dark .border-gray-300 {
  border-color: #374151 !important;
}

html.dark #main-header.scrolled {
  background-color: #1F2937;
  border-bottom-color: #374151;
}

html.dark #main-header.scrolled .nav-link {
  color: #F9FAFB;
}

html.dark #main-header.scrolled .nav-link:hover,
html.dark #main-header.scrolled .nav-link.active {
  color: #60A5FA;
}

html.dark #main-header.scrolled .social-icon {
  color: #9CA3AF;
}

html.dark #main-header.scrolled .social-icon:hover {
  color: #60A5FA;
}

html.dark #main-header.scrolled .lang-btn {
  border-color: #4B5563;
  color: #F9FAFB;
}

html.dark #main-header.scrolled .mobile-menu-icon {
  color: #F9FAFB;
}

html.dark .mobile-menu {
  background-color: #1F2937;
}

html.dark .mobile-menu a {
  color: #F9FAFB;
}

html.dark input,
html.dark textarea,
html.dark select {
  background-color: #374151;
  border-color: #4B5563;
  color: #F9FAFB;
}

html.dark input::placeholder,
html.dark textarea::placeholder {
  color: #9CA3AF;
}

html.dark footer {
  background-color: #111827;
}

/* === SKELETON LOADING === */

.skeleton {
  background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 0.25rem;
}

html.dark .skeleton {
  background: linear-gradient(90deg, #374151 25%, #4B5563 50%, #374151 75%);
  background-size: 200% 100%;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-text {
  height: 1rem;
  margin-bottom: 0.5rem;
}

.skeleton-title {
  height: 1.5rem;
  width: 70%;
  margin-bottom: 1rem;
}

.skeleton-image {
  height: 12rem;
  width: 100%;
  margin-bottom: 1rem;
}

/* === BREADCRUMBS === */

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  padding: 0.75rem 0;
  font-size: 0.875rem;
}

.breadcrumb-item {
  color: #6B7280;
  transition: color 0.2s;
}

.breadcrumb-item:hover {
  color: #295ba5;
}

.breadcrumb-item.active {
  color: #295ba5;
  font-weight: 600;
}

.breadcrumb-separator {
  margin: 0 0.5rem;
  color: #9CA3AF;
}

html.dark .breadcrumb-item {
  color: #9CA3AF;
}

html.dark .breadcrumb-item:hover {
  color: #60A5FA;
}

html.dark .breadcrumb-item.active {
  color: #60A5FA;
}

/* === NEWSLETTER FORM === */

.newsletter-form {
  display: flex;
  gap: 0.5rem;
  max-width: 400px;
}

.newsletter-form input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid #E5E7EB;
  border-radius: 0.5rem;
  transition: border-color 0.2s;
}

.newsletter-form input:focus {
  outline: none;
  border-color: #295ba5;
}

.newsletter-form button {
  padding: 0.75rem 1.5rem;
  background-color: #295ba5;
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  white-space: nowrap;
}

.newsletter-form button:hover {
  background-color: #1e4278;
}

/* === GLOBAL SEARCH === */

#global-search-modal {
  backdrop-filter: blur(4px);
}

.search-result-item {
  padding: 1rem;
  border-bottom: 1px solid #E5E7EB;
  transition: background-color 0.2s;
}

.search-result-item:hover {
  background-color: #F3F4F6;
}

html.dark .search-result-item {
  border-bottom-color: #374151;
}

html.dark .search-result-item:hover {
  background-color: #374151;
}

/* === PARALLAX EFFECT === */

.parallax-hero {
  transform-style: preserve-3d;
}

.parallax-bg {
  will-change: transform;
  transition: transform 0.1s ease-out;
}

/* === SCROLL ANIMATIONS - LEFT/RIGHT ENTRY === */

/* Only hide elements if JS is available (class added by JS) */
.js-enabled .animate-slide-left {
  opacity: 0;
  transform: translateX(-80px);
}

.js-enabled .animate-slide-right {
  opacity: 0;
  transform: translateX(80px);
}

.js-enabled .animate-slide-up {
  opacity: 0;
  transform: translateY(60px);
}

.js-enabled .animate-scale-in {
  opacity: 0;
  transform: scale(0.8);
}

.animate-slide-left,
.animate-slide-right,
.animate-slide-up,
.animate-scale-in {
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-slide-left.visible,
.animate-slide-right.visible,
.animate-slide-up.visible,
.animate-scale-in.visible {
  opacity: 1;
  transform: translateX(0) translateY(0) scale(1);
}

/* Fallback: show elements after 3s if JS fails */
@keyframes fallback-show {
  to {
    opacity: 1;
    transform: none;
  }
}

.js-enabled .animate-slide-left:not(.visible),
.js-enabled .animate-slide-right:not(.visible),
.js-enabled .animate-slide-up:not(.visible),
.js-enabled .animate-scale-in:not(.visible) {
  animation: fallback-show 0.5s ease-out 3s forwards;
}

/* Staggered animation delays */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* === 3D TILT HOVER EFFECT === */

.tilt-card {
  transform-style: preserve-3d;
  transform: perspective(1000px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
}

.tilt-card:hover {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.tilt-card .tilt-inner {
  transform: translateZ(30px);
  transition: transform 0.3s ease;
}

/* Glow effect on hover */
.tilt-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(41, 91, 165, 0.15),
    transparent 40%
  );
  pointer-events: none;
  z-index: 1;
}

.tilt-card:hover::before {
  opacity: 1;
}

/* Shine effect */
.tilt-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.1) 45%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.1) 55%,
    transparent 60%
  );
  pointer-events: none;
  z-index: 2;
}

.tilt-card:hover::after {
  opacity: 1;
}

/* === RIPPLE EFFECT === */

.ripple-btn {
  position: relative;
  overflow: hidden;
}

.ripple-btn .ripple {
  position: absolute;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.4);
  transform: scale(0);
  animation: ripple-animation 0.6s linear;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* === FLOATING ANIMATION === */

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.float-animation {
  animation: float 3s ease-in-out infinite;
}

/* === PULSE GLOW === */

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(41, 91, 165, 0.2),
                0 0 10px rgba(41, 91, 165, 0.2),
                0 0 15px rgba(41, 91, 165, 0.1);
  }
  50% {
    box-shadow: 0 0 10px rgba(41, 91, 165, 0.4),
                0 0 20px rgba(41, 91, 165, 0.3),
                0 0 30px rgba(41, 91, 165, 0.2);
  }
}

.pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* === TEXT GRADIENT ANIMATION === */

.gradient-text {
  background: linear-gradient(135deg, #295ba5 0%, #FF0000 50%, #295ba5 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* === HOVER LIFT EFFECT === */

.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* === MAGNETIC BUTTON === */

.magnetic-btn {
  transition: transform 0.2s ease-out;
}

/* === BLUR REVEAL === */

.blur-reveal {
  filter: blur(10px);
  opacity: 0;
  transition: filter 0.8s ease-out, opacity 0.8s ease-out;
}

.blur-reveal.visible {
  filter: blur(0);
  opacity: 1;
}

/* === GLASSMORPHISM EFFECT === */

.glass {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.glass-dark {
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

html.dark .glass-card {
  background: rgba(31, 41, 55, 0.7);
  border-color: rgba(255, 255, 255, 0.1);
}

.glass-nav {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

html.dark .glass-nav {
  background: rgba(31, 41, 55, 0.85);
}

/* === FLOATING SHAPES === */

.floating-shapes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.floating-shape {
  position: absolute;
  opacity: 0.1;
  animation: float-around 20s ease-in-out infinite;
}

/* EU Star shape - 5-pointed star like on EU flag */
.floating-shape.star {
  background: linear-gradient(135deg, #FFD700, #FFC107);
  clip-path: polygon(
    50% 0%,
    61% 35%,
    98% 35%,
    68% 57%,
    79% 91%,
    50% 70%,
    21% 91%,
    32% 57%,
    2% 35%,
    39% 35%
  );
  animation: star-float 20s ease-in-out infinite;
}

.floating-shape.star-blue {
  background: linear-gradient(135deg, #295ba5, #60A5FA);
  clip-path: polygon(
    50% 0%,
    61% 35%,
    98% 35%,
    68% 57%,
    79% 91%,
    50% 70%,
    21% 91%,
    32% 57%,
    2% 35%,
    39% 35%
  );
  animation: star-float 25s ease-in-out infinite;
}

.floating-shape.star-white {
  background: rgba(255, 255, 255, 0.8);
  clip-path: polygon(
    50% 0%,
    61% 35%,
    98% 35%,
    68% 57%,
    79% 91%,
    50% 70%,
    21% 91%,
    32% 57%,
    2% 35%,
    39% 35%
  );
  animation: star-float 18s ease-in-out infinite;
}

/* Star float animation with rotation and movement */
@keyframes star-float {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 0.15;
  }
  25% {
    transform: translate(40px, -25px) rotate(90deg) scale(1.1);
    opacity: 0.25;
  }
  50% {
    transform: translate(15px, 40px) rotate(180deg) scale(1);
    opacity: 0.15;
  }
  75% {
    transform: translate(-25px, 15px) rotate(270deg) scale(1.15);
    opacity: 0.22;
  }
  100% {
    transform: translate(0, 0) rotate(360deg) scale(1);
    opacity: 0.15;
  }
}

/* Staggered delays for stars */
.floating-shape.star:nth-child(1) { animation-delay: 0s; animation-duration: 22s; }
.floating-shape.star:nth-child(2) { animation-delay: -4s; animation-duration: 18s; }
.floating-shape.star:nth-child(3) { animation-delay: -8s; animation-duration: 26s; }
.floating-shape.star:nth-child(4) { animation-delay: -12s; animation-duration: 20s; }
.floating-shape.star:nth-child(5) { animation-delay: -6s; animation-duration: 24s; }
.floating-shape.star:nth-child(6) { animation-delay: -10s; animation-duration: 21s; }

.floating-shape.star-white:nth-child(1) { animation-delay: -2s; }
.floating-shape.star-white:nth-child(2) { animation-delay: -5s; }
.floating-shape.star-white:nth-child(3) { animation-delay: -9s; }
.floating-shape.star-white:nth-child(4) { animation-delay: -3s; }
.floating-shape.star-white:nth-child(5) { animation-delay: -7s; }
.floating-shape.star-white:nth-child(6) { animation-delay: -11s; }

.floating-shape.star-blue:nth-child(1) { animation-delay: -1s; animation-duration: 28s; }
.floating-shape.star-blue:nth-child(2) { animation-delay: -6s; animation-duration: 23s; }
.floating-shape.star-blue:nth-child(3) { animation-delay: -11s; animation-duration: 30s; }
.floating-shape.star-blue:nth-child(4) { animation-delay: -4s; animation-duration: 25s; }

/* Different sizes */
.floating-shape.small { width: 40px; height: 40px; }
.floating-shape.medium { width: 80px; height: 80px; }
.floating-shape.large { width: 120px; height: 120px; }
.floating-shape.xlarge { width: 180px; height: 180px; }

/* Different animation delays and speeds */
.floating-shape:nth-child(1) { animation-delay: 0s; animation-duration: 25s; }
.floating-shape:nth-child(2) { animation-delay: -5s; animation-duration: 20s; }
.floating-shape:nth-child(3) { animation-delay: -10s; animation-duration: 30s; }
.floating-shape:nth-child(4) { animation-delay: -15s; animation-duration: 22s; }
.floating-shape:nth-child(5) { animation-delay: -7s; animation-duration: 28s; }
.floating-shape:nth-child(6) { animation-delay: -12s; animation-duration: 24s; }

@keyframes float-around {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(50px, -30px) rotate(90deg);
  }
  50% {
    transform: translate(20px, 50px) rotate(180deg);
  }
  75% {
    transform: translate(-30px, 20px) rotate(270deg);
  }
}

/* Specific positions for shapes */
.floating-shape.pos-1 { top: 10%; left: 5%; }
.floating-shape.pos-2 { top: 20%; right: 10%; }
.floating-shape.pos-3 { top: 60%; left: 15%; }
.floating-shape.pos-4 { top: 70%; right: 5%; }
.floating-shape.pos-5 { top: 40%; left: 80%; }
.floating-shape.pos-6 { top: 85%; left: 40%; }

/* === MASONRY GALLERY === */

.masonry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  grid-auto-rows: 10px;
  gap: 16px;
}

.masonry-item {
  overflow: hidden;
  border-radius: 0.5rem;
  cursor: pointer;
  position: relative;
}

.masonry-item.span-1 { grid-row: span 20; }
.masonry-item.span-2 { grid-row: span 25; }
.masonry-item.span-3 { grid-row: span 30; }
.masonry-item.span-4 { grid-row: span 35; }

.masonry-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.masonry-item:hover img {
  transform: scale(1.1);
}

.masonry-item .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}

.masonry-item:hover .overlay {
  opacity: 1;
}

@media (max-width: 768px) {
  .masonry-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 8px;
  }

  .masonry-item.span-1 { grid-row: span 15; }
  .masonry-item.span-2 { grid-row: span 18; }
  .masonry-item.span-3 { grid-row: span 22; }
  .masonry-item.span-4 { grid-row: span 26; }
}

/* === TYPING EFFECT === */

.typing-text {
  display: inline-block;
  white-space: nowrap;
  vertical-align: bottom;
}

.typing-container {
  min-height: 1.5em;
  display: inline-flex;
  align-items: center;
}

/* Single blinking cursor after typing text */
.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1.1em;
  background-color: white;
  margin-left: 2px;
  vertical-align: bottom;
  animation: typing-cursor-blink 0.7s step-end infinite;
}

@keyframes typing-cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* === MORPHING BLOB === */

.morphing-blob {
  position: absolute;
  filter: blur(60px);
  opacity: 0.3;
  animation: morph 15s ease-in-out infinite;
}

@keyframes morph {
  0%, 100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
  25% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
  }
  50% {
    border-radius: 50% 60% 30% 60% / 30% 40% 70% 60%;
  }
  75% {
    border-radius: 60% 30% 60% 40% / 70% 50% 40% 60%;
  }
}

.blob-blue {
  background: linear-gradient(135deg, #295ba5, #60A5FA);
  width: 400px;
  height: 400px;
}

.blob-red {
  background: linear-gradient(135deg, #FF0000, #FF6B6B);
  width: 300px;
  height: 300px;
  animation-delay: -5s;
}

/* === GLOW TEXT === */

.glow-text {
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5),
               0 0 20px rgba(255, 255, 255, 0.3),
               0 0 30px rgba(255, 255, 255, 0.2);
}

/* === SHIMMER EFFECT === */

.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  animation: shimmer-slide 2s infinite;
}

@keyframes shimmer-slide {
  100% {
    left: 100%;
  }
}

/* ================================================================
   ADVANCED VISUAL EFFECTS - Inspired by EU MEP Websites
   ================================================================ */

/* === SCROLL REVEAL ANIMATIONS === */

.reveal {
  opacity: 0;
  transform: translateY(60px);
  transition: all 0.8s cubic-bezier(0.17, 0.55, 0.55, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-100px);
  transition: all 0.8s cubic-bezier(0.17, 0.55, 0.55, 1);
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(100px);
  transition: all 0.8s cubic-bezier(0.17, 0.55, 0.55, 1);
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.8s cubic-bezier(0.17, 0.55, 0.55, 1);
}

.reveal-scale.active {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* === PHILOSOPHY SECTION - Like Weber === */

.philosophy-section {
  background: linear-gradient(135deg, #1a365d 0%, #2d3748 50%, #1a202c 100%);
  position: relative;
  overflow: hidden;
}

.philosophy-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,215,0,0.1) 0%, transparent 50%);
  animation: philosophy-glow 15s ease-in-out infinite;
}

@keyframes philosophy-glow {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(25%, 25%); }
}

.philosophy-quote {
  position: relative;
  font-size: 2rem;
  font-weight: 300;
  line-height: 1.6;
  color: white;
}

.philosophy-quote::before {
  content: '"';
  font-size: 8rem;
  position: absolute;
  top: -2rem;
  left: -2rem;
  opacity: 0.15;
  font-family: Georgia, serif;
  color: #FFD700;
}

/* === TIMELINE STYLES === */

.timeline {
  position: relative;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, #295ba5, #FFD700);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 1.5rem 2.5rem;
}

.timeline-item:nth-child(odd) {
  left: 0;
  text-align: right;
  padding-right: 3rem;
}

.timeline-item:nth-child(even) {
  left: 50%;
  text-align: left;
  padding-left: 3rem;
}

.timeline-dot {
  position: absolute;
  width: 20px;
  height: 20px;
  background: #FFD700;
  border: 4px solid #295ba5;
  border-radius: 50%;
  top: 2rem;
  z-index: 1;
}

.timeline-item:nth-child(odd) .timeline-dot {
  right: -10px;
}

.timeline-item:nth-child(even) .timeline-dot {
  left: -10px;
}

.timeline-content {
  background: white;
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.timeline-year {
  display: inline-block;
  background: linear-gradient(135deg, #295ba5, #3b82f6);
  color: white;
  padding: 0.25rem 1rem;
  border-radius: 2rem;
  font-weight: 700;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

/* Mobile Timeline */
@media (max-width: 768px) {
  .timeline::before {
    left: 20px;
  }

  .timeline-item {
    width: 100%;
    left: 0 !important;
    text-align: left !important;
    padding-left: 3.5rem !important;
    padding-right: 1rem !important;
  }

  .timeline-item .timeline-dot {
    left: 10px !important;
    right: auto !important;
  }
}

/* === INSTAGRAM FEED GRID === */

.instagram-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.instagram-grid a {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 0.5rem;
}

.instagram-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.instagram-grid a:hover img {
  transform: scale(1.1);
}

.instagram-grid a::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.instagram-grid a:hover::after {
  opacity: 1;
}

@media (max-width: 768px) {
  .instagram-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* === PARALLAX SECTIONS === */

.parallax-section {
  position: relative;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

@supports (-webkit-touch-callout: none) {
  .parallax-section {
    background-attachment: scroll;
  }
}

/* === GRADIENT TEXT === */

.gradient-text {
  background: linear-gradient(135deg, #295ba5, #FFD700);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* === HOVER CARD 3D EFFECT === */

.card-3d {
  perspective: 1000px;
}

.card-3d-inner {
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.card-3d:hover .card-3d-inner {
  transform: rotateY(10deg) rotateX(5deg);
}

/* === FLOATING BADGE === */

.floating-badge {
  animation: float-badge 3s ease-in-out infinite;
}

@keyframes float-badge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* === SPLIT TEXT ANIMATION === */

.split-text span {
  display: inline-block;
  opacity: 0;
  transform: translateY(50px) rotateX(-90deg);
  animation: split-reveal 0.6s forwards;
}

@keyframes split-reveal {
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0);
  }
}

/* === SECTION DIVIDERS === */

.wave-divider {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.wave-divider svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 80px;
}

.wave-divider .shape-fill {
  fill: #FFFFFF;
}

/* === GLOWING BORDER EFFECT === */

.glow-border {
  position: relative;
}

.glow-border::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(45deg, #295ba5, #FFD700, #295ba5, #FFD700);
  background-size: 400%;
  border-radius: inherit;
  z-index: -1;
  animation: glow-rotate 3s linear infinite;
  filter: blur(5px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.glow-border:hover::before {
  opacity: 1;
}

@keyframes glow-rotate {
  100% { background-position: 400% 0; }
}

/* === TYPEWRITER CURSOR - handled by .typing-cursor class now === */

/* === VIDEO BACKGROUND === */

.video-bg-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.video-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
}

/* === SCROLL PROGRESS INDICATOR (improved) === */

#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, #295ba5, #FFD700, #FF0000);
  background-size: 200% 100%;
  animation: progress-gradient 2s linear infinite;
  z-index: 9999;
  transition: width 0.1s ease;
}

@keyframes progress-gradient {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* === GRADIENT TEXT GOLD === */

.gradient-text-gold {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* === SOCIAL ICON BUTTONS === */

.social-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  color: white;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.social-icon-btn:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* === INSTAGRAM GRID ITEMS === */

.instagram-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 0.75rem;
  cursor: pointer;
}

.instagram-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.3s ease;
}

.instagram-item:hover img {
  transform: scale(1.15);
  filter: brightness(0.8);
}

.instagram-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
}

.instagram-item:hover .instagram-overlay {
  opacity: 1;
}

/* Instagram grid responsive - 3 columns on medium, 2 on mobile */
.instagram-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (min-width: 1024px) {
  .instagram-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
  }
}

@media (max-width: 768px) {
  .instagram-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
}

/* === TIMELINE IMPROVEMENTS === */

.timeline-item::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  border: 4px solid #295ba5;
  border-radius: 50%;
  top: 2rem;
  z-index: 1;
  box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.2);
}

.timeline-item:nth-child(odd)::before {
  right: -12px;
}

.timeline-item:nth-child(even)::before {
  left: -12px;
}

@media (max-width: 768px) {
  .timeline-item::before {
    left: 8px !important;
    right: auto !important;
  }
}

/* Timeline content styling */
.timeline-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 0.5rem;
}

.timeline-content p {
  color: #4a5568;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* === PHILOSOPHY QUOTE MARK === */

.philosophy-quote-mark {
  font-family: Georgia, serif;
  color: #FFD700;
}

/* === FOOTER BLOB ANIMATION === */
@keyframes blob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(20px, -30px) scale(1.1); }
  50% { transform: translate(-20px, 20px) scale(0.9); }
  75% { transform: translate(30px, 10px) scale(1.05); }
}

.animate-blob {
  animation: blob 8s ease-in-out infinite;
}

.animation-delay-2000 {
  animation-delay: 2s;
}

.animation-delay-4000 {
  animation-delay: 4s;
}

/* === MODERN GLASSMORPHISM HEADER === */
#main-header.scrolled {
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  border-bottom: 1px solid rgba(200, 200, 200, 0.3) !important;
}

.dark #main-header.scrolled {
  background: rgba(17, 24, 39, 0.85) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* === FLOATING STARS ANIMATION === */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}
.animate-float {
    animation: float 4s ease-in-out infinite;
}

/* === TYPING EFFECT FIX - prevent page jumping === */
.typing-container {
    min-height: 2.5em;
    display: inline-flex;
    align-items: center;
}
.typing-container p {
    display: inline-flex;
    align-items: center;
    margin: 0;
}
@media (max-width: 768px) {
    .typing-container {
        min-height: 3.5em;
    }
}

/* === DROPDOWN ICON FIX === */
.dropdown-link:hover i {
    color: white !important;
}

/* === EU STARS SLOW SPIN === */
@keyframes slow-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.animate-slow-spin {
    animation: slow-spin 60s linear infinite;
}

/* === VERY NARROW SCREENS (< 380px) === */
@media (max-width: 379px) {
    /* Header spacing fix */
    #main-header .container > div {
        gap: 0.25rem;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    /* Ensure hamburger is always visible */
    #main-header .mobile-menu-icon {
        margin-left: auto;
        flex-shrink: 0;
        padding: 0.5rem;
    }

    /* Smaller header padding */
    #main-header .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    /* Reduce hero padding */
    .hero-section .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* === SHORT SCREENS (height < 700px) === */
@media (max-height: 700px) {
    /* Keep hero at 100vh, just reduce spacing */
    .hero-section .mb-6 { margin-bottom: 0.75rem !important; }
    .hero-section .mb-8 { margin-bottom: 1rem !important; }
    .hero-section .mt-10 { margin-top: 1.5rem !important; }
}

/* === VERY SHORT SCREENS (height < 620px) === */
@media (max-height: 620px) {
    .hero-section h1 {
        font-size: 2.5rem !important; /* smaller than text-5xl */
    }
    .hero-section .typing-container p {
        font-size: 1.1rem !important;
    }
    .hero-section .mb-3 { margin-bottom: 0.5rem !important; }
    .hero-section .mb-4 { margin-bottom: 0.5rem !important; }
    .hero-section .pt-16 { padding-top: 1rem !important; }
}

/* === SMALL SCREENS - Typing text fix === */
@media (max-width: 480px) {
    .typing-container {
        min-height: 2.5em;
        max-height: 3em;
        overflow: hidden;
    }

    .typing-text {
        display: block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
}

/* === ACCESSIBILITY - 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;
    }
}
