
/**
 * Memorial Cards Slideshow Styles
 * Designed to replace the static Eleanor preview with rotating cards
 */

/* ===================================
   MAIN SLIDESHOW CONTAINER
   =================================== */

.memorial-cards-slideshow {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ===================================
   TRACK CONTAINER & NAVIGATION
   =================================== */

.cards-track-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
}

.cards-track {
    flex: 1;
    position: relative;
    height: 500px;
    overflow: hidden;
}

/* ===================================
   INDIVIDUAL CARD SLIDES
   =================================== */

.memorial-card-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.memorial-card-slide.active {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
    z-index: 2;
}

/* ===================================
   MEMORIAL CARD LINK & BROWSER
   =================================== */

.memorial-card-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.memorial-card-browser {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    height: 100%;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.memorial-card-link:hover .memorial-card-browser {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

/* Browser header (decorative dots) */
.browser-header {
    background: linear-gradient(to bottom, #f5f5f5, #e8e8e8);
    padding: 12px 16px;
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #d0d0d0;
}

.browser-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff5f57;
}

.browser-dot:nth-child(2) {
    background: #ffbd2e;
}

.browser-dot:nth-child(3) {
    background: #28ca42;
}

/* ===================================
   CARD CONTENT
   =================================== */

.memorial-card-content {
    padding: 40px 30px;
    text-align: center;
}

/* Portrait */
.memorial-card-portrait {
    width: 140px;
    height: 140px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid #f0f0f0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    position: relative;
}

.memorial-card-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Name */
.memorial-card-name {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
    line-height: 1.2;
    letter-spacing: -0.3px;
}

/* Dates */
.memorial-card-dates {
    font-size: 1.125rem;
    color: #666;
    margin-bottom: 12px;
    font-weight: 400;
}

/* Type badge */
.memorial-card-type {
    display: inline-block;
    padding: 6px 16px;
    background: #f5f5f5;
    color: #666;
    border-radius: 20px;
    font-size: 0.813rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

/* Bio description */
.memorial-card-bio {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
    min-height: 48px;
}

/* CTA */
.memorial-card-cta {
    color: #002D5B;
    font-weight: 600;
    font-size: 1rem;
    transition: transform 0.2s ease;
    display: inline-block;
}

.memorial-card-link:hover .memorial-card-cta {
    transform: translateX(5px);
    color: #4A7C59;
}

/* ===================================
   NAVIGATION BUTTONS
   =================================== */

.cards-nav {
    flex: 0 0 45px;
    width: 45px;
    height: 45px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.cards-nav:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cards-nav:active {
    transform: scale(0.95);
}

.cards-nav svg {
    width: 22px;
    height: 22px;
    stroke: #002D5B;
}

/* ===================================
   INDICATOR DOTS
   =================================== */

.cards-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 25px;
}

.cards-indicator {
    width: 10px;
    height: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.cards-indicator:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.2);
}

.cards-indicator.active {
    background: rgba(255, 255, 255, 0.95);
    width: 30px;
    border-radius: 5px;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 1024px) {
    .cards-track {
        height: 480px;
    }
    
    .memorial-card-content {
        padding: 35px 25px;
    }
    
    .memorial-card-name {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .cards-track {
        height: 450px;
    }
    
    .memorial-card-portrait {
        width: 120px;
        height: 120px;
    }
    
    .memorial-card-content {
        padding: 30px 20px;
    }
    
    .memorial-card-name {
        font-size: 1.375rem;
    }
    
    .memorial-card-dates {
        font-size: 1rem;
    }
    
    .memorial-card-bio {
        font-size: 0.938rem;
    }
    
    .cards-nav {
        flex: 0 0 40px;
        width: 40px;
        height: 40px;
    }
    
    .cards-nav svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 640px) {
    .cards-track-container {
        gap: 10px;
    }
    
    .cards-track {
        height: 420px;
    }
    
    .memorial-card-portrait {
        width: 100px;
        height: 100px;
    }
    
    .memorial-card-content {
        padding: 25px 18px;
    }
    
    .memorial-card-name {
        font-size: 1.25rem;
    }
    
    .cards-nav {
        flex: 0 0 36px;
        width: 36px;
        height: 36px;
    }
}

/* ===================================
   ACCESSIBILITY
   =================================== */

.cards-nav:focus,
.cards-indicator:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 3px;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .memorial-card-slide {
        transition: opacity 0.3s ease !important;
        transform: none !important;
    }
    
    .memorial-card-browser,
    .memorial-card-cta {
        transition: none !important;
    }
}

/* ===================================
   LOADING STATE
   =================================== */

.memorial-card-portrait img[src=""] {
    background: linear-gradient(135deg, #e0e0e0, #f5f5f5);
}

/* ===================================
   PRINT
   =================================== */

@media print {
    .memorial-cards-slideshow {
        display: none;
    }
}

/* ===================================
   INTEGRATION WITH HERO
   =================================== */

/* Ensure proper sizing in hero-visual container */
.hero-visual .memorial-cards-slideshow {
    width: 100%;
    height: 100%;
    min-height: 500px;
}

/* Make sure it fits nicely in the hero layout */
@media (min-width: 1200px) {
    .hero-visual .memorial-cards-slideshow {
        max-width: 550px;
    }
}
