/* ========================================
   James Curtis Watson Memorial Styles
   ======================================== */

/* Obituary Styles */
.obituary-content {
    max-width: 100%;
    margin: 0 auto;
    padding: 40px 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.obituary-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.obituary-name {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
    line-height: 1.2;
}

.obituary-location {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 5px;
    font-weight: 500;
}

.obituary-dates {
    font-size: 1.1rem;
    color: #95a5a6;
    font-weight: 400;
}

.obituary-body {
    line-height: 1.8;
    color: #2c3e50;
}

.obituary-intro {
    font-size: 1.2rem;
    font-weight: 500;
    color: #34495e;
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    border-left: 4px solid #667eea;
    max-width: none;
}

.obituary-section {
    margin-bottom: 35px;
}

.obituary-section h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #ecf0f1;
    position: relative;
}

.obituary-section h3::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.obituary-section p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #34495e;
    margin-bottom: 15px;
    text-align: left;
    max-width: none;
}

.obituary-service {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 30px;
    border-radius: 12px;
    margin: 35px 0;
    border: 1px solid #dee2e6;
    max-width: none;
}

.obituary-service h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

.service-details {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #34495e;
    margin-bottom: 15px;
    text-align: center;
}

.service-note {
    font-style: italic;
    color: #7f8c8d;
    text-align: center;
    font-size: 1rem;
    margin-top: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
}

.obituary-donations {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    padding: 30px;
    border-radius: 12px;
    margin-top: 35px;
    border: 1px solid #feb2b2;
    max-width: none;
}

.obituary-donations h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
}

.obituary-donations p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #34495e;
    text-align: center;
    margin: 0;
}

/* Mobile responsive for obituary */
@media (max-width: 768px) {
    .obituary-content {
        padding: 20px 15px;
        margin: 0 10px;
    }
    
    .obituary-name {
        font-size: 2rem;
    }
    
    .obituary-intro {
        font-size: 1.1rem;
        padding: 15px;
    }
    
    .obituary-section h3 {
        font-size: 1.3rem;
    }
    
    .obituary-section p {
        font-size: 1rem;
    }
    
    .obituary-service,
    .obituary-donations {
        padding: 20px;
    }
}

/* Floating Action Buttons */
.floating-actions {
    position: fixed;
    left: 20px;
    top: 70%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.floating-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 20px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    min-width: 180px;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.floating-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.floating-btn:hover::before {
    left: 100%;
}

.floating-btn:hover {
    transform: translateX(10px) scale(1.05);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.floating-btn i {
    font-size: 18px;
    min-width: 20px;
}

.floating-btn.donation {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.floating-btn.donation:hover {
    box-shadow: 0 12px 35px rgba(255, 107, 107, 0.4);
}

.floating-btn.flowers {
    background: linear-gradient(135deg, #feca57 0%, #ff9ff3 100%);
    box-shadow: 0 8px 25px rgba(254, 202, 87, 0.3);
}

.floating-btn.flowers:hover {
    box-shadow: 0 12px 35px rgba(254, 202, 87, 0.4);
}

.floating-btn.tree {
    background: linear-gradient(135deg, #48dbfb 0%, #0abde3 100%);
    box-shadow: 0 8px 25px rgba(72, 219, 251, 0.3);
}

.floating-btn.tree:hover {
    box-shadow: 0 12px 35px rgba(72, 219, 251, 0.4);
}

.floating-btn.share {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    box-shadow: 0 8px 25px rgba(155, 89, 182, 0.3);
    position: relative;
}

.floating-btn.share:hover {
    box-shadow: 0 12px 35px rgba(155, 89, 182, 0.4);
}

.share-menu {
    position: absolute;
    left: 100%;
    top: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    padding: 10px;
    margin-left: 10px;
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    pointer-events: none;
}

.share-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
}

.share-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.share-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.2s ease;
    font-size: 14px;
}

.share-option:hover {
    background: #f5f5f5;
    color: #333;
}

.share-option i {
    font-size: 16px;
    min-width: 20px;
}

.share-option.facebook i {
    color: #1877f2;
}

.share-option.twitter i {
    color: #1da1f2;
}

.share-option.email i {
    color: #ea4335;
}

/* Mobile responsive for floating buttons */
@media (max-width: 768px) {
    .floating-actions {
        left: 10px;
        gap: 10px;
    }
    
    .floating-btn {
        min-width: 150px;
        padding: 12px 15px;
        font-size: 12px;
    }
    
    .floating-btn i {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .floating-actions {
        left: 5px;
        gap: 8px;
    }
    
    .floating-btn {
        min-width: 130px;
        padding: 10px 12px;
        font-size: 11px;
    }
    
    .floating-btn i {
        font-size: 14px;
    }
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Source Sans Pro', sans-serif;
    line-height: 1.6;
    color: #333;
    background: url('JAMES_PHOTOS/vecteezy_ai-generated-an-image-of-the-blue-sky-with-a-colorful-cloud_35347523.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
}

/* Container */
.memorial-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.memorial-header {
    background: linear-gradient(rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1)), 
                url('JAMES_PHOTOS/bannerimg.png');
    background-size: contain;
    background-position: center;
    background-attachment: fixed;
    color: #2c3e50;
    text-align: center;
    padding: 100px 20px 80px;
    margin-bottom: 40px;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
}

.memorial-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.3), rgba(118, 75, 162, 0.3));
    z-index: 1;
}

.memorial-header > * {
    position: relative;
    z-index: 2;
}

.memorial-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    margin-bottom: 15px;
    color: white;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
    animation: fadeInDown 1s ease-out;
}

