/* ============================================
   Bethany Baptist Church - History Page Styles
   Self-contained stylesheet
   ============================================ */

/* Accessibility: Skip to content link */
.visually-hidden-focusable {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.visually-hidden-focusable:focus {
    position: static;
    width: auto;
    height: auto;
    left: auto;
    overflow: visible;
    background: #fff;
    z-index: 1000;
    border: 3px solid #000;
    padding: 5px;
}

/* ============================================
   FULL-WIDTH HEADER BACKGROUND
   ============================================ */

.header-bg {
    width: 100%;
    background-color: var(--nav-bg);
    background-image: linear-gradient(to bottom, #2c2c2c, #1a1a1a);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

/* ============================================
   Header / Navbar Styling
   ============================================ */

.navbar.small-menu {
    padding-top: 0.2rem !important;
    padding-bottom: 0 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.25);
}

/* Logo */
.header-logo {
    width: 200px !important;
    max-width: 200px !important;
    height: auto;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.header-logo:hover,
.header-logo:focus {
    transform: scale(1.10);
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Light mode logo - invert black logo to white for dark header */
.header-logo {
    filter: invert(1) brightness(1.1);
}

/* Dark mode logo - restore original black logo for blue header */
[data-theme="dark"] .header-logo {
    filter: none;
}

/* Smaller menu font + readability */
.navbar.small-menu .nav-link {
    font-size: 0.85rem !important;
    letter-spacing: 0.3px;
}

/* Ensure no vertical shift of menu block */
.navbar.small-menu .navbar-nav {
    margin-top: 0 !important;
}

/* Clean underline animation */
.navbar.small-menu .nav-link {
    position: relative;
}

.navbar.small-menu .nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0.15rem;
    width: 0%;
    height: 2px;
    background: #fff;
    transition: width 0.25s ease;
}

.navbar.small-menu .nav-link:hover::after,
.navbar.small-menu .nav-link:focus::after {
    width: 100%;
}

/* Base nav links */
.nav-link {
    transition: all 0.3s ease;
    margin: 0 5px;
    font-weight: 500;
    color: #fff !important;
}

.nav-link:hover,
.nav-link:focus {
    transform: scale(1.08);
    outline: none;
}

/* Active page highlighting */
.navbar.small-menu .nav-link.active {
    border-bottom: 3px solid #fff;
    font-weight: 700;
    background-color: rgba(0,0,0,0.12);
    border-radius: 4px 4px 0 0;
}

/* Toggler styling (mobile) */
.navbar-toggler {
    border-color: rgba(255,255,255,0.7);
}

.navbar-toggler-icon {
    filter: brightness(1.2);
}

/* Dropdowns */
.dropdown-menu {
    border-radius: 6px;
    border: 1px solid #555;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
    background-color: #fff;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.dropdown-item {
    padding: 0.6rem 1.1rem;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    color: #000;
    font-size: 0.95rem;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: #f0f0f0;
    border-left: 3px solid #333;
    font-weight: 600;
    outline: none;
}

/* ============================================
   Mobile Header / Dropdown Behavior
   ============================================ */

@media (max-width: 991px) {
    .navbar.small-menu .navbar-nav {
        margin-top: 0.5rem !important;
    }

    .navbar.small-menu .nav-link {
        padding-top: 0.4rem !important;
        padding-bottom: 0.4rem !important;
        text-align: center;
    }

    .dropdown-menu {
        box-shadow: none;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .dropdown-item {
        text-align: center;
    }
}

/* ============================================
   Main Content
   ============================================ */

main {
    min-height: 400px;
    padding: 40px 0;
}

/* ============================================
   Footer Styling
   ============================================ */

footer,
.footer-content {
    background-color: var(--footer-bg);
    background-image: linear-gradient(to bottom, #2c2c2c, #1a1a1a);
    color: var(--footer-text);
    padding-top: 2rem;
    padding-bottom: 0.5rem;
}

/* Footer headings */
.footer-heading {
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 3px solid #666;
    padding-bottom: 10px;
}

/* Footer text */
.footer-address,
.footer-contact,
.footer-text {
    color: #fff;
    line-height: 1.8;
    font-size: 0.95rem;
}

/* Footer links */
.footer-contact a,
.footer-links a,
.footer-social a {
    color: #fff !important;
    transition: all 0.3s ease;
}

.footer-links a:hover,
.footer-contact a:hover,
.footer-social a:hover {
    transform: scale(1.08);
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

/* Footer column spacing */
.footer-content .row > [class^="col-"],
.footer-content .row > [class*=" col-"] {
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .footer-content .row > [class^="col-"],
    .footer-content .row > [class*=" col-"] {
        margin-bottom: 0.5rem;
    }
}

/* ============================================
   Buttons
   ============================================ */

.btn-primary {
    background-color: #333;
    border: 2px solid #fff;
    color: #fff;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #555;
    border: 3px solid #fff;
    transform: scale(1.10);
    outline: 2px solid #999;
    outline-offset: 2px;
}

/* ============================================
   Alerts
   ============================================ */

.alert {
    margin: 20px 0;
    padding: 15px;
    border-radius: 5px;
    border-left: 5px solid #000;
    position: relative;
    padding-left: 50px;
}

/* ============================================
   Theme Variables
   ============================================ */

:root {
    --bg: #ffffff;
    --text: #222222;
    --nav-bg: #2c2c2c;
    --footer-bg: #2c2c2c;
    --footer-text: #ffffff;
    --card-bg: #ffffff;
    --border-color: #dee2e6;
    --dropdown-bg: #ffffff;
    --dropdown-text: #000000;
    --dropdown-hover-bg: #f0f0f0;
}

/* Dark Mode Theme Variables */
[data-theme="dark"] {
    --bg: #1a1a1a;
    --text: #e0e0e0;
    --nav-bg: #0d63e0;
    --footer-bg: #0d63e0;
    --footer-text: #ffffff;
    --card-bg: #2c2c2c;
    --border-color: #444444;
    --dropdown-bg: #2c2c2c;
    --dropdown-text: #e0e0e0;
    --dropdown-hover-bg: #3c3c3c;
}

/* Apply theme variables */
body {
    background-color: var(--bg);
    color: var(--text);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark mode navbar adjustments */
[data-theme="dark"] .header-bg {
    background-color: var(--nav-bg);
    background-image: linear-gradient(to bottom, #0d63e0, #0b5ed7);
}

/* Dark mode footer adjustments */
[data-theme="dark"] footer,
[data-theme="dark"] .footer-content {
    background-color: var(--footer-bg);
    background-image: linear-gradient(to bottom, #0d63e0, #0b5ed7);
    color: var(--footer-text);
}

/* Dark mode styles for dropdowns */
[data-theme="dark"] .dropdown-menu {
    background-color: var(--dropdown-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .dropdown-item {
    color: var(--dropdown-text);
}

[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .dropdown-item:focus {
    background-color: var(--dropdown-hover-bg);
    color: var(--dropdown-text);
}

/* Dark mode heading styles */
[data-theme="dark"] .footer-heading {
    border-bottom-color: #555;
    color: var(--text);
}

/* Dark mode alert styles */
[data-theme="dark"] .alert {
    border-left-color: var(--text);
    background-color: var(--card-bg);
    color: var(--text);
}

/* Theme toggle button - integrated in navbar */
.theme-toggle {
    background: transparent !important;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    padding: 0.5rem 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    margin-left: 10px;
    color: #fff !important;
    min-width: 50px;
}

.theme-toggle:hover {
    transform: scale(1.15);
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-toggle:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Dark mode - make section 2 text dark */
[data-theme="dark"] section.bg-light {
    color: #212529 !important;
}

[data-theme="dark"] section.bg-light h2,
[data-theme="dark"] section.bg-light p,
[data-theme="dark"] section.bg-light a:not(.btn) {
    color: #212529 !important;
}

/* ============================================
   Navbar Social Icons
   ============================================ */
.navbar-social {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.5rem;
}

.navbar-social a {
    color: #fff !important;
    font-size: 1.1rem;
    line-height: 1;
    transition: transform 0.25s ease;
    text-decoration: none;
}

.navbar-social a:hover,
.navbar-social a:focus {
    transform: scale(1.2);
    outline: none;
}

/* ============================================
   Give Button - Navbar
   ============================================ */
.btn-give {
    background-color: #996633;
    border: 2px solid #fff;
    color: #fff !important;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.3rem 0.85rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-decoration: none;
    margin-left: 0.5rem;
    white-space: nowrap;
}

.btn-give:hover,
.btn-give:focus {
    background-color: #7a4d26;
    border-color: #fff;
    transform: scale(1.08);
    /* Enhanced focus indicator for 508c compliance */
    outline: 3px solid rgba(255,255,255,0.8);
    outline-offset: 2px;
}

/* Dark mode adjustments for give button - maintain brand consistency and 508c compliance */
[data-theme="dark"] .btn-give {
    background-color: #996633;
    color: #fff !important;
    border: 2px solid #fff;
}

[data-theme="dark"] .btn-give:hover,
[data-theme="dark"] .btn-give:focus {
    background-color: #b8773d;
    color: #fff !important;
    border-color: #fff;
    /* Enhanced focus indicator for 508c compliance */
    outline: 3px solid #fff;
    outline-offset: 2px;
}

/* ============================================
   Footer Social Icon Size
   ============================================ */
.footer-social a {
    font-size: 1.4rem;
    margin-right: 0.75rem;
}
