/* =====================================================
   Mobile Floating Action Bar (FAB) & Site Upgrades
   Premium UI/UX Enhancement v5.0
   ===================================================== */

/* =====================================================
   1. UNIFIED MOBILE FLOATING ACTION BAR
   Consolidates: Help, Share, WhatsApp, Scroll-to-top
   ===================================================== */

/* Mobile FAB Container */
.mobile-fab-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9990;
    display: none;
}

@media (max-width: 768px) {
    .mobile-fab-container {
        display: block;
    }

    /* Hide individual floating buttons on mobile */
    .scroll-top-btn,
    .faq-floating-btn,
    .share-page-btn {
        display: none !important;
    }
}

/* Main FAB Button */
.mobile-fab-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color, #1a5f7a), var(--primary-dark, #0d3d4d));
    border: 3px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 8px 25px rgba(26, 95, 122, 0.4),
        0 0 0 0 rgba(201, 162, 39, 0);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 10;
}

.mobile-fab-toggle:hover,
.mobile-fab-toggle:focus {
    transform: scale(1.1);
    box-shadow:
        0 12px 35px rgba(26, 95, 122, 0.5),
        0 0 0 8px rgba(201, 162, 39, 0.15);
}

.mobile-fab-toggle.active {
    background: linear-gradient(135deg, var(--gold-color, #c9a227), var(--gold-dark, #a88a1d));
    transform: rotate(45deg);
}

.mobile-fab-toggle .fab-icon-open,
.mobile-fab-toggle .fab-icon-close {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mobile-fab-toggle .fab-icon-close {
    position: absolute;
    opacity: 0;
    transform: rotate(-45deg);
}

.mobile-fab-toggle.active .fab-icon-open {
    opacity: 0;
    transform: rotate(45deg);
}

.mobile-fab-toggle.active .fab-icon-close {
    opacity: 1;
    transform: rotate(0deg);
}

/* FAB Menu Items */
.mobile-fab-menu {
    position: absolute;
    bottom: 70px;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mobile-fab-container.active .mobile-fab-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-fab-item {
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mobile-fab-container.active .mobile-fab-item {
    opacity: 1;
    transform: translateX(0);
}

.mobile-fab-container.active .mobile-fab-item:nth-child(1) { transition-delay: 0.05s; }
.mobile-fab-container.active .mobile-fab-item:nth-child(2) { transition-delay: 0.1s; }
.mobile-fab-container.active .mobile-fab-item:nth-child(3) { transition-delay: 0.15s; }
.mobile-fab-container.active .mobile-fab-item:nth-child(4) { transition-delay: 0.2s; }
.mobile-fab-container.active .mobile-fab-item:nth-child(5) { transition-delay: 0.25s; }

.mobile-fab-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    text-decoration: none;
    color: #fff;
}

.mobile-fab-btn:hover {
    transform: scale(1.1);
}

/* FAB Button Variants */
.mobile-fab-btn.fab-scroll {
    background: linear-gradient(135deg, var(--gold-color, #c9a227), var(--gold-dark, #a88a1d));
}

.mobile-fab-btn.fab-help {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.mobile-fab-btn.fab-share {
    background: linear-gradient(135deg, var(--primary-color, #1a5f7a), var(--primary-dark, #0d3d4d));
}

.mobile-fab-btn.fab-whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
}

.mobile-fab-btn.fab-copy {
    background: linear-gradient(135deg, #45aaf2, #2d98da);
}

/* FAB Labels */
.mobile-fab-label {
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

/* FAB Backdrop */
.mobile-fab-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9989;
}

.mobile-fab-container.active ~ .mobile-fab-backdrop,
body.fab-menu-open .mobile-fab-backdrop {
    opacity: 1;
    visibility: visible;
}

/* =====================================================
   2. MEMORY CARD IMPROVEMENTS
   ===================================================== */

/* Memory Card Type Badge - Compact Design */
.memory-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.memory-type-badge i {
    font-size: 0.85rem;
}

/* Type-specific badges */
.memory-type-badge.type-touching {
    background: linear-gradient(135deg, rgba(214, 48, 49, 0.1), rgba(214, 48, 49, 0.15));
    color: #d63031;
    border: 1px solid rgba(214, 48, 49, 0.2);
}

.memory-type-badge.type-story {
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.1), rgba(0, 184, 148, 0.15));
    color: #00b894;
    border: 1px solid rgba(0, 184, 148, 0.2);
}

.memory-type-badge.type-quote {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.1), rgba(108, 92, 231, 0.15));
    color: #6c5ce7;
    border: 1px solid rgba(108, 92, 231, 0.2);
}

.memory-type-badge.type-thought {
    background: linear-gradient(135deg, rgba(225, 112, 85, 0.1), rgba(225, 112, 85, 0.15));
    color: #e17055;
    border: 1px solid rgba(225, 112, 85, 0.2);
}

.memory-type-badge.type-photo {
    background: linear-gradient(135deg, rgba(9, 132, 227, 0.1), rgba(9, 132, 227, 0.15));
    color: #0984e3;
    border: 1px solid rgba(9, 132, 227, 0.2);
}

/* Memory Card Reactions - Fixed Position */
.memory-reactions-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    gap: 10px;
}

.memory-reactions {
    display: flex;
    gap: 6px;
}

.reaction-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f8f9fa;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 1rem;
    position: relative;
}

.reaction-btn:hover {
    transform: scale(1.15);
    background: #fff;
}

.reaction-btn.reaction-like {
    border-color: rgba(52, 152, 219, 0.2);
}
.reaction-btn.reaction-like:hover,
.reaction-btn.reaction-like.active {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
    border-color: #3498db;
}

.reaction-btn.reaction-heart {
    border-color: rgba(231, 76, 60, 0.2);
}
.reaction-btn.reaction-heart:hover,
.reaction-btn.reaction-heart.active {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    border-color: #e74c3c;
}

.reaction-btn.reaction-pray {
    border-color: rgba(155, 89, 182, 0.2);
}
.reaction-btn.reaction-pray:hover,
.reaction-btn.reaction-pray.active {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: #fff;
    border-color: #9b59b6;
}

/* Reaction Count Badge */
.reaction-count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--gold-color, #c9a227), var(--gold-dark, #a88a1d));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(201, 162, 39, 0.4);
}

/* Memory Author Footer - Non-overlapping */
.memory-card .memory-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    flex-wrap: wrap;
}

.memory-author-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.memory-author-info {
    flex: 1;
    min-width: 0;
}

.memory-author-info strong {
    display: block;
    font-size: 0.9rem;
    color: #2d3436;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.memory-author-info span {
    font-size: 0.8rem;
    color: #636e72;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* =====================================================
   3. ICON VISIBILITY FIXES
   ===================================================== */

/* Fix white icons on light backgrounds */
.memorial-section-header h2 i {
    color: var(--primary-color, #1a5f7a);
}

.filter-tab i,
.sort-dropdown i {
    color: inherit;
}

/* Ensure icon contrast in headers */
.section-header h2 i,
.memorial-bio h2 i {
    color: var(--gold-color, #c9a227);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* =====================================================
   4. MEMORIAL BANNER IMPROVEMENTS
   ===================================================== */

/* Add top padding for banner - cleaner layout */
.memorial-name-banner {
    top: 95px !important;
    margin-top: 0;
    padding: 15px 30px !important;
    max-width: 90%;
    text-align: center;
}

.memorial-emotional-quote {
    top: 160px !important;
    max-width: 85%;
    text-align: center;
}

/* Ensure hero has breathing room */
.memorial-hero {
    padding-top: 160px !important;
}

/* Enhanced animated background for memorial hero */
.memorial-hero {
    position: relative;
    overflow: hidden;
}

.memorial-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        url('https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=1920&h=1080&fit=crop') center/cover,
        linear-gradient(135deg, rgba(26, 95, 122, 0.95), rgba(13, 61, 77, 0.98));
    background-blend-mode: overlay;
    z-index: -1;
    animation: subtleZoom 25s ease-in-out infinite alternate;
}

/* Floating memorial particles */
.memorial-hero .floating-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    animation: floatParticle 10s ease-in-out infinite;
}

@keyframes floatParticle {
    0%, 100% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% { opacity: 0.6; }
    90% { opacity: 0.4; }
    100% {
        transform: translateY(-100px) scale(1);
        opacity: 0;
    }
}

/* Light rays effect */
.memorial-hero .light-ray {
    position: absolute;
    top: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg,
        rgba(201, 162, 39, 0),
        rgba(201, 162, 39, 0.3),
        rgba(201, 162, 39, 0));
    transform-origin: top;
    animation: lightRay 8s ease-in-out infinite;
    opacity: 0.3;
}

@keyframes lightRay {
    0%, 100% { transform: scaleY(0) translateY(-100%); opacity: 0; }
    50% { transform: scaleY(1) translateY(0); opacity: 0.4; }
}

/* =====================================================
   5. SECTION HEADER LAYOUT FIX
   ===================================================== */

/* Fix for section-subtitle placement */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header .section-subtitle {
    display: block;
    font-size: 0.9rem;
    color: var(--gold-color, #c9a227);
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.section-header h2 {
    margin-top: 0;
}

/* =====================================================
   6. PREMIUM ANIMATION ELEMENTS
   ===================================================== */

/* Subtle floating animation */
@keyframes gentleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hover-float {
    animation: gentleFloat 4s ease-in-out infinite;
}

/* Glow pulse effect */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(201, 162, 39, 0.2);
    }
    50% {
        box-shadow: 0 0 40px rgba(201, 162, 39, 0.4);
    }
}

.glow-pulse {
    animation: glowPulse 3s ease-in-out infinite;
}

/* Shimmer effect for premium elements */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.shimmer-effect {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

/* Interactive scale on hover */
.interactive-hover {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.interactive-hover:hover {
    transform: translateY(-5px) scale(1.02);
}

/* =====================================================
   7. WHATSAPP BANNER MOBILE IMPROVEMENTS
   ===================================================== */

@media (max-width: 768px) {
    .whatsapp-side-banner {
        display: none !important;
    }
}

/* =====================================================
   8. PAGE-SPECIFIC VISUAL UPGRADES
   ===================================================== */

/* About page - Add visual interest */
.about-content .about-image img {
    border-radius: 20px;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(201, 162, 39, 0.1);
}

/* How it Works - Replace SVG with real image container */
.svg-memorial-candle-container {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
}

.svg-memorial-candle-container img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 20px;
}

/* Stories - Replace SVG with real image container */
.svg-family-connection-container {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
}

.svg-family-connection-container img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 20px;
}

/* Contact page - Enhanced visual */
.contact-section {
    position: relative;
}

.contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.03), transparent);
    pointer-events: none;
}

