body {
  background-color: #f8f9fa;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

h2 {
  font-weight: 700;
  color: #2c3e50;
}

/* --- Listing Card (Legacy/General) --- */
.listing-card {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.listing-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.card-body {
  padding: 15px;
}

.price {
  color: #198754;
  font-weight: 700;
  font-size: 1.2rem;
}

.card-text {
  margin-bottom: 5px;
}

/* --- Topbar --- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 10px 20px;
  margin: 20px auto 30px auto;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  z-index: 10;
  gap: 20px;  
}

.topbar .left a,
.topbar .center button,
.topbar .right button {
  background-color: #00a86b;
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
}

.topbar .left a {
  text-decoration: none;
}

.topbar .login-form input {
  padding: 5px 8px;
  margin-right: 4px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.topbar .user-text {
  margin-right: 10px;
  font-weight: 500;
}

.logout-btn {
  background-color: #ff6464;
}
.topbar .right {
    display: flex;        
    align-items: center;  
    gap: 0.5rem;          
}


/* --- Layout Container (Centered Content) --- */
.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  padding-bottom: 40px; 
}


/* Filters */
.filters form input {
  max-width: 150px;
}

/* Card grid */
.estate-card {
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s;
}

.estate-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

/* Default card image height for desktop */
.card-img-top {
  height: 180px;
  object-fit: cover;
}

/* Login form inputs inline */
.topbar .login-form {
    display: flex;
    align-items: center;
    gap: 5px;
}

.topbar .login-form input {
    padding: 4px 8px;
    height: 30px;
    font-size: 0.85rem;
    margin: 0;
}

.topbar .login-form button {
    white-space: nowrap;
    padding: 4px 10px;
    height: 30px;
    font-size: 0.85rem;
}

/* ===== STORIES CAROUSEL FIXES ===== */
.stories-container h5 {
    font-weight: 600;
}

.stories-scroll {
    overflow-x: hidden; 
    position: relative;
    padding: 10px 0; 
}

.stories-track {
    display: flex;
    gap: 15px;
    white-space: nowrap; 
    animation: scrollStories 20s linear infinite; 
}

.story-card {
    width: 100px; 
    flex-shrink: 0;
    text-align: center;
}

.story-img-wrapper {
    width: 80px; 
    height: 80px;
    border-radius: 50%;
    overflow: hidden; 
    margin: 0 auto 5px auto;
    border: 2px solid #00a86b;
}

.story-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
}

.story-info {
    font-size: 0.75rem;
    white-space: normal;
}

@keyframes scrollStories {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } 
}

/* ========================================================= */
/* ===== FOOTER STYLES ===== */
/* ========================================================= */

.site-footer {
    background-color: #343a40; 
    color: #f8f9fa; 
    padding-top: 40px;
    padding-bottom: 20px;
    font-size: 0.9rem;
}

.site-footer .container {
    max-width: 1200px; 
}

.footer-heading {
    color: #198754; 
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 15px;
    border-bottom: 2px solid rgba(25, 135, 84, 0.5); 
    padding-bottom: 5px;
    display: inline-block;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: #adb5bd; 
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #ffffff; 
    text-decoration: underline;
}

.site-footer .text-muted {
    color: #adb5bd !important;
}

.social-links .social-icon {
    font-size: 1.5rem;
    color: #adb5bd;
    transition: color 0.2s ease;
}

.social-links .social-icon:hover {
    color: #ffffff;
}

.copyright-text {
    font-size: 0.8rem;
    color: #adb5bd;
}

/* ========================================================= */
/* ===== MOBILE RESPONSIVENESS (max-width: 600px) ===== */
/* ========================================================= */

