/* =========================================================
   1. BASE / RESET
   ========================================================= */
* {
    box-sizing: border-box;
}

html {
    font-size: 100%;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    font-size: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
    line-height: 1.65;
    color: #444;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =========================================================
   2. TYPOGRAPHY
   ========================================================= */
h1 {
    font-family: "Courier Prime", monospace;
    font-size: clamp(1.8rem, 1.215rem + 1.35vw, 2.4rem);
    line-height: 1.15;
    margin: 2rem 0 0 0;
}

h2 {
    font-family: "Courier Prime", monospace;
    font-size: clamp(1.4rem, 1.15rem + 0.8vw, 1.85rem);
    line-height: 1.2;
    margin: 1.5em 0 0.5em;
    text-align: center;
}

h3 {
    font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem);
    line-height: 1.25;
    margin: 1.25em 0 0.5em;
}

h4 {
    font-size: 1rem;
    line-height: 1.3;
    margin: 1em 0 0.25em;
    color: #111;
}

h1, h2, h3, h4 {
    font-weight: 400;
}

p {
    font-family: Arial, sans-serif;
    font-size: 1.1rem;
    margin: 0 0 1em 0;
}

/* Links */
a {
    color: #444;
    text-decoration: underline;
    text-underline-offset: 0.15em;
    text-decoration-thickness: 1px;
}

a:hover {
    color: #600;
    text-decoration: none;
}

/* =========== GOOGLE FONTS ============ */

.courier-prime-regular {
  font-family: "Courier Prime", monospace;
  font-weight: 400;
  font-style: normal;
}

.courier-prime-bold {
  font-family: "Courier Prime", monospace;
  font-weight: 700;
  font-style: normal;
}

.courier-prime-regular-italic {
  font-family: "Courier Prime", monospace;
  font-weight: 400;
  font-style: italic;
}

.courier-prime-bold-italic {
  font-family: "Courier Prime", monospace;
  font-weight: 700;
  font-style: italic;
}

/*<uniquifier>: Use a unique and descriptive class name*/
.roboto-mono-bob {
  font-family: "Roboto Mono", monospace;
  font-optical-sizing: auto;
  font-weight: 400; /* FIXED: Changed invalid <weight> placeholder to 400 */
  font-style: normal;
}

.geist-mono-bob {
  font-family: "Geist Mono", monospace;
  font-optical-sizing: auto;
  font-weight: 400; /* FIXED: Changed invalid <weight> placeholder to 400 */
  font-style: normal;
}

	
/* =========================================================
   3. LAYOUT
   ========================================================= */
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 20px;
}

/* Narrow content wrapper for non-photo pages */
.inner-wrap {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.inner-wrap img {
    margin: 0 auto;
}

/* =========================================================
   4. HEADER
   ========================================================= */
.site-header {
    display: flex;
    align-items: center;
    margin: 0 0 1.5em;
    padding: 0;
}

/* Text wrapper forces layout control over title and subtitle */
.branding {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;              /* Subtle space between title and paragraph */
}  

.site-header a {
    color: inherit;
    text-decoration: none;
}

.site-header a:hover {
    color: #600;
    text-decoration: none;
}

.logo {
    border: 1px solid black;
    display: block;
    height: auto;           		/* Maintains aspect ratio */
    max-width: 100px;        /* Limits size on mobile */
    width: 100%;
} 

.site-tagline {
    font-family: "Courier Prime", monospace;
}

/* Header on Screens 826px wide and up */
@media (min-width: 826px) {
    .site-header {
        flex-direction: row;        		/* Sits logo next to text container */
        justify-content: flex-start;		/* Aligns layout to the left */
        align-items: center;        		/* Centers logo and text vertically */
        gap: 20px;                 			/* Wider gap for larger screens */
        text-align: left;
    }
}

/* Header on small screens, under 825px)  */
@media (max-width: 825px) {
    .site-header {
        background: lightgrey;
        display: flex;
        flex-direction: column;		 /* Stacks logo and text container vertically */
        align-items: center;   			 /* Centers items horizontally */
        gap: 1px;             			 /* Space between logo and text */
        text-align: center;
        padding: 1px;
    }
	 
    h1 {
        line-height: .9;
        margin: 1rem 0 0 0;
    }
	 
    .logo {
        max-height: 55px;
        width: auto;
    }
	
    /* Mobile override styles -- downscale navigation text on small displays */
    .nav-menu,	
    .nav-menu a {
        font-size: 12px; 
        margin-right: .3em;
        text-decoration: underline;
    }	
}

/* =========================================================
   5. NAVIGATION
   ========================================================= */
.nav-menu {
    display: flex;
    font-family: "Courier Prime", monospace;
    flex-direction: column;
    margin: 1rem auto;
    gap: 0.25rem;
    width: 100%;
}

.nav-menu ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0 auto; 
    gap: 0;
}

