/* Custom CSS Styles for Emtiaz Najd */

* {
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    overflow-x: hidden;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #c62327, #65bd58);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a01d20;
}

/* Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Floating Shapes */
.floating-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.3;
    animation: float-shape 20s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    top: 50%;
    right: 15%;
    animation-delay: 2s;
}

.shape-3 {
    width: 250px;
    height: 250px;
    bottom: 15%;
    left: 20%;
    animation-delay: 4s;
}

.shape-4 {
    width: 180px;
    height: 180px;
    top: 30%;
    right: 25%;
    animation-delay: 6s;
}

@keyframes float-shape {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(30px, -30px) rotate(90deg);
    }
    50% {
        transform: translate(-20px, 20px) rotate(180deg);
    }
    75% {
        transform: translate(20px, 30px) rotate(270deg);
    }
}

/* Navigation Active Link */
/* ========================================
   Navigation Menu - Enhanced Design
   ======================================== */

/* Desktop Navigation Menu */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(to right, #c62327, #ffce2f);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-link:hover::after {
    width: 100%;
}

/* Desktop Dropdown Menu */
.dropdown > ul {
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown:hover > ul {
    transform: translateY(0);
}

/* Submenu Items */
.submenu-item {
    position: relative;
}

.submenu-item > a {
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.submenu-item:hover > a {
    border-left-color: #c62327;
    padding-left: 1.25rem;
}

/* Nested Submenu (Sub-Sub Menu) */
.submenu-item.has-children > ul {
    transform: translateX(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.submenu-item.has-children:hover > ul {
    transform: translateX(0);
}

/* RTL Support for Nested Submenus */
[dir="rtl"] .submenu-item > ul {
    right: auto;
    right: 100%;
    margin-right: 0.5rem;
    margin-left: 0.5rem;
}

[dir="rtl"] .submenu-item > a {
    border-left: none;
    border-right: 3px solid transparent;
}

[dir="rtl"] .submenu-item:hover > a {
    border-right-color: #c62327;
    padding-left: 1rem;
    padding-right: 1.25rem;
}

/* Mobile Submenu Styles */
.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.2s ease-out;
    opacity: 0;
    display: block !important;
}

.mobile-submenu.hidden {
    max-height: 0;
    opacity: 0;
}

.mobile-submenu:not(.hidden) {
    max-height: 1000px;
    opacity: 1;
    transition: max-height 0.4s ease-in, opacity 0.3s ease-in;
}

.mobile-submenu-toggle i {
    transition: transform 0.3s ease;
}

/* Mobile Menu Item Hover */
.mobile-menu-item > a:hover,
.mobile-submenu-item > a:hover {
    background-color: rgba(198, 35, 39, 0.05);
    border-radius: 0.5rem;
    padding-right: 0.5rem;
}

/* Active Menu Item Indicator */
.nav-link.active {
    color: #c62327;
    font-weight: 700;
}

.nav-link.active::after {
    width: 100%;
}

/* Gradient Text Animation */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.bg-gradient-to-r {
    background-size: 200% 200%;
    animation: gradient-shift 5s ease infinite;
}

/* Department Cards Hover Effect */
.department-card {
    transition: all 0.3s ease;
}

.department-card:hover {
    transform: translateY(-10px);
}

/* Card Shine Effect */
.department-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.department-card:hover::before {
    left: 100%;
}

/* Button Ripple Effect */
button, .btn {
    position: relative;
    overflow: hidden;
}

button::after, .btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:active::after, .btn:active::after {
    width: 300px;
    height: 300px;
}

/* Loading Animation for Images */
img {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Back to Top Button */
#back-to-top {
    transition: all 0.3s ease;
}

#back-to-top.show {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Form Focus Effects */
input:focus, textarea:focus {
    transform: scale(1.02);
    box-shadow: 0 0 0 3px rgba(198, 35, 39, 0.1);
}

/* Pulse Animation for Icons */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.department-card:hover i {
    animation: pulse 1s ease infinite;
}

/* Gradient Border Animation */
@keyframes gradient-border {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Text Selection */
::selection {
    background: #c62327;
    color: white;
}

::-moz-selection {
    background: #c62327;
    color: white;
}

/* Mobile Menu - Tailwind handles visibility via hidden class */

/* Responsive Typography */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem !important;
    }
    
    h2 {
        font-size: 2rem !important;
    }
    
    .floating-shape {
        display: none;
    }
}

/* Print Styles */
@media print {
    nav, footer, #back-to-top, #contact {
        display: none;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles here if needed */
}

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

/* Focus Visible for Keyboard Navigation */
*:focus-visible {
    outline: 3px solid #ffce2f;
    outline-offset: 2px;
}

/* Smooth Transitions */
* {
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border: 3px solid #c62327;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Card Glass Effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Particle Background Effect */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: #c62327;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    opacity: 0.3;
    animation: particle-float 15s infinite ease-in-out;
}

@keyframes particle-float {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    50% {
        transform: translateY(-100vh) translateX(50px);
    }
}

/* Hover Lift Effect */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Text Gradient */
.text-gradient {
    background: linear-gradient(135deg, #c62327, #ffce2f, #65bd58);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Section Divider */
.section-divider {
    height: 2px;
    background: linear-gradient(to right, transparent, #c62327, #ffce2f, #65bd58, transparent);
    margin: 4rem 0;
}

/* Stats Counter Animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-number {
    animation: countUp 1s ease forwards;
}

/* Testimonial Card */
.testimonial-card {
    position: relative;
    padding: 2rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -20px;
    right: 20px;
    font-size: 6rem;
    color: #c62327;
    opacity: 0.2;
    font-family: Georgia, serif;
}

/* Image Hover Zoom */
.image-zoom {
    overflow: hidden;
}

.image-zoom img {
    transition: transform 0.5s ease;
}

.image-zoom:hover img {
    transform: scale(1.1);
}

/* Border Animation */
.border-animate {
    position: relative;
}

.border-animate::before,
.border-animate::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid #c62327;
    transition: all 0.5s ease;
}

.border-animate::before {
    top: -5px;
    right: -5px;
    border-bottom: 0;
    border-left: 0;
}

.border-animate::after {
    bottom: -5px;
    left: -5px;
    border-top: 0;
    border-right: 0;
}

.border-animate:hover::before,
.border-animate:hover::after {
    width: calc(100% + 10px);
    height: calc(100% + 10px);
}

/* Success Message */
.success-message {
    background: linear-gradient(135deg, #65bd58, #4a9d44);
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 30px rgba(101, 189, 88, 0.3);
    animation: slideInDown 0.5s ease;
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Error Message */
.error-message {
    background: linear-gradient(135deg, #c62327, #a01d20);
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 30px rgba(198, 35, 39, 0.3);
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
}

/* Print Optimization */
@page {
    margin: 2cm;
}

/* Performance Optimization */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

/* WhatsApp Floating Button Animation */
.whatsapp-float {
    animation: whatsapp-pulse 2s ease-in-out infinite;
}

@keyframes whatsapp-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(37, 211, 102, 0);
    }
}

/* WhatsApp button hover effect */
a[href*="wa.me"]:hover {
    animation: none;
    box-shadow: 0 10px 40px rgba(37, 211, 102, 0.5) !important;
}

/* Parallax Values Section */
.parallax-values {
    position: relative;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.parallax-bg {
    will-change: transform;
}

/* Values Cards Glass Effect */
.values-card {
    position: relative;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.values-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    border-radius: 1.5rem;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

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

/* Glass Morphism Effect */
.backdrop-blur-lg {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* Parallax Scroll Effect */
@media (min-width: 768px) {
    .parallax-values .parallax-bg {
        transform: translateZ(0);
        will-change: transform;
    }
}

/* Animated Patterns in Parallax */
@keyframes pattern-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.2;
    }
}

.parallax-values .animate-pulse {
    animation: pattern-pulse 3s ease-in-out infinite;
}


/* Icon Rotation on Hover */
.values-card .group-hover\:rotate-12:hover {
    animation: icon-bounce 0.6s ease;
}

@keyframes icon-bounce {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.1) rotate(-12deg);
    }
    50% {
        transform: scale(1.15) rotate(12deg);
    }
    75% {
        transform: scale(1.1) rotate(-8deg);
    }
}

/* Responsive Parallax - Disable on Mobile */
@media (max-width: 768px) {
    .parallax-values .parallax-bg {
        background-attachment: scroll !important;
    }
    
    .parallax-values {
        background-attachment: scroll !important;
    }
}

/* Enhanced Shadow for Values Cards */
.values-card:hover > div {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* ========================================
   Vision Slider - Vertical Slides
   ======================================== */

/* Wave Background Animation */
.wave-background {
    pointer-events: none;
}

.waves {
    position: relative;
    width: 100%;
    height: 15vh;
    margin-bottom: -7px;
    min-height: 100px;
    max-height: 150px;
}

.parallax-waves > use {
    animation: move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite;
}

.parallax-waves > use:nth-child(1) {
    animation-delay: -2s;
    animation-duration: 7s;
}

.parallax-waves > use:nth-child(2) {
    animation-delay: -3s;
    animation-duration: 10s;
}

.parallax-waves > use:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 13s;
}

.parallax-waves > use:nth-child(4) {
    animation-delay: -5s;
    animation-duration: 20s;
}

@keyframes move-forever {
    0% {
        transform: translate3d(-90px, 0, 0);
    }
    100% { 
        transform: translate3d(85px, 0, 0);
    }
}
  
  /* Hero Background Slider */
  .hero-background-slider {
      z-index: 0;
  }
  
  .hero-swiper {
      width: 100%;
      height: 100%;
  }
  
  .hero-swiper .swiper-slide {
      width: 100%;
      height: 100%;
  }
  
  .hero-slide-bg {
      width: 100%;
      height: 100%;
      position: relative;
  }
  
  .hero-slide-bg img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 10s ease-out;
  }
  
  /* Ken Burns Effect on Active Slide */
  .hero-swiper .swiper-slide-active .hero-slide-bg img {
      transform: scale(1.15);
  }
  
  /* Blur and Overlay Effects */
  .hero-background-slider .backdrop-blur-sm {
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
  }
  
  /* Vision Swiper Customization */
.vision-swiper {
    width: 100%;
    height: 100%;
}

/* Section Title Header Animation */
.swiper-slide .absolute.top-8 {
    animation: fadeInDown 0.8s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.vision-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Slide Background Image Effects */
.slide-bg {
    background-color: #1a1a1a;
}

.slide-bg img {
    transition: transform 5s ease;
    opacity: 1;
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.swiper-slide-active .slide-bg img {
    transform: scale(1.1);
}

/* Preload images */
.swiper-slide img {
    will-change: transform;
}

/* Glass Card Effect */
.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Navigation Buttons Styling */
.vision-next,
.vision-prev {
    color: white !important;
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px);
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    transition: all 0.3s ease, opacity 0.3s ease !important;
    z-index: 20 !important;
}

.vision-next:hover,
.vision-prev:hover {
    background: rgba(198, 35, 39, 0.8) !important;
    border-color: #ffce2f !important;
    transform: scale(1.1) !important;
}

.vision-next::after,
.vision-prev::after {
    font-size: 24px !important;
    font-weight: bold !important;
}

/* Pagination Styling */
.vision-pagination {
    position: fixed !important;
    right: 20px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    left: auto !important;
    width: auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    transition: opacity 0.3s ease !important;
    z-index: 20 !important;
}

.vision-pagination .swiper-pagination-bullet {
    width: 12px !important;
    height: 12px !important;
    background: rgba(255, 255, 255, 0.5) !important;
    opacity: 1 !important;
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
    transition: all 0.3s ease !important;
}

.vision-pagination .swiper-pagination-bullet-active {
    background: #ffce2f !important;
    width: 16px !important;
    height: 16px !important;
    border-color: #ffce2f !important;
    box-shadow: 0 0 20px rgba(255, 206, 47, 0.8) !important;
}


/* Slide Content Animation */
.slide-content {
    animation: fadeInSlide 1s ease forwards;
    opacity: 0;
}

.swiper-slide-active .slide-content {
    opacity: 1;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Text Reveal Animation */
.swiper-slide-active h2,
.swiper-slide-active h3,
.swiper-slide-active p {
    animation: textReveal 0.8s ease forwards;
}

@keyframes textReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Image Zoom on Active Slide */
.swiper-slide-active .slide-bg img {
    animation: zoomIn 1.5s ease forwards;
}

@keyframes zoomIn {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.1);
    }
}

/* Glass Card Hover Effect */
.glass-card:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 206, 47, 0.5);
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
}

/* Responsive Adjustments for Vision Slider */
@media (max-width: 768px) {
    .waves {
        height: 10vh;
        min-height: 60px;
    }
    
    .vision-pagination {
        right: 10px !important;
    }
    
    .vision-next,
    .vision-prev {
        width: 50px !important;
        height: 50px !important;
    }
    
    .vision-next::after,
    .vision-prev::after {
        font-size: 20px !important;
    }
    
    .glass-card {
        padding: 1.5rem !important;
    }
}


/* Swiper Direction Override for Vertical */
.vision-swiper .swiper-wrapper {
    flex-direction: column;
}

/* Touch Feedback */
.vision-swiper .swiper-slide {
    user-select: none;
    -webkit-user-select: none;
}

/* Country Filter Buttons */
.level-filter-btn,
.country-filter-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    font-weight: 600;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.level-filter-btn:hover,
.country-filter-btn:hover {
    border-color: #c62327;
    color: #c62327;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(198, 35, 39, 0.2);
}

.level-filter-btn.active,
.country-filter-btn.active {
    background: linear-gradient(135deg, #c62327, #a01d20);
    border-color: #c62327;
    color: white;
    box-shadow: 0 4px 16px rgba(198, 35, 39, 0.3);
}

.level-filter-btn.active:hover,
.country-filter-btn.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(198, 35, 39, 0.4);
}

/* Level Back Button */
.level-back-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: transparent;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.level-back-btn:hover {
    transform: translateX(-5px);
}

/* Product Items Filter Animation */
.product-item {
    opacity: 1;
    transform: scale(1);
    transition: all 0.4s ease;
}

.product-item.hidden {
    opacity: 0;
    transform: scale(0.8);
    height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

/* Smooth Grid Animation */
#products-grid {
    transition: all 0.4s ease;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   Social Media Icons - Enhanced Design
   ======================================== */

/* Social Icon Base Styles */
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: social-fade-in 0.5s ease forwards;
}

.social-icon i {
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

/* Hover Effects */
.social-icon:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
    background-position: center;
}

.social-icon:hover i {
    transform: scale(1.15) rotate(5deg);
}

/* Ripple Effect */
.social-icon-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease, opacity 0.6s ease;
    opacity: 0;
    pointer-events: none;
}