@media (max-width: 600px) {
    /* --- Layout Container --- */
    .page-container {
        padding: 0 10px;
    }
    
    /* --- Card & Image Fix --- */
    /* Reduce the fixed height of the card image */
    .card-img-top {
        height: 120px; /* Reduced from 180px */
    }
    
    /* --- Header (topbar) --- */
    .topbar {
        margin: 10px auto 20px auto;
        padding: 10px 15px;
        border-radius: 5px;
        flex-wrap: wrap; 
        justify-content: center;
        gap: 10px;
    }

    .topbar .left,
    .topbar .center {
        flex-basis: 100%;
        text-align: center;
		gap: 5px;
    }

    .topbar .right {
        flex-basis: 100%;
        display: flex;
        justify-content: center;
		gap: 0.5rem;
        align-items: center;
    }
    
    .topbar .login-form {
        flex-direction: column;
        gap: 5px;
        width: 100%; 
        max-width: 250px; 
    }
    
    .topbar .login-form input,
    .topbar .login-form button {
        width: 100%; 
        height: 35px; 
        font-size: 0.9rem;
    }
    
    /* --- Filter Bar --- */
    .d-flex.justify-content-between.align-items-center.mb-4 {
        flex-direction: column;
        align-items: stretch !important; /* let children take full width */
    }

    #filterForm {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        margin-top: 10px;
        gap: 8px !important;
    }

    #filterForm > * {
        flex: 1 1 auto; /* allow buttons/links to shrink and grow */
        min-width: 0;   /* remove hard min-width to prevent overflow */
    }

    #filterForm button,
    #filterForm a,
    #filterForm .filter-ptype-display {
        flex: 1 1 auto;
        min-width: 0;          /* critical to allow shrinking */
        white-space: nowrap;   /* keep the text on one line */
        overflow: hidden;
        text-overflow: ellipsis; /* shorten overflowing text */
    }

    /* Optional: force label and button in "ptype" to wrap nicely */
    #filterForm .filter-ptype-display span {
        display: inline-block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* --- Card Grid --- */
    /* Force the card column to be full width on mobile (col-12) */
    .row.g-4 > div {
        flex: 0 0 100%; 
        max-width: 100%;
    }
    
    /* --- Footer --- */
    .site-footer .row {
        text-align: center;
    }
    
    .footer-heading {
        margin: 0 auto 15px auto;
    }
    
    .social-links {
        justify-content: center;
        display: flex;
        margin-bottom: 20px;
    }
	
	/* Hide the original table headers */
    .table-responsive table thead {
        display: none;
    }

    /* Make the table body rows behave like stacked blocks (cards) */
    .table-responsive table tbody,
    .table-responsive table tr {
        display: block;
        width: 100%;
    }

    /* Add space between the "card" recommendations */
    .table-responsive table tr {
        margin-bottom: 1rem;
        border: 1px solid #dee2e6; /* Add a border to visually separate */
        border-radius: 0.25rem;
    }
    
    /* Make each cell behave like a block and set up the side-by-side labels */
    .table-responsive table td {
        display: block;
        text-align: right !important; /* Align content to the right */
        padding-left: 50% !important; /* Make space for the pseudo-element label */
        position: relative;
        white-space: normal; /* Allow text to wrap */
        border: none; /* Remove horizontal lines between the stacked data */
    }
    
    /* Use pseudo-elements to display the column headers as labels on the left */
    .table-responsive table td:before {
        content: attr(data-label); /* Content is pulled from a data-label attribute */
        position: absolute;
        left: 0.5rem;
        width: 45%;
        padding-right: 10px;
        text-align: left; /* Align label to the left */
        font-weight: bold;
        color: #495057;
    }

    /* Special adjustment for the 'Feedback' cell to center the buttons */
    .table-responsive table td:last-child {
        text-align: center !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        /* Ensure the feedback buttons don't have a label */
    }
	
	.modal.show .modal-dialog {
		position: fixed;
		bottom: 0;
		margin: 0;
		width: 100%;
		max-width: 100%;
		border-radius: 20px 20px 0 0;
		animation: slideUp 0.3s ease-out;
	  }

	  @keyframes slideUp {
		from {
		  transform: translateY(100%);
		  opacity: 0;
		}
		to {
		  transform: translateY(0);
		  opacity: 1;
		}
	  }

	  .modal-content {
		border-radius: 20px 20px 0 0;
	  }

	  /* Optional: dim background a bit more for mobile */
	  .modal-backdrop.show {
		opacity: 0.7;
	  }
	  
	  /* Target all filter buttons including Location */
	  #filterForm button,
	  #filterForm a,
	  #filterForm .filter-ptype-display {
		max-width: 90vw;          /* Never exceed screen width */
		white-space: nowrap;      /* Keep text on one line */
		overflow: hidden;         /* Hide long text */
		text-overflow: ellipsis;  /* Add "..." if truncated */
	  }

	  /* Make the "Location" filter specifically a bit tighter */
	  button[data-bs-target="#locationModal"] {
		max-width: 85vw;
		font-size: 0.9rem;
		padding: 0.4rem 0.6rem;
	  }

}


