/* Global styles and variables */
:root {
    --primary-color: #205295;
    --secondary-color: #2C74B3;
    --accent-color: #144272;
    --dark-color: #0A2647;
    --light-color: #c5c9ce;
    --text-color: #2c2c2c;
    --border-color: #b0b4b8;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Raleway', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
}

p, li, a, span, div {
    font-family: 'Raleway', sans-serif;
}

/* Core layout components */
.sb-hero__subtitle {
    font-size: 1.75rem;
    font-style: normal;
    font-family: Raleway;
    font-weight: 300;
    line-height: 1.25;
    letter-spacing: 0px;
    text-transform: none;
    margin-bottom: 10px;
}
.sb-hero__title {
    font-size: 3.5rem;
    font-style: normal;
    font-family: Raleway;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0px;
    text-transform: none;
}
.sb-hero__description {
    font-size: 1.25rem;
    font-style: normal;
    font-family: Raleway;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0px;
    text-transform: none;
    margin-bottom: 20px;
}
.sb-section {
    position: relative;
    padding: 5rem 0;
}

.sb-section-opt-light {
    background-color: var(--background-secondary);
    color: var(--text-color);
}

.sb-section-opt-dark {
    background-color: #1a1a1a;
    color: #fff;
}

/* Navigation styles - Dark theme consistent with components/navigation.css */
.sb-navigation {
    position: relative;
    z-index: 1000;
    background-color: rgb(18, 20, 20) !important;
    padding: var(--spacing-md, 1rem) 0;
    box-shadow: var(--shadow-base, 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1));
    transition: var(--transition-base, all 0.3s ease);
}

.sb-top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
}

.sb-top-header__brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85) !important;
    text-decoration: none;
}

.sb-nav {
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.sb-nav--hidden {
    transform: translateY(-100%);
}

.sb-nav--fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(18, 20, 20, 0.98) !important;
    backdrop-filter: blur(8px);
}

.sb-nav__list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.sb-nav__item {
    margin: 0 1rem;
}

.sb-nav__link {
    color: rgba(255, 255, 255, 0.85) !important;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.sb-nav__link:hover {
    color: var(--primary-color, #205295) !important;
}

/* Navigation brand and Bootstrap navbar overrides */
.sb-navigation .navbar-brand,
.sb-navigation__brand {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 700;
}

.sb-navigation .navbar-brand:hover,
.sb-navigation__brand:hover {
    color: rgba(255, 255, 255, 1) !important;
}

.sb-navigation .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
}

.sb-navigation .navbar-nav .nav-link:hover {
    color: var(--primary-color, #205295) !important;
}

/* Mobile navigation */
.sb-mobile-nav-btn {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
}

.sb-mobile-nav-btn__line {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #333;
    position: relative;
}

.sb-mobile-nav-btn__line::before,
.sb-mobile-nav-btn__line::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background-color: #333;
    transition: transform 0.2s;
}

.sb-mobile-nav-btn__line::before {
    top: -6px;
}

.sb-mobile-nav-btn__line::after {
    bottom: -6px;
}

/* Banner styles */
.sb-banner {
    padding: 1rem;
    text-align: center;
}

.sb-banner__close {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

/* Button styles */
.sb-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s;
}

.sb-button--nav {
    background-color: #007bff;
    color: #fff;
}

.sb-button--nav:hover {
    background-color: #0056b3;
    color: #fff;
    text-decoration: none;
}

/* Footer styles */
.sb-footer {
    padding: 4rem 0;
    background-color: #c5c9ce;
}

.sb-footer__heading {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.sb-footer__nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sb-footer__nav-list li {
    margin-bottom: 0.75rem;
}

.sb-footer__nav-list a {
    color: #6c757d;
    text-decoration: none;
}

.sb-footer__contact-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-right: 0.5rem;
}

.sb-footer__bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #b0b4b8;
}

.sb-footer,
.sb-footer__title,
.sb-footer__text,
.sb-footer__list li,
.sb-footer__copyright {
    color: #2c2c2c !important;
}

.sb-footer__link {
    color: #205295 !important;
    text-decoration: underline;
}

.sb-footer__link:hover {
    color: #c19957 !important;
    text-decoration: underline;
}

/* Media Queries */
@media (max-width: 767px) {
    .sb-mobile-nav-btn {
        display: block;
    }

    .sb-nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: #c5c9ce;
        padding: 2rem;
    }

    .sb-nav.sb-nav--expanded {
        display: block;
    }

    .sb-nav__list {
        flex-direction: column;
    }

    .sb-nav__item {
        margin: 1rem 0;
    }
}

