/* ========================================
   MEMORIAL WEBPAGE - MOBILE-FIRST DESIGN
   ======================================== */

:root {
    /* Colors */
    --color-primary: #ffffff;
    --color-secondary: #f8f9fa;
    --color-tertiary: #e9ecef;
    --color-text-primary: #2c3e50;
    --color-text-secondary: #5a6c7d;
    --color-text-muted: #8b95a1;
    --color-accent: #d4af37;
    --color-border: #dee2e6;
    --color-shadow: rgba(0, 0, 0, 0.08);

    /* Typography */
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Inter', sans-serif;

    /* Spacing - Mobile First */
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* Borders */
    --border-radius: 12px;
    --shadow-sm: 0 2px 8px var(--color-shadow);
    --shadow-md: 0 4px 16px var(--color-shadow);
    --shadow-lg: 0 8px 32px var(--color-shadow);
}

.welcome-overlay {
    position: fixed;
    inset: 0;
    background: var(--color-primary);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: opacity 1.2s ease;
}

.welcome-content {
    padding: var(--spacing-xl);
    max-width: 600px;
    width: 100%;
}

/* Staggered Animation for content */
.welcome-content>* {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

.welcome-content .memorial-photo-small {
    animation-delay: 0.2s;
}

.welcome-content h1 {
    animation-delay: 0.4s;
}

.welcome-content p {
    animation-delay: 0.6s;
}

.welcome-content button {
    animation-delay: 0.8s;
}

.welcome-content h1 {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    margin: var(--spacing-lg) 0 var(--spacing-xs);
    color: var(--color-text-primary);
}

.welcome-content p {
    font-family: var(--font-sans);
    font-size: 1.2rem;
    color: var(--color-text-muted);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: var(--spacing-xl);
}

.memorial-photo-small {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    margin: 0 auto;
    overflow: hidden;
    /* Soft shadow instead of gold border */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.memorial-photo-small:hover {
    transform: scale(1.02);
}

.memorial-photo-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-view {
    animation: fadeIn 0.5s ease;
}

.hidden {
    display: none !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background: var(--color-primary);
    color: var(--color-text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.95)),
        url('photos/pexels-pedro-figueras-202443-681467.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.9) 100%);
    z-index: 1;
}

/* Floating Media Background */
.floating-media-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.floating-item {
    position: absolute;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    /* Stronger shadow */
    opacity: 0;
    animation: floatUp var(--duration, 20s) linear forwards;
    transform: rotate(var(--rotation, 0deg));
    will-change: transform, opacity;
    border: 2px solid rgba(255, 255, 255, 0.3);
    /* Subtle border for pop */
}

.floating-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

@keyframes floatUp {
    0% {
        opacity: 0;
        transform: translate(0, 0) rotate(var(--rotation, 0deg)) scale(0.9);
    }

    10% {
        opacity: 0.9;
        /* Increased visibility */
    }

    50% {
        opacity: 0.8;
        /* Maintained visibility */
    }

    85% {
        opacity: 0.6;
    }

    100% {
        opacity: 0;
        transform: translate(calc(var(--end-x) - 50vw),
                calc(var(--end-y) - 50vh)) rotate(calc(var(--rotation, 0deg) + 360deg)) scale(1.1);
    }
}


.hero-content {
    position: relative;
    text-align: center;
    padding: var(--spacing-lg);
    animation: fadeInUp 1s ease-out;
    z-index: 2;
}

.memorial-photo {
    width: 150px;
    height: 150px;
    margin: 0 auto var(--spacing-lg);
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--color-primary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.memorial-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.memorial-name {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 400;
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-sm);
    letter-spacing: 0.02em;
}

.memorial-dates {
    margin-bottom: var(--spacing-lg);
}

.date-line {
    font-family: var(--font-serif);
    font-size: clamp(1rem, 3vw, 1.25rem);
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-xs);
}

.age-line {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    font-style: italic;
}

.memorial-quote {
    margin-top: var(--spacing-lg);
    padding: 0 var(--spacing-md);
}

.memorial-quote p {
    font-family: var(--font-serif);
    font-size: clamp(1.1rem, 3vw, 1.35rem);
    font-style: italic;
    color: var(--color-text-secondary);
    line-height: 1.8;
}

/* ========================================
   NAVIGATION CARDS (HOME PAGE)
   ======================================== */

.nav-cards {
    padding: var(--spacing-xl) 0;
    background: linear-gradient(to bottom, var(--color-secondary), var(--color-primary));
}

.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.nav-card {
    background: var(--color-primary);
    border-radius: var(--border-radius);
    padding: var(--spacing-xl);
    text-align: center;
    text-decoration: none;
    color: var(--color-text-primary);
    border: 2px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    min-height: 160px;
}

.nav-card:active {
    transform: scale(0.98);
}

.nav-card-icon {
    color: var(--color-accent);
}

.nav-card h2 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 500;
}

