/* Base layout styles */
html, body {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}
.header-picture {
    height: 300px;
    width: 100%;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    position: relative;
    border-radius: 8px;
    margin-bottom: -13rem;
    transition: outline-color 0.3s ease;
    cursor: default; /* Change default cursor to normal */
    user-select: none; /* Prevent text selection while dragging */
    z-index: 1;
}

.header-picture.editing {
    outline: 2px solid #007bff;
    cursor: move; /* Change cursor to move only in editing mode */
    transition: none; /* Remove transitions during editing */
}

.header-picture.touching {
    outline: 2px solid #28a745;
    cursor: grabbing; /* Change cursor to grabbing while actively moving */
}

.header-picture.saving {
    opacity: 0.8;
    pointer-events: none;
}

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #007bff;
    animation: spin 1s linear infinite;
}

.notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 4px;
    color: white;
    z-index: 1000;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    animation: slideUp 0.3s ease;
}

.notification.success {
    background-color: #28a745;
}

.notification.error {
    background-color: #dc3545;
}

.notification.info {
    background-color: #17a2b8;
}

.notification.warning {
    background-color: #ffc107;
    color: #000;
}

@keyframes slideUp {
    from { transform: translate(-50%, 100%); }
    to { transform: translate(-50%, 0); }
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-out {
    opacity: 0;
    transition: opacity 0.3s ease;
}

html.template-default,
body.template-default,
.template-default,
.template-default body,
.template-default .page-wrapper,
.template-default #content {
    background-color: #f7f3eb;
    background-image: none;
    color: #1f2937;
}

.template-default .memorial-content,
.template-default .main-content {
    background: transparent;
}

.template-default {
    --mem-panel-bg: rgba(255, 255, 255, 0.98);
    --mem-panel-border: rgba(224, 218, 210, 0.4);
    --mem-panel-shadow: 0 14px 32px rgba(31, 41, 55, 0.08);

    --mem-section-bg: rgba(255, 255, 255, 0.96);
    --mem-section-border: rgba(224, 218, 210, 0.35);
    --mem-section-shadow: 0 14px 28px rgba(31, 41, 55, 0.06);
    --mem-section-title: #1f2937;
    --mem-section-text: #1f2937;
    --mem-section-muted: #6b7280;

    --mem-card-bg: rgba(255, 255, 255, 0.98);
    --mem-card-border: rgba(224, 218, 210, 0.4);
    --mem-card-shadow: 0 12px 22px rgba(31, 41, 55, 0.08);

    --mem-divider-color: rgba(224, 218, 210, 0.55);

    --mem-tab-bg: rgba(255, 255, 255, 0.75);
    --mem-tab-border: rgba(224, 218, 210, 0.5);
    --mem-tab-link: rgba(55, 65, 81, 0.85);
    --mem-tab-link-hover: #111827;
    --mem-tab-link-active: #111827;

    --mem-link-color: #1f2937;
    --mem-link-hover: #0f172a;
}

.memorial-content.template-default {
    background-color: transparent;
    color: #1f2937;
}

.memorial-content {
    position: relative;
    overflow: visible; /* Allow content to overflow for overlapping */
    padding: 0.5rem; /* Small padding for mobile */
    width: 100%;
}

@media screen and (min-width: 768px) {
    .memorial-content {
        padding: 1rem; /* More padding for desktop */
    }
}

.template-default .main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.template-default .max-w-4xl {
    flex: 1;
    width: 100%;
    max-width: 1024px;
    box-sizing: border-box;
    background: #fcfaf7;
    border-radius: 1.75rem;
    box-shadow: 0 35px 80px rgba(31, 41, 55, 0.08);
    padding-bottom: clamp(2rem, 4vw, 3rem);
}

.template-default .memorial-panel,
.template-default .memorial-section,
.template-default .section-panel {
    background: var(--mem-panel-bg);
    border-color: var(--mem-panel-border);
    box-shadow: var(--mem-panel-shadow);
}