.social-icon:hover .social-icon-ripple {
    width: 100px;
    height: 100px;
    opacity: 1;
}

/* Glow Effect on Hover */
.social-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.social-icon:hover::before {
    opacity: 1;
}

/* Pulse Animation for Active State */
@keyframes social-pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    50% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 8px rgba(255, 255, 255, 0);
    }
}

.social-icon:active {
    animation: social-pulse 0.6s ease;
    transform: scale(0.95);
}

/* Gradient Overlay on Hover */
.social-icon::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px;
    pointer-events: none;
}

.social-icon:hover::after {
    opacity: 1;
}

/* Icon Rotation Animation */
@keyframes icon-rotate {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.1);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

.social-icon:hover i.fa-instagram {
    animation: icon-rotate 0.6s ease;
}

/* Shine Effect */
@keyframes social-shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* Specific Icon Animations */
.social-icon:hover i.fa-twitter {
    animation: float 1s ease-in-out infinite;
}

.social-icon:hover i.fa-facebook {
    animation: pulse 1s ease-in-out infinite;
}

.social-icon:hover i.fa-linkedin {
    transform: scale(1.2) rotate(5deg);
}

.social-icon:hover i.fa-youtube {
    animation: pulse 0.8s ease-in-out infinite;
}

/* Responsive Design */
@media (max-width: 640px) {
    .social-icon {
        width: 40px;
        height: 40px;
    }
    
    .social-icon i {
        font-size: 16px;
    }
    
    .social-links {
        gap: 0.75rem;
    }
}

