/* Custom Styles and Animations */

/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Poppins:wght@400;500;600;700;800&family=Tajawal:wght@400;500;600;700;800&display=swap');

:root {
  --font-montserrat: 'Montserrat', ui-sans-serif, system-ui, sans-serif;
  --font-poppins: 'Poppins', ui-sans-serif, system-ui, sans-serif;
  --font-tajawal: 'Tajawal', ui-sans-serif, system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-poppins), ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  background-color: #000000;
  color: #FFFFFF;
}

/* Apply Montserrat to headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-montserrat), ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

/* Section utility class */
.section {
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  padding-top: 4rem;
  padding-bottom: 4rem;
}

/* Liquid decorations for sections - optimized */
.liquid-decoration {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px); /* Reduced from 60px */
  pointer-events: none;
  animation: liquidFloat 15s ease-in-out infinite;
  will-change: transform, opacity; /* GPU hint */
  transform: translateZ(0); /* Force GPU layer */
}

.liquid-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px); /* Reduced from 80px */
  pointer-events: none;
  animation: liquidWave 20s ease-in-out infinite;
  opacity: 0.2;
  will-change: transform, border-radius; /* GPU hint */
  transform: translateZ(0); /* Force GPU layer */
}

/* Liquid Background Animation */
@keyframes liquidFlow {
  0%, 100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  25% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    transform: translate(5%, 3%) scale(1.08) rotate(90deg);
  }
  50% {
    border-radius: 50% 50% 50% 50% / 40% 70% 60% 40%;
    transform: translate(-3%, 5%) scale(0.92) rotate(180deg);
  }
  75% {
    border-radius: 70% 30% 50% 50% / 30% 50% 50% 70%;
    transform: translate(3%, -5%) scale(1.05) rotate(270deg);
  }
}

@keyframes liquidPulse {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.1);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

@keyframes liquidFloat {
  0%, 100% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0.3;
  }
  50% {
    transform: translateY(-20px) translateX(10px) scale(1.05);
    opacity: 0.5;
  }
}

@keyframes liquidWave {
  0%, 100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    transform: rotate(0deg) scale(1);
  }
  50% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    transform: rotate(180deg) scale(1.1);
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3), 0 0 40px rgba(255, 255, 255, 0.15);
  }
  50% {
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.5), 0 0 60px rgba(255, 255, 255, 0.25);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.liquid-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.liquid-blob {
  position: absolute;
  filter: blur(60px); /* Reduced from 100px - major CPU saver */
  animation: liquidFlow 25s ease-in-out infinite;
  opacity: 0.5;
  will-change: transform, border-radius; /* GPU hint */
  transform: translateZ(0); /* Force GPU layer */
  contain: paint; /* Isolate rendering */
}

.liquid-blob-1 {
  background: radial-gradient(circle, rgba(245, 245, 245, 0.25) 0%, rgba(229, 229, 229, 0.15) 40%, transparent 70%);
  width: 800px;
  height: 800px;
  top: -20%;
  left: -15%;
  animation-delay: 0s;
}

.liquid-blob-2 {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, rgba(212, 212, 212, 0.12) 40%, transparent 70%);
  width: 700px;
  height: 700px;
  top: 35%;
  right: -10%;
  animation-delay: -8s;
}

.liquid-blob-3 {
  background: radial-gradient(circle, rgba(229, 229, 229, 0.18) 0%, rgba(168, 168, 168, 0.1) 40%, transparent 70%);
  width: 750px;
  height: 750px;
  bottom: -15%;
  left: 30%;
  animation-delay: -16s;
}

/* Metallic Border Effect */
.metal-border {
  position: relative;
  border: 1px solid rgba(229, 229, 229, 0.2);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(229, 229, 229, 0.01));
}