.nav-menu a {
    font-size: 1.6rem;
    margin-right: 1em;
    text-decoration: underline;
}

.nav-menu a:hover {
    color: #600;
    text-decoration: none;
}

/* =========================================================
   6. CONTACT FORM & UNIVERSAL BUTTONS
   ========================================================= */
.contact-form {
    margin: 0 auto 2em auto;
    width: 100%;
    max-width: 500px;
    padding: 0;
}

input,
textarea {
    font-family: "Courier New", monospace;
    font-size: 1.2rem;
    padding: .5rem;
    width: 100%;
}

label {
    font-family: "Courier New", monospace;
    font-size: 1.3rem;
    font-weight: bold;
    display: block;
    margin-top: .5rem;
}

/* Universal Button Style across site components */
.my-button {
    background-color: #ccc;
    border: 1px solid #bbb;
    letter-spacing: 0.05em;
    padding: 10px 16px;
    text-align: center;
    text-decoration: none;
    text-transform: lowercase;
    font-variant: small-caps;
    display: inline-block;
    font-size: 1.1rem;
    font-weight: normal;
    cursor: pointer;
    margin: 0 0 0 8px;
}

.my-button:hover {
    background-color: #ddd;
    border-color: #ccc;
    color: maroon;
}

.clear-button {
    opacity: 0.85;
}

.clear-button:hover {
    opacity: 1;
}

/* =========================================================
   7. PHOTO GALLERY & IMAGE MANAGEMENT
   ========================================================= */
.thumb {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    border-radius: 4px;
}

.gallery-container {
    column-count: 3;         /* Forces exactly 3 vertical columns */
    column-gap: 24px;        /* Spacing between columns */
    width: 100%;
}

.gallery-item {
    display: inline-block;   /* Prevents images from breaking in half across columns */
    width: 100%;
    margin-bottom: 24px;     /* Spacing below each image */
}

.gallery-item img {
    width: 100%;
    height: auto;            /* Preserves original portrait/landscape shape perfectly */
    display: block;
    border: 1px solid black;
}

/* Mobile responsive fallback */
@media (max-width: 768px) {
    .gallery-container {
        column-count: 2;     /* Drops to 2 columns on mobile */
    }
}

/* Home Page Specific Photo Grid Base */
.photo-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.grid-item {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 1px;
}

.photo-grid img {
    border: 1px solid black;
}

.caption {
    font-size: 0.95rem;
    line-height: 1.4;
    color: #444;
    margin-top: 0.5em;
}

.photo-grid a {
    font-size: 1.3em;
    color: #444;
}

.photo-grid a:hover {
    color: #600; 
}


/* =========================================================
   8. PHOTO SEARCH PAGE
   ========================================================= */
.search-wrapper {
    display: flex;
    flex-direction: column;
    text-align: center;
    margin-bottom: 10rem;
}

.search-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 30px auto;
}

#searchInput {
    flex: 1;
    min-width: 200px;
    max-width: 700px;
    padding: 10px;
    font-size: 1.2rem;
}

#photoGallery.search-results-grid {
    display: block;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding-top: 20px;
}

.grid-layout-wrapper {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    width: 100%;
}

.search-result-card {
    display: flex;
    flex-direction: column;
    text-align: center;
    overflow: hidden;
}

