img {
    max-width: 100%
}

html {
    box-sizing: border-box;
    /* Nicer looking fonts for OS X and iOS */
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}

img {
    /*Make images behave responsively. Here they will scale up to 100% of their natural size*/
    max-width: 100%;
    /*Make images display as a block (UA default is usually inline)*/
    display: block;
}

/*FORMAT ALL HEADERS ON ALL PAGES*/
/*.header {  
    background-color: #f1f1f1;  
    padding: 30px;  
    text-align: center;  }*/

/*topnav is my header*/
.topnav {
    list-style-type: none;
    margin: 0;
    padding-top: 10px;
    overflow: hidden;
}

.topnav li {
    float: right;
}

.topnav li a {
    display: block;
    text-align: center;
    padding: 20px 12px;
    text-decoration: none;
}

.logo-image {
    width: 50px;
    height: 50px;
    padding-top: 15px;
    padding-left: 30px;
    padding-bottom: 20px;
    float: left;
}

.searchArea {
    position: relative;
}

.searchBoxArea {
    position: absolute;
    left: 30%;
    top: 200px;
    width: 40%;
}

#searchBox {
    width: 80%;
    height: 30px;
    border-radius: 10px;
}

#submitButton {
    height: 30px;
    border-radius: 10px;
}

#advancedToggle {
    height: 30px;
    border-radius: 10px;
}

#tvToggle {
    height: 30px;
    border-radius: 10px;
}

.graveYard {
    display: flex;
    width: 100%;
    float: right;
    border-radius: 40px;
}

.main {
    padding-bottom: 100px;
    padding-left: 25px;
    padding-right: 25px;
    padding-top: 20px;
}

/* --- Header (always white, no JS needed) --- */
:root {
    --wrap: 1200px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #ffffff;
    /* white bar */
    border-bottom: 1px solid #e6e6e6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.site-header-inner {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.logo-image img {
    height: 40px;
    width: auto;
    display: block;
}

/* Menu */
.main-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 24px;
}

.main-nav a {
    color: #111;
    /* dark text on white for contrast */
    text-decoration: none;
    font-size: 16px;
    line-height: 1;
    padding: 8px 6px;
    border-radius: 8px;
    transition: color .15s ease, background-color .15s ease;
}

.main-nav a:hover {
    color: #000;
    background: rgba(0, 0, 0, 0.05);
    /* subtle hover */
}

.main-nav a:focus {
    outline: 2px solid #6aa3ff;
    /* visible keyboard focus */
    outline-offset: 2px;
    border-radius: 8px;
}

/* Optional: reduce spacing on narrow screens */
@media (max-width: 640px) {
    .main-nav {
        gap: 14px;
    }

    .logo-image img {
        height: 34px;
    }
}

/* --- Footer --- */
.site-footer {
    background: #ffffff;
    /* matches white header; change to #000 if you prefer dark */
    border-top: 1px solid #e6e6e6;
    padding: 16px 20px;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

.site-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    color: #555;
    /* medium gray text */
    font-size: 14px;
}

.site-footer-inner p {
    margin: 0;
    padding: 30px 0;
    /* adds vertical padding inside */
    margin-top: 20px;
    /* pushes it down from content above */
}

.breadcrumbs {
    max-width: 1200px;
    margin: 8px auto 0;
    padding: 8px 12px;
    font-size: 14px;
    text-align: left
}

.breadcrumbs a {
    color: #4b2bb7;
    text-decoration: none
}

.breadcrumbs a:hover {
    text-decoration: underline
}

.breadcrumbs .sep {
    margin: 0 6px;
    color: #777
}

