/*
 * Ever In Memory - Premium CSS Stylesheet
 * Custom warm cream background, charcoal typography, and elegant gold highlights.
 */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-premium: #FAF8F5;
    --text-charcoal: #1C2A38;
    --text-muted: #5A6B7C;
    --accent-gold: #C5A059;
    --accent-gold-hover: #A6823F;
    --bg-card: #FFFFFF;
    --border-soft: #EFECE8;

    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Outfit', system-ui, -apple-system, sans-serif;

    --shadow-premium: 0 10px 30px rgba(28, 42, 56, 0.04), 0 1px 8px rgba(28, 42, 56, 0.02);
    --shadow-hover: 0 15px 40px rgba(28, 42, 56, 0.08), 0 1px 12px rgba(28, 42, 56, 0.03);
}

body {
    background-color: var(--bg-premium);
    color: var(--text-charcoal);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6,
.font-serif {
    font-family: var(--font-serif);
    font-weight: 600;
}

.text-gold {
    color: var(--accent-gold) !important;
}

.bg-gold {
    background-color: var(--accent-gold) !important;
}

.bg-premium-cream {
    background-color: #F3EFE9 !important;
}

/* Custom premium buttons */
.btn-premium-gold {
    background-color: var(--accent-gold);
    color: #FFFFFF !important;
    font-family: var(--font-sans);
    font-weight: 500;
    padding: 0.75rem 1.75rem;
    border-radius: 50px;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.2);
}

