/* General Body and Layout */
:root {
    /* Define CSS variables for consistent colors */
    --light-gray-background: #f8f8f8;
    --border-gray: #ddd;
    --main-dark-blue: #003366;
    --accent-gold: #ffd700;
    --link-blue: #007bff;
}

body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-image: url('../turf2.jpg');
    background-size: cover;
    background-attachment: fixed;
    background-position: center center;
    background-color: #f4f4f4; /* Fallback color if image fails */
    box-sizing: border-box;
}

.site-wrapper {
    max-width: 1360px;
    margin: 0 auto;
    background-color: transparent;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding-bottom: 20px;
}

/* Ballpark Header (Name & City/State) */
.ballpark-header {
    background-color: #003366;
    padding: 20px;
    color: #fff;
    text-align: left;
    border-bottom: 3px solid var(--main-dark-blue);
}

.ballpark-title-container {
    padding: 10px 20px;
}

.ballpark-name {
    font-size: 2.5em;
    margin: 0;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.city-state {
    font-size: 0.8em;
    font-weight: normal;
}

/* Main Content Area - Using Flexbox for layout */
.main-content-area {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    background-color: transparent;
}

/* Information Sidebar */
.info-sidebar {
    flex: 0 0 250px;
    width: 250px;
    min-width: 200px;
    background-color: var(--light-gray-background);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
    border: 2px solid #a0a0a0;
    transition: transform 0.2s ease-in-out;
}

.info-sidebar:hover {
    /* Optional: Subtle scale on hover for interactivity */
    /* transform: scale(1.02); */
}

.info-card {
    padding: 0;
    margin: 0;
}

.info-card p {
    /* Reduced margin to tighten vertical spacing between items */
    margin-bottom: 5px;
    font-size: 0.95em;
    line-height: 1.2;
}

.info-card .title {
    font-weight: bold;
    color: var(--main-dark-blue);
    display: block;
    font-size: 1em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(0, 51, 102, 0.2);
    padding-bottom: 2px;
    margin-bottom: 8px;
}

.info-card .value {
    color: #555;
    display: block;
    margin-top: 0;
}

.info-card p:last-of-type .value {
    line-height: 1;
}

.info-card a {
    color: var(--link-blue);
    text-decoration: none;
}

.info-card a:hover {
    text-decoration: underline;
}

.photos-taken-years {
    font-style: italic;
    font-size: 0.85em;
    color: #777;
    margin-top: 15px;
}

/* Photo and Review Area (main content) */
.photo-and-review-area {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.main-photo-container {
    background-color: var(--light-gray-background);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
    border: 1px solid #ccc;
    flex-grow: 1;
}

.main-ballpark-photo {
    max-width: 1280px;
    width: 100%;
    height: auto;
    border: none;
    border-radius: 4px;
    display: block;
    margin: 0 auto;
}

/* Thumbnail Gallery */
.thumbnail-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    background-color: var(--light-gray-background);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-gray);
}

.thumbnail-link {
    display: block;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
}

.thumbnail-link:hover {
    border-color: var(--link-blue);
}

.thumbnail-img {
    width: 120px;
    height: 90px;
    object-fit: cover;
    display: block;
    border-radius: 4px;
}

/* Review Section */
.review-section {
    background-color: var(--light-gray-background);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-gray);
}

.review-text {
    font-size: 1.1em;
    line-height: 1.8;
    color: #444;
    white-space: pre-wrap;
}

/* Sidebar Ads */
.sidebar-ad {
    flex-shrink: 0;
    width: 160px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--light-gray-background);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-gray);
}

/* Footer */
.footer {
    background-color: var(--main-dark-blue);
    color: #fff;
    padding: 20px;
    border-top: 3px solid #001a33;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section {
    flex: 1 1 200px;
    min-width: 150px;
}

.footer-head {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--accent-gold);
}

.footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer ul li {
    margin-bottom: 8px;
    line-height: 1.4;
}

.footer ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 0.9em;
    border-bottom: 1px solid transparent;
    transition: border-bottom 0.2s ease, color 0.2s ease;
}

.footer ul li a:hover,
.footer ul li a:focus {
    color: var(--accent-gold);
    border-bottom: 1px solid var(--accent-gold);
}

