/* Public Memorial Site Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1.6;
    color: #2c3e50;
    background: #f5f5f5;
}

.memorial-page {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(to bottom, #34495e, #2c3e50);
    color: white;
}

.memorial-photo {
    margin-bottom: 30px;
}

.memorial-photo img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.memorial-header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: normal;
}

.dates {
    font-size: 1.2em;
    opacity: 0.9;
    font-style: italic;
}

/* Welcome Banner (Personal Pages) */
.welcome-banner {
    background: #3498db;
    color: white;
    padding: 15px 20px;
    text-align: center;
}

.welcome-banner p {
    margin: 5px 0;
}

.personal-link-note {
    font-size: 0.9em;
    opacity: 0.9;
}

/* Sections */
.section {
    padding: 40px 20px;
    border-bottom: 1px solid #ecf0f1;
}

.section h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.8em;
    text-align: center;
}

/* Tribute */
.tribute {
    background: #ecf0f1;
}

.tribute-text {
    font-size: 1.3em;
    line-height: 1.8;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    font-style: italic;
    color: #34495e;
}

/* Obituary */
.obituary {
    max-width: 700px;
    margin: 0 auto;
}

.obituary-toggle {
    display: block;
    width: 100%;
    padding: 15px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background 0.3s;
}

.obituary-toggle:hover {
    background: #2980b9;
}

.toggle-icon {
    float: right;
}

.obituary-content {
    display: none;
    margin-top: 20px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
    line-height: 1.8;
}

.obituary-content p {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1em;
}

.obituary-content p:last-child {
    margin-bottom: 0;
}

/* Huge title (****text****) */
.obituary-content h1 {
    color: #2c3e50;
    font-weight: 700;
    font-size: 2.2em;
    margin-top: 0;
    margin-bottom: 25px;
    line-height: 1.2;
    text-align: center;
    border-bottom: 2px solid #3498db;
    padding-bottom: 15px;
}

/* Section headers (**text**) */
.obituary-content h2 {
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.4em;
    margin-top: 25px;
    margin-bottom: 8px;
    line-height: 1.3;
}

.obituary-content h2:first-child {
    margin-top: 0;
}

/* Inline bold text */
.obituary-content strong {
    font-weight: 600;
    color: #2c3e50;
}

/* Title emphasis (if used inline) */
.obituary-content strong.title {
    font-weight: 700;
    font-size: 1.3em;
}

.obituary-content em {
    font-style: italic;
    color: #34495e;
}

.obituary-content a {
    color: #3498db;
    text-decoration: none;
    word-break: break-all;
}

.obituary-content a:hover {
    text-decoration: underline;
}

/* Service Info */
.service-info {
    background: #fff3cd;
}

.service-details p {
    margin: 10px 0;
    font-size: 1.1em;
}

.service-details strong {
    color: #856404;
}

/* Navigation Grid */
.navigation {
    background: white;
}