.metal-border-animate {
  position: relative;
  border: 2px solid transparent;
  background: linear-gradient(#000, #000) padding-box,
        linear-gradient(90deg, #A8A8A8, #F5F5F5, #E5E5E5, #F5F5F5, #A8A8A8) border-box;
  background-size: 300% 100%;
  animation: shimmer 3s linear infinite;
  will-change: background-position; /* GPU hint */
  transform: translateZ(0); /* Force GPU layer */
}

.metal-border-animate:hover {
  animation: shimmer 2s linear infinite, glow 2s ease-in-out infinite;
  will-change: background-position, box-shadow; /* GPU hint */
}

/* Metallic text gradient effect */
.metal-text {
  /* background: linear-gradient(135deg, #F5F5F5 0%, #E5E5E5 50%, #C9C9C9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text; */
  color: #e8e8e8;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

/* Glass morphism effect - optimized for performance */
.glass {
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(8px); /* Reduced from 12px - 33% less GPU load */
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  /* Performance optimizations */
  transform: translateZ(0); /* Force GPU acceleration */
  isolation: isolate; /* Create new stacking context */
  contain: paint; /* Isolate paint operations */
}

/* Animation utility classes */
.animate-on-scroll {
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
}

.fade-in-up {
  animation: fadeInUp 0.8s ease forwards;
}

.fade-in-left {
  animation: fadeInLeft 0.8s ease forwards;
}

.fade-in-right {
  animation: fadeInRight 0.8s ease forwards;
}

/* Scale In Animation */
.scale-in {
  animation: scaleIn 1s ease forwards;
}

/* Mobile Menu Animation */
.mobile-menu {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

.mobile-menu.open {
  max-height: 500px;
  opacity: 1;
}

/* Scroll indicator animation */
@keyframes scrollIndicator {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.7;
  }
  50% {
    transform: translateY(14px);
    opacity: 1;
  }
}

.scroll-indicator-dot {
  animation: scrollIndicator 2s ease-in-out infinite;
  will-change: transform, opacity; /* GPU hint */
  transform: translateZ(0); /* Force GPU layer */
}

/* Mobile-specific hero fixes */
@media (max-width: 767px) {
  /* Ensure hero section has proper mobile height */
  .hero-mobile-fix {
    min-height: 100vh;
    min-height: 100svh; /* Small viewport height for mobile browsers */
    padding-top: 80px; /* Account for fixed header */
    padding-bottom: 80px; /* Extra space for scroll indicator */
  }
  
  /* Top label visibility on mobile */
  .hero-label-mobile {
    padding: 0.625rem 1.25rem; /* py-2.5 px-5 */
    margin-bottom: 1.5rem; /* Reduced from mb-8 */
    font-size: 0.625rem; /* Even smaller than text-xs */
    letter-spacing: 0.25em; /* Slightly reduced letter spacing */
    border: 1px solid rgba(255, 255, 255, 0.15);
  }
  
  /* Headline size reduction for mobile */
  .hero-headline-mobile {
    font-size: 2rem; /* Reduced from text-5xl (3rem) */
    line-height: 1.2;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
  }
  
  /* Description text for mobile */
  .hero-description-mobile {
    font-size: 0.9375rem; /* Between text-sm and text-base */
    line-height: 1.5;
    margin-bottom: 2rem;
    padding: 0 0.5rem; /* Extra padding for better readability */
  }
  
  /* Button sizing for mobile */
  .hero-button-mobile {
    padding: 0.875rem 2rem; /* Slightly smaller */
    font-size: 0.9375rem;
    width: 100%;
    max-width: 280px;
  }
  
  /* Scroll indicator positioning for mobile */
  .hero-scroll-indicator-mobile {
    bottom: 2.5rem; /* Reduced from bottom-20 (5rem) */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
  }
  
  .hero-scroll-indicator-mobile .scroll-mouse {
    width: 1.5rem; /* Slightly smaller */
    height: 2.5rem;
    border-width: 2px;
  }
  
  .hero-scroll-indicator-mobile .scroll-indicator-dot {
    width: 0.25rem;
    height: 0.5rem;
  }
}

.footer-title {
  margin-bottom: .75rem;
  font-weight: 600;
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / var(--tw-text-opacity));
}

/* ============================================
   Language Switcher Component
   Matches LIKUIDIA's Metallic Design Pattern
   ============================================ */

.lang-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-switcher-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #FFFFFF;
  background: linear-gradient(#000, #000) padding-box,
        linear-gradient(90deg, #A8A8A8, #F5F5F5, #E5E5E5, #F5F5F5, #A8A8A8) border-box;
  border: 2px solid transparent;
  background-size: 300% 100%;
  animation: shimmer 3s linear infinite;
  transition: all 0.3s ease;
  will-change: background-position;
  transform: translateZ(0);
  text-decoration: none;
}

.lang-switcher-link:hover {
  animation: shimmer 2s linear infinite, glow 2s ease-in-out infinite;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.4), 0 0 60px rgba(255, 255, 255, 0.2);
}

.lang-switcher-icon {
  width: 1rem;
  height: 1rem;
  color: #E5E5E5;
  flex-shrink: 0;
}

.lang-switcher-text {
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
}

/* Mobile Language Switcher */
@media (max-width: 767px) {
  .lang-switcher-mobile {
    width: 100%;
    display: flex;
    justify-content: center;
  }
  
  .lang-switcher-link {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
}

/* RTL Language Switcher Adjustments */
html[dir="rtl"] .lang-switcher-link {
  background: linear-gradient(#000, #000) padding-box,
        linear-gradient(-90deg, #A8A8A8, #F5F5F5, #E5E5E5, #F5F5F5, #A8A8A8) border-box;
}

/* ============================================
   Pagination Styles - LIKUIDIA Design Pattern
   ============================================ */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pagination nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pagination .flex {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pagination span,
.pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #B0B0B0;
  background: rgba(10, 10, 10, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  text-decoration: none;
}

.pagination a:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(229, 229, 229, 0.3);
  color: #E5E5E5;
}

.pagination span[aria-current="page"],
.pagination .relative.z-10 {
  background: linear-gradient(#000, #000) padding-box,
        linear-gradient(90deg, #A8A8A8, #F5F5F5, #E5E5E5, #F5F5F5, #A8A8A8) border-box;
  border: 2px solid transparent;
  color: #FFFFFF;
  font-weight: 700;
}

.pagination span[aria-disabled="true"],
.pagination .relative.cursor-default {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.pagination svg {
  width: 1.25rem;
  height: 1.25rem;
  color: #E5E5E5;
}

/* Pagination text (Showing results) */
.pagination p {
  font-size: 0.875rem;
  color: #B0B0B0;
  margin: 0;
}

/* ============================================
   Blog Content Styles
   ============================================ */

.blog-content {
  color: #B0B0B0;
}

.blog-content h1, 
.blog-content h2, 
.blog-content h3, 
.blog-content h4, 
.blog-content h5, 
.blog-content h6 {
  color: #E5E5E5;
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.blog-content h1 { font-size: 2.25rem; }
.blog-content h2 { font-size: 1.875rem; }
.blog-content h3 { font-size: 1.5rem; }
.blog-content h4 { font-size: 1.25rem; }

.blog-content p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.blog-content ul, 
.blog-content ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.blog-content li {
  margin-bottom: 0.75rem;
  line-height: 1.7;
}

.blog-content ul li {
  list-style-type: disc;
}

.blog-content ol li {
  list-style-type: decimal;
}

/* Link styling - distinct cyan color for all links in article content */
.blog-content a {
  color: #00D4FF;
  text-decoration: underline;
  text-decoration-color: rgba(0, 212, 255, 0.3);
  text-underline-offset: 3px;
  transition: all 0.3s ease;
}

.blog-content a:hover {
  color: #33DDFF;
  text-decoration-color: rgba(0, 212, 255, 0.6);
}

.blog-content img {
  border-radius: 1rem;
  margin: 2rem auto;
  max-width: 100%;
  height: auto;
}

.blog-content blockquote {
  border-left: 4px solid #E5E5E5;
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: #E5E5E5;
}

.blog-content pre {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.blog-content code {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.9em;
  font-family: 'Courier New', monospace;
}

.blog-content pre code {
  background: transparent;
  padding: 0;
}

.blog-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
}

.blog-content table th,
.blog-content table td {
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.75rem;
  text-align: left;
}

.blog-content table th {
  background: rgba(255, 255, 255, 0.05);
  font-weight: 600;
  color: #E5E5E5;
}

/* Line clamp utility */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Responsive adjustments for blog sidebar */
@media (max-width: 1023px) {
  .sticky {
    position: relative !important;
    top: 0 !important;
  }
}

