/* ==========================================
   WHEALTON MEMORIAL WEBSITE - MAIN STYLES
   Elegant design with shadowed cards, hover effects, and regions
   ========================================== */

/* ==========================================
   CSS VARIABLES - Color Palette
   ========================================== */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #8b7355;
    --text-dark: #1a1a1a;
    --text-medium: #555;
    --text-light: #777;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #ddd;
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-hover: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* ==========================================
   BASE STYLES & RESET
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--bg-light);
    font-size: 16px;
}

/* ==========================================
   TYPOGRAPHY
   ========================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; margin-top: 2.5rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1.2rem;
    line-height: 1.8;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* ==========================================
   HEADER & NAVIGATION BAR
   ========================================== */
.site-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    box-shadow: var(--shadow-medium);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
}

nav ul li {
    margin: 0;
}

nav ul li a {
    display: block;
    padding: 1rem 1.5rem;
    color: white;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

nav ul li a:hover,
nav ul li a.active {
    background-color: rgba(255, 255, 255, 0.1);
    border-bottom: 3px solid var(--accent-color);
    text-decoration: none;
}

/* ==========================================
   MAIN CONTENT CONTAINER
   ========================================== */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* ==========================================
   HERO SECTION (Homepage)
   ========================================== */
.hero {
    background: linear-gradient(135deg, var(--bg-white) 0%, var(--bg-light) 100%);
    padding: 4rem 2rem;
    text-align: center;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
    margin-bottom: 3rem;
}

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

.subtitle {
    font-size: 1.4rem;
    color: var(--text-medium);
    font-style: italic;
    margin-top: 1rem;
}

/* ==========================================
   CONTENT REGIONS/SECTIONS
   ========================================== */
.content-section,
.intro-section,
.about-section,
.poetry-section {
    background-color: var(--bg-white);
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
}

/* ==========================================
   MEMORIAL CARDS WITH HOVER EFFECTS
   ========================================== */
.memorial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.memorial-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.memorial-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-color);
}

.memorial-card img {
    width: 100%;
    max-width: 280px;
    height: auto;
    border-radius: 6px;
    margin: 0 auto 1.5rem;
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease;
}

.memorial-card:hover img {
    transform: scale(1.05);
}

.memorial-card h2 {
    margin-top: 0;
    font-size: 1.8rem;
    color: var(--primary-color);
}

.memorial-card .dates {
    font-size: 1.1rem;
    color: var(--text-medium);
    font-style: italic;
    margin-bottom: 1rem;
}

.memorial-card p {
    color: var(--text-medium);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn-primary {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 0.9rem 2.2rem;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: var(--shadow-light);
}

.btn-primary:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    text-decoration: none;
}

/* ==========================================
   QUOTES & BLOCKQUOTES
   ========================================== */
.memorial-quote {
    background-color: var(--bg-light);
    border-left: 5px solid var(--accent-color);
    padding: 2rem 2.5rem;
    margin: 2.5rem 0;
    font-style: italic;
    border-radius: 4px;
    box-shadow: var(--shadow-light);
}

blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background-color: var(--bg-light);
    border-left: 5px solid var(--accent-color);
    font-style: italic;
    color: var(--text-medium);
    border-radius: 4px;
}

blockquote cite {
    display: block;
    margin-top: 1rem;
    font-size: 0.95rem;
    font-style: normal;
    color: var(--text-light);
}

/* ==========================================
   POEM SECTIONS
   ========================================== */
.poem-section {
    background-color: var(--bg-light);
    padding: 2.5rem;
    margin: 2.5rem 0;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
}

.poem-intro,
.poem-subtitle {
    font-style: italic;
    color: var(--text-medium);
    margin-bottom: 1rem;
    text-align: center;
}

.poem {
    font-family: 'Georgia', serif;
    font-size: 1.15rem;
    line-height: 1.9;
    color: var(--text-dark);
    white-space: pre-line;
    margin: 1.5rem 0;
    padding: 2rem;
    background-color: var(--bg-white);
    border-left: 4px solid var(--accent-color);
    border-radius: 4px;
    box-shadow: var(--shadow-light);
}

.poem.haiku {
    text-align: center;
    font-style: italic;
}

.poem-excerpt {
    background-color: var(--bg-white);
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
}

.poem-excerpt h3 {
    text-align: center;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

/* ==========================================
   MEMORIAL PAGE HEADER
   ========================================== */
.memorial-header {
    background: linear-gradient(135deg, var(--bg-white) 0%, var(--bg-light) 100%);
    padding: 3rem 2rem;
    text-align: center;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
    margin-bottom: 2.5rem;
}

.memorial-header h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.memorial-header .dates {
    font-size: 1.3rem;
    color: var(--text-medium);
    font-style: italic;
}

.memorial-header .tagline {
    font-size: 1.2rem;
    font-style: italic;
    color: var(--text-medium);
    margin-top: 1rem;
}

/* ==========================================
   PHOTO SECTIONS & GALLERIES
   ========================================== */
.photo-section,
.photo-gallery {
    margin: 2.5rem 0;
}

.memorial-photo-large {
    text-align: center;
    margin: 2.5rem 0;
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
}

.memorial-photo-large img {
    width: 100%;
    max-width: 650px;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-medium);
    margin: 0 auto;
}

figcaption {
    font-style: italic;
    color: var(--text-medium);
    margin-top: 1rem;
    font-size: 1rem;
    text-align: center;
}