/* Footer Ad Styling (No changes needed) */
.footer-ad {
    flex-shrink: 0;
    width: 300px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--light-gray-background);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-gray);
}

/* --- New Styles for index_new.htm content --- */
.main-content-column {
    background-color: var(--light-gray-background);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-gray);
    flex: 1;
    min-width: 300px;
}

.welcome-text {
    line-height: 1.8;
    color: #333;
    margin-bottom: 15px;
}

.latest-updates {
    font-weight: bold;
    margin-top: 25px;
    margin-bottom: 5px;
    color: var(--main-dark-blue);
    font-size: 1.1em;
}

.latest-updates-text {
    margin: 0;
}

.last-updated-text {
    font-size: 0.9em;
    color: #777;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 0;
}

.main-page-photo {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border: 5px solid #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

/* --- Styles for minparks_new.php (Table Layout) --- */

.page-header-index {
    background-color: var(--light-gray-background);
    padding: 20px;
    border-bottom: 1px solid var(--border-gray);
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.page-title {
    font-size: 2em;
    color: var(--main-dark-blue);
    margin-top: 0;
    margin-bottom: 5px;
    font-weight: bold;
}

.ballpark-count {
    font-size: 0.7em;
    color: #666;
    font-weight: normal;
}

.sort-instruction {
    font-size: 0.9em;
    color: #777;
    margin-top: 5px;
    margin-bottom: 0;
}

.main-content-index {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    background-color: transparent;
}

.ballpark-table-container {
    flex: 1 1 800px;
    min-width: 300px;
    overflow-x: auto;
    background-color: var(--light-gray-background);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-gray);
    padding: 10px;
}

.ballpark-list-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 0.9em;
    min-width: 700px;
}

.ballpark-list-table th,
.ballpark-list-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: top;
    white-space: nowrap;
}

.ballpark-list-table th {
    background-color: var(--main-dark-blue);
    color: #fff;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85em;
    position: sticky;
    top: 0;
    z-index: 1;
}

.ballpark-list-table th a {
    color: #fff;
    text-decoration: none;
    display: block;
}

.ballpark-list-table th a:hover {
    text-decoration: underline;
}

.ballpark-list-table .even-row {
    background-color: #f0f0f0;
}

.ballpark-list-table .odd-row {
    background-color: #e8e8e8;
}

.ballpark-list-table tbody tr:hover {
    background-color: #dcdcdc;
}

.ballpark-list-table td a {
    color: var(--link-blue);
    text-decoration: none;
    font-weight: bold;
}

.ballpark-list-table td a:hover {
    text-decoration: underline;
}

.sidebar-ad-right {
    flex-shrink: 0;
    width: 160px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--light-gray-background);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-gray);
    margin-left: auto;
}

/* --- Styles for Search Filter --- */
.search-filter-container {
    margin-top: 20px;
    margin-bottom: 20px;
    text-align: center;
}

#ballparkSearchInput {
    padding: 10px 15px;
    width: 80%;
    max-width: 400px;
    border: 1px solid var(--border-gray);
    border-radius: 5px;
    font-size: 1em;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#ballparkSearchInput:focus {
    border-color: var(--link-blue);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(0, 123, 255, 0.2);
    outline: none;
}

/* --- New CSS for Hamburger Menu --- */

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    /*background-color: var(--main-dark-blue);*/
    background-color: #D2B48C;
    color: #00FF00;
    flex-wrap: wrap; /* Added for mobile wrap */
}

.main-header .logo img {
    height: 150px;
    width: auto;
}

.hamburger-menu {
    display: none; /* Hidden by default on desktop */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001; /* Ensure it's on top */
}

.hamburger-menu:focus {
    outline: none;
}

.hamburger-menu .bar {
    width: 100%;
    height: 3px;
    background-color: #fff;
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

.main-nav {
    display: flex;
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex; /* Display links horizontally on desktop */
}

.nav-links li {
    margin: 0 15px;
}

.nav-links a {
   /* color: #006400; */
    color: var(--accent-gold);
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-gold);
}


