/**
 * Memorial Page Styles
 * Styles for the Seen Forever memorial single pages
 */

/* === Hero Banner Section === */
.sf-memorial-hero {
    position: relative;
    min-height: 500px;
    background-size: cover;
    background-position: center;
    background-color: #2c3e50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.sf-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.6));
}

.sf-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.sf-profile-photo {
    width: 200px;
    height: 200px;
    margin: 0 auto 30px;
    border-radius: 50%;
    overflow: hidden;
    border: 6px solid #ffffff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.sf-profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sf-hero-info {
    color: #ffffff;
}

.sf-memorial-name {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    line-height: 1.2;
    color: #fff;
}

.sf-memorial-dates {
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: 300;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.sf-memorial-age {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* === Tabs Navigation === */
.sf-memorial-tabs {
    background: #ffffff;
    border-bottom: 2px solid #e1e8ed;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sf-tabs-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.sf-tabs-wrapper::-webkit-scrollbar {
    height: 4px;
}

.sf-tabs-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.sf-tabs-wrapper::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 2px;
}

.sf-tab-button {
    flex: 0 0 auto;
    background: transparent;
    border: none;
    padding: 20px 25px;
    font-size: 1rem;
    font-weight: 500;
    color: #657786;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    border-radius: 0;
}

.sf-tab-button i {
    font-size: 1.2rem;
}

.sf-tab-button:hover {
    color: #23adde;
    background: #f7f9fa;
    border-bottom-color: #23adde;
}

.sf-tab-button:hover i {
    color: #23adde;
}

.sf-tab-button.active {
    color: #23adde;
    border-bottom-color: #23adde;
}

    .sf-tab-button.active i {
        color: #23adde;
    }

.sf-tab-button span {
    display: inline-block;
}

/* === Content Container === */
.sf-memorial-content {
    background: #f5f8fa;
    padding: 60px 20px;
    min-height: 500px;
}

.sf-memorial-container {
    max-width: 1200px;
    margin: 0 auto;
}

.sf-tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.sf-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sf-no-content {
    text-align: center;
    padding: 60px 20px;
    font-size: 1.1rem;
    color: #657786;
    font-style: italic;
}

/* === Obituary === */
.sf-obituary {
    background: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    font-size: 1.1rem;
    line-height: 1.8;
    color: #14171a;
}

.sf-obituary p {
    margin-bottom: 1.2rem;
}

/* === Timeline === */
.sf-timeline {
    position: relative;
    padding: 20px 0;
}

.sf-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #e1e8ed;
    transform: translateX(-50%);
}

.sf-timeline-item {
    position: relative;
    margin-bottom: 50px;
    display: flex;
}

.sf-timeline-item.left {
    justify-content: flex-start;
    padding-right: 50%;
}

.sf-timeline-item.right {
    justify-content: flex-end;
    padding-left: 50%;
}

.sf-timeline-content {
    background: #ffffff;
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: relative;
    width: 100%;
    max-width: 500px;
    overflow: hidden;
}

.sf-timeline-content::before {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    background: #1da1f2;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.sf-timeline-item.left .sf-timeline-content::before {
    right: -47px;
}

.sf-timeline-item.right .sf-timeline-content::before {
    left: -47px;
}

/* Timeline image inside content box */
.sf-timeline-image {
    width: 100%;
    max-height: 400px;
    overflow: hidden;
    margin: 0;
}

.sf-timeline-image img {
    width: 100%;
    height: 100%;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

/* Timeline text content */
.sf-timeline-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #14171a;
    margin: 0 0 10px 0;
    padding: 20px 25px 0 25px;
}

.sf-timeline-date {
    display: inline-block;
    padding: 4px 12px;
    background: #e1e8ed;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #657786;
    margin: 0 25px 15px 25px;
}

.sf-timeline-description {
    color: #657786;
    line-height: 1.6;
    padding: 0 25px 25px 25px;
}

.sf-timeline-description p:last-child {
    margin-bottom: 0;
}

/* === Gallery === */
.sf-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.sf-gallery-album {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.sf-gallery-album:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    text-decoration: none;
}

.sf-gallery-album a,
.sf-gallery-album a:hover {
    text-decoration: none;
}

.sf-album-cover {
    position: relative;
    width: 100%;
    padding-top: 75%;
    overflow: hidden;
    background: #e1e8ed;
}

.sf-album-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.sf-gallery-album:hover .sf-album-cover img {
    transform: scale(1.05);
}

.sf-album-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(29, 161, 242, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sf-gallery-album:hover .sf-album-overlay {
    opacity: 1;
}

.sf-album-overlay i {
    font-size: 3rem;
    color: #ffffff;
}

.sf-album-title {
    padding: 20px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #14171a;
    text-align: center;
}

/* === Memory Wall === */
.sf-memory-wall {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.sf-memory-item {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-left: 4px solid #23adde;
    margin: 0;
    font-style: italic;
    position: relative;
}

.sf-memory-item::before {
    content: '\201C';
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 4rem;
    color: #e1e8ed;
    line-height: 1;
    font-family: Georgia, serif;
}

.sf-memory-item p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #14171a;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.sf-memory-item cite {
    display: block;
    text-align: right;
    font-size: 0.95rem;
    color: #657786;
    font-style: normal;
    font-weight: 600;
}

/* === Family Grid === */
.sf-family-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
}