/* Premium card enhancements */
.premium-card {
    position: relative;
    overflow: hidden;
}

.premium-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(201, 162, 39, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

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

/* =====================================================
   9. RESPONSIVE ADJUSTMENTS
   ===================================================== */

@media (max-width: 480px) {
    .mobile-fab-toggle {
        width: 52px;
        height: 52px;
        font-size: 1.2rem;
    }

    .mobile-fab-btn {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }

    .mobile-fab-label {
        font-size: 0.8rem;
        padding: 6px 10px;
    }

    .memory-reactions {
        gap: 4px;
    }

    .reaction-btn {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .reaction-count {
        min-width: 18px;
        height: 18px;
        font-size: 0.65rem;
    }
}

/* =====================================================
   10. SCROLL-LINKED ANIMATIONS
   ===================================================== */

/* Elements that animate on scroll */
[data-scroll-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-scroll-animate].visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animations for grid items */
.stagger-animate > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.stagger-animate.visible > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-animate.visible > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-animate.visible > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-animate.visible > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-animate.visible > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-animate.visible > *:nth-child(6) { transition-delay: 0.6s; }

.stagger-animate.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* =====================================================
   11. COMPLETE MEMORY CARD REDESIGN v2.0
   Premium polished design for all screen sizes
   ===================================================== */

/* Memory Card - Clean Modern Design */
.memory-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.memory-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

/* Card Body */
.memory-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

/* Type Badge - Compact Corner Style */
.memory-type-badge {
    position: absolute !important;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px !important;
    border-radius: 8px !important;
    font-size: 0.7rem !important;
    font-weight: 600;
    margin: 0 !important;
    z-index: 2;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.memory-type-badge i {
    font-size: 0.7rem !important;
}

/* Type badge colors - lighter for floating look */
.memory-type-badge.type-touching,
.memory-category-badge.touching {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #e74c3c !important;
    border: 1px solid rgba(231, 76, 60, 0.2) !important;
}

.memory-type-badge.type-story,
.memory-category-badge.story {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #00b894 !important;
    border: 1px solid rgba(0, 184, 148, 0.2) !important;
}

.memory-type-badge.type-quote,
.memory-category-badge.quote {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #6c5ce7 !important;
    border: 1px solid rgba(108, 92, 231, 0.2) !important;
}

.memory-type-badge.type-thought,
.memory-category-badge.thought {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #e17055 !important;
    border: 1px solid rgba(225, 112, 85, 0.2) !important;
}

.memory-type-badge.type-photo,
.memory-category-badge.photo {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #0984e3 !important;
    border: 1px solid rgba(9, 132, 227, 0.2) !important;
}

/* Card with relative positioning for badge */
.memory-card-body {
    position: relative;
}

/* Memory Image - Full width, clean */
.memory-card .memory-image {
    width: calc(100% + 40px);
    margin: -20px -20px 15px -20px;
    max-height: 220px;
    object-fit: cover;
    border-radius: 0;
}

/* Memory Content - Clean text */
.memory-card .memory-content {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #2d3436;
    margin-bottom: 15px;
    flex: 1;
    padding-top: 10px;
}

/* Reactions Container - Clean bottom bar */
.memory-reactions-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 12px 0;
    margin-top: auto;
    border-top: 1px solid #f1f2f3;
    gap: 8px;
}

/* Reaction Buttons - Pill style */
.memory-reactions {
    display: flex;
    background: #f8f9fa;
    border-radius: 25px;
    padding: 4px;
    gap: 2px;
}

.reaction-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: #636e72;
}

.reaction-btn:hover {
    background: #fff;
    transform: scale(1.1);
}

.reaction-btn.reaction-like:hover,
.reaction-btn.reaction-like.active {
    color: #3498db;
    background: rgba(52, 152, 219, 0.15);
}

.reaction-btn.reaction-heart:hover,
.reaction-btn.reaction-heart.active {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.15);
}

