/*
 * ETERNITUM - Memorial Base Styles
 * Base styles for all memorial themes
 */

/* ========== BASE MEMORIAL LAYOUT ========== */
.memorial-hero {
    padding: 160px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.memorial-hero-content {
    position: relative;
    z-index: 2;
}

/* Photo Frame Base */
.memorial-photo-frame {
    width: 220px;
    height: 220px;
    margin: 0 auto;
    position: relative;
}

.memorial-photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.memorial-photo-wrapper {
    position: relative;
    display: inline-block;
}

.memorial-photo-wrapper .memorial-badge {
    position: absolute;
    bottom: 20px;
    right: -10px;
    font-size: 0.7rem;
    padding: 0.4rem 0.75rem;
}

/* Name & Dates */
.memorial-name {
    margin-bottom: 0.75rem;
    color: #fff;
}

.memorial-dates {
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.memorial-epitaph {
    max-width: 600px;
    margin: 0 auto 1.5rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
}

/* Action Buttons */
.memorial-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.memorial-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 4px;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    display: inline-block;
}

.memorial-btn-primary {
    background: linear-gradient(135deg, #8B7355, #D4AF37);
    color: #fff !important;
}

.memorial-btn-secondary {
    background: rgba(0, 0, 0, 0.6);
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.memorial-btn-secondary:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* ========== TRIBUTE COUNTERS ========== */
.tribute-counters {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.tribute-counter {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ========== CONTENT CARDS ========== */
.memorial-card {
    background: #fff;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
}

.memorial-card-heading {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    position: relative;
    color: #2C3E50;
    font-weight: 600;
}

.memorial-divider {
    height: 2px;
    background: linear-gradient(to right, transparent, #D4AF37, transparent);
    margin: 20px 0;
}

.memorial-content {
    color: #444;
    line-height: 1.9;
}

.memorial-content strong,
.memorial-content b {
    font-weight: bold;
}

/* ========== TRIBUTE SELECTION ========== */
.tribute-options {
    display: flex;
    gap: 0.5rem;
}

.tribute-option {
    flex: 1;
    padding: 1rem;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 2px solid #D4AF37;
}

.tribute-option:hover {
    transform: translateY(-2px);
    background: rgba(212, 175, 55, 0.1);
}

.tribute-option input[type="radio"] {
    display: none;
}

.tribute-option:has(input:checked) {
    background: #D4AF37;
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.tribute-option:has(input:checked) small {
    color: #fff;
}

.tribute-option .tribute-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

/* ========== GALLERY ========== */
.memorial-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.memorial-gallery img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s;
    border-radius: 8px;
}

.memorial-gallery img:hover {
    transform: scale(1.05);
}

/* ========== TRIBUTES LIST ========== */
.tribute-list {
    max-height: 400px;
    overflow-y: auto;
}

.tribute-item {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.tribute-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* ========== FAVORITES SECTION ========== */
.favorites-section {
    text-align: center;
}

.favorites-item {
    margin-bottom: 1.5rem;
}

.favorites-item:last-child {
    margin-bottom: 0;
}

.favorites-item .icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

/* ========== STATS BOX ========== */
.memorial-stats {
    display: flex;
    align-items: center;
    padding: 1.5rem;
}

.stat-item {
    text-align: center;
    margin-right: 2rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #D4AF37;
}

.stat-label {
    font-size: 0.75rem;
    color: #666;
}

.memorial-qr {
    margin-left: auto;
}

.memorial-qr img {
    width: 60px;
    padding: 3px;
    border: 2px solid #D4AF37;
}

/* Badge */
.memorial-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    background: #D4AF37;
    color: #fff;
}

/* ========== ANIMATED CANDLE ========== */
.candle-icon {
    display: inline-block;
    animation: flicker 1.5s ease-in-out infinite;
}

@keyframes flicker {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .memorial-hero {
        padding: 120px 0 60px;
    }

    .memorial-photo-frame {
        width: 160px;
        height: 160px;
    }

    .memorial-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .tribute-options {
        flex-direction: column;
    }

    .memorial-stats {
        flex-wrap: wrap;
        justify-content: center;
    }

    .stat-item {
        margin: 0.5rem 1rem;
    }

    .memorial-qr {
        margin: 1rem auto 0;
    }
}