/* The Obituary Network - Main Stylesheet */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #8b5a3c;
    --primary-dark: #6d4426;
    --secondary: #a67c52;
    --accent: #d4af37;
    --text: #2d1810;
    --text-light: #6b5446;
    --text-dark: #1a0f08;
    --bg-light: #faf8f5;
    --bg-white: #ffffff;
    --bg-card: #f5f0eb;
    --border: #e8e0d5;
    --shadow: 0 10px 40px rgba(139, 90, 60, .08);
    --shadow-lg: 0 20px 60px rgba(139, 90, 60, .12);
    --pet-primary: #7c3aed;
    --pet-secondary: #a78bfa;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: var(--bg-light);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
}

/* Header & Navigation */
header {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.demo-banner {
    background: linear-gradient(135deg, #d4af37 0%, #c19a2e 100%);
    color: white;
    padding: 10px;
    text-align: center;
    font-weight: 600;
    font-size: .9rem;
}

.demo-banner a {
    color: white;
    text-decoration: underline;
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

/* Enhanced Search Bar Container */
.search-bar-container {
    flex: 1;
    max-width: 650px;
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.search-type-selector {
    padding: 0.9rem 1rem;
    border: 2px solid var(--border);
    border-radius: 50px;
    font-size: 0.95rem;
    background: var(--bg-white);
    cursor: pointer;
    transition: all .3s;
    min-width: 180px;
    font-weight: 500;
    color: var(--text);
}

.search-type-selector:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(139, 90, 60, .12);
}

.search-type-selector:hover {
    border-color: var(--primary);
    background: var(--bg-light);
}

.search-input-wrapper {
    flex: 1;
    position: relative;
}

.search-bar {
    width: 100%;
    padding: 0.9rem 3rem 0.9rem 1.2rem;
    border: 2px solid var(--border);
    border-radius: 50px;
    font-size: 1rem;
    transition: all .3s;
}

.search-bar:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(139, 90, 60, .12);
}

.search-icon {
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3rem;
    color: var(--text-light);
    pointer-events: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: color .3s;
    font-size: .95rem;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Hero Section */
.hero {
    background: url('https://theobituarynetwork.com/images/placeholder.jpg') center/cover no-repeat;
    color: white;
    padding: 5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, .3);
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    opacity: .95;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    transition: all .3s;
}

.btn-primary {
    background: white;
    color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, .3);
}

.btn-secondary {
    background: rgba(255, 255, 255, .15);
    color: white;
    border: 2px solid rgba(255, 255, 255, .3);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, .25);
}

.btn-small {
    padding: .6rem 1.2rem;
    border-radius: 25px;
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
}

.btn-link {
    background: transparent;
    color: var(--primary);
    border: none;
}

.btn-link:hover {
    background: rgba(139, 90, 60, .1);
}

.share-memorial-btn {
    background: var(--accent);
    color: white;
}

.share-memorial-btn:hover {
    background: #c19a2e;
}

.tribute-btn {
    background: var(--primary);
    color: white;
}

.tribute-btn:hover {
    background: var(--primary-dark);
}

/* Features Section */
.features {
    max-width: 1400px;
    margin: -4rem auto 4rem;
    padding: 0 2rem;
    position: relative;
    z-index: 10;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform .3s, box-shadow .3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.7;
}

/* Memorials Section */
.memorials {
    max-width: 1400px;
    margin: 6rem auto;
    padding: 0 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.section-header p {
    font-size: 1.2rem;
    color: var(--text-light);
}

/* Memorial Filter Tabs */
.memorial-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 0.75rem 2rem;
    background: var(--bg-white);
    border: 2px solid var(--border);
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(139, 90, 60, 0.06);
}

.filter-tab:hover {
    background: var(--bg-card);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 90, 60, 0.12);
}

.filter-tab.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.4);
}

.filter-tab .count {
    background: rgba(139, 90, 60, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    min-width: 28px;
    text-align: center;
}

.filter-tab.active .count {
    background: rgba(255, 255, 255, 0.3);
}

/* Memorial Grid */
.memorial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
}

.memorial-card {
    background: var(--bg-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.4s ease;
}

.memorial-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.memorial-card.pet-memorial {
    border-top: 4px solid var(--pet-primary);
}

.memorial-card.hidden {
    display: none;
}

.memorial-card.filtering {
    opacity: 0;
    transform: scale(0.9);
}

.memorial-image {
    height: 250px;
    background: linear-gradient(135deg, #f5ebe0 0%, #e8d5c4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    position: relative;
    overflow: hidden;
}

.memorial-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.memorial-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary);
    color: white;
    padding: .4rem 1rem;
    border-radius: 50px;
    font-size: .8rem;
    font-weight: 600;
    z-index: 10;
}