.deceased-name {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    margin-bottom: 20px;
    color: white;
    text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.9);
    animation: fadeInDown 1s ease-out 0.2s both;
}

.dates {
    font-size: 1.4rem;
    opacity: 0.9;
    margin-bottom: 25px;
    font-weight: 300;
    animation: fadeInDown 1s ease-out 0.4s both;
}

.memorial-subtitle {
    font-size: 1.2rem;
    opacity: 0.85;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
    animation: fadeInUp 1s ease-out 0.6s both;
}

/* Funeral Service Information */
.funeral-service-info {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    margin-top: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    animation: fadeInUp 1s ease-out 0.8s both;
}

.event-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
    margin: 0 0 20px 0;
    text-shadow: none;
}

.event-details {
    text-align: center;
}

.event-date {
    font-size: 1.3rem;
    font-weight: 600;
    color: #e74c3c;
    margin: 10px 0;
    text-shadow: none;
}

.event-location {
    font-size: 1.2rem;
    font-weight: 500;
    color: #34495e;
    margin: 8px 0;
    text-shadow: none;
}

.event-address {
    font-size: 1.1rem;
    color: #7f8c8d;
    margin: 8px 0;
    text-shadow: none;
}

/* Navigation */
.memorial-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.8s both;
}

.nav-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.nav-btn:hover::before {
    left: 100%;
}

.nav-btn:hover, .nav-btn.active {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4c93 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Content Sections */
.content-section {
    display: block;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    animation: slideInUp 0.6s ease-out;
    border: 1px solid rgba(255,255,255,0.2);
}

.content-section.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #f0f0f0;
    position: relative;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.section-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-header h3 i {
    color: #667eea;
    font-size: 1.8rem;
}

.add-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.add-btn:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4c93 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Memorial Pages */
.memorial-pages {
    margin-top: 40px;
}

.memorial-pages h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: #333;
    text-align: center;
}

.pages-slider-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 25px;
    max-width: 100%;
}

.pages-slider {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.pages-grid {
    display: flex;
    gap: 25px;
    transition: transform 0.3s ease-in-out;
    width: max-content;
}

.slider-nav-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    z-index: 10;
    flex-shrink: 0;
}

.slider-nav-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.slider-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.slider-nav-btn:disabled:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.slider-indicator {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
    color: #667eea;
    font-weight: 500;
}



.page-item {
    border: 3px solid #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    flex: 0 0 280px;
    min-width: 280px;
}

.page-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1;
}

.page-item:hover::before {
    opacity: 1;
}

.page-item:hover {
    border-color: #667eea;
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.3);
}

.page-item img {
    width: 100%;
    height: 363px;
    object-fit: cover;
    transition: transform 0.3s;
}

.page-item:hover img {
    transform: scale(1.05);
}

.page-info {
    padding: 20px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.page-title {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 1.1rem;
}

.page-stats {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.page-annotation-count, .page-photo-count {
    font-size: 0.9rem;
    color: #667eea;
    font-weight: 500;
}

.page-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.page-action-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    gap: 4px;
}

.page-action-btn:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4c93 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.page-action-btn i {
    font-size: 10px;
}

/* Photo Gallery */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.photo-item {
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    background: white;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    position: relative;
}

.photo-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1;
}