.nav-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* ========================================
   PAGE HEADER (PHOTOS/VIDEOS PAGES)
   ======================================== */

.page-header {
    background: var(--color-primary);
    border-bottom: 1px solid var(--color-border);
    padding: var(--spacing-md) 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.page-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.page-header h1 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 400;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 8px;
    transition: all 0.2s ease;
    min-width: 44px;
    min-height: 44px;
}

.back-btn:active {
    background: var(--color-secondary);
}

.btn-icon {
    background: var(--color-accent);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.btn-icon:active {
    transform: scale(0.95);
}

/* ========================================
   GALLERIES
   ======================================== */

.gallery-section {
    padding: var(--spacing-lg) 0 var(--spacing-2xl);
}

/* Photo Grid - Mobile First */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
}

.photo-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    background: var(--color-secondary);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-item:active img {
    transform: scale(1.05);
}

.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    padding: var(--spacing-md) var(--spacing-sm);
    color: white;
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-item:active .photo-overlay {
    opacity: 1;
}

/* Video Grid - Mobile First */
.video-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
}

.video-item {
    background: var(--color-primary);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.video-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    background: var(--color-secondary);
    cursor: pointer;
    overflow: hidden;
}

.video-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.video-thumbnail:active .play-icon {
    background: rgba(0, 0, 0, 0.7);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-info-card {
    padding: var(--spacing-md);
}

.video-caption {
    font-size: 0.95rem;
    margin-bottom: var(--spacing-xs);
}

.video-author {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* ========================================
   MEMORIES SECTION
   ======================================== */

.memories-section {
    padding: var(--spacing-xl) 0 var(--spacing-2xl);
    background: linear-gradient(to bottom, var(--color-primary), var(--color-secondary));
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 400;
    text-align: center;
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-sm);
}

.section-subtitle {
    text-align: center;
    font-family: var(--font-serif);
    font-size: 1rem;
    color: var(--color-text-muted);
    font-style: italic;
    margin-bottom: var(--spacing-xl);
}

.memory-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.memory-card {
    background: var(--color-primary);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    animation: fadeInUp 0.6s ease-out;
}

.memory-content {
    padding: var(--spacing-lg);
}

.memory-message {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: var(--spacing-md);
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.memory-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--color-tertiary);
    font-size: 0.85rem;
}

.memory-author {
    color: var(--color-text-secondary);
    font-weight: 500;
}

.memory-date {
    color: var(--color-text-muted);
}

.memory-card-expandable {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.memory-card-expandable:active {
    transform: scale(0.99);
}

.read-more-btn {
    background: none;
    border: none;
    color: var(--color-accent);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    padding: var(--spacing-xs) 0;
    margin-top: var(--spacing-xs);
    display: inline-block;
}

/* Memory Lightbox */
.memory-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

.memory-lightbox.active {
    opacity: 1;
}

.memory-lightbox-content {
    background: var(--color-primary);
    border-radius: var(--border-radius);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

.memory-lightbox-body {
    padding: var(--spacing-xl);
    max-height: 70vh;
    overflow-y: auto;
}

.memory-lightbox-text {
    font-size: 1.05rem;
    line-height: 1.8;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    margin-bottom: var(--spacing-lg);
}

.memory-lightbox-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--spacing-md);
    border-top: 2px solid var(--color-tertiary);
    font-size: 0.9rem;
}


/* ========================================
   BUTTONS
   ======================================== */

.btn-primary,
.btn-secondary {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    min-height: 44px;
    min-width: 120px;
}

/* Music Toggle */
.music-toggle {
    position: fixed;
    bottom: var(--spacing-lg);
    left: var(--spacing-lg);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-primary);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    color: var(--color-text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 99;
    transition: all 0.3s ease;
}

.music-toggle:hover {
    transform: scale(1.1);
    color: var(--color-accent);
}

.music-toggle.playing {
    border-color: var(--color-accent);
    color: var(--color-accent);
    animation: pulseBorder 2s infinite;
}

@keyframes pulseBorder {
    0% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(212, 175, 55, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
    }
}

.btn-sm {
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    background: var(--color-secondary);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-sm:hover {
    background: var(--color-tertiary);
}

.btn-sm.active {
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-accent) 0%, #b8941f 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(2px);
    box-shadow: var(--shadow-sm);
}

.btn-secondary {
    background: var(--color-secondary);
    color: var(--color-text-primary);
    border: 2px solid var(--color-border);
}

.btn-secondary:active {
    background: var(--color-tertiary);
}

.btn-floating {
    position: fixed;
    bottom: var(--spacing-lg);
    right: var(--spacing-lg);
    z-index: 99;
    box-shadow: var(--shadow-lg);
}

/* ========================================
   MODAL
   ======================================== */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
    padding: 0;
}

