  M=/* ===================================
   Swigert Family Website - Unified Styles
   =================================== */

/* === GLOBAL RESET & BASE STYLES === */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: #f9f9f9;
    color: #333;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* === HEADER === */
header {
    background-color: #e8f4f8;
    padding: 20px 0;
    text-align: center;
    color: #2c3e50;
}

header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin: 0 0 10px 0;
    font-weight: 700;
}

header p {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin: 0;
}

/* === MAIN CONTENT CONTAINERS === */
main,
.content,
.container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
    padding: 32px 24px;
}

/* === SECTIONS === */
section {
    margin-bottom: 3rem;
}

.bio-section {
    background-color: #fff;
    border-radius: 8px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    margin-top: 20px;
}

.bio-category {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #4a90e2;
}

.bio-category h3 {
    color: #2c3e50;
    font-size: 1.3rem;
    margin: 0 0 15px 0;
    font-weight: 600;
}

.bio-category p {
    margin: 8px 0;
    line-height: 1.6;
    color: #555;
}

.bio-category strong {
    color: #2c3e50;
    font-weight: 600;
}

.family-list {
    list-style: none;
    padding-left: 0;
    margin: 10px 0;
}

.family-list li {
    padding: 5px 0 5px 20px;
    position: relative;
    color: #555;
}

.family-list li:before {
    content: "•";
    color: #4a90e2;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.locations-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
}

.locations-grid span {
    padding: 2px 8px;
    background: none;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    color: #555;
    text-align: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.locations-grid span.has-image {
    cursor: pointer;
    color: #2980b9;
    text-decoration: underline;
    text-decoration-style: dotted;
}

.locations-grid span.has-image:hover {
    background: #e8f4f8;
    color: #1a5f8a;
}

.locations-grid span::after {
    content: "";
}

.final-goodbye {
    border-left: none;
    background: #f0f4f8;
    text-align: center;
}

.final-goodbye h3 {
    color: #555;
    text-align: center;
}

.final-goodbye p {
    text-align: center;
}

@media (min-width: 768px) {
    .bio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .bio-category:last-child {
        grid-column: 1 / -1;
    }
}

/* === HEADINGS === */
h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    text-align: center;
}

h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    border-bottom: 3px solid #4a90e2;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.bio-section h2 {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.video-gallery-title {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 2rem;
    font-weight: bold;
}

/* === IMAGES === */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

.top-image,
.portrait-img {
    max-width: 400px;
    width: 50%;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    margin: 20px auto 10px;
}

.centered-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
}

.centered-image img {
    max-width: 320px;
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.09);
}

/* === CAPTIONS === */
.caption {
    margin-top: 8px;
    font-size: 1rem;
    color: #555;
    text-align: center;
}

.portrait-caption {
    font-style: italic;
    color: #2980b9;
    margin-top: 8px;
    font-size: 1.1rem;
    text-align: center;
}

/* === GALLERIES === */
.gallery,
.gallery-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 2rem;
}

.gallery-row {
    max-width: 900px;
    margin: 0 auto 2rem auto;
}

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

.gallery-item,
.gallery-image-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 1 250px;
    max-width: 280px;
}

.gallery-item:hover,
.gallery-image-container:hover {
    transform: scale(1.05);
}

.gallery-image,
.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

/* === VIDEO GALLERY === */
.video-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, 320px);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    justify-content: center;
}

.video-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 320px;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

/* Video wrapper with fixed dimensions and overflow hidden */
.video-item {
    position: relative;
    height: 250px;
}

video,
.video-item video {
    width: 320px !important;
    height: 200px !important;
    max-width: 320px !important;
    max-height: 200px !important;
    min-width: 320px !important;
    min-height: 200px !important;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: black;
    display: block !important;
    object-fit: cover !important;
    position: relative !important;
}

.video-gallery .video-item {
    height: 250px !important;
    overflow: hidden !important;
}

.video-gallery .video-item video {
    width: 320px !important;
    height: 200px !important;
    max-width: 320px !important;
    max-height: 200px !important;
    min-width: 320px !important;
    min-height: 200px !important;
    object-fit: cover !important;
    flex-shrink: 0 !important;
}

/* Nuclear option - force exact dimensions on ALL videos */
.video-gallery video,
body .video-gallery .video-item video,
body video[controls],
video[controls][aria-label] {
    width: 320px !important;
    height: 200px !important;
    max-width: 320px !important;
    max-height: 200px !important;
    object-fit: cover !important;
}

.video-container {
    margin: 30px auto;
    text-align: center;
}

.video-container h2 {
    color: #2c3e50;
}

.video-container img {
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 10px;
    width: auto;
    height: 200px;
    margin-left: auto;
    margin-right: auto;
}