.photo-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.photo-row figure {
    text-align: center;
    background-color: var(--bg-white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.photo-row figure:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.photo-row img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: var(--shadow-light);
}

/* ==========================================
   BOOK REFERENCES
   ========================================== */
.book-references {
    background-color: var(--bg-light);
    padding: 2.5rem;
    border-radius: 8px;
    margin-top: 3rem;
    box-shadow: var(--shadow-light);
}

.book-references h2 {
    margin-top: 0;
}

.book-references ul {
    list-style-position: inside;
    line-height: 2;
}

.book-references li {
    margin-bottom: 0.8rem;
}

/* ==========================================
   BIO PAGE SPECIFIC STYLES
   ========================================== */
.bio-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--bg-white);
    padding: 3rem 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
    margin-bottom: 2.5rem;
}

.bio-photo {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-medium);
    margin-bottom: 2rem;
}

.bio-intro {
    text-align: center;
    max-width: 700px;
}

.credentials {
    background-color: var(--bg-light);
    padding: 1.5rem 2rem;
    border-radius: 6px;
    margin: 2rem 0;
    border-left: 4px solid var(--accent-color);
}

.credentials ul {
    list-style-position: inside;
    color: var(--text-medium);
}

/* ==========================================
   FOOTER
   ========================================== */
footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 2.5rem 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-content p {
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.footer-content a {
    color: white;
    text-decoration: underline;
}

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

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

/* Tablets */
@media (max-width: 992px) {
    main {
        padding: 0 1.5rem;
    }

    .hero h1,
    .memorial-header h1 {
        font-size: 2.5rem;
    }

    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
}

/* Mobile */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
    }

    nav ul li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    nav ul li a {
        padding: 1rem;
    }

    .hero {
        padding: 3rem 1.5rem;
    }

    .hero h1,
    .memorial-header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.3rem; }

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

    .photo-row {
        grid-template-columns: 1fr;
    }

    .content-section,
    .intro-section,
    .about-section {
        padding: 1.5rem;
    }

    .memorial-quote,
    .poem-section {
        padding: 1.5rem;
    }

    .bio-photo {
        width: 200px;
        height: 200px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    main {
        padding: 0 1rem;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .btn-primary {
        padding: 0.7rem 1.5rem;
    }
}

/* ==========================================
   PRINT STYLES
   ========================================== */
@media print {
    header, footer {
        display: none;
    }

    main {
        max-width: 100%;
        padding: 0;
    }

    .memorial-card,
    .poem-section {
        page-break-inside: avoid;
    }

    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */
:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

/* Skip to main content */
.skip-link {
    position: absolute;
    left: -9999px;
    z-index: 999;
}

.skip-link:focus {
    left: 0;
    background: var(--accent-color);
    color: white;
    padding: 1rem;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000;
        --text-dark: #000;
        --border-color: #000;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* ==========================================
   EXPANDED MEMORIAL ARCHIVE FEATURES
   Added for flexible writing, gallery, and giving pages
   ========================================== */
.soft-hero {
    background: linear-gradient(135deg, #fffdf8 0%, #f4efe7 100%);
    border-left: 6px solid var(--accent-color);
}

.top-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-top: 1.5rem;
}

.btn-secondary {
    display: inline-block;
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--accent-color);
    padding: 0.8rem 1.8rem;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
}

.quick-links,
.memorial-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.5rem 0 2rem;
    padding: 1rem;
    background: #fffdf8;
    border: 1px solid #eadfce;
    border-radius: 8px;
}

.quick-links a,
.memorial-subnav a {
    display: inline-block;
    padding: 0.55rem 0.9rem;
    background: white;
    border: 1px solid #eadfce;
    border-radius: 999px;
    font-size: 0.95rem;
}

.next-steps-grid,
.writing-card-grid,
.donation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.feature-card,
.writing-card,
.donation-card,
.template-box,
.note-box,
.callout-box {
    border: 1px solid #eadfce;
    background: #fffdf8;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: var(--shadow-light);
}

.feature-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    color: var(--text-dark);
    text-decoration: none;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
    text-decoration: none;
}

.feature-label,
.entry-meta,
.edit-note {
    color: var(--accent-color);
    font-size: 0.95rem;
    font-style: italic;
}

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

.gallery-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.gallery-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
}

.gallery-card figcaption {
    padding: 1rem;
    color: var(--text-medium);
}

.gallery-card figcaption strong,
.gallery-card figcaption span {
    display: block;
}

.gallery-card figcaption span {
    margin-top: 0.35rem;
    font-size: 0.95rem;
}

.featured-poem {
    border-left: 6px solid var(--accent-color);
}

code {
    background: #f2eee8;
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
}

/* ==========================================
   PAGE-SPECIFIC MEMORIAL BANNERS
   ========================================== */

.memorial-banner-header {
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow-light);
    margin-bottom: 2.5rem;
    overflow: hidden;
    position: static;
    z-index: auto;
}

.memorial-banner-image {
    display: block;
    width: 100%;
    max-height: 360px;
    height: auto;
    object-fit: contain;
}
/* Keeps SEO/accessibility text available without showing duplicate text */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 700px) {
    .top-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .top-actions a,
    .btn-primary,
    .btn-secondary {
        text-align: center;
    }

    .gallery-card img {
        height: auto;
    }
}