/* Dark Mode Enhancements */
@media (prefers-color-scheme: dark) {
    .social-icon {
        border-color: rgba(255, 255, 255, 0.15);
    }
    
    .social-icon:hover {
        border-color: rgba(255, 255, 255, 0.3);
    }
}

/* Accessibility - Focus States */
.social-icon:focus {
    outline: 3px solid #ffce2f;
    outline-offset: 3px;
}

.social-icon:focus-visible {
    outline: 3px solid #ffce2f;
    outline-offset: 3px;
}

/* Loading State */
.social-icon.loading {
    pointer-events: none;
    opacity: 0.6;
}

.social-icon.loading i {
    animation: spin 1s linear infinite;
}

/* Tooltip removed - using native browser tooltips or no tooltips */

/* Smooth Entrance Animation */
@keyframes social-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.social-icon:nth-child(1) { animation-delay: 0.1s; }
.social-icon:nth-child(2) { animation-delay: 0.2s; }
.social-icon:nth-child(3) { animation-delay: 0.3s; }
.social-icon:nth-child(4) { animation-delay: 0.4s; }
.social-icon:nth-child(5) { animation-delay: 0.5s; }
.social-icon:nth-child(6) { animation-delay: 0.6s; }

/* ========================================
   Topics Page - Enhanced Design
   ======================================== */

