/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, rgba(45, 80, 22, 0.3) 0%, rgba(62, 107, 31, 0.4) 100%),
                url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?ixlib=rb-4.0.3&auto=format&fit=crop&w=2000&q=80') center/cover,
                linear-gradient(135deg, #2d5016 0%, #3e6b1f 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(45, 80, 22, 0.4) 0%, rgba(62, 107, 31, 0.4) 100%);
    z-index: 1;
}

header .container {
    position: relative;
    z-index: 2;
}

header h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: -1px;
}

header p {
    font-size: 1.3rem;
    opacity: 0.95;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    max-width: 600px;
    margin: 0 auto;
}

.back-link {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    transition: background-color 0.3s ease;
}

.back-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Search and Filter Section */
.search-filter-section {
    margin: 3rem 0;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    flex-wrap: wrap;
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-top: -50px;
    position: relative;
    z-index: 10;
}

.search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    border-color: #3e6b1f;
    box-shadow: 0 0 0 3px rgba(62, 107, 31, 0.1);
}

/* Smart Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.search-suggestions.show {
    display: block;
}

.suggestion-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.suggestion-item:hover,
.suggestion-item.highlighted {
    background-color: #f8f9fa;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-icon {
    font-size: 0.9rem;
    opacity: 0.6;
}

.suggestion-text {
    flex: 1;
}

.suggestion-type {
    font-size: 0.8rem;
    color: #666;
    background: #e9ecef;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
}

/* Advanced Filters */
.advanced-filters {
    width: 100%;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.filter-toggle {
    background: none;
    border: none;
    color: #3e6b1f;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.filter-toggle:hover {
    background-color: #f8f9fa;
}

.filter-groups {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.filter-groups.show {
    display: grid;
}

.filter-group {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
}

.filter-group h4 {
    margin: 0 0 0.5rem 0;
    color: #2d5016;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-tag {
    background: white;
    border: 1px solid #ddd;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.filter-tag:hover {
    border-color: #3e6b1f;
    background-color: #f0f8f0;
}

.filter-tag.active {
    background-color: #3e6b1f;
    color: white;
    border-color: #3e6b1f;
}

/* Search Results Info */
.search-results-info {
    margin: 1rem 0;
    padding: 1rem;
    background: #e8f5e8;
    border-radius: 8px;
    border-left: 4px solid #3e6b1f;
    display: none;
}

.search-results-info.show {
    display: block;
}

/* Results Counter */
.results-counter {
    margin: 1rem 0 0.5rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.95rem;
    color: #495057;
}

.results-count {
    font-weight: 600;
    color: #2d5016;
}

.results-count.highlight {
    background: linear-gradient(135deg, #3e6b1f 0%, #28a745 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    animation: highlightResults 0.3s ease;
}

@keyframes highlightResults {
    from {
        transform: scale(0.95);
        opacity: 0.8;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.clear-search {
    background: none;
    border: 1px solid #dee2e6;
    color: #6c757d;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-search:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
    color: #495057;
}

.search-query {
    font-weight: 600;
    color: #2d5016;
}

.match-reasons {
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.match-reason {
    background: rgba(62, 107, 31, 0.1);
    color: #2d5016;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.8rem;
}

.filter-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-section label {
    font-weight: 500;
    white-space: nowrap;
}

.filter-section select {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    background-color: white;
}

/* Parks Grid */
.parks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

/* Lazy loading image styles */
.lazy-image {
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.lazy-loaded {
    opacity: 1;
    animation: fadeInImage 0.5s ease;
}

@keyframes fadeInImage {
    from {
        opacity: 0.6;
        transform: scale(1.02);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.park-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.park-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.park-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: #e9ecef;
    will-change: opacity;
}

.park-info {
    padding: 1.5rem;
}

.park-name {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2d5016;
}

.park-state {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.park-description {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Park Detail Page */
.park-gallery {
    margin: 2rem 0;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.gallery-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

/* Alerts Section */
.alerts-section {
    margin: 2rem 0;
}

.alerts-section h2 {
    color: #d32f2f;
    margin-bottom: 1rem;
}

.alert-item {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.alert-title {
    font-weight: 600;
    color: #856404;
    margin-bottom: 0.5rem;
}

.alert-description {
    color: #856404;
}

.no-alerts {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.info-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.info-card h3 {
    color: #2d5016;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* Activities Grid */
.activities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.activity-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.activity-title {
    font-weight: 600;
    color: #2d5016;
    margin-bottom: 0.5rem;
}

/* Map Container */
.map-container {
    height: 300px;
    background-color: #e9ecef;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: #666;
}

/* Campgrounds Section */
.campground-item {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.campground-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2d5016;
    margin-bottom: 0.5rem;
}

.campground-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.campground-detail {
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 6px;
}

.campground-detail strong {
    color: #2d5016;
}

.amenities-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.amenity-tag {
    background-color: #e8f5e8;
    color: #2d5016;
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    font-size: 0.85rem;
}

/* Events Section */
.event-item {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
    border-left: 4px solid #3e6b1f;
}

.event-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d5016;
    margin-bottom: 0.5rem;
}

.event-date {
    color: #666;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.event-location {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.event-description {
    color: #555;
    line-height: 1.5;
}

/* Places Section */
.places-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.place-item {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.place-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d5016;
    margin-bottom: 0.5rem;
}

.place-type {
    background-color: #e8f5e8;
    color: #2d5016;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.place-description {
    color: #555;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.place-location {
    color: #888;
    font-size: 0.9rem;
}

/* Accordion Styles */
.accordion-container {
    margin: 2rem 0;
}

.accordion-item {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
    overflow: hidden;
}

.accordion-header {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #e8f5e8;
    transition: background-color 0.3s ease;
}

.accordion-header:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.accordion-header.active {
    background: linear-gradient(135deg, #e8f5e8 0%, #d4edda 100%);
}

.accordion-header h2 {
    color: #2d5016;
    margin: 0;
    font-size: 1.6rem;
}

.accordion-toggle {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2d5016;
    transition: transform 0.3s ease;
}

.accordion-header.active .accordion-toggle {
    transform: rotate(45deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-content.open {
    max-height: 2000px;
    padding: 1.5rem;
}

.loading-message {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.loading-message.loading {
    color: #2d5016;
    font-style: normal;
}

/* Section Headers */
.location-section h2 {
    color: #2d5016;
    margin: 2rem 0 1rem 0;
    font-size: 1.8rem;
    border-bottom: 2px solid #e8f5e8;
    padding-bottom: 0.5rem;
}

/* Contact and Link Styles */
.contact-info {
    margin: 1rem 0;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 6px;
}

.contact-info a {
    color: #2d5016;
    text-decoration: none;
    font-weight: 500;
}

.contact-info a:hover {
    color: #3e6b1f;
    text-decoration: underline;
}

.campground-links,
.place-links {
    margin: 1rem 0;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.action-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.reservation-link {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.reservation-link:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea085 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.website-link {
    background: linear-gradient(135deg, #2d5016 0%, #3e6b1f 100%);
    color: white;
}

.website-link:hover {
    background: linear-gradient(135deg, #1e3209 0%, #2d5016 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(45, 80, 22, 0.3);
}

.directions-info {
    margin-top: 1rem;
    padding: 0.75rem;
    background-color: #e8f5e8;
    border-radius: 6px;
    border-left: 4px solid #3e6b1f;
}

.place-fees,
.accessibility-info {
    margin: 0.5rem 0;
    padding: 0.5rem;
    background-color: #fff3cd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.accessibility-info {
    background-color: #d1ecf1;
    border-left: 3px solid #17a2b8;
}

/* No Data Messages */
.no-campgrounds,
.no-events,
.no-places,
.no-results {
    text-align: center;
    padding: 2rem;
    color: #666;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-style: italic;
    margin: 2rem 0;
}

.no-results h3 {
    color: #495057;
    margin-bottom: 0.5rem;
    font-style: normal;
}

.search-suggestions-help {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.suggestion-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
    justify-content: center;
}

.example-search {
    background: white;
    border: 1px solid #dee2e6;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.example-search:hover {
    background: #3e6b1f;
    color: white;
    border-color: #3e6b1f;
}

/* Utility Classes */
.loading {
    text-align: center;
    padding: 3rem;
    font-size: 1.1rem;
    color: #666;
}

.hidden {
    display: none;
}

.error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    margin: 1rem 0;
}

/* Footer */
footer {
    background-color: #2d5016;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    header {
        min-height: 300px;
        padding: 3rem 0;
    }

    header h1 {
        font-size: 2.5rem;
    }

    header p {
        font-size: 1.1rem;
    }

    .search-filter-section {
        flex-direction: column;
        align-items: stretch;
    }

    .parks-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .activities-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .image-gallery {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    header {
        padding: 2rem 0;
        min-height: 250px;
    }

    header h1 {
        font-size: 2rem;
    }

    header p {
        font-size: 1rem;
    }

    .search-filter-section {
        margin-top: -30px;
        padding: 1.5rem;
    }

    .park-info {
        padding: 1rem;
    }

    .info-card {
        padding: 1rem;
    }

    .accordion-header {
        padding: 1rem;
    }

    .accordion-header h2 {
        font-size: 1.4rem;
    }

    .accordion-content.open {
        padding: 1rem;
    }
}

/* Navigation styles */
.main-nav {
    margin-top: 1.5rem;
    text-align: center;
    padding: 1rem 0;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.main-nav a {
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    margin: 0 0.25rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    display: inline-block;
    font-weight: 500;
    font-size: 0.95rem;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
}

.main-nav a:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.4);
    transform: translateY(-1px);
}

.main-nav a.active {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.5);
    font-weight: 600;
}

/* Park page navigation */
header nav {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.back-link,
.blog-link {
    color: white;
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    transition: all 0.3s ease;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
}

.back-link:hover,
.blog-link:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .main-nav {
        margin-top: 0.5rem;
    }

    .main-nav a {
        margin: 0 0.25rem;
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    header nav {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }

    .back-link,
    .blog-link {
        text-align: center;
    }
}