.modal.active {
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.modal-content {
    background: var(--color-primary);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    background: var(--color-primary);
    z-index: 10;
}

.modal-header h2 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 400;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    padding: var(--spacing-xs);
    min-width: 44px;
    min-height: 44px;
}

.memory-form {
    padding: var(--spacing-lg);
}

.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-group label {
    display: block;
    font-weight: 500;
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-xs);
    font-size: 0.95rem;
}

.label-hint {
    color: var(--color-text-muted);
    font-weight: normal;
    font-size: 0.85rem;
}

.required {
    color: var(--color-accent);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--color-text-primary);
    background: var(--color-secondary);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    background: var(--color-primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.file-input {
    padding: var(--spacing-sm);
    background: var(--color-primary);
}

.preview-container {
    margin-top: var(--spacing-md);
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--color-secondary);
}

.preview-container img,
.preview-container video {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    display: block;
}

.remove-preview {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-info {
    padding: var(--spacing-sm);
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

.upload-progress {
    margin-top: var(--spacing-md);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--color-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: var(--spacing-xs);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-accent), #f0d896);
}

.drop-zone {
    border: 2px dashed var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--spacing-xl) var(--spacing-md);
    text-align: center;
    background: var(--color-secondary);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    min-height: 120px;
}

.drop-zone:hover {
    border-color: var(--color-text-muted);
}

.drop-zone.dragover {
    border-color: var(--color-accent);
    background: rgba(212, 175, 55, 0.05);
    transform: scale(1.02);
}

.drop-zone p {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    pointer-events: none;
}

.drop-zone svg {
    color: var(--color-accent);
    margin-bottom: var(--spacing-xs);
    pointer-events: none;
}

.file-input-hidden {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}


#photoProgressText,
#videoProgressText {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    text-align: center;
}

.form-actions {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-xl);
}

.form-actions button {
    flex: 1;
}

/* ========================================
   LIGHTBOX
   ======================================== */

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
}

.lightbox-close {
    position: absolute;
    top: var(--spacing-lg);
    right: var(--spacing-lg);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: var(--spacing-sm);
    border-radius: 50%;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: var(--spacing-sm);
    border-radius: 50%;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2001;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav.prev {
    left: var(--spacing-lg);
}

.lightbox-nav.next {
    right: var(--spacing-lg);
}

.lightbox-content {
    max-width: 100%;
    max-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img,
.lightbox-content video {
    max-width: 100%;
    max-height: 70vh;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    object-fit: contain;
}

.lightbox-content video {
    background: black;
}

.lightbox-info {
    position: absolute;
    bottom: var(--spacing-xl);
    left: var(--spacing-lg);
    right: var(--spacing-lg);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
}

.lightbox-caption {
    font-size: 1rem;
    margin-bottom: var(--spacing-xs);
}

.lightbox-author {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}

/* ========================================
   LOADING & EMPTY STATES
   ======================================== */

.loading,
.no-memories {
    text-align: center;
    padding: var(--spacing-2xl);
    color: var(--color-text-muted);
    font-style: italic;
}

.no-memories p {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    margin-bottom: var(--spacing-sm);
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Lightbox Transitions */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.lightbox-content.slide-next {
    animation: slideInRight 0.3s ease-out;
}

.lightbox-content.slide-prev {
    animation: slideInLeft 0.3s ease-out;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-1 {
    transition-delay: 100ms;
}

.stagger-2 {
    transition-delay: 200ms;
}

.stagger-3 {
    transition-delay: 300ms;
}

.stagger-4 {
    transition-delay: 400ms;
}

.stagger-5 {
    transition-delay: 500ms;
}

/* Enhanced Hover Effects */
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

.nav-card {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.nav-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 24px var(--color-shadow);
}


/* ========================================
   TABLET (768px+)
   ======================================== */

@media (min-width: 768px) {
    .hero {
        min-height: 100vh;
    }

    .memorial-photo {
        width: 200px;
        height: 200px;
    }

    /* Navigation cards in 2 columns on tablet */
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }

    /* Photo grid - 3 columns */
    .photo-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-md);
    }

    /* Video grid - 2 columns */
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Memory cards - 2 columns */
    .memory-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }

    /* Modal centered on tablet+ */
    .modal.active {
        align-items: center;
    }

    .modal-content {
        border-radius: var(--border-radius);
        max-width: 600px;
    }

    /* Hover effects for non-touch devices */
    .nav-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-md);
        border-color: var(--color-accent);
    }

    .photo-item:hover img {
        transform: scale(1.05);
    }

    .photo-item:hover .photo-overlay {
        opacity: 1;
    }
}

/* ========================================
   DESKTOP (1024px+)
   ======================================== */

@media (min-width: 1024px) {

    /* Navigation cards in 3 columns */
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Photo grid - 4 columns */
    .photo-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Video grid - 3 columns */
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========================================
   LARGE DESKTOP (1440px+)
   ======================================== */

@media (min-width: 1440px) {

    /* Photo grid - 5 columns */
    .photo-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}