/* Mobile fixes - CHANGED to max-width: 480px to override conflicts */
@media only screen and (max-width: 480px) {

    /* Fix the search area positioning for mobile */
    .searchBoxArea {
        position: absolute;
        top: 65% !important;
        /* Move down from center - closer to bottom third */
        left: 50% !important;
        /* Center horizontally */
        transform: translate(-50%, -50%) !important;
        /* Perfect centering */
        width: 90% !important;
        /* Use percentage for responsiveness */
        max-width: 500px;
        /* Limit max width */
        z-index: 10;
        /* Ensure it's above the image */
        text-align: center;
    }

    /* Make the graveyard image much taller */
    .graveYard {
        min-height: 60vh !important;
        /* Make it at least 60% of viewport height */
        max-height: 70vh !important;
        /* But not too tall */
        object-fit: cover;
        /* Maintain aspect ratio */
        border-radius: 20px !important;
        /* Smaller radius on mobile */
        width: 100%;
        display: block !important;
        /* Override flex */
        float: none !important;
    }

    /* Make search input more mobile-friendly - smaller buttons that fit */
    #searchBox {
        width: 65% !important;
        /* Leave room for submit button */
        height: 36px !important;
        /* Smaller height */
        font-size: 14px;
        /* Smaller font */
        border: 1px solid #ccc;
        border-radius: 6px;
        padding: 0 8px;
        display: inline-block;
        vertical-align: top;
        min-width: unset !important;
        /* Override old rule */
    }

    #submitButton {
        height: 36px !important;
        /* Match search box height */
        margin-left: 6px;
        padding: 0 12px;
        font-size: 14px;
        border-radius: 6px !important;
        display: inline-block;
        vertical-align: top;
        width: auto;
        background: #4CAF50;
        color: white;
        border: none;
    }

    #advancedToggle {
        height: 32px !important;
        padding: 0 12px;
        font-size: 12px;
        margin-top: 8px;
        border-radius: 6px !important;
        background: #666;
        color: white;
        border: none;
    }

    #tvToggle {
        height: 32px !important;
        padding: 0 12px;
        font-size: 12px;
        margin-top: 8px;
        border-radius: 6px !important;
        background: #666;
        color: white;
        border: none;
    }


    /* Make the logo bigger and easier to tap */
    .logo-image img {
        height: 36px !important;
    }
}

.search-heading {
    color: white;
    font-size: 24px;
    margin: 0 0 15px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    font-family: Georgia, serif;
}

/* Mobile styling for the heading */
@media only screen and (max-width: 480px) {
    .search-heading {
        font-size: 18px;
        margin: 0 0 12px 0;
    }
}

/* ========================================= */
/* MOBILE RESULTS PAGE IMPROVEMENTS - ADD TO BOTTOM OF styles.css */
/* ========================================= */

/* No results message styling */
.no-results {
    text-align: center;
    padding: 30px 20px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    margin: 20px;
    color: #856404;
}

/* Mobile-specific results page improvements */
@media only screen and (max-width: 767px) {

    /* Add some top padding to account for header */
    .Results {
        margin-top: 10px;
    }

    /* Make sure breadcrumbs are readable */
    .breadcrumbs {
        padding: 8px 15px !important;
        font-size: 13px !important;
    }

    /* Improve the HR separator */
    hr {
        border: none;
        height: 1px;
        background: #ddd;
        margin: 15px 0;
    }

    /* Make purple text more readable */
    .purple {
        color: #6b46c1 !important;
        font-size: 1.1em;
        font-weight: 500;
    }

    /* Footer improvements for mobile */
    .site-footer-inner p {
        padding: 15px 0 !important;
        font-size: 13px;
    }
}

/* Tablet improvements */
@media only screen and (min-width: 768px) and (max-width: 1024px) {
    .site-header-inner {
        padding: 10px 20px;
    }

    .main-nav {
        gap: 18px;
    }

    .main-nav a {
        font-size: 15px;
    }
}

.main-nav .nav-contest {
    color: #c40030;
    /* bright red */
    font-weight: 700;
}

.main-nav .nav-contest:hover {
    color: #7c3aed;
    /* purple on hover */
}

@media (max-width: 480px) {
  .logo-image img {
    height: 32px !important;   /* consistent, not too small */
    width: auto !important;
  }
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}