/* ===========================
   David Keeling — Shared Styles
   =========================== */

/* --- Base & Typography --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.5;
    font-size: 15px;
    /* Sticky Footer Setup */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    width: 100%;
}

h1,
h2,
h3,
h4 {
    font-family: "Times New Roman", Times, serif;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

h1 {
    font-size: 1.3rem;
    margin: 0;
    letter-spacing: 0.5px;
}

h2 {
    font-size: 1.8rem;
    color: #555;
    text-align: center;
    margin-bottom: 15px;
    margin-top: 30px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

a:hover {
    color: #005a9c;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Layout --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* --- Navigation --- */
.site-nav {
    background-color: #2c2c2c;
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.site-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-nav .nav-brand {
    color: #ffffff;
    font-family: "Times New Roman", Times, serif;
    font-size: 1.3rem;
    text-decoration: none;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.site-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
}

.site-nav li {
    margin-left: 15px;
}

.site-nav a:not(.nav-brand) {
    color: #ffffff;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 5px 0;
}

.site-nav a:hover {
    color: #d4af37;
}

/* Active nav link */
.site-nav a.nav-active {
    color: #d4af37;
}

/* Hamburger toggle button */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
}

/* --- Footer --- */
.site-footer {
    background-color: #222;
    color: #aaa;
    padding: 40px 20px;
    text-align: center;
    font-size: 0.85rem;
    margin-top: auto;
}

.site-footer h3 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.site-footer p {
    margin: 5px 0;
}

/* --- Responsive / Mobile Nav --- */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .site-nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        padding-top: 10px;
    }

    .site-nav ul.nav-open {
        display: flex;
    }

    .site-nav .container {
        flex-wrap: wrap;
    }

    .site-nav li {
        margin-left: 0;
        margin-bottom: 5px;
    }

    .site-nav a:not(.nav-brand) {
        display: block;
        padding: 8px 0;
    }
}

/* --- Skeleton Loading --- */
.skeleton-img {
    position: relative;
    overflow: hidden;
    background: #e8e8e8;
    min-height: 150px;
}

.skeleton-img::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.5),
            transparent);
    animation: skeleton-shimmer 1.5s infinite;
}

@keyframes skeleton-shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.skeleton-img img {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.skeleton-img.loaded::before {
    display: none;
}

.skeleton-img.loaded {
    background: transparent;
    min-height: auto;
}

.skeleton-img.loaded img {
    opacity: 1;
}