/* --- Media Query for Mobile --- */
@media (max-width: 768px) {
    /* FIX: Hide sidebar ads on mobile */
    .sidebar-ad, .sidebar-ad-right, .footer-ad {
        display: none;
    }

    .main-header {
        justify-content: space-between; /* Space logo and hamburger */
    }
    
    .main-header .logo img {
        height: 50px; /* Reset to smaller size for mobile screens */
    }
    
    .hamburger-menu {
        display: flex; /* Show on mobile */
    }
    
    .main-nav {
        display: none; /* Hidden by default on mobile */
        width: 100%;
        flex-direction: column;
        background-color: rgba(0, 51, 102, 0.95);
        position: absolute;
        top: 60px; /* Adjust this value to be below the header */
        left: 0;
        text-align: center;
        box-shadow: 0 8px 16px rgba(0,0,0,0.2);
        z-index: 1000; /* FIX: Added z-index to ensure menu is on top of content */
    }

    /* When menu is active, display it as a flex column */
    .main-nav.active {
        display: flex;
    }
    
    .nav-links {
        flex-direction: column;
        width: 100%;
        padding: 20px 0;
    }
    
    .nav-links li {
        margin: 10px 0;
    }
}

/* --- FIX: Styles to make Lightbox responsive on mobile --- */
.lightbox {
    /* Ensure the main lightbox container is always within the viewport */
    max-width: 100%;
    max-height: 100%;
    box-sizing: border-box;
}

.lb-outerContainer {
    /* Ensure the container for the image scales correctly */
    max-width: 100% !important;
    max-height: 100% !important;
    box-sizing: border-box;
}

.lb-image {
    /* The core fix: Make the image scale down to fit its container */
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
}

/* On mobile, center the main lightbox view and ensure no overflow */
@media (max-width: 768px) {
    #lightbox {
        padding: 0 !important;
    }

    #outerImageContainer,
    #imageDataContainer {
        width: 100% !important;
    }

    #lightboxImage {
        width: 100% !important;
        height: auto !important;
        padding-top: 10px;
    }
}

.hero-header {
  position: relative;
  height: 400px; /* Adjust as needed */
  background: url('fenwaypan.jpg') no-repeat center center/cover;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  text-shadow: 2px 2px 4px #000;
}

.hero-header .main-nav {
  background-color: transparent;
  width: 100%;
  position: absolute;
  bottom: 0;
  left: 0;
}

.hero-header .nav-links {
  justify-content: center;
}

.hero-header .social-icons {
  position: absolute;
  top: 20px;
  right: 20px;
}

.hero-tagline {
  font-size: 2.5em;
  margin-top: 10px;
}

/* You might need to adjust other existing CSS rules to make the header look correct with the new hero image. */

@media (max-width: 736px) {
  .hero-header .social-icons {
    display: none;
  }
}

header .logo img {
  height: 2.5em; /* Sets the logo's height to a manageable size */
  width: auto; /* Maintains the logo's aspect ratio */
  display: block; /* Overrides the 'display: none' rule */
}

@media (max-width: 736px) {
  header img {
    height: auto; /* Reverts to automatic height on mobile */
  }
}

/* This targets the logo specifically within the hero header */
.hero-header .hero-image-overlay a img {
  height: 15.5em; /* Sets the logo's height to a fixed, manageable size */
  width: auto; /* Ensures the image maintains its original aspect ratio */
  display: block; /* Overrides any "display: none" rules on mobile */
  background: linear-gradient(to bottom, rgba(0, 0, 0, 1.0) 0%, rgba(0, 0, 0, 0) 100%);
  align-items: center;
}

/* This adds a subtle white border and a shadow to help the logo stand out */
.hero-header .hero-image-overlay a img {
  border: 2px solid #fff;
  border-radius: 5px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

.main-header {
    background: linear-gradient(180deg, #001f3f 0%, #000b18 100%);
    border-bottom: 2px solid #2979ff; /* Subtle blue glow at the bottom */
    padding: 15px 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.nav-links li a {
    color: #ffffff;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.header-socials {
    display: flex;
    gap: 10px;
    margin-left: 20px;
}

/* Hide socials on mobile if the menu gets too crowded */
@media (max-width: 768px) {
    .header-socials {
        display: none; 
    }
}