/* --- Basic Setup --- */
body {
    font-size: 1rem;
    line-height: 1.6;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    background-color: #f9f9f9;
    color: #333;
    /* ATTENTION: Add this line to push content down below the navbar */
    padding-top: 80px;
    overflow-x: hidden;
}
@media (max-width: 767px) {
    html{
        font-size: 90%;
    }
    h1, .display-5 { font-size: 2rem;}
}
/* --- Main Content Layout (Desktop First) --- */
/* These are the default styles for desktop and larger screens.
   They are OUTSIDE of any media query. */
.main-container {
    display: flex;
    flex-direction: row; /* This ensures the layout is side-by-side on desktop */
    padding: 2rem;
    gap: 2rem;
}

/* ============================================ */
/* Responsive Styles for Mobile                 */
/* ============================================ */

/* These styles ONLY apply to screens 768px wide or smaller */
@media (max-width: 768px) {

  /* This rule now correctly OVERRIDES the desktop style for mobile */
  .main-container {
    flex-direction: column; /* Stacks vertically only on small screens */
    padding: 1rem;
  }

  /* This makes the sidebar take up the full width on mobile */
  .sidebar {
    flex-basis: auto;
  }
  
  /* Reduces font size in the pop-up modal on small screens */
  .itinerary-detail-title {
    font-size: 1.5rem;
  }
  
}

@media (max-width: 576px) {
  .itinerary-grid {
    grid-template-columns: 1fr;
  }

  .filter-menu li a {
    padding: 1.2rem;
    font-size: 1.1rem;
  }

  #modal-content {
    height: 100vh;
    border-radius: 0;
  }
}

.filter-menu {
    list-style-type: none;
    padding: 0;
    margin: 0;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.filter-menu li a {
    display: block;
    padding: 1rem;
    text-decoration: none;
    color: #333;
    border-left: 5px solid transparent;
    transition: background-color 0.2s ease, border-left-color 0.2s ease;
}

.filter-menu li a:hover {
    background-color: #f0f0f0;
}

.filter-menu li a.active {
    background-color: #e9f5ff;
    border-left-color: #007bff;
    font-weight: bold;
    color: #0056b3;
}

/* --- Itinerary Display Area --- */
.content-area {
    flex-grow: 1;
    min-width: 0;
}

.itinerary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.itinerary-box {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.itinerary-box:hover {
    transform: translateY(-5px);
}

.itinerary-box img {
    max-width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.itinerary-box h3 {
    margin: 0;
    color: #0056b3;
}

/* --- ATTENTION: New Modal (Pop-up) Styles --- */
#modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;

    /* ATTENTION: Added padding to create space on all sides */
    padding: 6rem;
    box-sizing: border-box;
    /* Ensures padding is included correctly */

    /* Animation properties */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}

#modal-content {
    background-color: #fff;
    padding: 2rem;
    border-radius: 2px;
    width: 100%;
    /* Let it fill the padded area */
    height: 100%;
    /* Let it fill the padded area */
    max-width: 800px;
    /* Still prevent it from getting too wide */
    overflow-y: auto;
    /* Allow content to scroll */
    position: relative;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);

    /* Pop-in animation */
    transform: scale(0.9);
    transition: transform 0.3s ease-in-out;
}

#modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

#modal-overlay.open #modal-content {
    transform: scale(1);
}

#close-modal-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2.5rem;
    font-weight: 300;
    color: #888;
    cursor: pointer;
    line-height: 1;
}

#close-modal-btn:hover {
    color: #000;
}

/* --- Itinerary Modal Padding Fix for Mobile --- */
#modal-overlay {
    padding: 1rem; /* Reduces padding to give content more space */
}

/* Styles for content inside the modal */
.itinerary-detail-title {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 1rem;
}

.itinerary-detail-description {
    font-size: 1rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.day-plan {
    border-left: 3px solid #007bff;
    padding-left: 1rem;
    margin-bottom: 1rem;
    text-align: left;
}

.day-plan h4 {
    font-weight: bold;
    color: #0056b3;
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.day-plan p,
.day-plan ul {
    white-space: normal;
}

.day-plan ul {
    margin-top: 0.5rem;
    padding-left: 20px;
}

.day-plan li {
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

/* --- Style for the new Contact Button --- */

/* Adds some space above the button */
.filter-menu .contact-item {
    margin-top: 1.5rem;
    padding: 0 1rem 1rem 1rem;
    /* Adds padding around the button */
}

/* Styles the link to look like a button */
.filter-menu .contact-btn {
    display: block;
    background-color: #5780ac;
    /* A primary blue color */
    color: #ffffff;
    /* White text */
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    /* Rounded corners */
    font-weight: bold;
    text-decoration: none;
    border-left: none;
    /* Removes the default border from the filter items */
    transition: background-color 0.3s ease;
}

/* A slightly darker blue when you hover over it */
.filter-menu .contact-btn:hover {
    background-color: #aec6e0;
    color: #ffffff;
}

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

.site-footer {
    background-color: #26272b;
    padding: 45px 0 20px;
    font-size: 15px;
    line-height: 24px;
    color: #737373;
}

.site-footer hr {
    border-top-color: #bbb;
    opacity: 0.5;
}

.site-footer hr.small {
    margin: 20px 0;
}

.site-footer h6 {
    color: #fff;
    font-size: 16px;
    text-transform: uppercase;
    margin-top: 5px;
    letter-spacing: 2px;
}

.site-footer a {
    color: #737373;
    text-decoration: none;
}

.site-footer a:hover {
    color: #3366cc;
    text-decoration: none;
}

.footer-links {
    padding-left: 0;
    list-style: none;
}

.footer-links li {
    display: block;
}

.footer-links a {
    color: #737373;
}

.footer-links a:active,
.footer-links a:focus,
.footer-links a:hover {
    color: #fff;
    text-decoration: none;
}

.footer-links.inline li {
    display: inline-block;
}

.site-footer .social-icons {
    text-align: right;
}

.site-footer .social-icons a {
    width: 40px;
    height: 40px;
    line-height: 40px;
    margin-left: 6px;
    margin-right: 0;
    border-radius: 100%;
    background-color: #33353d;
    display: inline-block;
    text-align: center;
    font-size: 16px;
    color: #fff;
    transition: all 0.2s ease;
}

.site-footer .social-icons a:hover {
    background-color: #007bff;
    transform: scale(1.1);
}

.copyright-text {
    margin: 0;
}

.contact-details i {
    margin-right: 10px;
    color: #bbb;
}

@media (max-width: 991px) {
    .site-footer [class^="col-"] {
        margin-bottom: 30px;
    }
}

@media (max-width: 767px) {
    .site-footer {
        padding-bottom: 0;
    }

    .site-footer .copyright-text,
    .site-footer .social-icons {
        text-align: center;
    }

    .site-footer .social-icons {
        margin-top: 20px;
    }
}

/* ADD THIS NEW, SAFER RULE */
.page-container {
    width: 100%;
    overflow-x: hidden;
}

.filter-toggle-btn {
    display: none; /* Hidden by default */
    width: 100%;
    padding: 1rem;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    margin-bottom: 1rem;
}

.collapse{
    justify-content: end;
}

@media (max-width: 768px) {
    .filter-toggle-btn {
        display: block; /* Show the button on mobile */
    }

    .filter-menu-container {
        display: none; /* Hide the menu by default on mobile */
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }

    .filter-menu-container.open {
        display: block; /* Show the menu when open */
        max-height: 500px; /* Adjust as needed */
    }
}

