/* Common styles shared across cemetery record pages */

/* Navigation and Dropdown Menu Styles */
nav {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1em 2em;
    margin-bottom: 1.5em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2000;
}

/* Hamburger Menu Button - Hidden by default, shown on mobile */
.hamburger-menu {
    display: none;
    background: var(--color-primary, #2d5016);
    color: white;
    border: none;
    padding: 12px 16px;
    font-size: 24px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    position: relative;
    z-index: 2100;
}

.hamburger-menu:hover {
    background: var(--color-primary-light, #4a7c2c);
    transform: scale(1.05);
}

.hamburger-menu:active {
    transform: scale(0.95);
}

.hamburger-icon {
    display: block;
    line-height: 1;
}

/* Nav menu wrapper */
.nav-menu {
    text-align: center;
}

nav h1 {
    display: inline-block;
    cursor: pointer;
    padding: 0.5em 1em;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(45, 80, 22, 0.6);
}

nav h1:hover {
    background: rgba(45, 80, 22, 0.9);
    transform: translateY(-2px);
}

nav h1 a {
    color: white;
    text-decoration: none;
}

nav h1 a:hover {
    color: white;
    text-decoration: none;
}

/* Dropdown Menu Styles - Modernized */
.dropbtn {
    background-color: var(--color-primary, #2d5016);
    color: white;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.dropbtn:hover, .dropbtn:focus {
    background-color: var(--color-primary-light, #4a7c2c);
    box-shadow: 0 4px 8px rgba(0,0,0,0.12);
    transform: translateY(-1px);
}

.dropdown {
    position: relative;
    display: inline-block;
    z-index: 2100;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: rgba(248, 249, 244, 0.98);
    min-width: 200px;
    overflow: auto;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
    border-radius: 8px;
    z-index: 2200;
    border: 1px solid rgba(45, 80, 22, 0.2);
    backdrop-filter: blur(10px);
}

.dropdown-content a {
    color: var(--color-text-dark, #1e293b);
    padding: 12px 20px;
    text-decoration: none;
    display: block;
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 15px;
}

.dropdown-content a:hover {
    background-color: rgba(74, 124, 44, 0.15);
    color: var(--color-primary, #2d5016);
    padding-left: 24px;
}

.dropdown:hover .dropdown-content {
    display: block;
    animation: fadeIn 0.2s ease;
}

/* Show class for mobile/touch dropdowns */
.dropdown-content.show {
    display: block !important;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown:hover .dropbtn {
    background-color: var(--color-primary-light, #4a7c2c);
}

.show {
    display: block;
}

/* Responsive Image Styles */
img {
    max-width: 100%;
    height: auto;
}

/* Loading Message Styles */
#loading {
    text-align: center;
    font-size: 18px;
    color: #666;
}

/* Names List Column Layout */
.names-list {
    column-count: 3;
    column-gap: 20px;
}

.names-list a {
    display: block;
    margin-bottom: 5px;
    text-decoration: none;
    color: #333;
}

.names-list a:hover {
    text-decoration: underline;
    color: #0066cc;
}

/* ============================================================================
   MOBILE RESPONSIVE STYLES
   ============================================================================ */

/* Tablet breakpoint (768px and below) */
@media (max-width: 768px) {
    .names-list {
        column-count: 1;
    }

    /* Navigation adjustments for tablets */
    nav {
        padding: 0.8em 1.5em;
    }

    nav h1 {
        font-size: 0.95em;
        padding: 0.4em 0.8em;
    }

    .dropbtn {
        padding: 12px 16px;
        font-size: 15px;
    }

    /* Content cards - reduce padding */
    .content-wrapper {
        padding: 1.5em;
        margin-left: 3%;
        margin-right: 3%;
    }

    .content-card {
        padding: 2em;
        margin: 1.5em auto;
    }

    .donation-card {
        padding: 2em;
        margin: 1.5em auto;
    }

    .image-card {
        padding: 1.5em;
        margin: 1.5em auto;
    }

    .historical-text {
        padding: 1.5em 2em;
        font-size: 1.1em;
    }

    .notice-card {
        padding: 1.2em 1.5em;
        font-size: 0.9em;
    }

    /* Page title adjustments */
    .page-title {
        font-size: 1.3em;
        padding: 0.8em;
    }
}

/* Mobile breakpoint (640px and below) */
@media (max-width: 640px) {
    /* Show hamburger menu */
    .hamburger-menu {
        display: block;
        width: 100%;
        margin-bottom: 0.5em;
    }

    /* Hide navigation menu by default on mobile */
    .nav-menu {
        display: none;
        width: 100%;
    }

    /* Show menu when active */
    .nav-menu.active {
        display: block;
        animation: slideDown 0.3s ease;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Navigation - stack items */
    nav {
        padding: 0.6em 1em;
    }

    nav h1 {
        display: block;
        width: 100%;
        text-align: center;
        margin-bottom: 0.5em;
        font-size: 0.9em;
        cursor: pointer;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }

    /* Add touch indicator */
    nav h1:after {
        content: " ▾";
        font-size: 0.8em;
        opacity: 0.7;
    }

    /* Hide indicator for non-dropdown items (Home, Members Only) */
    nav h1:only-child:after,
    nav h1 a:only-child:after {
        content: "";
    }

    .dropbtn {
        padding: 10px 14px;
        font-size: 14px;
        width: 100%;
        margin-bottom: 0.5em;
    }

    .dropdown {
        display: block;
        width: 100%;
        margin-bottom: 0.3em;
    }

    .dropdown-content {
        position: static;
        box-shadow: 0 4px 8px rgba(0,0,0,0.15);
        margin-bottom: 0.5em;
        border-radius: 0 0 8px 8px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .dropdown-content.show {
        max-height: 500px;
        overflow: visible;
    }

    .dropdown-content a {
        padding: 14px 20px;
        font-size: 15px;
        border-bottom: 1px solid rgba(45, 80, 22, 0.1);
    }

    .dropdown-content a:last-child {
        border-bottom: none;
    }

    .dropdown-content a:hover {
        padding-left: 20px;
    }

    /* Content adjustments */
    .content-wrapper {
        padding: 1.2em;
        margin-left: 2%;
        margin-right: 2%;
        font-size: 1em;
    }

    .content-card,
    .donation-card {
        padding: 1.5em;
        margin: 1em auto;
        max-width: 100%;
    }

    .image-card {
        padding: 1em;
        margin: 1em auto;
        max-width: 100%;
    }

    .historical-text {
        padding: 1.2em 1.5em;
        font-size: 1em;
        margin: 1em auto;
    }

    .notice-card {
        padding: 1em;
        font-size: 0.85em;
        margin: 1em auto;
    }

    .image-caption {
        font-size: 1em;
    }

    /* Page title */
    .page-title {
        font-size: 1.1em;
        padding: 0.6em;
    }

    .section-heading {
        font-size: 1.2em;
    }
}

/* Small mobile breakpoint (480px and below) */
@media (max-width: 480px) {
    /* Further reduce padding and margins */
    body {
        font-size: 14px;
    }

    nav {
        padding: 0.5em;
        margin-bottom: 1em;
    }

    nav h1 {
        font-size: 0.85em;
        padding: 0.3em 0.5em;
    }

    .dropbtn {
        padding: 8px 12px;
        font-size: 13px;
    }

    .dropdown-content a {
        padding: 10px 16px;
        font-size: 14px;
    }

    .content-wrapper {
        padding: 1em;
        margin-left: 1%;
        margin-right: 1%;
        font-size: 0.95em;
    }

    .content-card,
    .donation-card,
    .image-card {
        padding: 1em;
        margin: 0.8em auto;
        border-radius: 8px;
    }

    .historical-text {
        padding: 1em;
        font-size: 0.95em;
        margin: 0.8em auto;
    }

    .notice-card {
        padding: 0.8em;
        font-size: 0.8em;
    }

    .page-title {
        font-size: 1em;
        padding: 0.5em;
    }

    .section-heading {
        font-size: 1.1em;
    }

    .image-caption {
        font-size: 0.95em;
    }

    /* Spacing utilities */
    .spacing-top {
        margin-top: 1em;
    }

    .spacing-bottom {
        margin-bottom: 1em;
    }
}

/* Common page structure classes */
.page-container {
    background: transparent;
}

.page-title {
    text-align: center;
    color: white;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(8px);
    padding: 1em;
    border-radius: 12px;
    margin-bottom: 1em;
}

.page-title a {
    color: white;
    text-decoration: none;
}

.page-title a:hover {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.content-wrapper {
    font-size: 1.1em;
    color: var(--color-text-dark, #1e293b);
    font-weight: 400;
    margin-left: 5%;
    margin-right: 5%;
    line-height: 1.7;
    background: rgba(252, 250, 245, 0.80);
    backdrop-filter: blur(8px);
    padding: 2em;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.section-heading {
    text-align: center;
    font-weight: 600;
    color: var(--color-text-dark, #1e293b);
    font-family: var(--font-serif, 'Lora', Georgia, serif);
    margin-bottom: 1em;
}

/* Modern Card-Based Layouts */
.content-card {
    background: rgba(252, 250, 245, 0.80);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 2.5em;
    margin: 2em auto;
    max-width: 900px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.donation-card {
    background: rgba(252, 250, 245, 0.82);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 2.5em 3em;
    margin: 2em auto;
    max-width: 700px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(184, 115, 51, 0.3);
    color: var(--color-text-dark, #1e293b);
    font-size: 1.05em;
    line-height: 1.7;
}

.donation-card strong {
    color: var(--color-primary, #2d5016);
}

.notice-card {
    background: rgba(255, 248, 235, 0.80);
    backdrop-filter: blur(8px);
    border-left: 4px solid var(--color-accent, #b87333);
    border-radius: 8px;
    padding: 1.5em 2em;
    margin: 2em auto;
    max-width: 700px;
    color: var(--color-text-dark, #1e293b);
    font-size: 0.95em;
    line-height: 1.6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.notice-card a {
    color: var(--color-accent-dark, #8b5a2b);
    font-weight: 600;
}

.image-card {
    background: rgba(252, 250, 245, 0.82);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 2em;
    margin: 2em auto;
    max-width: 900px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.image-card img {
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    margin-top: 1em;
}

.image-caption {
    font-size: 1.1em;
    color: var(--color-text-medium, #475569);
    font-weight: 500;
    margin-bottom: 0.5em;
    font-family: var(--font-serif, 'Lora', Georgia, serif);
}

.historical-text {
    font-size: 1.2em;
    color: var(--color-text-dark, #1e293b);
    font-weight: 400;
    line-height: 1.8;
    margin: 2em auto;
    padding: 2em 3em;
    max-width: 800px;
    text-align: center;
    font-family: var(--font-serif, 'Lora', Georgia, serif);
    font-style: italic;
    background: rgba(252, 250, 245, 0.80);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* Spacing utilities */
.spacing-top {
    margin-top: 2em;
}

.spacing-bottom {
    margin-bottom: 2em;
}
