* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: #89201e;
    background-image: url('assets/img/overlay.png');
    background-blend-mode: soft-light;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #1a1a1a;
    min-height: 100vh;
    padding: 0;
    margin: 0;
    line-height: 1.6;
    animation: fadeIn 0.6s ease-in;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/img/overlay.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.05;
    mix-blend-mode: soft-light;
    pointer-events: none;
    z-index: 0;
}

.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease-out;
    cursor: pointer;
}

.splash-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.splash-screen img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
    flex: 1;
}

.splash-loader {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: #1a1a1a;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.container {
    width: 100% !important;
    max-width: 100%;
    min-height: 100vh;
    background: transparent;
    padding: max(30px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(30px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding-top: 0;
}

.header-image {
    width: 100%;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-image img {
    width: 100% !important;
    height: 100% !important;
    display: block;
    object-fit: cover;
    max-width: 100% !important;
    transition: transform 0.3s ease;
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.3) 100%);
    padding: 30px 20px;
}

.header-overlay h1 {
    font-size: 13px;
    font-weight: 500;
    color: white;
    margin-bottom: 16px;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    opacity: 0.95;
}

.header-overlay h2 {
    font-size: 36px;
    font-weight: 300;
    color: white;
    margin-bottom: 0;
    line-height: 1.2;
    letter-spacing: -1px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

.dates {
    margin-top: 16px;
    font-size: 14px;
    color: black;
    font-style: italic;
}

.buttons-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 50px;
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.funeral-btn {
    background: white;
    color: #1a1a1a;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 14px 20px;
    font-size: 16px;
    font-family: inherit;
    border-radius: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
    text-align: center;
    -webkit-appearance: none;
    appearance: none;
    min-height: 50px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    letter-spacing: 0.2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.funeral-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.05), transparent);
    transition: left 0.5s;
}

.funeral-btn:active {
    background: #f5f5f5;
    transform: scale(0.98);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.funeral-btn:active::before {
    left: 100%;
}

.funeral-btn svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    stroke-width: 2;
    stroke: #1a1a1a;
    transition: transform 0.2s ease;
}

.funeral-btn:active svg {
    transform: scale(0.95);
}

footer {
    margin-top: auto;
    padding-top: 35px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

footer p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-style: italic;
    line-height: 1.7;
    padding: 0 20px;
    font-weight: 400;
    letter-spacing: 0.2px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background-color: white;
    padding: 30px 25px;
    max-width: 400px;
    width: 100%;
    position: relative;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: 300;
    color: #666;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: #1a1a1a;
}

.modal-content p {
    color: #1a1a1a;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    padding: 0 10px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}