/* ==========================================================================
   1. BASE STYLES 
   ========================================================================== */

  /* --- GLOBAL STYLES --- */
  body, html {
        margin: 0;
        padding: 0;
        font-family: Arial, sans-serif;
        height: 100%;
        height: 100dvh;
        /* Keep body overflow hidden initially to manage the full-page layout */
        overflow: hidden; 
      }
      
      /* --- Custom Map Popup Styling --- */
      
      /*  Increased specificity by adding .leaflet-popup-pane */
      .leaflet-popup-pane .custom-leaflet-popup .leaflet-popup-content-wrapper {
        background: #eaf6f4; /* Light teal/cyan background */
        color: #333;
        border-radius: 8px;
        padding: 10px 15px;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
        margin:0;
      }
      
      /* --- Price Styling within the Map Popup --- */
      
      /* Increased specificity by adding .leaflet-popup-pane */
          .leaflet-popup-pane .custom-leaflet-popup .popup-price { 
          display: block; /* Make it take up its own line */
          font-size: 1.4em; /* Make the text large */
          font-weight: 700; /* Make it bold */
          color: #1a7e4b; /* Use a strong green color */
          margin-bottom: 5px;
          line-height: 1.1;
          }
      
      /* Increased specificity by adding .leaflet-popup-pane */
      .leaflet-popup-pane .custom-leaflet-popup .leaflet-popup-tip {
        background: #eaf6f4; /* Match the background color */
        box-shadow: none; /* Remove the default tip shadow */
      }
      
      /* Increased specificity by adding .leaflet-popup-pane */
      .leaflet-popup-pane .custom-leaflet-popup .leaflet-popup-close-button {
        color: #00796b; /* Match the site's primary green/teal color */
        font-size: 24px;
        right: 8px;
        top: 0px;
      }
      
      /* Increased specificity by adding .leaflet-popup-pane */
      .leaflet-popup-pane .custom-leaflet-popup .leaflet-popup-content b {
        color: #004d40; /* Darker primary color for emphasis */
      }
      
      /* --- FOOTER STYLES (ADJUSTED HEIGHT/PADDING) --- */
      .footer {
        background-color: #005a6a; /* Match Header */
        color: white;
        text-align: center;
        font-size: 0.75em; /* Small text */
        padding: 5px 0;
        
        /* Fixed at bottom */
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        /* REDUCED HEIGHT from 30px to 25px */
        height: 25px; 
        z-index: 3000; /* Above everything, including map attribution */
        box-sizing: border-box;
        
        /* Center text vertically */
        display: flex;
        justify-content: center;
        align-items: center;
      }
      
      /* Prevent background scrolling when mobile menu is open */
      body.no-scroll {
        overflow: hidden;
      }
      
      /* --- HEADER STYLES --- */
      .header {
        background-color: #005a6a;
        color: white;
        /* Aggressively reduced padding */
        padding: 0px 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        /* Aggressively reduced height */
        height: 50px; 
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        z-index: 1000;
        }
      
      /* Logo and Link Styling */
      .logo {
        display: flex;
        align-items: center; 
        gap: 8px; 
      }
      
      .logo-icon {
        height: 50px;
        width: auto;
        display: block;
      }
      
      /* Move the logo text styling from inline to class */
      .logo span {
        font-size: 1.2em;
        font-weight: bold;
        color: white;
      }
      
      /* Container for the links (Desktop: Horizontal) */
      .nav-links {
        display: flex; 
        gap: 15px;
        margin-left:  auto;
      }
      
      /* Targetting the anchor links (White, Un-underlined) */
      .nav-links a {
        color: white; 
        text-decoration: none; 
        font-size: 0.95em; 
        transition: opacity 0.2s; 
      }
      
      .nav-links a:hover {
        opacity: 0.8; 
      }
      
      /* Hide hamburger/close buttons by default (Desktop) */
      #hamburger-menu, #close-menu {
        display: none; 
      }
      
      /* --- CONTROLS TIER (Below Header) --- */
      .controls-tier {
        padding: 10px 20px;
        background-color: #f7f7f7;
        border-bottom: 1px solid #ddd;
        display: flex;
        /* --- Allow wrap for mobile stacking --- */
        flex-wrap: wrap; 
        justify-content: space-between;
        align-items: center;
        /* --- Removed fixed height, added gap --- */
        height: auto; 
        gap: 10px 20px; /* Vertical 10px, Horizontal 20px */
      }
      
      .location-info {
        /* To ensure h1 and link stay inline */
        display: flex;
        align-items: baseline;
        gap: 10px;
      }
      
      .location-info h1 {
        font-size: 1.2em;
        margin: 0;
        display: inline;
      }
      
      .change-link {
        font-size: 0.9em;
        color: #005a6a;
        text-decoration: none;
      }
      
      /* Fuel Chips Styling */
      .fuel-chips {
        display: flex;
        gap: 10px;
        flex-grow: 1; 
        overflow-x: auto; 
        padding-bottom: 2px;
      }
      
      .chip {
        padding: 5px 12px;
        background-color: #e0e0e0;
        border-radius: 20px;
        font-size: 0.85em;
        cursor: pointer;
        transition: background-color 0.2s, color 0.2s;
        white-space: nowrap;
      }

      /* Update .chip to handle anchor tags gracefully */
      /* 1. Base State: Remove underline and force dark text */
      a.chip {
        text-decoration: none !important; /* Kill the underline */
        color: #333 !important;           /* Kill the link blue */
        display: inline-block;            /* Ensure padding/shape works correctly */
      }

      /* Ensure the hover state works for links too */
      a.chip:hover {
        text-decoration: none !important;
        color: #333 !important;
      }
      
      .chip.selected {
        background-color: #005a6a;
        color: white !important;
        font-weight: bold;
      }
      
      /* --- FILTER BUTTON STYLES (Global/Desktop) --- */
      .filter-container {
        flex-shrink: 0; 
        display: flex; 
        gap: 10px; 
      }
      
      /* Brand Filter Button Styling */
      #brand-filter-button {
        padding: 5px 15px;
        background-color: #008744; 
        color: white;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-size: 0.85em;
        font-weight: bold;
        transition: background-color 0.2s;
        white-space: nowrap;
      }
      #brand-filter-button:hover {
        background-color: #005a6a; 
      }
      
      /* Island Filter Button Styling */
      #island-filter-button {
        padding: 5px 15px;
        background-color: #005a6a;
        color: white;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-size: 0.85em;
        font-weight: bold;
        transition: background-color 0.2s;
        white-space: nowrap;
      }
      
      #island-filter-button.active {
        background-color: #008cba; 
      }
      
      /* NEW: VIEW TOGGLE BUTTON STYLING */
      #view-toggle-button {
        padding: 5px 15px;
        background-color: #ff9900; 
        color: white;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-size: 0.85em;
        font-weight: bold;
        transition: background-color 0.2s;
        white-space: nowrap;
      }
      #view-toggle-button:hover {
        background-color: #cc7a00;
      }
      
      
      /* --- MAIN CONTENT LAYOUT (MOBILE BASE) --- */
      .main-content-wrapper {
        height: calc(100vh - 110px); 
        overflow-y: auto;
        display: block; /* Ensure it's not flex by default */
        padding-bottom: 0; 
      }
      
      .map-container {
        /* Base mobile height for when it's explicitly shown on mobile */
        height: 300px; 
        background-color: transparent;
        margin-bottom: 20px; 
        position:relative;
      }
      
      .map-container .map-loading-overlay {
        /* 1. Positioning: Ensure it covers the entire map container */
        position: absolute; 
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        
        /* 2. Layering: Force it above all Leaflet elements (CRITICAL) */
        z-index: 10000; 
        
        /* 3. Initial State: Hide it by default when .is-loading is absent */
        display: none; 
        /* (Your existing .map-container.is-loading .map-loading-overlay: display: flex; will override this) */
      }
      .map-loading-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(255, 255, 255, 0.7); /* Light transparent background */
        display: none; /* Hidden by default */
        justify-content: center;
        align-items: center;
        z-index: 100; /* Must be above the map tiles */
      }
      
      .map-loading-overlay .spinner {
        border: 6px solid rgba(0, 0, 0, 0.1);
        border-top: 6px solid #005a6a; /* Use your brand color */
        border-radius: 50%;
        width: 50px;
        height: 50px;
        animation: spin 1s linear infinite;
      }
      
      /* 4. Trigger class to show the spinner */
      .map-container.is-loading .map-loading-overlay {
        display: flex; /* Show the overlay when loading */
      }
      
      
      
      #map {
        height: 100%;
        width: 100%;
        /* Ensure no default padding is inherited, adjusted in media query */
        padding: 0; 
        box-sizing: border-box; 
      }
      
      .main-container {
        /* This creates the list's default gutters */
        padding: 20px;
      }
      
      .scroll-buffer {
        height: 60px; 
        width: 100%;
        display: none; 
      }
      
      /* Station Card Styling (unchanged) */
      .station-card {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px;
        margin-bottom: 10px;
        border: 1px solid #ddd;
        border-left: 6px solid;
        border-radius: 4px;
        cursor: pointer;
        transition: background-color 0.2s;
      }
      
      .station-card:hover {
        background-color: #f0f8ff; 
      }
      
      .station-card.selected {
        background-color: #e6f7ff; 
        border-color: #007bff; 
        box-shadow: 0 0 8px rgba(0, 123, 255, 0.3);
      }
      
      .price-info {
        flex-shrink: 0; 
        width: 100px; 
        text-align: right;
        padding-right: 15px;
        border-right: 1px solid #eee;
      }
      .price {
        font-size: 1.8em;
        font-weight: bold;
      }
      .update-time {
        font-size: 0.75em;
        color: #777;
      }
      
      .details-info {
        flex-grow: 1;
        padding: 0 15px;
      }
      .station-name {
        font-size: 1em;
        margin: 0 0 5px 0;
        color: #005a6a;
      }
      .address-line {
        font-size: 0.85em;
        color: #555;
        margin: 0;
      }
      
      .direction-button {
        flex-shrink: 0;
        padding: 8px 10px;
        background-color: #008744;
        color: white;
        text-decoration: none;
        border-radius: 4px;
        font-size: 0.8em;
        font-weight: bold;
      }
      
      .loading-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 40px 0;
        color: #777;
      }
      .spinner {
        border: 4px solid rgba(0, 0, 0, 0.1);
        border-top: 4px solid #005a6a; 
        border-radius: 50%;
        width: 40px;
        height: 40px;
        animation: spin 1s linear infinite;
        margin-bottom: 15px; 
      }
      @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
      }
      .loading-message, .no-results-message {
        font-size: 1.1em;
        color: #555;
      }
      
      #clear-focus-button {
        display: none; 
        width: 100%;
        padding: 10px;
        margin-bottom: 20px;
        background-color: #007bff;
        color: white;
        border: none;
        border-radius: 4px;
        font-size: 1em;
        cursor: pointer;
        text-align: center;
        transition: background-color 0.2s;
      }
      
      #clear-focus-button:hover {
        background-color: #0056b3;
      }
      
      /* --- BRAND FILTER MODAL STYLES (unchanged) --- */
      .modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        display: none; 
        justify-content: center;
        align-items: center;
        z-index: 2000;
      }
      
      .modal-content {
        background-color: white;
        padding: 20px;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        width: 90%;
        max-width: 400px;
        max-height: 80vh;
        overflow-y: auto;
      }
      
      .modal-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 15px;
        border-bottom: 1px solid #eee;
        padding-bottom: 10px;
      }
      
      .modal-header h3 {
        margin: 0;
        font-size: 1.2em;
        color: #005a6a;
      }
      
      .close-button {
        background: none;
        border: none;
        font-size: 1.5em;
        cursor: pointer;
        color: #555;
      }
      
      .brand-list {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
        margin-bottom: 20px;
      }
      
      .brand-checkbox-container {
        display: flex;
        align-items: center;
        cursor: pointer;
        padding: 5px;
        border-radius: 4px;
        transition: background-color 0.1s;
      }
      
      .brand-checkbox-container:hover {
        background-color: #f5f5f5;
      }
      
      /* Target both checkboxes and radio buttons */
      .brand-checkbox-container input {
        margin-right: 8px;
        accent-color: #008744; 
        transform: scale(1.2); /* Make them slightly easier to tap */
      }
      
      .modal-actions {
        display: flex;
        justify-content: space-between;
        gap: 10px;
      }
      
      .modal-button {
        padding: 10px 15px;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-weight: bold;
        flex: 1;
      }
      
      #apply-filters-button {
        background-color: #008744;
        color: white;
      }
      
      #clear-filters-button {
        background-color: #f0f0f0;
        color: #333;
      }
      
      
      /* --- MOBILE MEDIA QUERY (HAMBURGER MENU & TWO-ROW CONTROLS) --- */
      @media (max-width: 799px) {
        
        /* 1. Hamburger Menu Logic */
        .nav-links { display: none; }
      
        #hamburger-menu, #close-menu {
          display: block; /* Ensure it's visible again! */
          background: none; 
          border: none;
          color: white; 
          cursor: pointer;
          font-size: 1.5em; 
          padding: 0;
        }


        #close-menu {
          display: block;
          
          /* Positioning: Pin to top right of the open menu */
          position: absolute;
          top: 15px;
          right: 15px;
          
          /* Visuals */
          background: transparent;
          border: none;
          cursor: pointer;
          padding: 10px; /* Increases touch target size without changing icon size */
          z-index: 2001; /* Ensure it is above the menu background */
          
          /* Interaction */
          opacity: 0.8;
          transition: opacity 0.2s, transform 0.2s;
        }

        #close-menu:active {
          opacity: 1;
          transform: scale(0.95); /* Slight press effect */
        }        
      
        .header {
          height: 45px !important; /* Practical compact height */
          padding: 5px 20px !important; /* Reduced padding */
        } 
      
        .logo {
          min-height: 0 !important;
          align-self: center !important;
        }   
      
        body.menu-is-open #hamburger-menu { display: none; } 
        #close-menu { display: block; } 
      
        .nav-links.is-open {
          /* Layout: Flex column for vertical list */
          display: flex;
          flex-direction: column;
          align-items: center;
          justify-content: flex-start;
          
          /* Positioning: Break out of the header and cover the screen */
          position: fixed;
          top: 0;
          right: 0;
          width: 50%;
          height: 100dvh; /* Use dynamic height */
          
          /* Visuals */
          background-color: #005a6a; /* Match your brand color */
          padding-top: 60px; /* Push links down so they don't hit the Close button */
          z-index: 2000; /* Ensure it sits on top of EVERYTHING */
          box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
      
          
          /* Animation (Optional but nice) */
          transform: translateX(0);
          transition: transform 0.3s ease-in-out;
        }
      
        /* Style the links inside the menu for touch targets */
        .nav-links.is-open a {
          font-size: 1.2rem;
          padding: 15px;
          width: 100%;
          text-align: center;
          border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Subtle separator */
        }
        .nav-links.is-open a:first-of-type {
          border-top: 1px solid rgba(255, 255, 255, 0.1); /* Matches your bottom borders */
        }
        .nav-links:not(.is-open) { 
          transform: translateX(100%); 
          display: none; 
        }
        
        
        /* 2. Controls Tier Layout (4 rows on mobile) */
        
        .controls-tier {
          /* NEW: Reduced top/bottom padding to gain map space */
          padding: 5px 20px 5px 20px;
        }
      
        .location-info { flex-basis: 100%; order: 1; padding: 2px 0; }
        .fuel-chips { display: flex; flex-basis: 100%; order: 2; }
        
        /* FIX: Filter Container now holds the remaining two buttons (Order 3) */
        .filter-container { 
          display: flex; 
          flex-grow: 1; 
          justify-content: space-between; 
          order: 3; /* MOVED UP: To sit under chips */
          flex-basis: 100%; 
          /* REDUCED MARGIN to gain space */
          margin-bottom: 3px; 
        }
      
        /* NEW: Island Button Styling (Block element, Order 4) */
        #island-filter-button {
          position: static;
          bottom: auto; 
          left: auto; 
          z-index: auto; 
          
          /* Visual Styling: Back to a solid block button for the controls tier */
          background-color: #005a6a;
          color: white;
          border: none; /* Removed border */
          border-radius: 4px; /* Consistent rounded corners */
          
          /* Size & Text */
          width: 100%; 
          order: 4; /* MOVED DOWN: To sit at the bottom of the controls tier */
          padding: 6px 15px;
          font-size: 0.9em;
          font-weight: bold;
          box-sizing: border-box;
          cursor: pointer;
          
          /* Reset layout properties from previous location, use new tight margin */
          display: block;
          flex-grow: unset;
          /* REDUCED MARGIN to gain space */
          margin: 3px 0 3px 0;
        }
      
        /* Active state (when filtering is ON) */
        #island-filter-button.active {
          background-color: #008cba;
          color: white;
          border-color: #005a6a;
        }
      
        /* FIX: Adjust button sizing - applies only to Brand and View Toggle */
        #view-toggle-button, #brand-filter-button {
          flex-grow: 1;
          /* Use consistent padding for a cleaner look */
          padding: 8px 5px; 
          font-size: 0.9em;
          margin: 0 5px; 
        }
        
        /* 3. Mobile View Switching Logic (GUTTERS AND WHITESPACE) */
        
        .main-content-wrapper {
          /* CRITICAL CHANGE: Reduced subtraction from 300px to 250px to make map taller */
          height: calc(100vh - 210px); 
          height: calc(100dvh - 210px);
          overflow-y: hidden; 
          padding-bottom: 50px; 
          box-sizing: border-box;
        }
        
        /* Map State (body.map-view) - Map is visible, List is hidden */
        body.map-view .main-container {
          display: none; 
        }
        
        body.map-view .map-container {
          display: block; 
          height: 100%;
          margin: 0; 
          padding: 20px 20px 20px 20px;
          box-sizing: border-box;
          background-color: transparent;
        }
        
        body.map-view #map {
          height: calc(100% - 20px);
          width: 100%;
          padding: 0;
        }
      
        /* List State (body.list-view) - List is visible, Map is hidden */
        body.list-view .main-container {
          display: block; 
          overflow-y: auto; 
          height: 100%;
        }
        
        body.list-view .map-container {
          display: none; 
        }
        
        /* Update button text based on current state */
        body.list-view #view-toggle-label::before {
          content: "Map View";
        }
        body.map-view #view-toggle-label::before {
          content: "List View"; 
        }
      }
      
      
      /* --- DESKTOP MEDIA QUERY (MAIN LAYOUT) --- */
      @media (min-width: 800px) {
        
        .main-content-wrapper {
          /* CORRECTED: Desktop uses flex layout and min-height */
          display: flex;
          height: calc(100vh - 110px); 
          min-height: calc(100vh - 110px); 
          overflow-y: hidden; 
          padding-bottom: 50px;
        }
        
        /* Hide the view toggle button on desktop (since both are visible side-by-side) */
        #view-toggle-button {
          display: none;
        }
        
        /* Keep desktop fuel chips visible and next to location */
        .fuel-chips {
          display: flex;
        }
        
        /* Ensure the location info and filters are back in a single row on desktop */
        .controls-tier {
          flex-wrap: nowrap;
          height: 40px;
        }
        
        .main-container {
          /* Ensure display is block/flex on desktop, overriding mobile hide */
          display: block; 
          width: 40%;
          max-width: 500px;
          padding: 20px; 
          height: 99.9%; 
          overflow-y: auto; 
          border-right: 1px solid #ddd;
        }
        
        .scroll-buffer {
          display: block; 
        }
        
        .map-container {
          /* Ensure display is block on desktop, overriding mobile hide */
          display: block;
          flex: 1; 
          height: 100%; 
          margin-bottom: 0; 
          padding: 20px 20px 20px 0; 
          box-sizing: border-box; 
          position: relative;
        }
        
        #map {
          height: calc(100% - 40px);
          padding: 15px 12px;
          box-sizing: border-box; 
          width: 100%;
          border: 1px solid #ccc; 
          border-radius: 4px; 
        }
      }
      
      /* =========================================
      LIVE SEARCH STYLES 
      ========================================= */
   
   /* Wrapper handles the positioning of the dropdown */
   .live-search-wrapper {
     position: relative; 
     width: 100%;
     max-width: 500px; /* Limit width */
     margin: 0 auto; /* Center it */
   }
   
   /* Updated Input Styling (No button attached) */
   .main-search-input {
     width: 100%;
     padding: 15px 20px 15px 45px; /* Left padding for spinner */
     font-size: 1.1rem;
     border: 2px solid #ddd;
     border-radius: 30px; /* Full rounded pill */
     outline: none;
     box-shadow: 0 4px 10px rgba(0,0,0,0.05);
     transition: all 0.2s;
     box-sizing: border-box;
   }
   
   .main-search-input:focus {
     border-color: #005a6a;
     box-shadow: 0 6px 15px rgba(0,90,106, 0.15);
   }
   
   /* Near Me Link Styling */
   .near-me-link {
     color: #008744;
     font-weight: bold;
     text-decoration: none;
     border-bottom: 2px solid #e6f4ea;
     font-size: 1.1em;
   }
   .near-me-link:hover {
     background-color: #e6f4ea;
     border-bottom-color: #008744;
   }
   
   /* Loading Spinner (Inside Input) */
   .search-spinner {
     position: absolute;
     left: 15px;
     top: 50%;
     transform: translateY(-50%);
     width: 20px;
     height: 20px;
     border: 3px solid #f3f3f3;
     border-top: 3px solid #005a6a;
     border-radius: 50%;
     animation: spin 0.8s linear infinite;
     z-index: 10;
   }
   
   /* Dropdown Container */
   .search-results-dropdown {
     position: absolute;
     top: 100%; /* Directly below input */
     left: 0;
     right: 0;
     margin-top: 8px; /* Slight gap */
     background: white;
     border-radius: 12px;
     box-shadow: 0 10px 25px rgba(0,0,0,0.15);
     border: 1px solid #eee;
     z-index: 1000;
     overflow: hidden; /* Clips corners */
     text-align: left; /* Reset text align */
     max-height: 300px; /* Scrollable if too many results */
     overflow-y: auto;
   }
   
   /* Individual Result Item */
   .search-result-item {
     padding: 12px 20px;
     cursor: pointer;
     border-bottom: 1px solid #f5f5f5;
     display: flex;
     justify-content: space-between;
     align-items: center;
     transition: background 0.1s;
   }
   
   .search-result-item:last-child {
     border-bottom: none;
   }
   
   .search-result-item:hover {
     background-color: #f0f8ff; /* Lightest blue */
   }
   
   /* "No Results" state */
   .search-result-item.no-hover {
     cursor: default;
     color: #777;
     justify-content: center;
   }
   .search-result-item.no-hover:hover {
     background-color: white;
   }
   
   /* Text inside result */
   .result-name {
     font-weight: 600;
     color: #333;
   }
   
   .result-sub {
     font-size: 0.85em;
     color: #888;
   }