/* Breadcrumbs Section with Background Image */
section[style*="background-image"] {
    position: relative;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: auto;
}

/* Ensure text readability over background image */
section[style*="background-image"] h1,
section[style*="background-image"] .text-white {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

section[style*="background-image"] .text-gray-100 {
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* Smooth background image loading */
section[style*="background-image"]::before {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
    background-size: cover;
    background-position: center;
    filter: blur(0px);
    transition: filter 0.3s ease;
    z-index: 0;
}

/* Mobile: Disable fixed attachment for better performance */
@media (max-width: 768px) {
    section[style*="background-image"] {
        background-attachment: scroll !important;
    }
}

/* Category Badge Enhancement */
.category-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* ========================================
   Sidebar - Enhanced Design
   ======================================== */

/* Sidebar Categories */
.sidebar-categories {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-category-item {
    margin-bottom: 0.5rem;
}

.sidebar-category-link {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    color: #374151;
    text-decoration: none;
}

.sidebar-category-link:hover {
    background: rgba(198, 35, 39, 0.05);
    border-color: rgba(198, 35, 39, 0.2);
    transform: translateX(-4px);
}

.sidebar-category-link.active {
    background: linear-gradient(135deg, rgba(198, 35, 39, 0.1), rgba(198, 35, 39, 0.05));
    border-color: #c62327;
    color: #c62327;
    font-weight: 700;
}

.sidebar-category-link.active i {
    color: #c62327;
}

/* Subcategories */
.sidebar-subcategories {
    list-style: none;
    padding: 0;
    margin: 0;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sidebar-subcategory-item {
    margin-bottom: 0.25rem;
}

.sidebar-subcategory-link {
    background: #ffffff;
    border: 1px solid #f3f4f6;
    color: #6b7280;
    text-decoration: none;
}

.sidebar-subcategory-link:hover {
    background: rgba(198, 35, 39, 0.05);
    border-color: rgba(198, 35, 39, 0.15);
    transform: translateX(-2px);
}

.sidebar-subcategory-link.active {
    background: rgba(198, 35, 39, 0.08);
    border-color: rgba(198, 35, 39, 0.3);
    color: #c62327;
    font-weight: 600;
}

/* Sub-subcategories */
.sidebar-subsubcategories {
    list-style: none;
    padding: 0;
    margin: 0;
    animation: slideDown 0.3s ease-out;
}

.sidebar-subsubcategory-link {
    background: #fafafa;
    border: 1px solid #f3f4f6;
    color: #9ca3af;
    text-decoration: none;
}

.sidebar-subsubcategory-link:hover {
    background: rgba(198, 35, 39, 0.05);
    border-color: rgba(198, 35, 39, 0.1);
    transform: translateX(-2px);
}

.sidebar-subsubcategory-link.active {
    background: rgba(198, 35, 39, 0.08);
    border-color: rgba(198, 35, 39, 0.2);
    color: #c62327;
    font-weight: 600;
}

/* Sidebar Badge */
.sidebar-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.sidebar-category-link:hover .sidebar-badge,
.sidebar-subcategory-link:hover .sidebar-badge,
.sidebar-subsubcategory-link:hover .sidebar-badge {
    background: rgba(198, 35, 39, 0.2);
    transform: scale(1.1);
}

/* Sidebar Card (Most Viewed) */
.sidebar-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    display: block;
    color: inherit;
}

.sidebar-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
    border-color: rgba(198, 35, 39, 0.2);
}

.sidebar-card .card-img-top,
.sidebar-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.sidebar-card:hover .card-img-top,
.sidebar-card:hover img {
    transform: scale(1.05);
}

.sidebar-card .card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0.75rem 1rem 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-card:hover .card-title {
    color: #c62327;
}

.sidebar-card .card-text {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0 1rem 0.75rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-card .video-container,
.sidebar-card .image-container,
.sidebar-card .audio-container {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
}

.sidebar-card .video-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-card:hover .video-container::after {
    opacity: 1;
}

.sidebar-card .extra-images-count {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 10;
}

.sidebar-card .extra-images-count span {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #c62327;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .sidebar-category-link {
        padding: 0.75rem 1rem;
    }
    
    .sidebar-subcategory-link {
        padding: 0.5rem 0.75rem;
    }
}

/* Breadcrumbs Styling */
.breadcrumbs ol li {
    display: inline-flex;
    align-items: center;
}

.breadcrumbs ol li:last-child {
    color: #1f2937;
    font-weight: 600;
}

/* Pagination Styling */
.pagination-wrapper .pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination-wrapper .pagination li {
    display: inline-block;
}

.pagination-wrapper .pagination li a,
.pagination-wrapper .pagination li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.pagination-wrapper .pagination li a {
    color: #4b5563;
    background: white;
    border-color: #e5e7eb;
}

.pagination-wrapper .pagination li a:hover {
    color: #c62327;
    background: rgba(198, 35, 39, 0.05);
    border-color: #c62327;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(198, 35, 39, 0.15);
}

.pagination-wrapper .pagination li.active span,
.pagination-wrapper .pagination li.active a {
    color: white;
    background: linear-gradient(135deg, #c62327, #a01d20);
    border-color: #c62327;
    box-shadow: 0 4px 12px rgba(198, 35, 39, 0.3);
}

.pagination-wrapper .pagination li.disabled span,
.pagination-wrapper .pagination li.disabled a {
    color: #9ca3af;
    background: #f3f4f6;
    border-color: #e5e7eb;
    cursor: not-allowed;
    opacity: 0.5;
}

/* Topic Cards Enhancement */
.post-card {
    background: white;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #c62327, #ffce2f, #65bd58);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
    z-index: 1;
}

.post-card:hover::before {
    transform: scaleX(1);
}

.post-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(198, 35, 39, 0.2);
}

.post-card .card-img-top,
.post-card img {
    width: 100%;
    height: 256px;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-card:hover .card-img-top,
.post-card:hover img {
    transform: scale(1.1);
}

.post-card .card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.75rem;
    line-height: 1.5;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card:hover .card-title {
    color: #c62327;
}

.post-card .card-title i {
    color: #c62327;
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.post-card:hover .card-title i {
    transform: scale(1.1) rotate(5deg);
}

.post-card .card-text {
    color: #6b7280;
    line-height: 1.8;
    flex-grow: 1;
    font-size: 0.9375rem;
}

.post-card .read-more-link {
    color: #c62327;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    position: relative;
}

.post-card .read-more-link::before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #c62327, #ffce2f);
    transition: width 0.3s ease;
}

.post-card .read-more-link:hover {
    color: #a01d20;
    gap: 0.75rem;
}

.post-card .read-more-link:hover::before {
    width: 100%;
}

.post-card .read-more-link i {
    transition: transform 0.3s ease;
}

.post-card .read-more-link:hover i {
    transform: translateX(-4px);
}

/* Video Container Enhancements */
.video-container {
    position: relative;
    overflow: hidden;
}

.video-container .play-button {
    transition: all 0.3s ease;
}

.post-card:hover .video-container .play-button {
    transform: scale(1.15);
    box-shadow: 0 8px 24px rgba(198, 35, 39, 0.4);
}

/* Image Container Enhancements */
.image-container {
    position: relative;
    overflow: hidden;
}

.image-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.post-card:hover .image-container::after {
    opacity: 1;
}

/* Audio Container */
.audio-container {
    border-radius: 1.5rem 1.5rem 0 0;
    overflow: hidden;
}

.audio-container .audio-player {
    margin: 0;
}

/* Extra Images Count Badge */
.extra-images-count {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    animation: fadeIn 0.5s ease;
}

.extra-images-count span {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.post-card:hover .extra-images-count span {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Card Content Spacing */
.post-card .p-6 {
    padding: 1.5rem;
}

/* Line Clamp Utilities */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .post-card {
        border-radius: 1.25rem;
    }
    
    .post-card .card-img-top,
    .post-card img {
        height: 220px;
    }
    
    .post-card .card-title {
        font-size: 1.125rem;
    }
    
    .post-card .card-text {
        font-size: 0.875rem;
    }
    
    .pagination-wrapper .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .post-card:hover {
        transform: translateY(-4px) scale(1.01);
    }
}

/* Card Loading Animation */
@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card {
    animation: cardFadeIn 0.6s ease forwards;
}

/* Enhanced Shadow on Hover */
.post-card:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Border Gradient Effect */
.post-card {
    position: relative;
}

.post-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1.5rem;
    padding: 2px;
    background: linear-gradient(135deg, #c62327, #ffce2f, #65bd58);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.post-card:hover::after {
    opacity: 1;
}