.search-result-card a {
    text-decoration: none;
    display: block;
    width: 100%;
}

.thumb-crop-box {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    position: relative;
    border: 2px solid #444;
    border-radius: 2px;
}

.result-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.action-wrapper {
    margin-top: 10px;
    padding: 0 4px;
}

.view-link {
    color: #000;
    font-weight: 400;
    text-decoration: underline;
    font-size: 0.95rem;
    transition: color 0.2s ease-in-out;
}

.search-result-card a:hover .view-link {
    color: #004499;
}

.results-text {
    font-size: 1.2em;
    width: 100%;
    text-align: center;
    margin-bottom: 20px;
}

.results-heading {
    width: 100%;
    text-align: center;
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: #555;
    margin: 0 auto 20px auto;
    padding: 0.3em 0.6em;
}

/* =========================================================
   9. JEFF GLIGHTBOX OVERRIDES
   ========================================================= */
.gslide-image img {
    max-height: 85vh;
    max-width: 90vw;
    width: auto;
    height: auto;
    object-fit: contain;
    border: 2px solid #000;
    box-sizing: border-box;
}

.gslide-title {
    font-size: 1.2rem !important;
    font-weight: 600;
    margin: 0 !important;
    padding: 0 !important;
}

.gslide-desc {
    font-size: 1rem !important;
    margin: 0 !important;
    padding: 0 !important;
}

.gdesc-inner,
.gslide-description {
    padding: 0 !important;
}

.gslide-media {
    box-shadow: none !important;
}

.goverlay {
    background: rgba(255, 255, 255, 1);
}

/* =========================================================
   10. GLOBAL UTILITIES
   ========================================================= */
.courier {
    font-family: "Courier Prime", "Courier New", monospace;
}

/* Gray box containing text on the Thank You and 404 pages */
.gray-box {
    border: 2px solid black; 
    background: #dedede; 
    margin: 0 auto; 
    padding: 1rem; 
    width: auto;
}

/* Used on our contact form for the "honeypot" trap */
.hidden {
    display: none;
}

/* Horizontal divider in header */
hr {
    background-color: #ccc;
    border: none;     /* Removes the browser's default 3D gray border shading */
    height: 1px;
    width: 25%;
    margin: 0 auto 1rem auto;   /* Automatically centers the block element horizontally */
}

/* .margin-zero removes all margins from something when they're generally wanted but 
	not this time and not in this situation */
.margin-zero {
    margin: 0;
}

.small {
    font-size: 1rem;
}

.text-center {
    text-align: center;
}

i {
    font-style: italic;
}

/* =========================================================
   11. FOOTER NAVIGATION REFINEMENTS
   ========================================================= */

/* Targets the main footer layout container */
footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;             /* Tightens up the vertical space between link rows */
    padding: 2rem 1rem;
}

footer p {
    margin: 0;
    max-width: 99%;
    line-height: 1.6;
}

/* Scaled down menu in footer */
footer a, 
footer li, 
footer span,
footer .active { 
    font-size: 1.1rem !important; /* Forces all elements in the footer link block to be identical in size */
    text-decoration: underline;         
    color: #444;                  			 
    display: inline-block;
}

/* Ensure the active, unlinked state entry in the footer is grayed out */
footer .active,
footer li:not(:has(a)) {
    color: #aaa !important;
    text-decoration: none !important;
    margin-right: 1em;
}


/* =========================================================
   12. MEDIA QUERIES (MOBILE FIRST UPWARD / OVERRIDES)
   ========================================================= */

/* Standard Screens & Desktop Viewports (768px and up) */
@media (min-width: 768px) {
    .photo-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large Displays (1024px and up) */
@media (min-width: 1024px) {
    .gallery-container {
        display: grid; /* FIXED: Added grid display to process template layout safely */
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Mobile Component Structural Fallbacks (Max overrides) */
@media (max-width: 768px) {
    .nav-menu ul {
        text-align: center;
    }
    
    .grid-layout-wrapper {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
}

/* Ultra-Wide Monitors Max Limits */
@media (max-width: 1800px) {
    .container {
        max-width: 1200px;
    }
}