/* ========================================================= */
/* ===== SPINNING RADAR STYLES (New Code) ===== */
/* ========================================================= */

.radar-placement {
    /* Center the radar on the page */
    display: flex;
    justify-content: center;
    align-items: center;
    /* Optional: Give it a dark background to make the glow pop */
    /* background-color: #1a1a1a; */
}

:root {
    --radar-green: #00ff41;
    --radar-size: 150px; /* Adjust size here */
    --radar-dark: #001f05;
}

/* ------------------
   The Main Radar Screen and Grid
   ------------------ */
.radar-container {
    position: relative;
    width: var(--radar-size);
    height: var(--radar-size);
    border-radius: 50%;
    
    /* Creates the background pattern with concentric circles and radial lines */
    background: 
        /* Radial lines (like spokes) */
        repeating-conic-gradient(from 0deg, var(--radar-green) 0deg 0.5deg, transparent 0.5deg 45deg),
        /* Concentric circles */
        radial-gradient(circle, transparent 25%, rgba(0,255,65,0.1) 25.5%, transparent 26%, transparent 40%, rgba(0,255,65,0.1) 40.5%, transparent 41%),
        /* Dark inner area */
        var(--radar-dark);
    
    /* Outer ring glow */
    border: 3px solid var(--radar-green);
    box-shadow: 0 0 15px var(--radar-green), inset 0 0 10px var(--radar-green);
    overflow: hidden; 
}

/* ------------------
   The Spinning Fading Wedge (Trailing Fade)
   ------------------ */
.radar-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* Creates the fading wedge shape using a conic gradient */
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        /* Start the fade-in well after the leading edge */
        rgba(0, 255, 65, 0.0) 270deg, 
        /* Gradually increase opacity as we approach the trailing edge */
        rgba(0, 255, 65, 0.4) 300deg,   
        /* The brightest part is at the trailing edge (345-360 degrees) */
        rgba(0, 255, 65, 0.8) 345deg, 
        rgba(0, 255, 65, 0) 360deg      /* Ends transparent to blend with the start */
    );
    
    /* Ensures the conic-gradient is perfectly circular */
    -webkit-mask-image: radial-gradient(circle, white 50%, black 50%);
    mask-image: radial-gradient(circle, white 50%, black 50%);
    
    /* Apply the spinning animation */
    animation: spin 3s linear infinite; 
    transform-origin: center center;
}

/* ------------------
   The Animation Definition
   ------------------ */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ------------------
   Optional: Radar 'Blips' (Targets)
   ------------------ */
.blip {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--radar-green);
    box-shadow: 0 0 10px var(--radar-green);
    z-index: 10; /* Ensure blips appear above the wedge */
    animation: pulse 2s infinite alternate; 
}

.blip-1 {
    top: 20%;
    left: 70%;
    animation-delay: 0.5s; 
}

.blip-2 {
    bottom: 40%;
    left: 15%;
    animation-delay: 1.5s;
}

@keyframes pulse {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0.2;
        transform: scale(0.8);
    }
}