.photo-item:hover::before {
    opacity: 1;
}

.photo-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.3);
    border-color: #667eea;
}

.photo-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s;
}

.photo-item:hover img {
    transform: scale(1.05);
}

.photo-info {
    padding: 20px;
    position: relative;
    z-index: 2;
}

.photo-caption {
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
    font-size: 1.1rem;
}

.photo-meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.4;
}

.comment-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    gap: 6px;
}

.comment-btn:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4c93 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Memory Wall, Guest Book, Timeline */
.memories-container, .guestbook-container, .timeline-container {
    display: grid;
    gap: 25px;
}

.memory-item, .guest-entry, .timeline-event {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 25px;
    border-radius: 15px;
    border-left: 5px solid #667eea;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.memory-item::before, .guest-entry::before, .timeline-event::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    opacity: 0;
    transition: opacity 0.3s;
}

.memory-item:hover::before, .guest-entry:hover::before, .timeline-event:hover::before {
    opacity: 1;
}

.memory-item:hover, .guest-entry:hover, .timeline-event:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.15);
}

.memory-author, .guest-name, .event-title {
    font-weight: 600;
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

.memory-text, .guest-message, .event-description {
    margin-bottom: 12px;
    line-height: 1.6;
    color: #555;
    position: relative;
    z-index: 1;
}

.memory-date, .guest-date, .event-date {
    font-size: 0.9rem;
    color: #888;
    font-style: italic;
    position: relative;
    z-index: 1;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideInDown 0.4s ease-out;
    border: 1px solid rgba(255,255,255,0.2);
}

.close {
    color: #aaa;
    float: right;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    position: absolute;
    top: 15px;
    right: 20px;
}

.close:hover {
    color: #333;
}

.modal h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: #333;
    text-align: center;
}

/* Form Styles */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #f8f9fa;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
    width: 100%;
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4c93 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Flipbook Modal */
.flipbook-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease-out;
}

.flipbook-content {
    position: relative;
    width: 95%;
    max-width: 1400px;
    height: 90%;
    margin: 2% auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
    display: flex;
}

.flipbook-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.flipbook-page {
    flex: 1;
    width: 100%;
    object-fit: contain;
    display: block;
}

.flipbook-sidebar {
    width: 350px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 2px solid #dee2e6;
    background: white;
}

.sidebar-header h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
}

.sidebar-actions {
    display: flex;
    gap: 10px;
}

.sidebar-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sidebar-btn:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4c93 100%);
    transform: translateY(-1px);
}

.sidebar-form {
    padding: 20px;
    background: white;
    border-bottom: 1px solid #dee2e6;
}

.sidebar-form h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.1rem;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.cancel-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.cancel-btn:hover {
    background: #5a6268;
}

.sidebar-section {
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
}

.sidebar-section h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-comments {
    max-height: 300px;
    overflow-y: auto;
}

.sidebar-comment {
    background: white;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 3px solid #667eea;
}

.sidebar-comment-author {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    font-size: 14px;
}

.sidebar-comment-text {
    color: #666;
    line-height: 1.4;
    margin-bottom: 5px;
}

.sidebar-comment-date {
    font-size: 12px;
    color: #999;
}

.sidebar-photos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.sidebar-photo {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.sidebar-photo:hover {
    transform: scale(1.05);
}

.sidebar-photo img {
    width: 100%;
    height: 80px;
    object-fit: cover;
}

.sidebar-photo-caption {
    padding: 8px;
    font-size: 12px;
    color: #333;
    text-align: center;
}

.flipbook-nav {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    align-items: center;
    background: rgba(255,255,255,0.95);
    padding: 12px 20px;
    border-radius: 25px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
    z-index: 10;
}

.flipbook-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.flipbook-btn:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4c93 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.flipbook-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.95);
    color: #333;
    border: none;
    padding: 10px 15px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    z-index: 100;
}

.flipbook-close:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.page-number {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    min-width: 120px;
    text-align: center;
}

/* Status Messages */
.status {
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: 10px;
    text-align: center;
    font-weight: 500;
    animation: slideInDown 0.4s ease-out;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.status.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 2px solid #c3e6cb;
}

.status.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 2px solid #f5c6cb;
}

/* Action Buttons */
.action-buttons {
    text-align: center;
    margin: 40px 0;
    animation: fadeInUp 1s ease-out 1s both;
}