.video-container video {
    display: block !important;
    width: 480px !important;
    max-width: 90% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    min-width: 0 !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    margin: 0 auto 10px auto !important;
    object-fit: contain !important;
    position: static !important;
}

/* === LINKS === */
a {
    color: #2980b9;
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    text-decoration: underline;
}

.photo-link {
    color: #2980b9;
    text-decoration: none;
    border-bottom: none;
    cursor: pointer;
}

.photo-link:hover {
    color: #1a5276;
    border-bottom: none;
}

.wedding-link {
    color: #2980b9;
    text-decoration: none;
    cursor: pointer;
}

.wedding-link:hover {
    color: #1a5276;
}

.obit-link {
    display: block;
    text-align: center;
    margin: 20px 0;
    font-size: 1.2rem;
}

.obit-link a {
    color: #2980b9;
    text-decoration: none;
    font-weight: bold;
}

/* === BUTTONS === */
.donate-btn {
    display: block;
    margin: 0 auto 32px auto;
    background: #3a7bd5;
    color: #fff;
    font-size: 1.15rem;
    padding: 14px 36px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(58, 123, 213, 0.3);
    transition: background 0.2s ease;
    max-width: 300px;
}

.donate-btn:hover {
    background: #285fa6;
    text-decoration: none;
}

/* === TEXT BLOCKS === */
.tribute {
    font-style: italic;
    font-size: 1.15rem;
    color: #555;
    margin: 32px 0 24px 0;
    line-height: 1.6;
    text-align: center;
}

.bio-section .tribute {
    border-left: 4px solid #2980b9;
    padding-left: 15px;
    text-align: left;
}

.donation-section {
    text-align: center;
    margin: 30px 0;
    font-size: 1.15rem;
    color: #2c3e50;
}

.donation-section a {
    color: #2980b9;
    font-weight: bold;
}

/* === LISTS === */
.bio-section ul {
    list-style-type: none;
    padding-left: 0;
}

.bio-section li {
    margin-bottom: 10px;
}

.bio-section li strong {
    font-weight: bold;
}

.bio-section ul ul {
    margin-top: 5px;
    margin-bottom: 5px;
    padding-left: 20px;
}

/* === FOOTER === */
footer {
    display: block;
    clear: both;
    text-align: center;
    padding: 1.5rem;
    font-size: 0.9rem;
    color: #555;
    background-color: #f5f5f5;
    border-top: 2px solid #ddd;
    margin-top: 3rem;
    width: 100%;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }

    header p {
        font-size: 1rem;
    }

    .top-image,
    .portrait-img {
        width: 80%;
    }

    .gallery {
        grid-template-columns: 1fr;
    }
    
    .gallery-row {
        flex-direction: column;
        align-items: center;
    }
    
    .gallery-image-container {
        max-width: 320px;
        width: 100%;
    }

    .video-gallery {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .video-item,
    .video-item video {
        width: 100%;
        max-width: 320px;
    }

    .video-gallery-title {
        font-size: 1.5rem;
    }

    .gallery-image {
        height: 200px;
    }

    .gallery-row {
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .top-image,
    .portrait-img {
        width: 90%;
    }

    .container {
        padding: 16px;
    }

    .centered-image img {
        max-width: 95vw;
    }
}

@media (max-width: 480px) {
    main,
    .content {
        padding: 10px;
    }

    .bio-section {
        padding: 15px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }
}

/* === HOME LINK === */
.home-link {
    display: inline-block;
    margin-top: 10px;
    color: #2980b9;
    font-size: 1rem;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.home-link:hover {
    color: #1a5f8a;
    text-decoration: underline;
}

/* === SLIDESHOW === */
.slideshow-container {
    position: relative;
    max-width: 600px;
    margin: 20px auto;
    min-height: 550px;
}

.slideshow-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 550px;
}

.slideshow-container img {
    max-width: 600px;
    width: 70%;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    display: block;
    margin: 0 auto;
    max-height: 500px;
    object-fit: contain;
}

.slide-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    color: #2c3e50;
    font-size: 24px;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s ease;
    z-index: 10;
}

.slide-nav:hover {
    background: rgba(255, 255, 255, 0.95);
}

.slide-nav.prev { left: 10px; }
.slide-nav.next { right: 10px; }

@media (max-width: 768px) {
    .slideshow-container { max-width: 90%; }
    .slide-nav { font-size: 18px; padding: 8px 12px; }
}

/* === VINTAGE PHOTOS GALLERY === */
.vintage-photos {
    margin: 30px auto;
    max-width: 900px;
}

.vintage-photos h2 {
    text-align: center;
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 20px;
}

.vintage-gallery {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    max-width: 100%;
    margin: 0 auto;
    overflow-x: auto;
    justify-content: center;
}

.vintage-gallery .vintage-item {
    flex: 0 0 130px;
}

.vintage-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.vintage-item:hover { transform: scale(1.05); }