.reaction-btn.reaction-pray:hover,
.reaction-btn.reaction-pray.active {
    color: #9b59b6;
    background: rgba(155, 89, 182, 0.15);
}

/* Reaction Count - Inline subtle */
.reaction-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 0.6rem;
    font-weight: 700;
    color: #fff;
    background: var(--gold-color, #c9a227);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    border: 1.5px solid #fff;
}

/* Author Section - Clean footer */
.memory-card .memory-author {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 12px;
    margin-top: 0 !important;
    border-top: none !important;
}

.memory-author-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.memory-author-avatar.color-1 { background: linear-gradient(135deg, #667eea, #764ba2); }
.memory-author-avatar.color-2 { background: linear-gradient(135deg, #f093fb, #f5576c); }
.memory-author-avatar.color-3 { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.memory-author-avatar.color-4 { background: linear-gradient(135deg, #43e97b, #38f9d7); }
.memory-author-avatar.color-5 { background: linear-gradient(135deg, #fa709a, #fee140); }
.memory-author-avatar.color-6 { background: linear-gradient(135deg, #a8edea, #fed6e3); color: #666; }
.memory-author-avatar.color-7 { background: linear-gradient(135deg, #ff9a9e, #fad0c4); }
.memory-author-avatar.color-8 { background: linear-gradient(135deg, #a18cd1, #fbc2eb); }

.memory-author-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.memory-author-info strong {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #2d3436;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.memory-author-info span {
    font-size: 0.75rem;
    color: #b2bec3;
    display: flex;
    align-items: center;
    gap: 4px;
}

.memory-author-info span i {
    font-size: 0.65rem;
}

/* =====================================================
   12. MOBILE MEMORY CARD OPTIMIZATIONS
   ===================================================== */

@media (max-width: 768px) {
    .memory-card-body {
        padding: 16px;
    }

    .memory-type-badge {
        top: 10px;
        right: 10px;
        padding: 4px 8px !important;
        font-size: 0.65rem !important;
    }

    .memory-type-badge i {
        font-size: 0.65rem !important;
    }

    .memory-card .memory-image {
        width: calc(100% + 32px);
        margin: -16px -16px 12px -16px;
        max-height: 180px;
    }

    .memory-card .memory-content {
        font-size: 0.9rem;
        line-height: 1.65;
    }

    .memory-reactions-container {
        padding: 10px 0;
    }

    .memory-reactions {
        padding: 3px;
    }

    .reaction-btn {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
    }

    .reaction-count {
        min-width: 14px;
        height: 14px;
        font-size: 0.55rem;
        top: -3px;
        right: -3px;
    }

    .memory-author-avatar {
        width: 32px;
        height: 32px;
        min-width: 32px;
        font-size: 0.75rem;
    }

    .memory-author-info strong {
        font-size: 0.8rem;
        max-width: 120px;
    }

    .memory-author-info span {
        font-size: 0.7rem;
    }
}

@media (max-width: 400px) {
    .memory-card-body {
        padding: 14px;
    }

    .memory-type-badge {
        padding: 3px 6px !important;
        font-size: 0.6rem !important;
    }

    .memory-type-badge i {
        font-size: 0.6rem !important;
    }

    .memory-card .memory-image {
        width: calc(100% + 28px);
        margin: -14px -14px 10px -14px;
        max-height: 150px;
    }

    .reaction-btn {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    .memory-author-info strong {
        max-width: 100px;
    }
}

/* =====================================================
   13. MEMORIAL HERO ENHANCED BACKGROUND
   ===================================================== */

/* Subtle animated gradient overlay */
.memorial-hero::after {
    background: linear-gradient(
        180deg,
        transparent 0%,
        transparent 60%,
        rgba(245, 247, 250, 0.3) 80%,
        var(--bg-primary, #f5f7fa) 100%
    ) !important;
}

/* Floating decorative elements */
.memorial-hero-decoration {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201, 162, 39, 0.1), transparent 70%);
    filter: blur(40px);
    animation: floatDecoration 15s ease-in-out infinite;
    pointer-events: none;
}

@keyframes floatDecoration {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(20px, -30px) scale(1.1); }
    50% { transform: translate(-15px, -20px) scale(0.9); }
    75% { transform: translate(25px, -40px) scale(1.05); }
}

/* =====================================================
   14. SECTION HEADER ICON FIX
   ===================================================== */

/* Fix for memories section header icon visibility */
.memorial-section-header h2 i,
.memorial-section h2 i {
    color: var(--gold-color, #c9a227) !important;
    opacity: 1 !important;
}

/* Ensure filter tabs have proper icon colors */
.filter-tab i {
    color: inherit !important;
    opacity: 0.8;
}

.filter-tab.active i {
    opacity: 1;
}

/* =====================================================
   15. MEMORY CARD FOOTER LAYOUT
   ===================================================== */

/* Footer container - author left, reactions right */
.memory-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 15px;
    margin-top: auto;
    border-top: 1px solid #f1f2f3;
    gap: 12px;
    flex-wrap: wrap;
}

.memory-card-footer .memory-author {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    padding-top: 0 !important;
    margin-top: 0 !important;
    border-top: none !important;
}

.memory-card-footer .memory-reactions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

/* Badge label hidden on mobile for compact look */
@media (max-width: 500px) {
    .memory-type-badge .badge-label {
        display: none;
    }

    .memory-type-badge {
        padding: 6px 8px !important;
    }

    .memory-card-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .memory-card-footer .memory-author {
        order: 2;
    }

    .memory-card-footer .memory-reactions {
        order: 1;
        justify-content: center;
        background: #f8f9fa;
        border-radius: 25px;
        padding: 5px 10px;
    }
}