@media (max-width: 768px) {
    .sb-nav--expanded {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: #c5c9ce;
        padding: 1rem;
        z-index: 1000;
    }

    .sb-nav__close {
        display: block;
        position: absolute;
        top: 1rem;
        right: 1rem;
    }
}

/* Utility classes */
.has-background {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.option-width-default {
    max-width: 1200px;
    margin: 0 auto;
}

.sb-container-fixed {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Animation classes */
.is-banner-in #sb-banner {
    visibility: visible;
}

.sb-nav--fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #d5d8dc;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Hero section styles */
#home.sb-section {
    padding: 6rem 0;
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: #fff;
}

#home h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* Feature cards */
.sb-feature-card {
    background: #e8eaed;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    color: #2c2c2c;
}

.sb-feature-card:hover {
    transform: translateY(-5px);
}

.sb-feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto;
}

.sb-icon {
    width: 100%;
    height: 100%;
    fill: #007bff;
}

/* Campground cards */
.sb-campground-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    color: #333;
}

.sb-campground-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.sb-campground-card .card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 1.25rem;
}

.sb-campground-card .card-footer {
    background: transparent;
    border-top: 1px solid #e0e0e0;
    padding: 1rem;
    margin-top: auto;
}

.sb-campground-card .card-img-top {
    height: 180px;
    object-fit: cover;
    width: 100%;
}

.sb-campground-card .card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #205295;
}

.sb-campground-card .card-location {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 0.75rem;
}

.sb-campground-card .card-text {
    font-size: 0.9rem;
    color: #444;
    flex-grow: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Button variations */
.sb-button--primary {
    background-color: #007bff;
    color: #fff;
    border: none;
}

.sb-button--primary:hover {
    background-color: #0056b3;
    color: #fff;
}

.sb-button--secondary {
    background-color: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.sb-button--secondary:hover {
    background-color: rgba(255,255,255,0.15);
    color: #fff;
}

.sb-button--primary {
    background-color: #3182ce;
    color: white;
    border: none;
}

.sb-button--primary:hover {
    background-color: #2c5282;
    color: white;
    text-decoration: none;
}

/* CTA section */
#cta.sb-section {
    background-color: #c5c9ce;
}

#cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.sb-cta-wrapper {
    margin-top: 2rem;
}

/* Filter card styles */
.sb-filter-card {
    background: #e8eaed;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
}

.sb-filter-card .form-control {
    border: 1px solid #b0b4b8;
    border-radius: 4px;
    padding: 0.75rem;
    width: 100%;
    transition: border-color 0.2s;
}

.sb-filter-card .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: 2px solid #0056b3;
    outline-offset: 2px;
}

/* Grid layout adjustments */
.campground-item {
    display: flex !important;
    padding: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Animation for filtering */
.campground-item {
    transition: opacity 0.3s ease;
}

.campground-item:not(:visible) {
    opacity: 0;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    #home h1 {
        font-size: 2.5rem;
    }
    
    .sb-section {
        padding: 3rem 0;
    }
    
    .sb-feature-card {
        margin-bottom: 2rem;
    }
}

/* Campground Details styles */
.sb-campground-detail {
    margin-bottom: 3rem;
}

.sb-campground-gallery img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
}

.sb-campground-amenities .fas {
    width: 20px;
    color: #28a745;
}

.sb-booking-card {
    position: sticky;
    top: 2rem;
}

.sb-booking-card .card {
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    border: none;
}

.sb-booking-card .form-control {
    padding: 0.75rem;
    border-radius: 4px;
    border: 1px solid #b0b4b8;
}

.sb-booking-card .price-info {
    border-bottom: 1px solid #b0b4b8;
    padding-bottom: 1rem;
}

.sb-booking-card .total-price {
    border-top: 1px solid #b0b4b8;
    padding-top: 1rem;
}

/* Breadcrumb customization */
.breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
}

.breadcrumb-item a {
    color: #007bff;
    text-decoration: none;
}

.breadcrumb-item.active {
    color: #555555;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
}

/* Contact form styles */
.sb-contact-form {
    background: #e8eaed;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
    color: #2c2c2c;
}

.sb-contact-form .form-group {
    margin-bottom: 1.5rem;
}

.sb-contact-form label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.sb-contact-form .form-control {
    padding: 0.75rem;
    border: 1px solid #b0b4b8;
    border-radius: 4px;
    transition: border-color 0.2s;
    background-color: #c5c9ce;
    color: #2c2c2c;
}

.sb-contact-form .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: 2px solid #0056b3;
    outline-offset: 2px;
}

.sb-contact-info-item {
    padding: 1.5rem;
    transition: transform 0.3s ease;
}

.sb-contact-info-item:hover {
    transform: translateY(-5px);
}

