﻿/* SweetAlert2 RTL styling */
.rtl-alert {
    direction: rtl;
    font-family: 'Almarai', sans-serif;
    text-align: right;
}

/* Ensure dropdown is visible */
.dropdown-menu {
    display: block;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s, opacity 0.3s linear;
    z-index: 1050;
}

.dropdown-menu.show {
    visibility: visible;
    opacity: 1;
}

/* Fix for notification dropdown */
#notificationsDropdown {
    cursor: pointer;
}

/* Mobile navbar improvements */
@media (max-width: 768px) {
    .navbar .container {
        padding: 0 15px;
    }
    
    /* Make notifications dropdown more mobile-friendly */
    .dropdown-menu {
        width: 300px !important;
        max-width: calc(100vw - 30px);
        left: auto !important;
        right: 0 !important;
        transform: translateX(-10px);
    }
    
    /* Adjust navbar spacing on mobile */
    .d-flex.align-items-center.gap-2 {
        gap: 0.5rem !important;
    }
    
    /* Ensure buttons don't shrink too much */
    .btn.btn-danger {
        min-width: 40px;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    /* Logo size adjustment for mobile */
    .navbar-brand img,
    .fixed-top img[src="images/logo.png"] {
        max-width: 50px !important;
    }
}

@media (max-width: 576px) {
    /* Further mobile optimizations */
    .dropdown-menu {
        width: 280px !important;
    }
    
    .fixed-top .container {
        padding: 0 10px;
    }
}

/* Enhanced Hero Section */
.hero-section {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    overflow: hidden;
    min-height: 100vh;
    height: 100vh;
    position: relative;
    width: 100%;
    color: white;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 255, 136, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(74, 144, 226, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 51, 102, 0.05) 0%, transparent 50%);
    animation: backgroundShift 15s ease-in-out infinite;
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 3;
}

.hero-section .row {
    position: relative;
    z-index: 3;
}

.hero-section .col-lg-6 {
    position: relative;
    z-index: 3;
}

/* Remove image container styles since we're using background */
.hero-image-container,
.hero-image-wrapper,
.hero-image,
.hero-image-overlay {
    display: none;
}

@keyframes backgroundShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@media (max-width: 768px) {
    .hero-section {
        background-attachment: scroll;
    }
}

/* ---- Hero title cinematic reveal ---- */
.hero-title-reveal {
    opacity: 0;
    animation: heroTitleIn 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards 1.6s;
    transform-origin: left center;
    position: relative;
    display: inline-block;
}

@keyframes heroTitleIn {
    0% {
        opacity: 0;
        transform: translateX(-40px) translateZ(-80px) rotateY(8deg) scale(0.9);
        filter: blur(8px);
        letter-spacing: -8px;
    }
    40% {
        filter: blur(0);
    }
    70% {
        transform: translateX(4px) translateZ(0) rotateY(-1deg) scale(1.01);
        letter-spacing: 1px;
    }
    100% {
        opacity: 1;
        transform: translateX(0) translateZ(0) rotateY(0) scale(1);
        filter: blur(0);
        letter-spacing: normal;
    }
}

.hero-subtitle-reveal {
    opacity: 0;
    animation: heroSubIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards 2.6s;
}

@keyframes heroSubIn {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
        filter: blur(6px);
    }
    60% {
        transform: translateY(-4px) scale(1.01);
        filter: blur(0);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

/* Glow line under hero title */
.text-header {
    position: relative;
    display: inline-block;
    color: #19a593 !important;
    animation: textGlow 3s cubic-bezier(0.45, 0.05, 0.25, 1) infinite alternate 2.6s;
}

@keyframes textGlow {
    0% { text-shadow: 0 0 10px rgba(25, 165, 147, 0.4), 0 0 30px rgba(25, 165, 147, 0.15); }
    100% { text-shadow: 0 0 20px rgba(25, 165, 147, 0.8), 0 0 50px rgba(25, 165, 147, 0.3), 0 0 100px rgba(25, 165, 147, 0.1); }
}

.text-header::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: 0;
    left: auto;
    width: 0;
    height: 3px;
    background: linear-gradient(270deg, #009473, #4af0fc, transparent);
    border-radius: 2px;
    animation: heroLineGrowRight 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards 2.1s;
    box-shadow: 0 0 20px rgba(0, 148, 115, 0.3);
}

@keyframes heroLineGrowRight {
    0% { width: 0; opacity: 0; }
    100% { width: 80px; opacity: 1; }
}

.floating-elements {
    position: relative;
    width: 100%;
    height: 100%;
}

.floating-element {
    position: absolute;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: floatElement 6s ease-in-out infinite;
}

.floating-element i {
    font-size: 1.2rem;
    color: white;
}

.element-1 {
    top: 20%;
    right: 10%;
    animation-delay: 0s;
}

.element-2 {
    bottom: 30%;
    left: 15%;
    animation-delay: 2s;
}

.element-3 {
    top: 60%;
    right: 20%;
    animation-delay: 4s;
}

@keyframes floatElement {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-15px) rotate(180deg);
        opacity: 1;
    }
}