.action-buttons .submit-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    padding: 18px 40px;
    font-size: 18px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: auto;
}

.action-buttons .submit-btn:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea085 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(40, 167, 69, 0.4);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4c93 100%);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .memorial-container {
        padding: 15px;
    }
    
    .memorial-header {
        padding: 60px 15px 50px;
        margin-bottom: 30px;
        background-attachment: scroll;
        background-size: cover;
        background-position: right;
    }
    
    .memorial-title {
        font-size: 2.5rem;
    }
    
    .deceased-name {
        font-size: 2rem;
    }
    
    .memorial-nav {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .nav-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .content-section {
        padding: 25px;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .section-header h3 {
        font-size: 1.6rem;
    }
    
    .pages-slider-container {
        gap: 15px;
    }
    
    .pages-grid {
        gap: 15px;
    }
    
    .page-item {
        flex: 0 0 200px;
        min-width: 200px;
    }
    
    .slider-nav-btn {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
    
    .photo-gallery {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
    
    .flipbook-page {
        max-width: 95%;
        max-height: 80%;
    }
    
    .flipbook-nav {
        bottom: 20px;
        padding: 10px 20px;
        gap: 15px;
    }
    
    .flipbook-close {
        top: 20px;
        right: 20px;
        padding: 10px 15px;
        font-size: 20px;
    }
    
    .page-number {
        font-size: 16px;
        min-width: 100px;
    }

    /* Mobile slide-out action menu */
    .floating-actions {
        position: fixed;
        left: -280px; /* Start off-screen */
        top: 50%;
        transform: translateY(-50%);
        width: 280px;
        background: white;
        border-radius: 0 15px 15px 0;
        box-shadow: 0 5px 20px rgba(0,0,0,0.2);
        transition: left 0.3s ease;
        z-index: 1000;
        padding: 20px;
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .floating-actions.active {
        left: 0;
    }

    /* Mobile action toggle button */
    .mobile-action-toggle {
        position: fixed;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 50px;
        height: 50px;
        background: linear-gradient(135deg, #667eea, #764ba2);
        border: none;
        border-radius: 0 25px 25px 0;
        color: white;
        font-size: 20px;
        cursor: pointer;
        z-index: 1001;
        box-shadow: 0 2px 10px rgba(0,0,0,0.2);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
    }

    .mobile-action-toggle:hover {
        background: linear-gradient(135deg, #5a6fd8, #6a4190);
        width: 55px;
    }

    .mobile-action-toggle.active {
        left: 280px;
    }

    /* Style the action buttons for mobile slide-out */
    .floating-actions .floating-btn {
        width: 100%;
        height: 50px;
        border-radius: 10px;
        font-size: 14px;
        padding: 0 15px;
        justify-content: flex-start;
        gap: 12px;
    }

    .floating-actions .floating-btn i {
        font-size: 18px;
        min-width: 20px;
    }

    /* Show QR code section in mobile slide-out */
    .floating-actions .qr-code-section {
        position: static; /* Override fixed positioning */
        left: auto;
        top: auto;
        z-index: auto;
        display: block;
        max-width: none;
        width: 100%;
    }

    /* Show mobile action toggle on mobile */
    .mobile-action-toggle {
        display: flex;
    }
}

@media (max-width: 480px) {
    .memorial-title {
        font-size: 2rem;
    }
    
    .deceased-name {
        font-size: 1.6rem;
    }
    
    .dates {
        font-size: 1.1rem;
    }
    
    .memorial-subtitle {
        font-size: 1rem;
    }
    
    .funeral-service-info {
        padding: 20px;
        margin-top: 30px;
        max-width: 90%;
    }
    
    .event-title {
        font-size: 1.6rem;
    }
    
    .event-date {
        font-size: 1.1rem;
    }
    
    .event-location {
        font-size: 1rem;
    }
    
    .event-address {
        font-size: 0.9rem;
    }
    
    .pages-slider-container {
        gap: 10px;
    }
    
    .pages-grid {
        gap: 10px;
    }
    
    .page-item {
        flex: 0 0 160px;
        min-width: 160px;
    }
    
    .slider-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .flipbook-nav {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }
    
    .flipbook-btn {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    /* Enhanced mobile optimizations */
    .memorial-container {
        padding: 10px;
    }
    
    .memorial-header {
        padding: 40px 10px 30px;
        margin-bottom: 20px;
    }
    
    .content-section {
        padding: 20px 15px;
    }
    
    .section-header {
        padding: 15px;
    }
    
    .section-header h3 {
        font-size: 1.4rem;
    }
    
    .add-btn {
        padding: 10px 20px;
        font-size: 14px;
        width: 100%;
        max-width: 250px;
    }
    
    .photo-item {
        margin-bottom: 15px;
    }
    
    .photo-item img {
        max-height: 200px;
    }
    
    .memory-item, .guest-entry, .timeline-event {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .modal-content {
        width: 98%;
        margin: 5% auto;
        padding: 15px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .form-group input, .form-group textarea {
        padding: 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .submit-btn {
        padding: 15px 25px;
        font-size: 16px;
        width: 100%;
    }
    
    .action-buttons {
        margin: 20px 0;
    }
    
    .action-buttons .submit-btn {
        width: 100%;
        max-width: 300px;
        padding: 15px 25px;
        font-size: 16px;
    }
}

/* Print Styles */
@media print {
    .memorial-nav,
    .add-btn,
    .modal,
    .flipbook-modal,
    .action-buttons {
        display: none !important;
    }
    
    .content-section {
        display: block !important;
        box-shadow: none;
        border: 1px solid #ccc;
        margin-bottom: 20px;
        page-break-inside: avoid;
    }
    
    .memorial-header {
        background: none !important;
        color: #333 !important;
        border: 2px solid #333;
    }
    
    .photo-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pages-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Photo Modal Styles */
.photo-view-modal {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.photo-view {
    text-align: center;
}

.photo-view img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}

.photo-details {
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.photo-details h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-family: 'Playfair Display', serif;
}

.photo-details p {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
}

.photo-comments {
    margin: 20px 0;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 15px;
    background: #f8f9fa;
}

.photo-comment {
    background: white;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 3px solid #667eea;
}

.photo-comment:last-child {
    margin-bottom: 0;
}

.comment-author {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    font-size: 14px;
}

.comment-text {
    color: #555;
    line-height: 1.5;
    margin-bottom: 8px;
}

.comment-date {
    font-size: 12px;
    color: #888;
    font-style: italic;
}

.add-comment {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    border: 2px dashed #667eea;
}

.add-comment input {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.add-comment input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.add-comment button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.add-comment button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Mobile responsive for photo modal */
@media (max-width: 768px) {
    .photo-view-modal {
        width: 95%;
        margin: 5% auto;
        max-height: 95vh;
    }
    
    .photo-view img {
        max-height: 300px;
    }
    
    .photo-comments {
        max-height: 250px;
    }
    
    .add-comment {
        padding: 15px;
    }
    
    .add-comment button {
        width: 100%;
        padding: 15px;
    }
}

/* Touch-friendly interactions for mobile */
@media (max-width: 768px) {
    /* Larger touch targets */
    .nav-btn, .add-btn, .submit-btn, .flipbook-btn {
        min-height: 44px; /* Apple's recommended minimum */
        min-width: 44px;
    }
    
    /* Better touch feedback */
    .nav-btn:active, .add-btn:active, .submit-btn:active, .flipbook-btn:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
    
    /* Improved scrolling */
    .photo-comments, .modal-content {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    /* Better modal handling */
    .modal {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Prevent text selection on buttons */
    .nav-btn, .add-btn, .submit-btn, .flipbook-btn, .close {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    /* Better form handling */
    .form-group input, .form-group textarea {
        -webkit-appearance: none;
        border-radius: 8px;
    }
    
    /* Improved photo gallery */
    .photo-gallery {
        gap: 15px;
    }
    
    .photo-item {
        border-radius: 12px;
        overflow: hidden;
    }
    
    /* Better page grid */
    .pages-grid {
        gap: 12px;
    }
    
    .page-item {
        border-radius: 12px;
        overflow: hidden;
    }
}

/* Extra small mobile devices */
@media (max-width: 360px) {
    .memorial-title {
        font-size: 1.8rem;
    }
    
    .deceased-name {
        font-size: 1.4rem;
    }
    
    .dates {
        font-size: 1rem;
    }
    
    .memorial-subtitle {
        font-size: 0.9rem;
    }
    
    .nav-btn {
        font-size: 14px;
        padding: 12px 16px;
    }
    
    .section-header h3 {
        font-size: 1.3rem;
    }
    
    .pages-slider-container {
        gap: 8px;
    }
    
    .pages-grid {
        gap: 8px;
    }
    
    .page-item {
        flex: 0 0 120px;
        min-width: 120px;
    }
    
    .slider-nav-btn {
        width: 35px;
        height: 35px;
        font-size: 12px;
    }
    
    .photo-gallery {
        gap: 12px;
    }
    
    .modal-content {
        width: 99%;
        margin: 2% auto;
        padding: 12px;
    }
}

/* Animated Flipbook Styles */
.animated-flipbook-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 40px 20px;
    margin: 20px 0;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    animation: fadeInUp 1s ease-out;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.flipbook-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.flipbook-header h2 {
    color: #2c3e50;
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 300;
}

.flipbook-header p {
    color: #7f8c8d;
    font-size: 1.1em;
    margin-bottom: 30px;
}

.flipbook-wrapper {
    position: relative;
    margin: 30px 0;
}

.flipbook {
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 2000px;
    height: 700px;
    position: relative;
    min-height: 600px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.flipbook-page {
    position: absolute;
    width: 280px;
    height: 380px;
    background: white;
    border-radius: 3px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    transform-origin: left center;
    transition: all 1.2s cubic-bezier(0.645, 0.045, 0.355, 1);
    cursor: pointer;
    overflow: hidden;
    border: 1px solid #ddd;
}

.flipbook-spread {
    position: relative;
    width: 1000px;
    height: 650px;
    display: flex;
    transform-style: preserve-3d;
}

.flipbook-left-page {
    position: absolute;
    left: 0;
    width: 500px;
    height: 650px;
    background: white;
    border-radius: 3px 0 0 3px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    transform-origin: right center;
    transition: all 1.2s cubic-bezier(0.645, 0.045, 0.355, 1);
    overflow: hidden;
    border: 1px solid #ddd;
    z-index: 2;
}

.flipbook-right-page {
    position: absolute;
    right: 0;
    width: 500px;
    height: 650px;
    background: white;
    border-radius: 0 3px 3px 0;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    transform-origin: left center;
    transition: all 1.2s cubic-bezier(0.645, 0.045, 0.355, 1);
    overflow: hidden;
    border: 1px solid #ddd;
    z-index: 1;
}

.flipbook-page img,
.flipbook-left-page img,
.flipbook-right-page img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 3px;
}

.flipbook-page.flipped {
    transform: rotateY(-180deg);
}

.flipbook-page.current {
    z-index: 10;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    transform: scale(1.02);
}

.flipbook-page:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 30px rgba(0,0,0,0.5);
}

.flipbook-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

.flip-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.flip-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.flip-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.page-indicator {
    background: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    color: #2c3e50;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.flipbook-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.action-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.4);
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(240, 147, 251, 0.6);
}

/* Animation for page flip */
@keyframes pageFlip {
    0% { 
        transform: rotateY(0deg);
        box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    }
    25% {
        transform: rotateY(-45deg) scale(1.05);
        box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    }
    50% { 
        transform: rotateY(-90deg) scale(1.1);
        box-shadow: 0 20px 40px rgba(0,0,0,0.7);
    }
    75% {
        transform: rotateY(-135deg) scale(1.05);
        box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    }
    100% { 
        transform: rotateY(-180deg);
        box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    }
}

@keyframes pageFlipLeft {
    0% { 
        transform: rotateY(0deg);
        box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    }
    25% {
        transform: rotateY(45deg) scale(1.05);
        box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    }
    50% { 
        transform: rotateY(90deg) scale(1.1);
        box-shadow: 0 20px 40px rgba(0,0,0,0.7);
    }
    75% {
        transform: rotateY(135deg) scale(1.05);
        box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    }
    100% { 
        transform: rotateY(180deg);
        box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    }
}

.flipbook-page.flipping,
.flipbook-left-page.flipping,
.flipbook-right-page.flipping {
    animation: pageFlip 1.2s cubic-bezier(0.645, 0.045, 0.355, 1);
    pointer-events: none;
}

.flipbook-left-page.flipping {
    animation: pageFlipLeft 1.2s cubic-bezier(0.645, 0.045, 0.355, 1);
}

/* Mobile responsiveness for animated flipbook */
@media (max-width: 768px) {
    .flipbook-page {
        width: 250px;
        height: 350px;
    }
    
    .flipbook {
        height: 400px;
    }
    
    .flipbook-header h2 {
        font-size: 2em;
    }
    
    .flipbook-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .flipbook-actions {
        flex-direction: column;
        align-items: center;
    }
}

/* Photo Viewer Modal Styles */
.photo-viewer-modal {
    background: rgba(0, 0, 0, 0.9);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.photo-viewer-content {
    max-width: 95vw;
    max-height: 95vh;
    width: 1200px;
    height: 700px;
    display: flex;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    position: relative;
}

.photo-viewer-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
}

.photo-viewer-close:hover {
    background: rgba(0,0,0,0.9);
    transform: scale(1.1);
}

.photo-viewer-left {
    flex: 2;
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
    position: relative;
}

.photo-viewer-image {
    flex: 1;
    width: 100%;
    object-fit: contain;
    background: #000;
    max-height: 500px;
}

.photo-viewer-details {
    padding: 20px;
    background: white;
    border-top: 1px solid #eee;
}

.photo-viewer-details h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.4em;
}

.photo-viewer-details p {
    color: #7f8c8d;
    margin: 5px 0;
    font-size: 0.95em;
}

.photo-viewer-sidebar {
    flex: 1;
    background: white;
    border-left: 1px solid #eee;
    display: flex;
    flex-direction: column;
    max-width: 400px;
}

.photo-viewer-sidebar .sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.photo-viewer-sidebar .sidebar-header h3 {
    margin: 0 0 5px 0;
    font-size: 1.2em;
}

.comment-count {
    font-size: 0.9em;
    opacity: 0.9;
}

.add-comment-form {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.add-comment-form h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.1em;
}

.add-comment-form .form-group {
    margin-bottom: 15px;
}

.add-comment-form input,
.add-comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.9em;
}

.add-comment-form textarea {
    resize: vertical;
    min-height: 80px;
}

.add-comment-form .submit-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.95em;
    transition: all 0.3s ease;
}

.add-comment-form .submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.comments-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.photo-comment {
    background: #f8f9fa;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.photo-comment:last-child {
    margin-bottom: 0;
}

.comment-author {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
    font-size: 0.95em;
}

.comment-text {
    color: #555;
    line-height: 1.5;
    margin-bottom: 8px;
}

.comment-date {
    color: #7f8c8d;
    font-size: 0.85em;
}

/* Mobile responsiveness for photo viewer */
@media (max-width: 768px) {
    .photo-viewer-content {
        flex-direction: column;
        width: 95vw;
        height: 90vh;
    }
    
    .photo-viewer-sidebar {
        max-width: none;
        border-left: none;
        border-top: 1px solid #eee;
    }
    
    .photo-viewer-image {
        max-height: 300px;
    }
}

/* Navigation Buttons for Photo Viewer */
.photo-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    font-size: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.photo-nav-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.photo-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.photo-nav-btn:disabled:hover {
    transform: translateY(-50%) scale(1);
}

.photo-nav-prev {
    left: 20px;
}

.photo-nav-next {
    right: 20px;
}

/* Photo Counter */
.photo-counter {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    margin-top: 10px;
    display: inline-block;
}

/* Comment Count Display */
.comment-count-display {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 10px;
    border-radius: 15px;
    font-size: 12px;
    margin-top: 8px;
    display: inline-block;
    cursor: default;
}

/* Upload Progress Bar */
.upload-progress {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.progress-container {
    width: 100%;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 14px;
    color: #6c757d;
    text-align: center;
    font-weight: 500;
}

/* Back to Top Button */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    z-index: 1000;
    font-size: 1.2em;
}

/* Mobile Action Toggle Button (hidden on desktop) */
.mobile-action-toggle {
    display: none;
}

/* Show QR code section on desktop (floating position) */
.floating-actions .qr-code-section {
    position: fixed;
    left: 20px;
    top: 20px;
    z-index: 1000;
    max-width: 200px;
    display: block;
    margin-bottom: 20px;
    margin-top: -24rem;
    transform: none; /* Override the parent's transform */
}

.back-to-top-btn:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.back-to-top-btn:active {
    transform: translateY(-1px);
}

.back-to-top-btn i {
    transition: transform 0.2s ease;
}

.back-to-top-btn:hover i {
    transform: translateY(-2px);
}

/* Mobile responsive for back to top button */
@media (max-width: 768px) {
    .back-to-top-btn {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .back-to-top-btn {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 1em;
    }
} 