.sb-contact-icon {
    font-size: 2rem;
    color: #007bff;
    margin-bottom: 1rem;
}

.sb-contact-info-item h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.sb-contact-info-item p {
    color: #6c757d;
    margin: 0;
}

.sb-contact-info-item a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.2s;
}

.sb-contact-info-item a:hover {
    color: #007bff;
}

/* Alert customization */
.alert {
    border: none;
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 2rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert .close {
    font-size: 1.25rem;
    opacity: 0.75;
    transition: opacity 0.2s;
}

.alert .close:hover {
    opacity: 1;
}

/* Error page styles */
.sb-error-content {
    padding: 4rem 0;
}

.sb-error-content .display-1 {
    font-size: 6rem;
    font-weight: 300;
    line-height: 1.2;
    color: #6c757d;
}

.sb-error-content h2 {
    font-size: 2rem;
    color: #343a40;
}

.sb-error-actions {
    margin-top: 2rem;
}

.sb-error-actions .sb-button {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
}

/* Button variations for error page */
.sb-button--secondary.sb-error-button {
    border: 2px solid #6c757d;
    color: #6c757d;
}

.sb-button--secondary.sb-error-button:hover {
    background-color: #6c757d;
    color: #fff;
}

/* Loading spinner styles */
.sb-loading-spinner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.sb-loading-spinner .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Loading skeleton styles for content */
.sb-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Typeahead search styles */
.typeahead-container {
    position: relative;
    width: 100%;
}

.typeahead-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    background: #e8eaed;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid #b0b4b8;
    border-top: none;
    margin-top: 2px;
}

.typeahead-item {
    padding: 12px 15px;
    border-bottom: 1px solid #b0b4b8;
    cursor: pointer;
    transition: background-color 0.15s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.typeahead-item:hover,
.typeahead-item.selected {
    background-color: #b8d4f0;
}

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

.typeahead-item-image {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.typeahead-item-info {
    flex: 1;
    min-width: 0;
}

.typeahead-item-name {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.typeahead-item-location {
    font-size: 0.85rem;
    color: #555555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.typeahead-loading,
.typeahead-error,
.typeahead-no-results {
    padding: 15px;
    text-align: center;
    color: #555555;
}

.typeahead-error {
    color: #dc3545;
}

.typeahead-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Ensure the search input has proper styling */
#searchInput {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#searchInput:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
    outline: none;
}

/* Add focus styles for keyboard navigation */
.typeahead-item:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
}

/* Add scrollbar styling */
.typeahead-results::-webkit-scrollbar {
    width: 8px;
}

.typeahead-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.typeahead-results::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.typeahead-results::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Make sure campground cards are displayed properly */
#campgrounds-grid {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    padding: 0;
}

/* Fix for campground items display */
.campground-item {
    display: flex !important;
    padding: 0.5rem;
    margin-bottom: 1.5rem;
}

.campground-item:hover {
    transform: translateY(-5px);
}

/* Fix for maps */
.sb-map-container {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 800px;
    margin-bottom: 2rem;
}

#map {
    width: 100% !important;
    height: 800px !important;
}

/* Ensure the map container is visible */
.leaflet-container {
    width: 100% !important;
    height: 100% !important;
}

/* Fix for markers */
.leaflet-marker-icon {
    z-index: 500 !important;
}

/* Override any hidden styles */
.campground-item[style*="display: none"] {
    display: none !important;
}
.campground-item:not([style*="display: none"]) {
    display: flex !important;
}

/* Fix for campground cards display */
.campground-item {
    display: flex !important;
    margin-bottom: 1.5rem;
}

.sb-campground-card {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Force visibility of cards */
#campgrounds-grid .campground-item {
    opacity: 1 !important;
}

/* Fix map marker issues */
.leaflet-marker-icon {
    z-index: 1000 !important;
}

.leaflet-popup {
    z-index: 1001 !important;
}

/* Set proper height for map */
#map {
    height: 800px !important;
    width: 100% !important;
}

/* Stop page from auto-scrolling */
html {
    scroll-behavior: smooth;
}

/* Fix pagination spacing */
#pagination-container {
    margin-top: 2rem;
}

/* Improve map marker display */
.leaflet-marker-icon {
    z-index: 500 !important;
}

.leaflet-popup {
    z-index: 600 !important;
}

.map-popup {
    padding: 5px;
}

.map-popup h5 {
    margin-bottom: 5px;
    font-size: 1rem;
}

.map-popup p {
    margin-bottom: 10px;
    font-size: 0.9rem;
}

/* Ensure the map displays properly */
#map {
    width: 100% !important;
    height: 800px !important;
    z-index: 1;
}