/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-bg: #f8f9fa;
    --dark-bg: #1a1a1a;
    --text-dark: #2c3e50;
    --text-light: #ffffff;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.2);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.8;
    color: var(--text-dark);
    background-color: #fff;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-image: url('../images/spencer-hero.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    overflow: hidden;
}

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

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
    animation: fadeInUp 1.2s ease;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
}

.hero-dates {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    opacity: 0.95;
    letter-spacing: 3px;
}

.hero-tagline {
    font-size: 1.3rem;
    font-style: italic;
    opacity: 0.9;
    font-family: 'Cormorant Garamond', serif;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.scroll-indicator span {
    display: block;
    width: 24px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    position: relative;
}

.scroll-indicator span::before {
    content: '';
    position: absolute;
    width: 6px;
    height: 10px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 3px;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollDown 2s infinite;
}

/* Navigation */
.nav {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 0 2rem;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--secondary-color);
}

.nav-link:hover::after {
    width: 80%;
}

/* Sections */
.section {
    padding: 5rem 2rem;
}

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

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.title-divider {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    margin: 1rem auto 1.5rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* About Section */
.about-section {
    background: var(--light-bg);
}

.obituary {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    padding: 3rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.obituary p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    text-align: justify;
}

.survived-by {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.survived-by h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.preceded {
    margin-top: 1rem;
    font-style: italic;
    color: var(--text-muted);
}

/* Memories Section */
.memories-section {
    background: white;
}

.upload-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto 4rem;
}

.upload-box {
    background: var(--light-bg);
    border: 3px dashed var(--border-color);
    border-radius: 10px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-box:hover {
    border-color: var(--secondary-color);
    background: rgba(52, 152, 219, 0.05);
}

.upload-box.dragover {
    border-color: var(--secondary-color);
    background: rgba(52, 152, 219, 0.1);
}

.upload-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    color: var(--secondary-color);
}

.upload-box h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.upload-box p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.upload-form {
    background: var(--light-bg);
    border-radius: 10px;
    padding: 2rem;
}

.upload-form h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.upload-form input,
.upload-form textarea {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.upload-form input:focus,
.upload-form textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary-color), #2980b9);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    display: inline-block;
    background: white;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.btn-secondary:hover {
    background: var(--secondary-color);
    color: white;
}

/* Memories Display */
.memories-display {
    column-count: 3;
    column-gap: 1.5rem;
    margin-top: 3rem;
}

.memory-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    animation: fadeInUp 0.5s ease;
    break-inside: avoid;
    margin-bottom: 1.5rem;
    display: inline-block;
    width: 100%;
}

.memory-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.memory-card .memory-name {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.memory-card .memory-message {
    color: var(--text-dark);
    line-height: 1.6;
    font-size: 0.95rem;
}

.memory-card .memory-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 1rem;
    font-style: italic;
}

/* Gallery Section */
.gallery-section {
    background: var(--light-bg);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    animation: fadeInUp 0.5s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-placeholder {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Celebration Section */
.celebration-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
}

.celebration-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.celebration-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.celebration-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.celebration-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    color: var(--secondary-color);
}

.celebration-icon svg {
    width: 100%;
    height: 100%;
}

.celebration-card h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.celebration-card p {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background: var(--dark-bg);
    color: var(--text-light);
    padding: 3rem 2rem;
    text-align: center;
}

.footer-quote {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    font-style: italic;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.footer-text {
    font-size: 1rem;
    opacity: 0.8;
    margin: 0.5rem 0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: zoomIn 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #ccc;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: translate(-50%, -50%) scale(0.5);
    }
    to {
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes scrollDown {
    0%, 100% {
        transform: translate(-50%, 0);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, 10px);
        opacity: 0.5;
    }
}

/* Responsive Design */
@media (max-width: 1024px) and (min-width: 769px) {
    .memories-display {
        column-count: 2;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-dates {
        font-size: 1.2rem;
    }

    .hero-tagline {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .nav-container {
        gap: 1rem;
    }

    .nav-link {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }

    .upload-container {
        grid-template-columns: 1fr;
    }

    .memories-display {
        column-count: 1;
        column-gap: 0;
    }

    .obituary {
        padding: 2rem 1.5rem;
    }

    .obituary p {
        font-size: 1rem;
    }

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

    .celebration-details {
        grid-template-columns: 1fr;
    }

    .modal-close {
        top: 10px;
        right: 20px;
        font-size: 35px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .section {
        padding: 3rem 1rem;
    }

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