.vintage-item img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.vintage-item .caption {
    padding: 8px;
    font-size: 0.85rem;
    color: #555;
    text-align: center;
}

@media (max-width: 768px) {
    .vintage-gallery {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }
    .vintage-item img { height: 140px; }
}

/* === LOCATION HOVER === */
.location-hover {
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}
.location-hover:hover {
    background: #e8f4f8;
    border-color: #4a90e2;
    color: #2c3e50;
}
.location-hover::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 10px;
    width: 200px;
    height: 150px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}
.location-hover.has-image:hover::after { opacity: 1; }
.location-hover.no-image::after { display: none !important; }
.location-hover[data-location="parma-heights"]::after { background-image: url('/photos/locations/parma-heights.jpg'); }
.location-hover[data-location="berea"]::after { background-image: url('/photos/locations/berea.jpg'); }
.location-hover[data-location="glen-ellyn"]::after { background-image: url('/photos/locations/glen-ellyn.jpg'); }
.location-hover[data-location="ridgefield"]::after { background-image: url('/photos/locations/ridgefield.jpg'); }
.location-hover[data-location="arlington"]::after { background-image: url('/photos/locations/arlington.jpg'); }
.location-hover[data-location="pound-ridge"]::after { background-image: url('/photos/locations/pound-ridge.jpg'); }
.location-hover[data-location="useppa"]::after { background-image: url('/photos/locations/useppa.jpg'); }
.location-hover[data-location="richmond"]::after { background-image: url('/photos/locations/richmond.jpg'); }
.location-hover[data-location="plainfield"]::after { background-image: url('/photos/locations/plainfield.jpg'); }
@media (hover: none) and (pointer: coarse) {
    .location-hover::after { display: none !important; }
}

/* === FAMILY MEMBER HOVER === */
.family-hover {
    position: relative;
    cursor: pointer;
    color: #2980b9;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-style: dotted;
}
.family-hover:hover { color: #1a5f8a; }

.family-hover::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 10px;
    width: 200px;
    height: 150px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}
.family-hover.has-image:hover::after { opacity: 1; }
.family-hover.no-image::after { display: none !important; }
.family-hover[data-family="brett"]::after   { background-image: url('/photos/family/brett.jpg'); }
.family-hover[data-family="thomas"]::after  { background-image: url('/photos/family/thomas.jpg'); }
.family-hover[data-family="pj"]::after      { background-image: url('/photos/family/pj.jpg'); }
.family-hover[data-family="luke"]::after    { background-image: url('/photos/family/luke.jpg'); }
.family-hover[data-family="margaret"]::after { background-image: url('/photos/family/margaret.jpg'); }
.family-hover[data-family="morgan"]::after  { background-image: url('/photos/family/morgan.jpg'); }
.family-hover[data-family="annabelle"]::after { background-image: url('/photos/family/annabelle.jpg'); }
@media (hover: none) and (pointer: coarse) {
    .family-hover::after { display: none !important; }
}

.ibm-hover {
    cursor: pointer;
    color: #2980b9;
    text-decoration: underline dotted;
    position: relative;
}

.ibm-hover::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 10px;
    width: 200px;
    height: 150px;
    background-image: url('/paul/photos/paul_ibm.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.ibm-hover:hover::after { opacity: 1; }

@media (hover: none) and (pointer: coarse) {
    .ibm-hover::after { display: none !important; }
}

.diploma-hover {
    cursor: pointer;
    color: #2980b9;
    text-decoration: underline dotted;
    position: relative;
}

.diploma-hover::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 10px;
    width: 120px;
    height: 150px;
    background-image: url('/shane/photos/diploma.jpg');
    background-size: cover;
    background-position: center top;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.diploma-hover:hover::after { opacity: 1; }

@media (hover: none) and (pointer: coarse) {
    .diploma-hover::after { display: none !important; }
}

.greenview-hover {
    cursor: pointer;
    color: #2980b9;
    text-decoration: underline dotted;
    position: relative;
}

.greenview-hover::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 10px;
    width: 120px;
    height: 150px;
    background-image: url('/paul/photos/greenview.jpg');
    background-size: cover;
    background-position: center top;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.greenview-hover:hover::after { opacity: 1; }

@media (hover: none) and (pointer: coarse) {
    .greenview-hover::after { display: none !important; }
}

.firstdate-hover {
    cursor: pointer;
    color: #2980b9;
    text-decoration: underline dotted;
    position: relative;
}

.firstdate-hover::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 10px;
    width: 160px;
    height: 140px;
    background-image: url('/paul/photos/paul_shane_date.jpg');
    background-size: cover;
    background-position: center top;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.firstdate-hover:hover::after { opacity: 1; }

@media (hover: none) and (pointer: coarse) {
    .firstdate-hover::after { display: none !important; 