.btn-premium-gold:hover {
    background-color: var(--accent-gold-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(197, 160, 89, 0.3);
}

.btn-premium-outline {
    background-color: transparent;
    color: var(--text-charcoal) !important;
    font-family: var(--font-sans);
    font-weight: 500;
    padding: 0.75rem 1.75rem;
    border-radius: 50px;
    border: 2px solid var(--accent-gold);
    transition: all 0.3s ease;
}

.btn-premium-outline:hover {
    background-color: var(--accent-gold);
    color: #FFFFFF !important;
    transform: translateY(-2px);
}

.btn-premium-dark {
    background-color: var(--text-charcoal);
    color: #FFFFFF !important;
    font-family: var(--font-sans);
    font-weight: 500;
    padding: 0.75rem 1.75rem;
    border-radius: 50px;
    border: none;
    transition: all 0.3s ease;
}

.btn-premium-dark:hover {
    background-color: #2c3e50;
    transform: translateY(-2px);
}

/* Premium Card Styles */
.card-premium {
    background-color: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    box-shadow: var(--shadow-premium);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card-premium:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

/* Header & Navbar Custom styling */
.navbar-premium {
    background-color: rgba(250, 248, 245, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-soft);
    padding: 1rem 0;
}

.navbar-brand-premium {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-charcoal) !important;
    text-decoration: none;
}

.nav-link-premium {
    color: var(--text-charcoal) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: color 0.2s ease;
}

.nav-link-premium:hover {
    color: var(--accent-gold) !important;
}

/* Hero Section with Serene Background & Overlay */
.hero-section {
    padding: 7rem 0;
    position: relative;
    background-image: url('../images/hero_bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(250, 248, 245, 0.96) 35%, rgba(250, 248, 245, 0.7) 100%);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.15;
    color: var(--text-charcoal);
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.15rem;
    margin-bottom: 2rem;
}

/* Benefit Strip */
.benefit-strip {
    background-color: var(--text-charcoal);
    color: #FFFFFF;
    padding: 1.5rem 0;
    border-radius: 12px;
}

.benefit-strip-item {
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.benefit-strip-item i {
    color: var(--accent-gold);
}

/* Timeline/How it works details */
.timeline-step {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 2.5rem;
}

.timeline-step::before {
    content: '';
    position: absolute;
    left: 1.15rem;
    top: 2rem;
    bottom: -2.5rem;
    width: 2px;
    background-color: var(--border-soft);
}

.timeline-step:last-child::before {
    display: none;
}

.timeline-num {
    position: absolute;
    left: 0;
    top: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: var(--bg-card);
    border: 2px solid var(--accent-gold);
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-serif);
    font-weight: 700;
}

/* Footer layout */
.footer-premium {
    background-color: #121C27;
    color: #E2E8F0;
    padding: 5rem 0 2rem 0;
    margin-top: 5rem;
}

.footer-premium h5 {
    color: #FFFFFF;
    font-family: var(--font-serif);
    margin-bottom: 1.5rem;
}

.footer-premium a {
    color: #A0AEC0;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-premium a:hover {
    color: var(--accent-gold);
}

/* Mock Card Preview */
.mock-memorial-card {
    background: #FFFFFF;
    border-radius: 24px;
    box-shadow: 0 20px 45px rgba(28, 42, 56, 0.08);
    overflow: hidden;
    max-width: 380px;
    margin: 0 auto;
}

.mock-cover {
    height: 120px;
    background: linear-gradient(135deg, #1C2A38 0%, #3A4E62 100%);
    position: relative;
}

.mock-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 4px solid #FFFFFF;
    position: absolute;
    bottom: -45px;
    left: 50%;
    transform: translateX(-50%);
    object-fit: cover;
    background-color: #E2E8F0;
}

.mock-content {
    padding: 3.5rem 1.5rem 1.5rem 1.5rem;
    text-align: center;
}

.mock-badge-qr {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: #FAF8F5;
    border: 1px dashed var(--accent-gold);
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--accent-gold);
    font-weight: 500;
    margin-top: 1rem;
}

.memorial-header-wrap {
    position: relative;
    z-index: 10;
}

.memorial-avatar-container {
    margin-top: -100px;
    position: relative;
    z-index: 11;
}

.memorial-profile-avatar-square {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 12px;
    border: 6px solid #FFFFFF;
    box-shadow: var(--shadow-premium);
    background-color: #FFFFFF;
}

/* Premium Tabs Styling */
.nav-tabs-premium {
    border-bottom: 2px solid var(--border-soft) !important;
}

.nav-tabs-premium .nav-item {
    margin-bottom: -2px;
}

.nav-tabs-premium .nav-link {
    background: transparent !important;
    border: none !important;
    color: var(--text-muted) !important;
    font-weight: 500 !important;
    padding: 1rem 1.5rem !important;
    font-family: var(--font-serif);
    font-size: 1.05rem;
    border-bottom: 3px solid transparent !important;
    transition: all 0.2s ease;
}

.nav-tabs-premium .nav-link:hover {
    color: var(--accent-gold) !important;
    border-bottom-color: var(--border-soft) !important;
}

.nav-tabs-premium .nav-link.active {
    color: var(--accent-gold) !important;
    border-bottom-color: var(--accent-gold) !important;
    font-weight: 600 !important;
}

/* Public Memorial Layout styling */
.memorial-banner {
    position: relative;
    height: 380px;
    background-color: #1c2a38;
    background-position: center;
    background-size: cover;
}

.memorial-profile-wrap {
    margin-top: -120px;
    position: relative;
    z-index: 10;
}

.memorial-profile-avatar {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 8px solid var(--bg-premium);
    box-shadow: var(--shadow-premium);
    object-fit: cover;
    background-color: #FFFFFF;
}

.memorial-dates-badge {
    background-color: var(--text-charcoal);
    color: #FFFFFF;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    display: inline-block;
    font-family: var(--font-serif);
    letter-spacing: 0.05rem;
}

.gallery-grid-item {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--border-soft);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-grid-item:hover {
    transform: scale(1.03);
}

.gallery-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Plaque Preview Graphic */
.plaque-preview {
    background-color: #1F2937;
    color: #F3F4F6;
    border-radius: 12px;
    padding: 2rem;
    border: 6px solid #D4AF37;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 320px;
    margin: 0 auto;
}

.plaque-preview-qr {
    background: #FFFFFF;
    padding: 1rem;
    border-radius: 8px;
    display: inline-block;
    margin: 1.5rem 0;
}

/* Custom Accordion Styling */
.accordion-premium .accordion-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: 16px !important;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-premium);
    overflow: hidden;
}

.accordion-premium .accordion-button {
    background-color: var(--bg-card);
    color: var(--text-charcoal);
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1.25rem 1.5rem;
    border: none;
    box-shadow: none;
}

.accordion-premium .accordion-button:not(.collapsed) {
    color: var(--accent-gold);
    background-color: var(--bg-premium);
}

.accordion-premium .accordion-button::after {
    filter: brightness(0.2);
}