.template-default .memorial-section--flat,
.template-default .memorial-section--flat .section-panel {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

/* Tribute card styles */
.template-default .tribute-card {
    border: 1px solid #e0dad2;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.template-default .tribute-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
}

.template-default .tribute-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.template-default .tribute-header .name {
    font-weight: bold;
    margin-right: 8px;
}

.template-default .tribute-header .date {
    color: #888;
    font-size: 0.9em;
}

.template-default .tribute-content {
    margin-bottom: 8px;
}

.template-default .tribute-actions {
    display: flex;
    align-items: center;
}

/* Like button styles */
.template-default .like-button {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #888;
    transition: color 0.2s ease-in-out;
}

.template-default .like-button i {
    margin-right: 4px;
}

.template-default .like-button:hover,
.template-default .like-button.liked {
    color: #e0245e;
}

/* Separator styles */
.template-default .separator {
    border-top: 1px solid #e0dad2;
    margin: 20px 0;
}

/* Footer styles */
.template-default footer {
    background: transparent;
    color: #e0dad2;
    width: 100%;
    padding: clamp(2rem, 4vw, 3rem) 0;
}

.template-default footer .container {
    max-width: 1024px;
    margin: 0 auto;
    background: #1e232b;
    border-radius: 1.5rem;
    padding: clamp(1.75rem, 4vw, 2.75rem);
    border: 1px solid rgba(224, 218, 210, 0.18);
    box-shadow: 0 25px 60px rgba(17, 24, 39, 0.18);
}

/* Button styles */
.template-default .btn-custom {
    background: linear-gradient(135deg, #f2eadf 0%, #e2d6c7 100%);
    color: #1e232b;
    border-color: rgba(30, 35, 43, 0.12);
    box-shadow: 0 10px 22px rgba(17, 24, 39, 0.08);
}

.template-default .btn-custom:hover {
    background: linear-gradient(135deg, #fff8ee 0%, #efe2d2 100%);
    color: #111827;
    box-shadow: 0 14px 28px rgba(17, 24, 39, 0.12);
}

.template-default .tribute-avatar {
    background: rgba(30, 35, 43, 0.08);
    border-color: rgba(30, 35, 43, 0.12);
}

.template-default .tribute-card__media {
    background: rgba(30, 35, 43, 0.04);
}

.template-default .reply-button {
    color: #4b5563 !important;
}

.template-default .reply-button:hover {
    color: #1e232b !important;
}

/* Timeline styles */
.template-default .timeline-container {
  padding: 2rem 0;
  max-width: 1024px;
  margin: 0 auto;
  position: relative;
}

.template-default .timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: #e0dad2;
  transform: translateX(-50%);
}

.template-default .timeline-item {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s ease forwards;
  position: relative;
  margin-bottom: 2rem;
}

.template-default .timeline-dot {
  position: absolute;
  left: 50%;
  width: 16px;
  height: 16px;
  background-color: #e0dad2;
  border: 2px solid #fff;
  border-radius: 50%;
  transform: translateX(-50%);
  z-index: 10;
  transition: all 0.3s ease;
  box-shadow: 0 0 0 4px rgba(224, 218, 210, 0.2);
}

.template-default .timeline-item:hover .timeline-dot {
  transform: translateX(-50%) scale(1.2);
  box-shadow: 0 0 0 6px rgba(224, 218, 210, 0.3);
  background-color: #1e232b;
  border-color: #fff;
}

@media (min-width: 768px) {
  .template-default .timeline-item:nth-child(odd) .timeline-content {
    text-align: right;
  }
}

.template-default .timeline-content {
  position: relative;
}

/* Hide the connecting lines on mobile */
@media (max-width: 767px) {
  .template-default .timeline-content::before {
    display: none;
  }
  
  .template-default .timeline-item {
    padding-top: 2rem;
    width: 100% !important;
    margin-left: 0 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .template-default .timeline-content {
    margin-top: 1rem;
    text-align: center;
  }

  .template-default .timeline-line {
    left: 50% !important;
    transform: translateX(-50%) !important;
  }

  .template-default .timeline-card::before {
    left: 50% !important;
    right: auto !important;
    top: -20px !important;
    transform: translateX(-50%) !important;
  }

  .template-default .timeline-dot {
    left: 50% !important;
    top: 0 !important;
    transform: translateX(-50%) !important;
  }
}

/* Show connecting lines only on desktop */
@media (min-width: 768px) {
  .template-default .timeline-content::before {
    content: '';
    position: absolute;
    top: 50%;
    width: 2rem;
    height: 2px;
    background-color: #e0dad2;
  }

  .template-default .timeline-item:nth-child(odd) .timeline-content::before {
    left: 100%;
    transform: translateY(-50%);
  }

  .template-default .timeline-item:nth-child(even) .timeline-content::before {
    right: 100%;
    transform: translateY(-50%);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.template-default .timeline-item:nth-child(1) { animation-delay: 0.1s; }
.template-default .timeline-item:nth-child(2) { animation-delay: 0.2s; }
.template-default .timeline-item:nth-child(3) { animation-delay: 0.3s; }
.template-default .timeline-item:nth-child(4) { animation-delay: 0.4s; }
.template-default .timeline-item:nth-child(5) { animation-delay: 0.5s; }

/* Tributes styles */
.template-default .tributes {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 60px;
}

.template-default .tributes::before,
.template-default .tributes::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: #e0dad2;
    top: 0;
    bottom: 0;
}

.template-default .tributes::before {
    left: 30px;
}

.template-default .tributes::after {
    right: 30px;
}

.template-default .tribute-item {
    padding: 0.75rem 1rem;
    position: relative;
    background-color: inherit;
    margin-bottom: 1rem;
}

.template-default .tribute-item::before,
.template-default .tribute-item::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #e0dad2;
    border: 2px solid #fff;
    top: 15px;
}

.template-default .tribute-item::before {
    left: -8px;
}

.template-default .tribute-item::after {
    right: -8px;
}

.template-default .tribute-content {
    background: #ffffff;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.template-default .tribute-header {
    margin-bottom: 0.75rem;
}

.template-default .tribute-author {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.template-default .tribute-name {
    font-weight: 600;
    color: #1e232b;
    font-size: 1rem;
}

.template-default .tribute-date {
    color: #666;
    font-size: 0.8rem;
}

.template-default .tribute-divider {
    height: 1px;
    background-color: #e0dad2;
    margin: 0.75rem 0;
}

.template-default .tribute-text {
    color: #4a5568;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.template-default .tribute-actions {
    display: flex;
    align-items: center;
}

.template-default .like-button {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

@media screen and (max-width: 48rem) {
    .template-default .tribute-content {
        padding: 0.75rem;
    }
    
    .template-default .tribute-name {
        font-size: 0.9rem;
    }
    
    .template-default .tribute-date {
        font-size: 0.75rem;
    }
}

/* Additional styles */
.template-default .tribute-avatar {
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.template-default .tribute-card:hover .tribute-avatar {
    background-color: #1e232b;
    color: #e0dad2;
}

.template-default .leave-tribute {
    background-color: #f9fafb;
    transition: box-shadow 0.2s ease-in-out;
}

.template-default .leave-tribute:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
}

.hidden {
  display: none !important;
}


@media screen and (max-width: 48rem) {
    .template-default .tributes {
        padding: 20px 30px; /* Reduced side padding on mobile */
    }

    .template-default .tribute-item {
        padding: 0.75rem 1rem; /* Reduced padding */
        margin-bottom: 1rem; /* Add space between items */
    }

    .template-default .tribute-name {
        font-size: 0.9rem; /* Slightly smaller name on mobile */
        margin-bottom: 0.25rem;
    }

    .template-default .tribute-date {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }

    .template-default .tribute-text {
        font-size: 0.875rem;
        line-height: 1.4;
    }

    /* Adjust the vertical lines */
    .template-default .tributes::before {
        left: 15px;
    }

    .template-default .tributes::after {
        right: 15px;
    }

    /* Adjust the dots */
    .template-default .tribute-item::before {
        left: -6px;
        width: 12px;
        height: 12px;
    }

    .template-default .tribute-item::after {
        right: -6px;
        width: 12px;
        height: 12px;
    }
}

/* Gallery styles */
.template-default .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.template-default .gallery-item {
    position: relative;
    aspect-ratio: 1;
    background-color: #f3f4f6;
    border-radius: 0.5rem;
    overflow: hidden;
}

.template-default .gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, #f3f4f6, #e0dad2, #f3f4f6);
    background-size: 200% 100%;
    animation: pulse 1.5s ease-in-out infinite;
}

.template-default .gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
    opacity: 0;
    position: relative;
    z-index: 1;
}

.template-default .gallery-image.loaded {
    opacity: 1;
}

.template-default .gallery-item.loaded::before {
    display: none;
}

@keyframes pulse {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.template-default .video-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f3f4f6;
    position: relative;
    z-index: 1;
}

.template-default .video-container i {
    font-size: 2rem;
    color: #666;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@media screen and (max-width: 48rem) {
    .template-default .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.5rem;
        padding: 0.5rem;
    }
}

.header-container {
    position: relative;
    overflow: hidden;
}

.header-image-wrapper {
    width: 140%;
    height: 140%;
    left: -20%;
    top: -20%;
    position: absolute;
    background-position: center;
    transition: transform 0.1s ease;
}

.header-container.editing .header-image-wrapper {
    cursor: move;
    cursor: grab;
}

.header-container.touching .header-image-wrapper {
    cursor: grabbing;
    transition: none;
}

.header-container.editing {
    outline: 2px solid #007bff;
}

.header-container.touching {
    outline: 2px solid #28a745;
}

.header-container.saving {
    opacity: 0.8;
    pointer-events: none;
}

.profile-picture {
    transition: transform 0.3s ease;
    z-index: 10;
}

.profile-picture:hover {
    transform: scale(1.02);
}

.icon-controls {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.75rem;
    z-index: 20;
}

.icon-controls i {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    padding: 0.25rem;
}

.icon-controls i:hover {
    transform: scale(1.05);
    color: rgba(255, 255, 255, 1);
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.icon-controls i.hidden {
    display: none;
}

.like-button.liked {
    color: #e0dad2 !important;
}

.like-button {
    cursor: pointer;
}

/* Updated styles for decorative foliage */
.decorative-foliage {
    position: fixed;
    top: 0;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    opacity: 0.8;
}

.left-foliage {
    left: -50px;
}

.right-foliage {
    right: -50px;
}

.decorative-foliage svg {
    height: 100%;
    width: auto;
}

.decorative-foliage svg path {
    animation: gentleSway 12s ease-in-out infinite;
    transform-origin: center center;
}

.decorative-foliage svg path:nth-child(2) {
    animation-delay: -3s;
}

.decorative-foliage svg path:nth-child(3) {
    animation-delay: -6s;
}

.decorative-foliage svg path:nth-child(4) {
    animation-delay: -9s;
}

@keyframes gentleSway {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(1deg) scale(1.02); }
    75% { transform: rotate(-1deg) scale(0.98); }
}

/* Ensure main content stays above decorative elements */
.memorial-content {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.95);
}

/* ============================================
   ENHANCED DEFAULT THEME IMPROVEMENTS
   ============================================ */

/* Enhanced background with subtle texture */
.template-default body {
    background: linear-gradient(180deg, #fafafa 0%, #ffffff 50%, #fafafa 100%) !important;
    background-attachment: fixed;
}

/* Enhanced card design with better shadows and depth */
.template-default .tribute-card,
.template-default .timeline-content,
.template-default .tribute-content {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%) !important;
    border: 1px solid rgba(224, 218, 210, 0.3) !important;
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.08),
        0 1px 3px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.template-default .tribute-card:hover,
.template-default .timeline-content:hover,
.template-default .tribute-content:hover {
    transform: translateY(-4px) !important;
    border-color: rgba(224, 218, 210, 0.6) !important;
    box-shadow: 
        0 12px 24px rgba(0, 0, 0, 0.12),
        0 4px 8px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(224, 218, 210, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 1) !important;
}

/* Enhanced profile picture with subtle glow */
.template-default .profile-picture {
    border: 4px solid white !important;
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(224, 218, 210, 0.3),
        0 0 20px rgba(224, 218, 210, 0.2) !important;
    transition: all 0.3s ease !important;
}

.template-default .profile-picture:hover {
    box-shadow: 
        0 12px 24px rgba(0, 0, 0, 0.2),
        0 0 0 2px rgba(224, 218, 210, 0.5),
        0 0 30px rgba(224, 218, 210, 0.3) !important;
    transform: scale(1.02) !important;
}

/* Enhanced buttons with better hover states */
.template-default .btn-custom {
    background: linear-gradient(135deg, #e0dad2 0%, #d4c9b8 100%) !important;
    color: #1e232b !important;
    border: 1px solid rgba(224, 218, 210, 0.3) !important;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative;
    overflow: hidden;
}

.template-default .btn-custom::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;
}

.template-default .btn-custom:hover::before {
    left: 100%;
}

.template-default .btn-custom:hover {
    background: linear-gradient(135deg, #1e232b 0%, #2a3441 100%) !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 
        0 8px 16px rgba(30, 35, 43, 0.25),
        0 4px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(30, 35, 43, 0.3) !important;
}

.template-default .btn-custom:active {
    transform: translateY(0) !important;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.template-default .more-link {
    color: #1e232b !important;
}

.template-default .more-link:hover {
    color: #4b5563 !important;
}

/* Enhanced timeline with better visual effects */
.template-default .timeline-dot {
    background: linear-gradient(135deg, #e0dad2 0%, #d4c9b8 100%) !important;
    border: 3px solid #fff !important;
    box-shadow: 
        0 0 0 3px rgba(224, 218, 210, 0.3),
        0 4px 8px rgba(224, 218, 210, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
    transition: all 0.3s ease !important;
}

.template-default .timeline-item:hover .timeline-dot {
    transform: translateX(-50%) scale(1.3) !important;
    box-shadow: 
        0 0 0 4px rgba(224, 218, 210, 0.4),
        0 6px 12px rgba(224, 218, 210, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 1) !important;
    background: linear-gradient(135deg, #1e232b 0%, #2a3441 100%) !important;
    border-color: #fff !important;
}

.template-default .timeline-line {
    background: linear-gradient(180deg, 
        transparent 0%, 
        #e0dad2 10%, 
        #e0dad2 90%, 
        transparent 100%) !important;
    box-shadow: 0 0 8px rgba(224, 218, 210, 0.3) !important;
}

/* Enhanced gallery items */
.template-default .gallery-item {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%) !important;
    border: 1px solid rgba(224, 218, 210, 0.3) !important;
    overflow: hidden !important;
    position: relative !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.template-default .gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(224, 218, 210, 0) 0%, rgba(224, 218, 210, 0.15) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.template-default .gallery-item:hover::before {
    opacity: 1;
}

.template-default .gallery-item:hover {
    transform: translateY(-4px) scale(1.02) !important;
    border-color: rgba(224, 218, 210, 0.6) !important;
    box-shadow: 
        0 12px 24px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(224, 218, 210, 0.4),
        0 0 20px rgba(224, 218, 210, 0.2) !important;
}

.template-default .gallery-image {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.template-default .gallery-item:hover .gallery-image {
    transform: scale(1.1) !important;
}

/* Enhanced form inputs */
.template-default input[type="text"]:focus,
.template-default input[type="email"]:focus,
.template-default textarea:focus,
.template-default select:focus {
    outline: none !important;
    border-color: #e0dad2 !important;
    box-shadow: 
        0 0 0 3px rgba(224, 218, 210, 0.2),
        0 4px 8px rgba(224, 218, 210, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%) !important;
}

/* Enhanced like button */
.template-default .like-button {
    transition: all 0.3s ease !important;
    padding: 0.5rem 0.75rem !important;
    border-radius: 0.375rem !important;
}

.template-default .like-button:hover {
    background: rgba(224, 218, 210, 0.15) !important;
    transform: scale(1.1) !important;
    color: #e0245e !important;
}

.template-default .like-button.liked {
    color: #e0245e !important;
    background: rgba(224, 37, 94, 0.1) !important;
    animation: heartPulse 0.5s ease !important;
}

@keyframes heartPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Enhanced header image overlay */
.template-default .header-image-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 50%, 
        rgba(255, 255, 255, 0.15) 100%);
    pointer-events: none;
}

/* Enhanced decorative foliage for light theme */
.template-default .decorative-foliage svg path {
    fill: rgba(224, 218, 210, 0.3) !important;
    stroke: rgba(224, 218, 210, 0.4) !important;
    filter: drop-shadow(0 0 4px rgba(224, 218, 210, 0.2));
}

/* Enhanced typography with subtle shadows */
.template-default h1 {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    letter-spacing: -0.02em !important;
}

.template-default h2 {
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.03) !important;
    letter-spacing: -0.01em !important;
}

/* Enhanced empty states */
.template-default .empty-state {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(250, 250, 250, 0.8) 100%) !important;
    border: 1px dashed rgba(224, 218, 210, 0.4) !important;
    border-radius: 0.5rem !important;
    padding: 2rem !important;
}

/* Enhanced reply forms */
.template-default .reply-form {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(250, 250, 250, 0.9) 100%) !important;
    border: 1px solid rgba(224, 218, 210, 0.3) !important;
    border-radius: 0.5rem !important;
    padding: 1rem !important;
    backdrop-filter: blur(10px) !important;
}

/* Enhanced reply items */
.template-default .reply-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.6) 0%, rgba(250, 250, 250, 0.6) 100%) !important;
    border: 1px solid rgba(224, 218, 210, 0.2) !important;
    border-left: 3px solid rgba(224, 218, 210, 0.5) !important;
}

