/* styles.css
   Shared styles for every page on the site. Page-specific <style> blocks
   that used to repeat this same CSS on every page have been removed --
   this file is now the one place to make a change. */

* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0 0 70px 0; /* leave room for the fixed footer */
}

header {
    text-align: center;
    background-color: #f0f0f0;
    padding: 10px;
}

p {
    color: #333;
}

/* ---------- Navigation ---------- */

nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    background-color: #333;
    padding: 10px;
    row-gap: 8px;
}

nav a {
    color: white;
    text-decoration: none;
    margin: 0 15px;
    padding: 4px 10px;
    border-radius: 4px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

nav a:hover {
    background-color: #555;
    color: #fff;
}

/* Keep the "Hunts"/"Photos" toggle highlighted while its menu is open */
.dropdown.open > a {
    background-color: #555;
}

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

.dropdown-content {
    display: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 10;
    min-width: 180px;
}

/* Tap to open on touch devices (phones/tablets) */
.dropdown.open .dropdown-content {
    display: block;
}

/* Hover to open on devices that actually have a mouse */
@media (hover: hover) and (pointer: fine) {
    .dropdown:hover .dropdown-content {
        display: block;
    }
}

.dropdown-content a {
    color: white;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    margin: 0;
    white-space: nowrap;
    border-radius: 0;
    transition: background-color 0.15s ease;
}

.dropdown-content a:hover {
    background-color: #555;
}

/* ---------- Page layout ---------- */

.container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    padding: 20px 40px;
}

header {
    grid-column: span 2;
}

.services {
    grid-column: span 1;
    padding-left: 40px;
    display: flex;
    flex-direction: column;
}

/* Full-width variant: for pages like the photo galleries that don't
   need the two-column (text + slideshow) split layout. */
.container.full-width {
    display: block;
}

section {
    margin-top: 20px;
}

/* Default images (not slideshow/gallery): never force a fixed height --
   that was distorting/cropping photos of different shapes. */
img {
    max-width: 100%;
    height: auto;
}

/* ---------- Home-page style slideshow ---------- */

#slideshow {
    overflow: hidden;
    width: 100%;
    max-width: 650px;
    aspect-ratio: 13 / 10; /* same proportions as the old 650x500 box, but it now scales */
    margin: 20px auto;
    position: relative;
}

#slideshow img {
    width: 100%;
    height: 100%;
    display: none;
    object-fit: cover;
}

/* ---------- Pricing tables ---------- */

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    font-size: 1.1em;
    padding: 10px;
}

/* ---------- Photo galleries (trail cam / photo gallery pages) ---------- */

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 15px;
}

.gallery img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.gallery img:hover {
    transform: scale(1.05);
    transition: transform 0.2s;
}

.gallery-status {
    grid-column: 1 / -1;
    text-align: center;
    color: #666;
    padding: 20px;
}

/* ---------- Lightbox (click a photo to view it full-size) ---------- */

.gallery-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox.open {
    display: flex;
}

.gallery-lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    border: none;
}

.lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: #ddd;
    font-size: 0.9em;
    margin: 0;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1.6em;
    line-height: 1;
    padding: 10px 16px;
    border-radius: 6px;
    transition: background-color 0.15s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.28);
}

.lightbox-close {
    top: 16px;
    right: 16px;
}

.lightbox-prev {
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}

@media (max-width: 600px) {
    .lightbox-close,
    .lightbox-prev,
    .lightbox-next {
        font-size: 1.2em;
        padding: 8px 12px;
    }
}

/* ---------- Contact page ---------- */

.contact-info {
    font-size: 1.5em;
    margin: 20px auto;
    width: fit-content;
    text-align: center;
}

.contact-info h2 {
    margin: 10px 0;
}

.contact-info p {
    margin: 5px 0;
}

.contact-info a {
    text-decoration: none;
    color: inherit;
    font-weight: bold;
}

.contact-info p.email {
    color: rgb(0, 110, 255);
    text-decoration: underline;
}

/* ---------- Footer ---------- */

footer {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    text-align: center;
    padding: 10px 0;
    background-color: #f0f0f0;
}

/* ---------- Responsive breakpoints ---------- */

/* Tablets and small laptops */
@media (max-width: 900px) {
    .container {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    header {
        grid-column: 1;
    }

    .services {
        padding-left: 0;
    }
}

/* Phones */
@media (max-width: 600px) {
    body {
        padding-bottom: 90px;
    }

    nav a {
        margin: 0 8px;
        font-size: 0.95em;
    }

    .container {
        padding: 12px;
        gap: 20px;
    }

    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }

    .gallery img {
        height: 130px;
    }

    th,
    td {
        font-size: 0.95em;
        padding: 6px;
    }

    footer {
        font-size: 0.85em;
    }
}

/* Legacy helper classes kept in case any page still references them */
.split {
    height: 100%;
    width: 50%;
    position: fixed;
    z-index: 1;
    top: 20;
    overflow-x: hidden;
    padding-top: 20px;
}

.left {
    left: 0;
}

.right {
    right: 0;
}

.centered {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.centered img {
    width: 400px;
    height: 500px;
    max-width: 100%;
}