.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.nav-card {
    display: block;
    padding: 30px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.nav-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.nav-card h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.nav-card p {
    opacity: 0.9;
}

/* Announcements */
.announcements {
    background: #e8f4f8;
}

.announcement {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.announcement h3 {
    color: #2980b9;
    margin-bottom: 5px;
}

.announcement-date {
    font-size: 0.9em;
    color: #7f8c8d;
    margin-bottom: 10px;
}

/* Photo Gallery */
.submit-photo-cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 30px;
}

.submit-photo-cta h2 {
    color: white;
    margin-bottom: 10px;
}

.submit-photo-cta p {
    margin-bottom: 20px;
    opacity: 0.9;
}

.submit-photo-cta .btn {
    background: white;
    color: #764ba2;
    font-weight: bold;
}

.submit-photo-cta .btn:hover {
    background: #f8f9fa;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.photo-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

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

.photo-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.photo-caption {
    padding: 15px;
    text-align: center;
    color: #555;
}

/* Memories */
.submit-memory-cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 30px;
}

.submit-memory-cta h2 {
    color: white;
    margin-bottom: 10px;
}

.submit-memory-cta p {
    margin-bottom: 20px;
    opacity: 0.9;
}

.submit-memory-cta .btn {
    background: white;
    color: #764ba2;
    font-weight: bold;
}

.submit-memory-cta .btn:hover {
    background: #f8f9fa;
}

.memories-list {
    max-width: 700px;
    margin: 0 auto;
}

.memory-item {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.memory-item h3 {
    color: #2980b9;
    margin-bottom: 10px;
}

.memory-author {
    font-weight: bold;
    color: #555;
    margin-bottom: 5px;
}

.memory-date {
    font-size: 0.9em;
    color: #7f8c8d;
    margin-bottom: 15px;
}

.memory-content {
    line-height: 1.8;
    color: #2c3e50;
}

/* Locations */
.location-item {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.location-item h2 {
    color: #2980b9;
    margin-bottom: 15px;
    text-align: left;
}

.location-address {
    font-size: 1.1em;
    margin-bottom: 15px;
    color: #555;
}

.location-notes {
    margin-top: 15px;
    line-height: 1.8;
    color: #2c3e50;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.3s;
    font-size: 1em;
}

.btn:hover {
    background: #2980b9;
}

.btn-primary {
    background: #27ae60;
}

.btn-primary:hover {
    background: #229954;
}

/* Page Header */
.page-header {
    background: #34495e;
    color: white;
    padding: 30px 20px;
    text-align: center;
}

.page-header h1 {
    margin-bottom: 10px;
}

.page-header a {
    color: #3498db;
}

/* Placeholder */
.placeholder {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
    font-size: 1.1em;
}

/* Footer */
.memorial-footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 30px 20px;
}

.memorial-footer a {
    color: #3498db;
    text-decoration: none;
}

.memorial-footer a:hover {
    text-decoration: underline;
}

/* Staggered Pulse Animation with Pauses */
/* X = 2s (pulse), Y = 2s (pause), Total = 12s */
/* Timing: b1(0-2s) pause(2-4s) b2(4-6s) pause(6-8s) b3(8-10s) pause(10-12s) */

@keyframes pulse-b1 {
    /* 0-2s: Pulse (0-16.67%) */
    0% {
        transform: scale(1);
    }
    8.33% {
        transform: scale(1.05);
    }
    16.67% {
        transform: scale(1);
    }
    /* 2-12s: Static (16.67-100%) */
    16.68%, 100% {
        transform: scale(1);
    }
}

@keyframes pulse-b2 {
    /* 0-4s: Static (0-33.33%) */
    0%, 33.33% {
        transform: scale(1);
    }
    /* 4-6s: Pulse (33.33-50%) */
    41.66% {
        transform: scale(1.05);
    }
    50% {
        transform: scale(1);
    }
    /* 6-12s: Static (50-100%) */
    50.01%, 100% {
        transform: scale(1);
    }
}

@keyframes pulse-b3 {
    /* 0-8s: Static (0-66.67%) */
    0%, 66.67% {
        transform: scale(1);
    }
    /* 8-10s: Pulse (66.67-83.33%) */
    75% {
        transform: scale(1.05);
    }
    83.33% {
        transform: scale(1);
    }
    /* 10-12s: Static (83.33-100%) */
    83.34%, 100% {
        transform: scale(1);
    }
}

/* Apply animations to each button */
.pulse-animation:nth-child(1) {
    animation: pulse-b1 12s ease-in-out infinite;
}

.pulse-animation:nth-child(2) {
    animation: pulse-b2 12s ease-in-out infinite;
}

.pulse-animation:nth-child(3) {
    animation: pulse-b3 12s ease-in-out infinite;
}

/* Hover behavior - MUST override animation transform */
.pulse-animation:hover {
    animation-play-state: paused !important; /* Force pause */
    transform: translateY(-5px) scale(1.05) !important; /* Lift + keep scale */
    box-shadow: 0 8px 16px rgba(0,0,0,0.2) !important; /* Add shadow */
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%) !important; /* Green gradient */
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .memorial-header h1 {
        font-size: 2em;
    }
    
    .memorial-photo img {
        width: 200px;
        height: 200px;
    }
    
    .tribute-text {
        font-size: 1.1em;
    }
    
    .nav-grid {
        grid-template-columns: 1fr;
    }
}