/* Smooth transitions for interactive elements */
.template-default button,
.template-default a,
.template-default input,
.template-default textarea,
.template-default select {
    transition-property: background-color, border-color, color, box-shadow, transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 200ms;
}

/* Enhanced focus states for accessibility */
.template-default *:focus-visible {
    outline: 2px solid #e0dad2 !important;
    outline-offset: 2px !important;
    border-radius: 0.25rem !important;
}

/* Enhanced video container */
.template-default .video-container {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%) !important;
    border: 1px solid rgba(224, 218, 210, 0.3) !important;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

.template-default .video-container:hover {
    border-color: rgba(224, 218, 210, 0.6) !important;
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(224, 218, 210, 0.4),
        0 0 20px rgba(224, 218, 210, 0.2) !important;
}

/* Enhanced separator lines */
.template-default .separator {
    border-top: 1px solid rgba(224, 218, 210, 0.4) !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

/* Enhanced tribute divider */
.template-default .tribute-divider {
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(224, 218, 210, 0.5) 50%, 
        transparent 100%) !important;
    height: 1px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

/* Enhanced notification styling */
.template-default .notification {
    backdrop-filter: blur(10px) !important;
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

/* Enhanced loading spinner */
.template-default .loading-spinner {
    border-color: rgba(224, 218, 210, 0.3) !important;
    border-top-color: #e0dad2 !important;
    box-shadow: 0 0 10px rgba(224, 218, 210, 0.4) !important;
}

/* Improved mobile responsiveness */
@media screen and (max-width: 768px) {
    .template-default .tribute-card,
    .template-default .timeline-content,
    .template-default .tribute-content {
        box-shadow: 
            0 2px 4px rgba(0, 0, 0, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
    }
    
    .template-default .gallery-item:hover {
        transform: translateY(-2px) !important;
    }
}

/* Form inputs - ensure consistent white background for inputs and textareas */
.template-default input[type="text"],
.template-default input[type="email"],
.template-default textarea,
.template-default select {
    background-color: #ffffff !important;
    border: 1px solid #d1d5db;
    color: #1f2937;
    border-radius: 0.375rem;
}