.memorial-badge.pet {
    background: var(--pet-primary);
}

.memorial-content {
    padding: 2rem;
}

.memorial-content h3 {
    font-size: 1.6rem;
    margin-bottom: .75rem;
    color: var(--text);
}

.memorial-dates {
    color: var(--text-light);
    font-size: .95rem;
    margin-bottom: .5rem;
}

.memorial-location {
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.memorial-excerpt {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.memorial-actions {
    display: flex;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-white);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.empty-state.hidden {
    display: none;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .7);
    z-index: 2000;
    overflow-y: auto;
    padding: 2rem;
    align-items: flex-start;
    justify-content: center;
}

.modal-content {
    background: var(--bg-white);
    max-width: 800px;
    width: 100%;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.modal-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 3rem 2rem 2rem;
    border-radius: 24px 24px 0 0;
    position: relative;
}

.modal-header.pet-type {
    background: linear-gradient(135deg, var(--pet-primary) 0%, var(--pet-secondary) 100%);
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    background: none;
    border: none;
}

.step-indicator {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.step-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .3);
    transition: all .3s;
}

.step-dot.active {
    background: white;
    width: 40px;
    border-radius: 6px;
}

.modal-body {
    padding: 3rem 2rem;
    max-height: 70vh;
    overflow-y: auto;
}

/* Full Obituary Styles */
.full-obit-photo img {
    max-height: 500px;
    width: 100%;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 2rem;
}

.full-obit-icon {
    font-size: 7rem;
    text-align: center;
    margin: 2.5rem 0;
}

.full-obit-dates {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.full-obit-location {
    text-align: center;
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 2rem;
}

.full-obituary-content h2 {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1.2rem;
}

.full-obit-section {
    margin: 3rem 0;
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 16px;
}

.full-obit-section h3 {
    font-size: 1.7rem;
    color: var(--primary);
    border-bottom: 3px solid var(--border);
    padding-bottom: .8rem;
    margin-bottom: 1.5rem;
}

.full-obit-section p {
    line-height: 1.8;
    color: var(--text);
}

.full-obit-share {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem;
    background: rgba(139, 90, 60, .05);
    border-radius: 16px;
}

.full-obit-share h4 {
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-btn {
    padding: .9rem 1.5rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: white;
    transition: transform .3s;
}

.share-btn:hover {
    transform: translateY(-2px);
}

.share-btn.facebook {
    background: #1877f2;
}

.share-btn.twitter {
    background: #1da1f2;
}

.share-btn.linkedin {
    background: #0077b5;
}

.share-btn.copy {
    background: #6c757d;
}

/* Form Styles */
.form-modal .modal-content {
    max-width: 900px;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group.full {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    margin-bottom: .5rem;
    font-weight: 600;
    color: var(--text);
}

.date-roladex {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: .75rem;
}

.date-roladex select {
    padding: .9rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    background: white;
    transition: border-color .3s;
}

.date-roladex select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: .9rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    transition: border-color .3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.photo-upload {
    border: 3px dashed var(--border);
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all .3s;
    background: var(--bg-light);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-upload:hover {
    border-color: var(--primary);
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

.photo-upload.has-image {
    border-style: solid;
    border-color: var(--primary);
    background: white;
    padding: 1rem;
}

.upload-preview {
    max-width: 100%;
    max-height: 300px;
    border-radius: 12px;
    object-fit: contain;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.payment-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 2rem 0;
}

.payment-btn {
    padding: 1.2rem;
    background: var(--bg-light);
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all .3s;
    font-weight: 600;
    width: 100%;
}

.payment-btn:hover {
    border-color: var(--primary);
    background: white;
}

.error-message,
.success-message {
    padding: 1rem;
    border-radius: 12px;
    margin: 1rem 0;
    font-weight: 500;
}

.error-message {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.success-message {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.upload-status {
    font-size: .9rem;
    color: var(--text-light);
    margin-top: .5rem;
    text-align: center;
}

/* Footer */
footer {
    background: var(--text);
    color: white;
    padding: 4rem 2rem;
    margin-top: 6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

footer h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
}

footer a {
    color: white;
    text-decoration: none;
    transition: opacity .3s;
}

footer a:hover {
    opacity: .7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        padding: 3rem 1.5rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-bar-container {
        max-width: 100%;
        flex-direction: column;
        width: 100%;
    }
    
    .search-type-selector {
        width: 100%;
        min-width: unset;
    }
    
    .search-input-wrapper {
        width: 100%;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .memorial-filters {
        gap: 0.5rem;
    }
    
    .filter-tab {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .memorial-grid {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .payment-options {
        grid-template-columns: 1fr;
    }
    
    .date-roladex {
        grid-template-columns: 1fr;
    }
    
    .share-buttons {
        flex-direction: column;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 0px;
}