.sf-family-member {
    background: #ffffff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform 0.3s ease;
}

.sf-family-member:hover {
    transform: translateY(-5px);
}

.sf-family-photo {
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #e1e8ed;
}

.sf-family-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sf-family-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #14171a;
    margin-bottom: 5px;
}

.sf-family-relation {
    font-size: 0.95rem;
    color: #657786;
    margin: 0;
}

/* === Service Info === */
.sf-service-info {
    background: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    max-width: 700px;
    margin: 0 auto;
}

.sf-service-item {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid #e1e8ed;
}

.sf-service-item:last-child {
    border-bottom: none;
}

.sf-service-item i {
    font-size: 1.5rem;
    color: #185a64;
    width: 30px;
    flex-shrink: 0;
}

.sf-service-item div {
    flex: 1;
}

.sf-service-item strong {
    display: block;
    font-size: 1.1rem;
    color: #14171a;
    margin-bottom: 5px;
}

/* === Links Grid === */
.sf-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.sf-link-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: #ffffff;
    padding: 20px 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-decoration: none;
    color: #14171a;
    transition: all 0.3s ease;
}

.sf-link-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    background: #1da1f2;
    color: #ffffff;
    text-decoration: none;
}

.sf-link-item i {
    font-size: 1.8rem;
    color: #1da1f2;
    transition: color 0.3s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.sf-link-item:hover i {
    color: #ffffff;
}

.sf-link-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 0;
}

.sf-link-url {
    font-size: 1rem;
    font-weight: 500;
    color: #14171a;
    word-break: break-all;
    transition: color 0.3s ease;
}

.sf-link-item:hover .sf-link-url {
    color: #ffffff;
}

.sf-link-description {
    font-size: 0.85rem;
    color: #657786;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.sf-link-item:hover .sf-link-description {
    color: rgba(255, 255, 255, 0.9);
}

/* === Music Embed (Spotify & Apple Music) === */
.sf-music-embed {
    background: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    max-width: 700px;
    margin: 0 auto;
}

.sf-music-playlist {
    margin-bottom: 30px;
}

.sf-music-playlist:last-child {
    margin-bottom: 0;
}

.sf-playlist-description {
    font-size: 16px;
    color: #657786;
    margin-bottom: 15px;
    text-align: center;
}

.sf-spotify-playlist iframe {
    width: 100%;
    border-radius: 8px;
}

.sf-apple-music-playlist iframe {
    width: 100%;
    max-width: 660px;
    display: block;
    margin: 0 auto;
    border-radius: 10px;
}

/* Legacy support for old class name */
.sf-spotify-embed {
    background: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    max-width: 700px;
    margin: 0 auto;
}

.sf-spotify-embed iframe {
    width: 100%;
    border-radius: 8px;
}

/* === Edit Memorial Tab === */
.sf-tab-edit {
    margin-left: auto;
    text-decoration: none;
}

.sf-tab-edit:hover {
    text-decoration: none;
}

/* === Responsive Design === */
@media (max-width: 1024px) {
    .sf-memorial-name {
        font-size: 2.5rem;
    }

    .sf-timeline-item {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .sf-timeline::before {
        left: 20px;
    }

    .sf-timeline-item.left .sf-timeline-content,
    .sf-timeline-item.right .sf-timeline-content {
        grid-column: 1;
        text-align: left;
        margin-left: 50px;
    }

    .sf-timeline-item.left .sf-timeline-image,
    .sf-timeline-item.right .sf-timeline-image {
        grid-column: 1;
        grid-row: 2;
        margin-left: 50px;
    }

    .sf-timeline-content::before {
        left: -47px !important;
        right: auto !important;
    }

    .sf-family-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 768px) {
    .sf-memorial-hero {
        min-height: 400px;
        padding: 40px 20px;
    }

    .sf-profile-photo {
        width: 150px;
        height: 150px;
    }

    .sf-memorial-name {
        font-size: 2rem;
    }

    .sf-memorial-dates {
        font-size: 1.2rem;
    }

    .sf-memorial-age {
        font-size: 1rem;
    }

    .sf-tab-button {
        padding: 15px 20px;
        font-size: 0.9rem;
    }

    .sf-tab-button span {
        display: none;
    }

    .sf-tab-button i {
        font-size: 1.5rem;
    }

    .sf-memorial-content {
        padding: 40px 15px;
    }

    .sf-obituary {
        padding: 25px;
    }

    .sf-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }

    .sf-memory-wall {
        grid-template-columns: 1fr;
    }

    .sf-family-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 20px;
    }

    .sf-service-info,
    .sf-spotify-embed,
    .sf-music-embed {
        padding: 25px;
    }

    .sf-links-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .sf-profile-photo {
        width: 120px;
        height: 120px;
    }

    .sf-memorial-name {
        font-size: 1.8rem;
    }

    .sf-family-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sf-gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* === Unavailable Memorial Page === */
.sf-memorial-unavailable {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 60px 20px;
    background-color: #f8f9fa;
}

.sf-unavailable-content {
    text-align: center;
    max-width: 500px;
}

.sf-unavailable-content h1 {
    font-size: 1.6rem;
    color: #333;
    margin-bottom: 15px;
}

.sf-unavailable-content p {
    color: #666;
    margin-bottom: 25px;
    font-size: 1rem;
    line-height: 1.6;
}