/* --- Property Details Page Styles --- */
/* Style for the main property image on the details page */
.property-detail-img {
    width: 100%;
    height: 400px; /* Fixed height for a hero image look */
    object-fit: cover; /* Ensures the image covers the area without distortion */
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

.property-slider-img {
    width: 100%;
    height: 400px; 
    object-fit: contain; 
    background-color: #000; /* Use a dark background to blend with blurred image */
    border-radius: 0;
}

.carousel-item {
    position: relative; /* Needed to position the background layer */
    height: 400px; /* Match the height of the image */
    overflow: hidden; /* Prevent background from extending outside */
    background-color: #000; /* Fallback background */
    border-radius: 0.5rem; /* Apply corner rounding here */
}

.property-slider-bg {
    /* Full coverage and positioning */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Keep it behind the main image */
    object-fit: cover; /* This one *must* cover to fill the background */
    filter: blur(12px) brightness(40%); /* Apply blur and darkness */
    transform: scale(1.1); /* Zoom in slightly to ensure edges are blurred/hidden */
}

/* Re-apply z-index to the main image to ensure it's on top */
.property-slider-img {
    width: 100%;
    height: 400px;
    object-fit: contain; 
    background-color: transparent; /* Make sure the image itself is transparent */
    position: relative; /* Bring this element above the background */
    z-index: 2; 
}

/* Target the previous and next buttons and ensure they are on top of all images. */
.carousel-control-prev,
.carousel-control-next {
    /* Set a high z-index to guarantee clickability. */
    z-index: 10; 
}

/* Style for the grid of key property details */
.details-grid {
    font-size: 1.05rem;
    padding-left: 15px; /* Alignment for the icons */
}

.details-grid strong {
    font-weight: 600;
    color: #34495e; /* Darker text for labels */
}

/* Ensure the contact form input fields look nice */
.card.bg-light input.form-control {
    border: 1px solid #ced4da;
}

/* --- Language Flag Switcher Styles --- */
/* 1. Base style for all flag links */
.language-flag-link {
    display: inline-block;
    /* Transition for smooth visual feedback */
    transition: all 0.2s ease-in-out; 
    border-radius: 3px; /* Match flag shape */
    line-height: 0; /* Important to remove any extra link space */
}

/* Base image styling: slightly desaturate all flags */
.language-flag-link img {
    opacity: 0.6; /* Dim the unselected state */
    filter: grayscale(80%); /* Make it mostly grayscale */
    transition: all 0.2s ease-in-out; 
}

/* 2. Style for the CURRENTLY selected flag */
.language-flag-link.active-lang img {
    opacity: 1; /* Full color */
    filter: none; /* Remove grayscale */
    /* Add a subtle highlight border/shadow */
    box-shadow: 0 0 0 2px #007bff; /* A blue border, use your primary color */
    border-radius: 3px;
    transform: scale(1.1); /* Optional: make it slightly larger */
}

/* 3. Hover effect */
.language-flag-link:hover img {
    opacity: 1; /* Reveal full color on hover */
    filter: none;
}

/* --- Add Estate Page Styling --- */
.card form input[type="file"] {
  border: 1px solid #ced4da;
  background-color: #fff;
  padding: 6px;
  border-radius: 6px;
}

.card form .form-check-input {
  margin-top: 0;
}

.card form .form-text {
  font-size: 0.85rem;
  color: #6c757d;
}

.card form .form-label.fw-bold {
  color: #2c3e50;
}

.card form .btn-success {
  font-size: 1.05rem;
  font-weight: 600;
}

/* Missions and Tasks Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75); /* Darker overlay for better focus */
    z-index: 1050; /* Ensures it's above other Bootstrap elements */
    overflow-y: auto; /* Allows scrolling if the content is long */
}

.modal-overlay .container {
    /* Adds vertical padding for the content inside the overlay */
    padding-top: 40px; 
    padding-bottom: 40px;
}

/* ========================================= */
/* CURRENCY TOGGLE STYLES (USD | GEL)        */
/* ========================================= */

/* Container styling (for the whole block) */
.currency-toggle {
    /* Base look: light background, border, padding */
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 2px 8px;
    cursor: pointer;
    background-color: #f8f9fa;
    user-select: none; /* Prevents text selection on click */
    display: inline-flex; /* Ensures content stays aligned */
    align-items: center;
}

/* Hover feedback for the entire container */
.currency-toggle:hover {
    border-color: #198754; /* Green hover border */
}

/* Base style for the individual currency options */
.currency-option {
    transition: color 0.2s ease, font-weight 0.2s ease;
    /* Important: We need a pointer cursor to indicate these are clickable */
    cursor: pointer;
}

/* Separator style */
.currency-separator {
    color: #adb5bd; /* Subtle gray separator */
    margin: 0 4px;
    font-weight: 400; /* Ensure separator is not bold */
}

/* -------------------- */
/* STATE STYLES         */
/* -------------------- */

/* Inactive State: Subtle and grayed out */
.currency-option.inactive {
    color: #6c757d; /* Darker gray color */
    font-weight: 400; /* Regular font weight */
}

/* Active State: Highlighted Green */
.currency-option.active {
    color: #198754; /* Bootstrap success color (Green) */
    font-weight: 700; /* Bold font weight */
}

/* ===== CTA BANNER STYLE ===== */
.cta-banner {
  background-color: #ffffff;
  border: 1px solid #dee2e6;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.cta-banner a:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .cta-banner {
    font-size: 0.85rem;
    padding: 6px 10px;
  }
}