/* ==========================================================================
   2. HOMEPAGE SPECIFIC STYLES (Appended to correct layout)
   ========================================================================== */

/* Reset the "App" layout for the Homepage only */
body.home-view {
    overflow-y: auto !important; /* Allow scrolling on homepage */
    height: auto !important;
    background-color: white;
}

/* DEFAULT (DESKTOP) HOMEPAGE LAYOUT
   Centered horizontally, starts 15vh from the top 
*/
body.home-view .main-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    
    /* CHANGE 1: Stop forcing it to the middle */
    justify-content: flex-start; 
    
    /* CHANGE 2: Push it down by 15% of the screen height */
    padding-top: 15vh; 

    min-height: calc(100vh - 80px); 
    height: auto !important; 
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 20px;
    background: radial-gradient(circle at top, #f8fcfb, #ffffff);
}

/* Hero Typography */
.hero-container {
    width: 100%;
    max-width: 700px;
    text-align: center;
    margin-bottom: 50px;
}

.hero-title {
    color: #005a6a; /* Your Brand Teal */
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.hero-subtitle {
    color: #555;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.hero-subtitle a {
    color: #008744; /* Your Brand Green */
    text-decoration: none;
    font-weight: bold;
    border-bottom: 2px solid #e6f4ea;
    transition: all 0.2s;
}

.hero-subtitle a:hover {
    background-color: #e6f4ea;
    border-bottom-color: #008744;
}

/* Search Box Container */
.search-box-container {
    margin-bottom: 40px;
}

/* Recent Searches */
.recent-searches-container h3 {
    font-size: 0.9rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

/* Helper to center your existing .fuel-chips flex container */
.justify-center {
    justify-content: center;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

/* Helper text below search box */
.search-hint-text {
    font-size: 0.85rem; 
    color: #888;         
    margin-top: 10px;    
    margin-bottom: 0;
}
.search-hint-text strong {
    color: #005a6a;
}


/* ==========================================================================
   3. MOBILE SPECIFIC HOMEPAGE OVERRIDES
   ========================================================================== */

/* TIGHT SPACING OVERRIDE (Blade @mobile class) 
   Applied via Blade @mobile directive in welcome.blade.php
   Overrides the 15vh desktop padding with fixed 20px
*/
body.home-view .main-content-wrapper.mobile-padding {
    padding-top: 20px !important; 
    justify-content: flex-start !important; 
}

/* Standard Mobile Text Adjustments */
@media (max-width: 600px) {
    /* 1. Tight Text Spacing */
    .hero-title { font-size: 1.8rem; line-height: 1.2; margin-bottom: 10px; padding: 0 10px; }
    .hero-subtitle { font-size: 1rem; margin-bottom: 15px; }
    
    /* 2. Container Adjustment */
    .hero-container { width: 100%; max-width: 100%; padding: 0; }
    
    /* 3. Dropdown sizing - Ensure it fits above keyboard */
    .search-results-dropdown { max-height: 200px; }


    /* 1. Reduce overall card padding to buy horizontal space */
      .station-card {
        padding: 10px; /* Was 15px */
      }

      /* 2. Slim down the Price Column (100px is too wide for mobile) */
      .price-info {
          width: 75px; /* Reduced from 100px */
          padding-right: 8px; /* Reduced gap */
      }

      /* 3. Scale down the Price Text slightly */
      .price {
          font-size: 1.5em; /* Was 1.8em */
      }

      /* 4. Compact the "Get Directions" button */
      .direction-button {
          padding: 6px 8px; /* Smaller touch padding */
          font-size: 0.75em; /* Slightly smaller text */
          white-space: nowrap; /* Ensure it never breaks onto two lines */
      }

      /* 5. Ensure the middle text section behaves nicely */
      .details-info {
          padding: 0 8px; /* Reduce side padding */
          /* Crucial: Allows the address to wrap/shrink instead of pushing the button off-screen */
          min-width: 0; 
      }    
}