.carousel-item img {
    will-change: transform;
}

/* Accessibility improvements */
.login-btn:focus,
.register-btn:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Loading states moved to global styles.css */

/* Enhanced Courses Section */
.courses-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
}

.courses-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23dee2e6" stroke-width="0.5" opacity="0.3"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.1;
    pointer-events: none;
}

.section-header {
    position: relative;
    z-index: 2;
}

.section-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.title-main {
    color: #2c3e50;
    display: block;
}

.title-accent {
    color: #e74c3c;
    display: block;
    font-size: 0.9em;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.section-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.feature-item:hover {
    transform: translateX(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.feature-item i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.feature-item span {
    font-weight: 500;
    color: #2c3e50;
}

/* Enhanced Carousel */
.carousel-container {
    position: relative;
    z-index: 2;
}

.modern-carousel {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    background: #fff;
}

.carousel-image-container {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    background: linear-gradient(135deg, #2F3438 0%, #6B7F8E 100%);
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.carousel-item:hover .carousel-image {
    transform: scale(1.05);
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.carousel-item:hover .carousel-overlay {
    opacity: 1;
}

.carousel-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.carousel-link:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 1);
}

.carousel-link-icon {
    font-size: 2rem;
    color: #e74c3c;
}

.modern-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent) !important;
    border: none;
    border-radius: 0;
    text-align: right;
}

.caption-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.caption-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.modern-price {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(45deg, #28a745, #20c997) !important;
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.content-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Placeholder Content */
.placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: white;
    text-align: center;
    padding: 2rem;
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.placeholder-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.placeholder-content p {
    opacity: 0.8;
    margin: 0;
}

/* Carousel Controls Enhancement */
.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.modern-carousel:hover .carousel-control-prev,
.modern-carousel:hover .carousel-control-next {
    opacity: 1;
}

.carousel-control-prev {
    left: 15px;
}

.carousel-control-next {
    right: 15px;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: invert(1);
    width: 20px;
    height: 20px;
}

/* Carousel Indicators Enhancement */
.carousel-indicators {
    bottom: 15px;
    margin-bottom: 0;
}

.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.carousel-indicators .active {
    background: #e74c3c;
    border-color: #e74c3c;
    transform: scale(1.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
        text-align: center;
    }

    .section-features {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .feature-item {
        flex: 1;
        min-width: 150px;
        justify-content: center;
        text-align: center;
        flex-direction: column;
        gap: 0.5rem;
    }

    .carousel-image-container {
        height: 300px;
    }

    .modern-caption {
        padding: 1rem;
    }

    .caption-title {
        font-size: 1.2rem;
    }

    .carousel-link {
        width: 60px;
        height: 60px;
    }

    .carousel-link-icon {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .courses-section {
        padding: 3rem 0;
    }

    .carousel-image-container {
        height: 250px;
    }

    .section-features {
        gap: 0.5rem;
    }

    .feature-item {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
}

/* ========================================
   BIOLOGY SECTION â€” COLORFUL REDESIGN
   ======================================== */
.biology-section {
    position: relative;
    background: linear-gradient(160deg, #f8faff 0%, #edf2f9 100%);
    padding: 100px 0;
    overflow: hidden;
}

.biology-bg-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.bio-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.08;
}

.bio-shape-1 {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle at 30% 30%, #2d8a4e, #4caf50);
    top: -250px;
    right: -150px;
    animation: morpOrb 28s cubic-bezier(0.45, 0.05, 0.25, 1) infinite alternate;
}

.bio-shape-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle at 70% 70%, #7c3aed, #a855f7);
    bottom: -200px;
    left: -100px;
    animation: morpOrb 32s cubic-bezier(0.45, 0.05, 0.25, 1) infinite alternate-reverse;
}

.bio-shape-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle at 50% 50%, #2563eb, #0d9488);
    top: 45%;
    left: 55%;
    animation: morpOrb 24s cubic-bezier(0.45, 0.05, 0.25, 1) infinite alternate;
}

@keyframes morpOrb {
    0% { border-radius: 50%; transform: translate(0, 0) scale(1) rotate(0deg); }
    25% { border-radius: 40% 60% 60% 40% / 60% 40% 50% 50%; transform: translate(40px, -30px) scale(1.1) rotate(90deg); }
    50% { border-radius: 50% 50% 40% 60% / 40% 60% 50% 50%; transform: translate(-20px, 40px) scale(0.9) rotate(180deg); }
    75% { border-radius: 60% 40% 50% 50% / 50% 50% 60% 40%; transform: translate(30px, 20px) scale(1.05) rotate(270deg); }
    100% { border-radius: 50%; transform: translate(-30px, -20px) scale(1) rotate(360deg); }
}

/* ---- Header ---- */
.section-header-wrapper {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    z-index: 1;
}

.bio-icon-main {
    width: 88px;
    height: 88px;
    margin: 0 auto 28px;
    background: linear-gradient(135deg, #2d8a4e, #7c3aed);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: white;
    box-shadow: 0 12px 48px rgba(45, 138, 78, 0.3);
    position: relative;
    opacity: 0;
    transform-origin: center;
}

.biology-animate .bio-icon-main {
    animation: iconLand 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes iconLand {
    0% { opacity: 0; transform: scale(0) rotate(-180deg); border-radius: 50%; }
    60% { transform: scale(1.15) rotate(10deg); border-radius: 30%; }
    80% { transform: scale(0.95) rotate(-5deg); border-radius: 26px; }
    100% { opacity: 1; transform: scale(1) rotate(0deg); border-radius: 24px; }
}

.bio-icon-main::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 30px;
    border: 2px solid rgba(124, 58, 237, 0.25);
    opacity: 0;
}

.biology-animate .bio-icon-main::after {
    animation: ringExpand 3s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite 1s;
}

@keyframes ringExpand {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0; }
}

.bio-icon-main i {
    opacity: 0;
}

.biology-animate .bio-icon-main i {
    animation: iconSpinIn 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards 0.15s;
}

@keyframes iconSpinIn {
    0% { opacity: 0; transform: rotate(-360deg) scale(0); }
    100% { opacity: 1; transform: rotate(0deg) scale(1); }
}

.biology-title {
    font-size: 3rem;
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 12px;
    letter-spacing: -1px;
    opacity: 0;
    position: relative;
    display: inline-block;
}

.biology-animate .biology-title {
    animation: titleReveal 1s cubic-bezier(0.22, 1, 0.36, 1) forwards 0.25s;
}

@keyframes titleReveal {
    0% { opacity: 0; transform: translateY(30px) scale(0.95); clip-path: polygon(0 0, 100% 0, 100% 0, 0 0); }
    100% { opacity: 1; transform: translateY(0) scale(1); clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
}

.title-highlight {
    background: linear-gradient(135deg, #2d8a4e, #7c3aed, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    background-size: 200% 200%;
    animation: gradientShift 4s cubic-bezier(0.45, 0.05, 0.25, 1) infinite alternate 0.6s;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

.biology-subtitle {
    font-size: 1.15rem;
    color: #4a5568;
    font-weight: 400;
    max-width: 520px;
    margin: 12px auto 28px;
    line-height: 1.7;
    opacity: 0;
}

.biology-animate .biology-subtitle {
    animation: subtitleSlide 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards 0.4s;
}

@keyframes subtitleSlide {
    0% { opacity: 0; transform: translateY(20px); letter-spacing: -2px; filter: blur(4px); }
    100% { opacity: 1; transform: translateY(0); letter-spacing: normal; filter: blur(0); }
}

.biology-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0;
}

.biology-animate .biology-divider {
    animation: dividerFadeIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards 0.55s;
}

.divider-dot {
    width: 8px;
    height: 8px;
    background: #7c3aed;
    border-radius: 50%;
    animation: dotBreathe 2.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite 1.2s;
}

.divider-dot:last-child {
    animation-delay: 1.5s;
}

.divider-line {
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #7c3aed, transparent);
    position: relative;
    overflow: hidden;
}

.divider-line::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, #2d8a4e, transparent);
    animation: lineSweep 2.4s ease-in-out infinite 1s;
}

@keyframes dotBreathe {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.8); opacity: 1; }
}

@keyframes lineSweep {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes dividerFadeIn {
    0% { opacity: 0; transform: scaleX(0.5); }
    100% { opacity: 1; transform: scaleX(1); }
}

/* ========================================
   CARD COLOR SCHEMES (per --card-hue)
   ======================================== */
/* Hue 1: Cell biology â€” Greens */
.biology-card[style*="--card-hue: 1"] { --c1: #2d8a4e; --c2: #4caf50; --c3: #a5d6a7; --c4: #e8f5e9; }
/* Hue 2: Genetics â€” Purples */
.biology-card[style*="--card-hue: 2"] { --c1: #7c3aed; --c2: #a855f7; --c3: #c4b5fd; --c4: #f3e8ff; }
/* Hue 3: Human body â€” Reds/Coral */
.biology-card[style*="--card-hue: 3"] { --c1: #dc2626; --c2: #f43f5e; --c3: #fca5a5; --c4: #ffe4e6; }
/* Hue 4: Plants â€” Emerald */
.biology-card[style*="--card-hue: 4"] { --c1: #059669; --c2: #34d399; --c3: #a7f3d0; --c4: #ecfdf5; }
/* Hue 5: Classification â€” Blues */
.biology-card[style*="--card-hue: 5"] { --c1: #2563eb; --c2: #3b82f6; --c3: #93c5fd; --c4: #eff6ff; }
/* Hue 6: Ecosystem â€” Teal */
.biology-card[style*="--card-hue: 6"] { --c1: #0d9488; --c2: #14b8a6; --c3: #99f6e4; --c4: #f0fdfa; }

/* ---- Card grid ---- */
.biology-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    perspective: 1200px;
}

.biology-card {
    --order: 0;
    opacity: 0;
    transform-style: preserve-3d;
}

.biology-animate .biology-card {
    animation-name: card3DEnter;
    animation-duration: 1s;
    animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
    animation-fill-mode: forwards;
    animation-delay: calc(var(--order) * 0.15s + 0.3s);
}

@keyframes card3DEnter {
    0% { opacity: 0; transform: translateZ(-100px) rotateX(15deg) rotateY(-10deg) scale(0.8) translateY(30px); }
    50% { filter: blur(0); }
    100% { opacity: 1; transform: translateZ(0) rotateX(0) rotateY(0) scale(1) translateY(0); }
}

/* ---- Card inner ---- */
.biology-card-inner {
    position: relative;
    background: white;
    border-radius: 28px;
    padding: 0 0 32px;
    height: 100%;
    min-height: 340px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: default;
    overflow: hidden;
    transform-style: preserve-3d;
    border: 1px solid rgba(0,0,0,0.04);
}

.biology-card-inner:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 32px 80px rgba(0,0,0,0.1);
}

/* ---- Background blob per card ---- */
.card-bg-blob {
    position: absolute;
    top: -40%;
    right: -30%;
    width: 160%;
    height: 120%;
    background: radial-gradient(circle at 30% 30%, var(--c4), transparent 70%);
    pointer-events: none;
    transition: all 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
}

.biology-card-inner:hover .card-bg-blob {
    opacity: 1;
    top: -30%;
    right: -20%;
}

/* ---- Top gradient deco ---- */
.card-top-deco {
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, var(--c1), var(--c2));
    border-radius: 28px 28px 0 0;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.card-top-deco::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: decoSweep 3s ease-in-out infinite;
}

@keyframes decoSweep {
    0% { left: -100%; }
    100% { left: 200%; }
}

/* ---- Icon wrap ---- */
.card-icon-wrap {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: -40px auto 16px;
    background: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    position: relative;
    z-index: 2;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.biology-card-inner:hover .card-icon-wrap {
    transform: scale(1.08);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.biology-card-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--c1), var(--c2));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.biology-card-inner:hover .biology-card-icon {
    transform: rotateY(180deg) scale(1.05);
}

/* ---- Badge ---- */
.card-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--c4);
    color: var(--c1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 3;
}

.biology-card-inner:hover .card-badge {
    background: var(--c1);
    color: white;
    transform: scale(1.15);
}

/* ---- Content ---- */
.biology-card-content {
    position: relative;
    z-index: 1;
    padding: 0 20px;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.biology-card-content h3 {
    font-size: 1.3rem;
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 8px;
    transition: color 0.4s ease;
}

.biology-card-inner:hover .biology-card-content h3 {
    color: var(--c1);
}

.biology-card-content p {
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.7;
    margin: 0;
}

/* ---- Tags ---- */
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
    padding: 16px 20px 0;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.card-tags span {
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    background: var(--c4);
    color: var(--c1);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.biology-card-inner:hover .card-tags span {
    background: var(--c1);
    color: white;
    transform: translateY(-2px);
}

.card-tags span:nth-child(2) {
    transition-delay: 0.05s;
}

.card-tags span:nth-child(3) {
    transition-delay: 0.1s;
}

/* ---- Shimmer ---- */
.card-shimmer {
    position: absolute;
    top: 8px;
    left: -75%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: skewX(-20deg);
    transition: left 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.biology-card-inner:hover .card-shimmer {
    left: 125%;
}

/* ---- Corner accent ---- */
.card-corner-br {
    position: absolute;
    bottom: 12px;
    left: 20px;
    width: 28px;
    height: 3px;
    background: linear-gradient(90deg, var(--c2), transparent);
    border-radius: 2px;
    transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.biology-card-inner:hover .card-corner-br {
    width: 56px;
}

/* ---- Responsive ---- */
@media (max-width: 992px) {
    .biology-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
        padding: 0 16px;
    }
    .biology-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 576px) {
    .biology-section {
        padding: 60px 0;
    }
    .biology-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .biology-title {
        font-size: 2rem;
    }
    .bio-icon-main {
        width: 72px;
        height: 72px;
        font-size: 1.8rem;
    }
    .card-icon-wrap {
        width: 76px;
        height: 76px;
    }
    .biology-card-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

/* ========================================
   SCROLL PROGRESS BAR
   ======================================== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #2F3438, #6B7F8E, #B0C2D0);
    z-index: 10000;
    width: 0;
    transition: width 0.1s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 0 12px rgba(47, 52, 56, 0.3);
    border-radius: 0 2px 2px 0;
}

/* ========================================
   SVG BIOLOGY DECORATIONS ANIMATIONS
   ======================================== */
.antibody-animation {
    position: absolute;
    width: 80px;
    height: 80px;
    top: 15%;
    left: 8%;
    opacity: 0.15;
    animation: antibodyFloat 12s cubic-bezier(0.45, 0.05, 0.25, 1) infinite;
}

.virus-animation {
    position: absolute;
    width: 50px;
    height: 50px;
    bottom: 20%;
    right: 12%;
    opacity: 0.12;
    animation: virusSpin 20s linear infinite;
}

@keyframes antibodyFloat {
    0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
    30% { transform: translateY(-20px) rotate(5deg) scale(1.05); }
    60% { transform: translateY(8px) rotate(-3deg) scale(0.97); }
    90% { transform: translateY(-10px) rotate(2deg) scale(1.02); }
}

@keyframes virusSpin {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

.bacteriophage-animation {
    position: fixed;
    width: 120px;
    height: auto;
    bottom: 40px;
    right: 30px;
    opacity: 0.08;
    animation: phageDance 18s cubic-bezier(0.45, 0.05, 0.25, 1) infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes phageDance {
    0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
    25% { transform: translateY(-15px) rotate(-5deg) scale(1.02); }
    50% { transform: translateY(-8px) rotate(3deg) scale(0.98); }
    75% { transform: translateY(-20px) rotate(-2deg) scale(1.01); }
}

.molecule-animation {
    position: fixed;
    width: 100px;
    height: auto;
    bottom: 80px;
    left: 30px;
    opacity: 0.06;
    animation: moleculeRotate 30s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes moleculeRotate {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.05); }
    100% { transform: rotate(360deg) scale(1); }
}

.injection {
    position: fixed;
    width: 70px;
    height: auto;
    top: 50%;
    left: 5%;
    opacity: 0.05;
    animation: injectionBob 14s cubic-bezier(0.45, 0.05, 0.25, 1) infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes injectionBob {
    0%, 100% { transform: translateY(0) rotate(-15deg); }
    50% { transform: translateY(-25px) rotate(15deg); }
}

/* ========================================
   HERO FLOATING PARTICLES
   ======================================== */
.hero-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.hero-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: particleDrift linear infinite;
}

.hero-particle:nth-child(1) { left: 10%; top: 20%; width: 3px; height: 3px; animation-duration: 8s; animation-delay: 0s; }
.hero-particle:nth-child(2) { left: 25%; top: 60%; width: 5px; height: 5px; animation-duration: 11s; animation-delay: 1s; }
.hero-particle:nth-child(3) { left: 40%; top: 30%; width: 2px; height: 2px; animation-duration: 9s; animation-delay: 2s; }
.hero-particle:nth-child(4) { left: 55%; top: 70%; width: 4px; height: 4px; animation-duration: 12s; animation-delay: 0.5s; }
.hero-particle:nth-child(5) { left: 70%; top: 40%; width: 3px; height: 3px; animation-duration: 7s; animation-delay: 1.5s; }
.hero-particle:nth-child(6) { left: 85%; top: 15%; width: 5px; height: 5px; animation-duration: 10s; animation-delay: 3s; }
.hero-particle:nth-child(7) { left: 15%; top: 80%; width: 2px; height: 2px; animation-duration: 13s; animation-delay: 0.8s; }
.hero-particle:nth-child(8) { left: 90%; top: 55%; width: 4px; height: 4px; animation-duration: 9s; animation-delay: 2.5s; }

@keyframes particleDrift {
    0% { transform: translateY(0) translateX(0); opacity: 0.3; }
    25% { transform: translateY(-30px) translateX(15px); opacity: 0.8; }
    50% { transform: translateY(-60px) translateX(-10px); opacity: 0.4; }
    75% { transform: translateY(-90px) translateX(20px); opacity: 0.7; }
    100% { transform: translateY(-120px) translateX(0); opacity: 0; }
}

/* ========================================
   COURSE FEATURE ITEMS â€” STAGGERED ENTRANCE
   ======================================== */
.section-features {
    perspective: 800px;
}

.section-features .feature-item {
    opacity: 0;
    transform: translateX(-30px) rotateY(8deg);
    animation: featureSlideIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.section-features .feature-item:nth-child(1) { animation-delay: 0.3s; }
.section-features .feature-item:nth-child(2) { animation-delay: 0.45s; }
.section-features .feature-item:nth-child(3) { animation-delay: 0.6s; }

@keyframes featureSlideIn {
    0% { opacity: 0; transform: translateX(-30px) rotateY(8deg); }
    100% { opacity: 1; transform: translateX(0) rotateY(0); }
}

.feature-item {
    position: relative;
    overflow: hidden;
}

.feature-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.feature-item:hover::after {
    left: 100%;
}

.feature-item:hover {
    transform: translateX(-5px) scale(1.02) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}

.feature-item i {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.feature-item:hover i {
    transform: scale(1.2) rotate(10deg);
}

/* ========================================
   SECTION SEPARATOR
   ======================================== */
.section-separator {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(107, 127, 142, 0.2), transparent);
    margin: 0;
    position: relative;
    overflow: hidden;
}

.section-separator::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(107, 127, 142, 0.3), transparent);
    animation: separatorSweep 4s cubic-bezier(0.45, 0.05, 0.25, 1) infinite;
}

@keyframes separatorSweep {
    0% { left: -100%; }
    100% { left: 200%; }
}

/* ========================================
   HONOR ROLL CARDS â€” HOVER EFFECTS
   ======================================== */
.honor-student-card {
    transition:
        transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.honor-student-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(107, 127, 142, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.honor-student-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px rgba(47, 52, 56, 0.12) !important;
}

.honor-student-card:hover::before {
    opacity: 1;
}

.honor-student-card .student-photo {
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.honor-student-card:hover .student-photo {
    transform: scale(1.08);
}

.honor-rank-overlay {
    transition:
        transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
        background 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.honor-student-card:hover .honor-rank-overlay {
    transform: scale(1.15);
    background: linear-gradient(135deg, #2F3438, #6B7F8E);
}

/* ========================================
   OPINION CARDS â€” HOVER EFFECTS
   ======================================== */
.opinion-card {
    transition:
        transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.opinion-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transform: skewX(-20deg);
    transition: left 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.opinion-card:hover::after {
    left: 150%;
}

.opinion-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 16px 48px rgba(47, 52, 56, 0.1) !important;
}

.opinion-card .quote-icon {
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.opinion-card:hover .quote-icon {
    transform: scale(1.15) rotate(-8deg);
    color: #6B7F8E;
}

.opinion-card.featured {
    position: relative;
}

.opinion-card.featured::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 40px 40px 0;
    border-color: transparent #6B7F8E transparent transparent;
    transition: border-width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.opinion-card.featured:hover::before {
    border-width: 0 50px 50px 0;
}

/* ========================================
   ENHANCED CAROUSEL
   ======================================== */
.modern-carousel {
    position: relative;
}

.carousel-item {
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.carousel-item-next.carousel-item-start,
.carousel-item-prev.carousel-item-end {
    transform: scale(0.92) rotateY(2deg);
}

.carousel-item.active.carousel-item-start,
.carousel-item.active.carousel-item-end {
    transform: scale(1) rotateY(0);
}

.carousel-control-prev,
.carousel-control-next {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    transform: translateY(-50%) scale(1.15);
    background: rgba(255, 255, 255, 1) !important;
}

/* ========================================
   SMOOTH SECTION REVEAL
   ======================================== */
.courses-section,
.honor-roll-section,
.student-opinions-section {
    position: relative;
}

.courses-section::after,
.honor-roll-section::after,
.student-opinions-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(107, 127, 142, 0.15), transparent);
}

/* ========================================
   NAVBAR SCROLL EFFECT
   ======================================== */
.fixed-top.w-100.bg-white.shadow-sm {
    transition:
        padding 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        backdrop-filter 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.navbar-scrolled {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.92) !important;
}

/* ========================================
   RESPONSIVE ANIMATION ADJUSTMENTS
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    .scroll-progress,
    .hero-particle,
    .antibody-animation,
    .virus-animation,
    .bacteriophage-animation,
    .molecule-animation,
    .injection {
        display: none;
    }

    .hero-title-reveal,
    .hero-subtitle-reveal,
    .biology-card,
    .section-features .feature-item {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .hero-title-reveal::after,
    .title-highlight::after,
    .biology-card-inner::after,
    .opinion-card::after,
    .feature-item::after {
        display: none;
    }
}

.login-btn, .register-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2F3438 0%, #6B7F8E 100%);
    color: white;
    border: 2px solid transparent;
    border-radius: 60px;
    padding: 10px 20px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    margin: 0 5px;
}

@media (max-width: 576px) {
    .login-btn, .register-btn { padding: 6px 12px; font-size: 0.85rem; margin: 0 2px; }
    .arrow-icon { margin-right: 3px; }
    .arrow-icon svg { width: 18px; height: 18px; }
    .btn-text { gap: 4px; }
    .fixed-top .container { padding-left: 5px; padding-right: 5px; }
    .fixed-top { padding: 8px 0 !important; }
    .fixed-top .container img { max-width: 50px !important; }
    .fixed-top .container { display: flex; flex-direction: column; align-items: center; }
    .fixed-top .container > a { margin-bottom: 8px; }
    .fixed-top .d-flex.align-items-center { justify-content: center; }
    .container.mt-4 { margin-top: 120px !important; }
    .container.mt-3 { margin-top: 110px !important; }
}

.register-btn { background: linear-gradient(135deg, #2F3438 0%, #6B7F8E 100%); box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3); }
.login-btn:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4); background: linear-gradient(135deg, #6B7F8E 0%, #2F3438 100%); border-color: rgba(255, 255, 255, 0.2); }
.register-btn:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 15px 35px rgba(245, 87, 108, 0.4); background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%); border-color: rgba(255, 255, 255, 0.2); }
.login-btn:active, .register-btn:active { transform: translateY(-1px) scale(1.02); }
.btn-text { display: flex; gap: 8px; }
.text-part-1 { color: white; }
.text-part-2 { color: #ffa640; }
.text-part-3 { color: #ff2c51; }
@media (max-width: 576px) { .fixed-top .container { flex-direction: row; flex-wrap: wrap; } .fixed-top .d-flex.align-items-center { justify-content: center; margin-top: 5px; } .fixed-top .text-decoration-none { margin-bottom: 5px; } }
.arrow-icon { margin-right: 8px; transition: all 0.3s ease; color: #ffc107; }
.login-btn:hover .arrow-icon { transform: translateX(4px) rotate(180deg); }
.virus-icon { transition: all 0.3s ease; }
.login-btn2:hover .virus-icon { transform: rotate(180deg); }
.login-btn::after, .register-btn::after { content: ""; position: absolute; top: 50%; left: 50%; width: 5px; height: 5px; background: rgba(255, 255, 255, 0.5); opacity: 0; border-radius: 100%; transform: scale(1, 1) translate(-50%); transform-origin: 50% 50%; }
.login-btn:hover::after { animation: ripple 1s ease-out; }
.register-btn:hover::after { animation: ripple 1s ease-in; }
.login-btn:focus, .register-btn:focus { outline: 2px solid #007bff; outline-offset: 2px; }

.login-btn2 {
    background: linear-gradient(135deg, #2F3438 0%, #6B7F8E 100%);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    width: auto;
    min-width: 200px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-btn2:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.register-btn2 {
    background: linear-gradient(135deg, #2F3438 0%, #6B7F8E 100%);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    width: 100%;
    transition: all 0.3s ease;
}

.register-btn2:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(rgba(47, 52, 56, 0.3));
}


.login-input-group-icon {
    color: #2F3438;
}
.login-input-group:focus-within .login-input-group-icon {
    color: #2F3438;
}
.register-input-group-icon {
    color: #2F3438;
}
.register-input-group:focus-within .register-input-group-icon {
    color: #2F3438;
}
/* Platform-specific animations */
[data-aos] {
  overflow: hidden !important;
}

[data-aos^='fade'][data-aos^='fade'] {
  will-change: opacity, transform;
  backface-visibility: hidden;
}

.gear-animation {
  position: absolute;
  top: 20%;
  right: 20%;
  width: 120px;
  height: 120px;
  z-index: 0;
  opacity: 0.15;
  animation: gearRotate 8s linear infinite;
  transform-origin: 50% 50%;
}

@keyframes gearRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.circuit-animation {
  position: absolute;
  bottom: -90%;
  left: 20%;
  width: 120px;
  height: 120px;
  z-index: 0;
  opacity: 0.5;
  animation: circuitPulse 3s ease-in-out infinite;
}

@media (min-width: 768px) {
  .circuit-animation { bottom: 10%; left: 60%; }
}
@media (min-width: 1000px) {
  .circuit-animation { bottom: 0; }
}
@media (min-width: 1200px) {
  .circuit-animation { bottom: -70%; }
}
@media (min-width: 1400px) {
  .circuit-animation { bottom: -70%; }
}

@keyframes circuitPulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.05); }
}

.mechanical-animation {
  position: absolute;
  bottom: -90%;
  left: 20%;
  width: 80px;
  height: 80px;
  z-index: 0;
  opacity: 0.5;
  animation: mechanicalFloat 14s ease-in-out infinite;
  transform-style: preserve-3d;
}

@media (min-width: 768px) {
  .mechanical-animation { bottom: 10%; left: 60%; }
}
@media (min-width: 1000px) {
  .mechanical-animation { bottom: 0; }
}
@media (min-width: 1200px) {
  .mechanical-animation { bottom: -70%; }
}
@media (min-width: 1400px) {
  .mechanical-animation { bottom: -70%; }
}

@keyframes mechanicalFloat {
  0% { transform: translate(0, 0) scale(0.9); opacity: 0.4; }
  25% { transform: translate(15px, -10px) scale(1); opacity: 0.6; }
  50% { transform: translate(30px, 5px) scale(1.05); opacity: 0.5; }
  75% { transform: translate(5px, 15px) scale(0.95); opacity: 0.6; }
  100% { transform: translate(0, 0) scale(0.9); opacity: 0.4; }
}

.molecular-structure-animation {
  position: absolute;
  top: -20%;
  left: 35%;
  width: 120px;
  height: 120px;
  z-index: 0;
  opacity: 0.6;
  animation: molecularRotation 8s ease-in-out infinite;
}

@keyframes molecularRotation {
  0% { transform: rotate(0deg) scale(1); opacity: 0.6; }
  25% { transform: rotate(90deg) scale(1.05); opacity: 0.8; }
  50% { transform: rotate(180deg) scale(1.1); opacity: 0.9; }
  75% { transform: rotate(270deg) scale(1.05); opacity: 0.8; }
  100% { transform: rotate(360deg) scale(1); opacity: 0.6; }
}

.chemical-reaction-animation {
  position: absolute;
  top: 90%;
  left: 10%;
  width: 120px;
  height: 120px;
  z-index: 0;
  opacity: 0.7;
  animation: reactionPulse 6s ease-in-out infinite;
}

@keyframes reactionPulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  25% { transform: scale(1.05); opacity: 0.8; }
  50% { transform: scale(1.1); opacity: 0.9; }
  75% { transform: scale(1.05); opacity: 0.8; }
}

.atom-animation {
  position: absolute;
  top: 30%;
  left: 15%;
  width: 100px;
  height: 100px;
  z-index: 0;
}

.diffusion-animation {
  position: absolute;
  top: 130%;
  right: 30%;
  width: 140px;
  height: 60px;
  z-index: 0;
  opacity: 0.7;
  animation: chemicalReaction 4s ease-in-out infinite;
}

@keyframes chemicalReaction {
  0%, 100% { transform: translateY(0) scaleY(1); }
  50% { transform: translateY(-10px) scaleY(1.2); }
}

.magnet-animation {
  position: absolute;
  width: 140px;
  height: 84px;
  right: 25%;
  bottom: -190%;
  z-index: 0;
  opacity: 0.7;
  animation: molecularBond 3s ease-in-out infinite;
}

@media (min-width: 768px) {
  .magnet-animation { bottom: -200%; right: 35%; }
}
@media (min-width: 1200px) {
  .magnet-animation { bottom: -105%; }
}

@keyframes atomSpin {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.1); }
  100% { transform: rotate(360deg) scale(1); }
}

@keyframes molecularBond {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.1); opacity: 0.9; }
}

.price-badge {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white !important;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
}

.price-badge i {
    font-size: 0.8rem;
}