/* Admin Custom Sidebar Layout */
.admin-sidebar {
    background-color: #111827;
    min-height: 100vh;
    color: #9CA3AF;
}

.admin-sidebar .nav-link {
    color: #9CA3AF;
    padding: 0.75rem 1.5rem;
    border-radius: 0;
    border-left: 4px solid transparent;
    transition: all 0.2s ease;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: #FFFFFF;
    background-color: #1F2937;
    border-left-color: var(--accent-gold);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s forwards ease-out;
}

/* Step Card Premium Styles */
.step-card {
    background-color: #FFFFFF;
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    box-shadow: var(--shadow-premium);
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
    padding: 2.5rem 1.75rem;
    overflow: hidden;
}

.step-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(197, 160, 89, 0.1) !important;
    border-color: rgba(197, 160, 89, 0.3);
}

.step-number-bg {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 700;
    color: rgba(197, 160, 89, 0.12);
    line-height: 1;
}

.step-icon-wrap {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #F8F5F0;
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.step-card:hover .step-icon-wrap {
    background-color: var(--accent-gold);
    color: #FFFFFF;
    transform: scale(1.1);
}

/* -------------------------------------------------------------
 * Admin & Frontend Spacing Mobile Friendliness
 * ------------------------------------------------------------- */

/* Desktop & Large Screen Admin Layout */
@media (min-width: 992px) {
    .admin-sidebar {
        position: fixed !important;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 100;
        width: 16.666667% !important;
        /* matches col-lg-2 */
        height: 100vh !important;
    }

    .admin-main {
        margin-left: 16.666667% !important;
        min-height: 100vh;
    }
}

/* Tablet Admin Layout */
@media (min-width: 768px) and (max-width: 991.98px) {
    .admin-sidebar {
        position: fixed !important;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 100;
        width: 25% !important;
        /* matches col-md-3 */
        height: 100vh !important;
    }

    .admin-main {
        margin-left: 25% !important;
        min-height: 100vh;
    }
}

/* Mobile Screen Admin & General Spacing Adjustments */
@media (max-width: 767.98px) {


    .btn-premium-gold,
    .btn-premium-outline {
        padding: 16px !important;
        height: auto !important;
        font-size: 16px;
        line-height: 11px;
    }

    .navbar-premium {
        padding-bottom: 0;
    }

    .navbar-premium img {
        max-width: 190px !important;
    }

    .admin-sidebar {
        position: fixed !important;
        top: 56px !important;
        /* height of mobile top header */
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        z-index: 1040 !important;
        width: 100% !important;
        height: calc(100vh - 56px) !important;
        min-height: auto !important;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    }

    .admin-main {
        margin-left: 0 !important;
        padding-top: 20px !important;
        min-height: calc(100vh - 56px);
    }

    /* General Spacing Reductions on Mobile */
    .py-5 {
        padding-top: 2.25rem !important;
        padding-bottom: 2.25rem !important;
    }

    .py-4 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }

    .py-3 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }

    .my-5 {
        margin-top: 2rem !important;
        margin-bottom: 2rem !important;
    }

    .my-4 {
        margin-top: 1.5rem !important;
        margin-bottom: 1.5rem !important;
    }

    /* Flatten nested container paddings inside sections on mobile */
    .py-5 .container.py-5,
    .py-5 .container.py-md-4,
    .py-5 .container.py-4,
    .py-5 .container.py-3,
    .py-4 .container.py-4,
    .py-4 .container.py-3 {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    /* Reduce Hero padding specifically */
    .hero-section {
        padding: 3rem 0 !important;
    }

    .hero-title {
        font-size: 2.25rem !important;
        line-height: 1.2 !important;
        margin-bottom: 1rem !important;
    }

    .hero-subtitle {
        font-size: 1rem !important;
        margin-bottom: 1.5rem !important;
    }

    .footer-premium {
        padding: 3.5rem 0 1.5rem 0 !important;
        margin-top: 3rem !important;
    }

    .timeline-step {
        margin-bottom: 1.75rem !important;
        padding-left: 2.5rem !important;
    }

    .timeline-step::before {
        left: 0.9rem !important;
    }

    .timeline-num {
        width: 2rem !important;
        height: 2rem !important;
        font-size: 0.9rem !important;
    }

    .card-premium {
        border-radius: 16px !important;
    }
}