<style>
        /* ****** Font and Typography Styling ****** */
        body {
            font-family: 'Poppins', sans-serif;
            /* Removed margin-bottom as footer is no longer fixed */
        }

        /* 1. Ensure the header row aligns items vertically for better centering */
        .mdl-layout__header-row {
            align-items: center;
        }

        /* Make main titles more prominent */
        .mdl-layout__header-row .mdl-layout-title {
            font-weight: 700; 
            font-size: 1.8em; 
            display: flex;
            align-items: center;
        }
        
        /* Styling for the small ".com" part */
        .tld-small {
            font-size: 0.5em; 
            font-weight: 400; 
            margin-left: 2px;
            vertical-align: baseline; 
            position: relative;
            top: 0.4em; 
        }

        /* By default, hide main navigation and profile icon for small screens (Mobile First) */
        .mdl-layout__header-row .mdl-navigation,
        #profile-icon-container {
            display: none;
        }
        
        /* Hide the 3-dots menu on larger screens by default */
        #overflow-menu-container {
            display: none;
        }

        /* Styling for the Post Property Button */
        .post-property-button {
            background-color: white !important; 
            color: #d32f2f !important; 
            font-weight: 700;
        }
        
        /* ****** Drawer Styling - White Background ****** */
        .mdl-layout__drawer {
            background-color: white !important; 
        }
        
        /* ****** UPDATED: Drawer Profile Header Styling ****** */
        .drawer-profile-header {
            /* Retain padding and red background */
            padding: 24px 0 16px; 
            margin-bottom: 0; 
            background-color: #D32F2F; 
            color: white; 
            display: flex;
            flex-direction: column; 
            align-items: center; 
        }
        
        .drawer-profile-header .material-icons {
            font-size: 64px; 
            color: white; 
            margin-bottom: 4px; 
        }
        
        /* NEW: Style for the Welcome Message */
        .welcome-message {
            font-size: 1.1em;
            font-weight: 700;
        }
        
        /* KEY CHANGE 2: Increase Font Size and set MDL Theme Color for Drawer Menu Items */
        .mdl-layout__drawer .mdl-navigation__link {
            /* Set link text color to MDL red theme color */
            color: #D32F2F !important;
            
            /* INCREASE FONT SIZE */
            font-size: 1.1em; 
            font-weight: 600; 

            /* Divider styles */
            border-bottom: 1px solid #eee; 
            padding-top: 14px; 
            padding-bottom: 14px;
            margin: 0 16px; 
            line-height: normal; 
        }
        
        /* Remove border from the last item to keep it clean */
        .mdl-layout__drawer .mdl-navigation__link:last-child {
            border-bottom: none;
        }
        
        /* ********************************************** */
        
        /* ****** Search Bar Styling (UPDATED for Aesthetics) ****** */
        .search-container {
            /* Enhanced Look */
            background-color: white; /* White background */
            padding: 30px 20px; /* Increased padding */
            margin-bottom: 30px; /* More margin below */
            border-radius: 12px; /* Smoother rounded corners */
            /*box-shadow: 0 6px 10px 0 rgba(0,0,0,.1), 0 1px 18px 0 rgba(0,0,0,.08), 0 3px 5px -1px rgba(0,0,0,.15); /* Stronger shadow for lift */
            box-shadow: 0 2px 4px rgba(0,0,0,0.05);
            border: 1px solid #eee; /* Light border */
        }

        .search-container h3 {
            color: #D32F2F; /* Title color */
            margin-top: 0;
            margin-bottom: 25px;
            font-weight: 700;
            text-align: center;
        }

        .search-form {
            display: flex;
            flex-wrap: wrap; 
            gap: 15px;
            align-items: flex-end; 
            /* Added to center the button on larger screens */
            justify-content: space-between; 
        }

        .search-field {
            flex: 1 1 200px; 
        }
        
        /* MDL textfield wrapper is needed for layout, but custom styling overrides behavior */
        .mdl-textfield {
            width: 100%;
            position: relative; 
        }
        
        
        /* NEW FIX: Simple Static Label for Select Fields (No MDL Animation) */
        .custom-select-field {
            /* Position relative is crucial for positioning the label and arrow */
            position: relative;
            padding-top: 18px; /* Space for the label above */
            margin-bottom: 10px; /* Space below the input line */
            width: 100%;
        }

        .custom-select-label {
            position: absolute;
            top: 0; /* Place it at the very top of the padding */
            left: 0;
            /* Label is permanently Primary Red color */
            color: #D32F2F; 
            font-size: 13px;
            font-weight: 500;
            line-height: 18px; /* Match standard line height for labels */
            transition: none; /* No transition needed as color is fixed */
        }

        /* Adjust the select input to fit the new static label */
        .custom-select-field .mdl-textfield__input {
            /* Clear previous margins/paddings that were compensating for floating label logic */
            margin-top: 0; 
            padding-bottom: 5px; 
            
            /* Ensure the text is visible and starts below the label's space */
            padding-top: 5px; 
            width: 100%;
            height: auto; /* Allow height to adjust */
            box-sizing: border-box;
            background-color: transparent;
            
            /* === UPDATED STYLES FOR DISPLAYED DROPDOWN VALUE === */
            color: #333; /* Dark grey for contrast */
            font-size: 1.1em; /* Slightly larger text */
            font-weight: 500; /* Medium weight for readability */
            /* =================================================== */

            -webkit-appearance: none; /* Remove default browser styling for select */
            -moz-appearance: none;
            appearance: none;
            padding-right: 20px; /* Space for a custom dropdown indicator */

            /* === UPDATED: Border restored to 1px Primary Red (reduced weight) === */
            border: none;
            border-bottom: 1px solid #D32F2F; 
            transition: none; 
        }

        /* Ensure the border remains on focus too */
        .custom-select-field .mdl-textfield__input:focus {
            border-bottom: 1px solid #D32F2F; 
            outline: none;
        }

        /* Custom Dropdown Arrow */
        .custom-select-field:before {
            content: '\25BC'; /* Down arrow unicode */
            position: absolute;
            right: 0;
            top: 30px; /* Adjusted top to align with the select box */
            color: rgba(0,0,0,.54);
            font-size: 12px;
            pointer-events: none;
        }

        .search-button-container {
            /* Set a fixed size for the button container on desktop */
            flex: 0 0 200px; 
            /* Added margin-left for centering effect if space allows */
            margin: 0 auto; 
        }

        /* Responsive adjustments for search form */
        @media screen and (min-width: 840px) {
            /* Make the fields take slightly less than 1/4 of the width to accommodate gap */
            .search-field {
                flex: 1 1 calc(25% - 15px);
            }
            /* The button container gets its own row space, centered */
            .search-button-row {
                width: 100%;
                display: flex;
                justify-content: center; /* Center the button container horizontally */
                margin-top: 15px;
            }
            .search-button-container {
                flex: 0 0 200px; /* Fixed width for button */
                margin: 0; /* Remove auto margin when placed in centered row */
            }
        }
        
        /* Ensure the search button takes full width on small screens and is not centered */
        @media screen and (max-width: 839px) {
            .search-field, .search-button-container {
                flex: 1 1 100%; /* Full width on small screens */
            }
            .search-button-row {
                width: 100%;
                margin-top: 15px;
            }
            .search-button-container {
                margin: 0; /* Full width button should not be auto-margined */
            }
        }
        
        /* ****** NEW: Three-Column Layout Styles (Flexible 1:4:1 Ratio) ****** */
        .three-column-layout {
            display: flex;
            /* --- UPDATED: Reduced gap between columns for desktop/tablet --- */
            gap: 15px; 
            padding-top: 20px; /* Add some space above the columns */
            padding-bottom: 20px;
        }

        .column-panel {
            background-color: white;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.05);
            border: 1px solid #eee;
        }

        /* Mobile First: Hide sidebars and make center content full width */
        .sidebar-left, .sidebar-right {
            display: none; /* Hidden on small/medium screens */
        }
        .main-content-center {
            /* Full width when sidebars are hidden */
            flex: 1 1 100%; 
            max-height: none; /* Reset max-height on mobile */
            overflow-y: visible;
        }
        
        /* Responsive stacking for mobile */
        @media screen and (max-width: 840px) {
            .three-column-layout {
                flex-direction: column; /* Stack columns vertically */
                /* --- UPDATED: Reduced vertical gap for mobile stack --- */
                gap: 10px;
            }
        }
        
        /* Desktop/Large Screen (>= 840px): Show sidebars and apply 1:4:1 ratio */
        @media screen and (min-width: 840px) {
            /* Restore row layout */
            .three-column-layout {
                flex-direction: row;
            }
            
            /* Show sidebars and set their 1-unit flex */
            .sidebar-left, .sidebar-right {
                display: block; 
                flex: 1; 
                overflow: hidden; 
                max-width: 20%; 
            }
            /* Set main content to 4-unit flex and restore internal scroll */
            .main-content-center {
                flex: 4; 
                /* Increased max-height for center column */
                max-height: 350vh; 
                overflow-y: auto; 
            }
        }
        /* ****** END: Three-Column Layout Styles ****** */

        /* ****** NEW: Ad Box Styles ****** */
        .ad-box {
            background-color: #f0f0f0; /* Light grey background for contrast */
            border: 1px dashed #D32F2F; /* Dashed border for visual cue */
            color: #555;
            text-align: center;
            font-size: 0.9em;
            font-weight: 600;
            margin-bottom: 15px; /* Space between ads */
            padding: 15px 10px;
            border-radius: 4px;
            line-height: 1.2;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .ad-box-small {
            height: 120px; /* Small ad unit height */
        }
        .ad-box-large {
            height: 250px; /* Taller ad unit height */
        }
        /* ****** END: Ad Box Styles ****** */


        /* ****** NEW: Property List Item Card Styles ****** */
        .property-card {
            display: flex;
            flex-direction: column; /* Stack on mobile */
            background-color: white;
            border: 1px solid #eee;
            border-radius: 8px;
            margin-bottom: 20px;
            overflow: hidden;
            box-shadow: 0 1px 3px rgba(0,0,0,0.08);
        }
        
        @media screen and (min-width: 600px) {
            .property-card {
                flex-direction: row; /* Side-by-side on larger screens */
            }
        }
        
        .card-image {
            /* Fixed width for desktop, full width for mobile */
            width: 100%;
            height: 200px;
            min-width: 200px;
            background-color: #f0f0f0;
            background-size: cover;
            background-position: center;
            display: flex;
            justify-content: center;
            align-items: center;
            font-weight: 600;
            color: #777;
        }

        @media screen and (min-width: 600px) {
            .card-image {
                flex: 0 0 250px; /* Fixed width for image on tablet/desktop */
                height: auto; /* Let content height define it */
            }
        }

        .card-content {
            flex-grow: 1;
            padding: 15px;
            display: flex;
            flex-direction: column;
        }
        
        .card-header {
            display: flex;
            /* Changed to space-between since price is removed, but keeping flex for title/other elements */
            justify-content: space-between; 
            align-items: flex-start;
            margin-bottom: 8px;
        }

        .card-header h4 {
            font-weight: 700;
            color: #333;
            margin: 0;
            font-size: 1.3em;
            line-height: 1.2;
        }
        
        /* MODIFIED: Removed margin-left as price is now in the footer and is aligned right */
        .card-price {
            font-size: 1.5em;
            font-weight: 700;
            color: #D32F2F; /* Red color for price */
            white-space: nowrap; /* Prevent price from wrapping */
        }
        
        .card-location {
            color: #777;
            font-size: 0.9em;
            margin-bottom: 10px;
        }
        
        .card-features {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            padding: 10px 0;
            border-top: 1px solid #eee;
            border-bottom: 1px solid #eee;
        }
        
        .feature-tag {
            background-color: #f7f7f7;
            color: #555;
            padding: 5px 10px;
            border-radius: 4px;
            font-size: 0.85em;
            font-weight: 500;
            display: flex;
            align-items: center;
        }
        
        .feature-tag .material-icons {
            font-size: 16px;
            margin-right: 4px;
            color: #D32F2F;
        }

        .card-footer {
            margin-top: auto; /* Push to the bottom */
            padding-top: 10px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 0.85em;
            color: #999;
        }
        
        /* ****** END: Property List Item Card Styles ****** */

        /* ****** NEW: Pagination Styles ****** */
        .pagination-container {
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 10px 0 0;
            margin-top: 10px; /* Space between last card and pagination */
        }
        
        .pagination-container .mdl-button {
            min-width: 32px; /* Standard button size */
            height: 32px;
            margin: 0 4px;
            font-size: 0.9em;
            font-weight: 600;
            color: #333;
        }
        
        /* Style for the current/active page button */
        .pagination-container .mdl-button.mdl-button--raised.mdl-button--accent {
            color: white;
        }
        /* ****** END: Pagination Styles ****** */

        /* ****** Scrollable Footer Styling ****** */
        .app-footer {
            width: 100%;
            padding: 20px 16px; 
            background-color: #D32F2F; /* Red background */
            color: white;
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 0.9em;
            box-sizing: border-box; 
            margin-top: 40px; 
        }
        
        .footer-links a {
            color: white;
            text-decoration: none;
            margin-left: 15px;
            font-weight: 600;
            transition: opacity 0.3s ease;
        }
        
        .footer-links a:hover {
            opacity: 0.8;
        }
        
        /* Hide links and show only copyright on smaller screens */
        @media screen and (max-width: 600px) {
            .footer-links {
                display: none;
            }
            .app-footer {
                justify-content: center;
                text-align: center;
            }
        }
        /* ************************************ */


        /* ------------------------------------------- */
        /* Custom Styles for Larger Screens (Desktop/Tablet) */
        /* ------------------------------------------- */
        @media screen and (min-width: 840px) {
            /* Show main navigation menu items */
            .mdl-layout__header-row .mdl-navigation {
                display: flex; 
                margin-left: auto;
            }
            
            /* Show the Profile Icon container */
            #profile-icon-container {
                display: flex;
            }

            /* HIDE the 3-dots menu on large screens */
            #overflow-menu-container {
                display: none;
            }

            /* Hide the hamburger/menu icon and sidebar on large screens */
            .mdl-layout__drawer-button,
            .mdl-layout__drawer {
                display: none;
            }
            .mdl-layout__content {
                margin-left: 0 !important;
            }
            
            /* Add margin to the Post Property button */
            #create-button-container {
                margin-right: 15px;
                display: flex;
            }

            /* Menu link styling */
            .mdl-layout__header-row .mdl-navigation__link {
                font-weight: 700; 
                transition: background-color 0.3s ease;
            }
            .mdl-layout__header-row .mdl-navigation__link:hover {
                background-color: rgba(255, 255, 255, 0.1); 
                color: white !important;
            }

            /* Profile Icon Container styling */
            #profile-icon-container {
                align-items: center;
                margin-left: 0; 
                padding: 0; 
                border: none;
                border-radius: 0; 
            }
            #profile-menu-button {
                padding: 0;
                width: 48px; 
                height: 48px;
            }
        }

        /* ------------------------------------------- */
        /* Custom Styles for Smaller Screens (Mobile) */
        /* ------------------------------------------- */
        @media screen and (max-width: 839px) {
            /* Ensure the drawer (sidebar) is visible on small screens */
            .mdl-layout__drawer {
                display: block; 
            }
            
            /* Align the 'Post Property' button on small screens */
            #create-button-container {
                margin-left: auto;
                margin-right: 8px; 
                display: flex; 
            }
            
            /* SHOW the 3-dots menu on small screens */
            #overflow-menu-container {
                display: flex;
                align-items: center;
                margin-right: 0;
            }
        }
        
        /* Custom CSS overriding default mdl padding in header row */
        .mdl-layout__header-row
        {
            padding: 0 16px 0 52px; /* default is 0 16px 0 72px */
        }
</style>