.mobile-only {
    display: none;
}

.controls {
    padding: 15px;
    background: white;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 88px;
    /* 44px (nav) + 44px (toggle) */
    z-index: 999;
    height: auto;
}

.school-info {
    padding: 10px;
}

.school-name {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 5px;
}

.school-details {
    font-size: 14px;
    margin-bottom: 3px;
}

select {
    padding: 5px;
    font-size: 14px;
    margin: 5px;
}

label {
    font-weight: bold;
    margin-right: 5px;
}

.search-container {
    display: inline-block;
    margin-right: 20px;
}

.highlight {
    background-color: #FFD700;
}

.container {
    display: flex;
    height: calc(100vh - 104px);
    min-height: 500px;
    margin-bottom: 20px;
    margin-top: 0;
}

.schools-list {
    width: 15%;
    min-width: 200px;
    background: white;
    overflow-y: auto;
    border-right: 1px solid #ccc;
    height: calc(100vh - 220px);
    /* Adjusted to account for header, nav, and controls */
    display: flex;
    flex-direction: column;
    background: white;
    box-shadow: var(--shadow-sm);
}

.schools-search {
    position: relative;
    flex: 1;
}

.schools-search input {
    width: 100%;
    height: 44px;
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: white;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.schools-search input:hover {
    border-color: var(--primary-color);
}

.schools-search input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

.schools-list-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    height: 100%;
    /* Ensure content takes full height */
}

.school-list-item {
    padding: 16px;
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    background: white;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.school-list-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.school-list-item.selected {
    border-left: 4px solid var(--primary-color);
    background: rgba(33, 150, 243, 0.05);
}

.school-header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}

.school-ranking {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.school-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
}

.school-stats {
    margin-top: 8px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.phase-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.phase-stat:last-child {
    margin-bottom: 0;
}

.phase-label {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    min-width: 40px;
    text-align: center;
}

.phase-value {
    color: var(--text-secondary);
}

.phase-value.ballot {
    color: #dc3545;
}

.school-attributes {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.school-attribute {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    background: #f8f9fa;
    color: var(--text-secondary);
}

.school-attribute i {
    font-size: 0.8rem;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.like-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    color: #acacac;
    padding: 5px;
    z-index: 2;
}

.like-btn:hover {
    color: #ff4444;
}

.like-btn.liked {
    color: #ff4444;
}

.distance-control {
    display: none;
}

.liked-properties-btn {
    display: inline-block;
    padding: 5px 10px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}

.liked-properties-btn:hover {
    background: #f5f5f5;
}

.back-btn {
    display: inline-block;
    padding: 5px 10px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    margin-right: 20px;
}

.back-btn:hover {
    background: #f5f5f5;
}

.school-list-item .school-name {
    font-weight: normal;
    margin-bottom: 4px;
}

.school-info .school-name {
    font-weight: normal;
    font-size: 16px;
    margin-bottom: 5px;
}

.property-item.selected {
    background-color: #e3f2fd;
}

.property-item {
    cursor: pointer;
}

.comparison-section {
    padding: 20px;
    background: #fff;
    margin: 0 20px 20px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

.comparison-section h2 {
    margin-bottom: 15px;
    color: #333;
}

.table-container {
    overflow-x: auto;
    margin-bottom: 20px;
    max-width: 100%;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 14px;
}

.comparison-table th,
.comparison-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.comparison-table th {
    background: #f5f5f5;
    font-weight: 600;
    color: #333;
    position: sticky;
    top: 0;
    z-index: 10;
}

.comparison-table tr:hover {
    background-color: #f8f9fa;
}

.comparison-table .action-btn {
    padding: 5px 10px;
    margin: 0 5px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s;
}

.comparison-table .highlight-btn {
    background-color: #4CAF50;
    color: white;
}

.comparison-table .highlight-btn:hover {
    background-color: #45a049;
}

.comparison-table .unlike-btn {
    background-color: #ff4444;
    color: white;
}

.comparison-table .unlike-btn:hover {
    background-color: #cc0000;
}

.comparison-table th {
    cursor: pointer;
    user-select: none;
}

.comparison-table th::after {
    content: '↕';
    margin-left: 5px;
    color: #999;
}

.comparison-table th.sort-asc::after {
    content: '↑';
    color: #333;
}

.comparison-table th.sort-desc::after {
    content: '↓';
    color: #333;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    overflow-y: auto;
    /* Enable vertical scrolling */
    padding: 20px 0;
    /* Add some padding to ensure content doesn't touch edges */
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    /* Changed from percentage to fixed margin */
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: black;
}

.filter-group {
    margin-bottom: 15px;
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.range-inputs {
    display: flex;
    gap: 10px;
    align-items: center;
}

.range-inputs input {
    flex: 1;
}

.modal-body {
    flex: 1;
    padding-right: 10px;
}

.modal-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: right;
    background: #fefefe;
}

#applyFilters {
    padding: 8px 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#applyFilters:hover {
    background-color: #45a049;
}

.filter-btn {
    padding: 8px 16px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.filter-btn:hover {
    background-color: #e9ecef;
}

.filter-count {
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    margin-left: 5px;
    display: none;
}

.filter-count.active {
    display: inline;
}

#clearFilters {
    padding: 8px 16px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
}

#clearFilters:hover {
    background-color: #c82333;
}

/* Modern color scheme and variables */
:root {
    --primary-color: #2196F3;
    --secondary-color: #f5f5f5;
    --text-primary: #333;
    --text-secondary: #666;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --radius-sm: 4px;
    --radius-md: 8px;
}

/* Base styles update */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--text-primary);
    line-height: 1.5;
}

/* Modern input styles */
input,
select {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    transition: all 0.2s ease;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

/* Updated button styles */
button,
.liked-properties-btn,
.back-btn {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: white;
    font-weight: 500;
    transition: all 0.2s ease;
}

button:hover,
.liked-properties-btn:hover,
.back-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

/* Modern card styles */
.property-item {
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.property-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Updated modal styles */
.modal-content {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

/* Modern filter button */
.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.filter-count {
    background: var(--primary-color);
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 500;
}

.school-list-item {
    padding: 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    transition: all 0.2s ease;
}

.school-list-item:hover {
    background: var(--secondary-color);
}

.school-list-item.selected {
    background: rgba(33, 150, 243, 0.1);
    border-left: 3px solid var(--primary-color);
}

/* Properties list modernization */
.properties-header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 16px;
}

.property-details {
    padding: 12px;
}

.detail-row {
    padding: 4px 0;
}

/* Controls modernization */
.controls {
    background: white;
    box-shadow: var(--shadow-md);
    padding: 15px;
    height: 40px;
    display: flex;
    align-items: center;
}

.controls-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.controls-row select,
.controls-row input,
.controls-row button {
    height: 44px;
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: white;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.controls-row select:hover,
.controls-row input:hover,
.controls-row button:hover {
    border-color: var(--primary-color);
}

.controls-row select:focus,
.controls-row input:focus,
.controls-row button:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

/* Schools search container */
.schools-search {
    position: relative;
    flex: 1;
}

.schools-search input {
    width: 200px;
    height: 38px;
    padding: 4px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: white;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.schools-search input:hover {
    border-color: var(--primary-color);
}

.schools-search input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

/* Filter button specific styles */
.filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    background: var(--secondary-color);
}

.filter-btn:hover {
    background: #e9ecef;
}

#schoolSearch {
    width: 100%;
    box-sizing: border-box;
}

/* Mobile adjustments */
@media screen and (max-width: 768px) {
    .controls-row {
        flex-direction: column;
        width: 100%;
    }

    #schoolSearch {
        width: 100%;
        box-sizing: border-box;
    }
}

/* Info tip styling */
.info-tip {
    display: inline-block;
    color: var(--text-secondary);
    cursor: help;
    margin-left: 4px;
    position: relative;
}

.info-tip:hover::after {
    content: attr(title);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 100%;
    padding: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    z-index: 1000;
}

.info-tip:hover {
    color: var(--primary-color);
}

/* Logo styling */
.logo-container {
    gap: 8px;
    display: flex;
    align-items: center;
    padding-right: 24px;
    margin-right: 24px;
    text-decoration: none;
    color: var(--text-primary);
}

/* Logo styling */
.tabs-container {
    display: flex;
    flex-direction: row;
}

.logo {
    height: 60px;
    width: auto;
    margin-right: 15px;
}

.site-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 24px;
    border-right: 1px solid #e0e0e0;
    margin-right: 24px;
}

.website-name {
    font-weight: 600;
    font-size: 20px;
    color: #2196F3;
    white-space: nowrap;
}

.emoji {
    font-size: 24px;
    line-height: 1;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .logo {
        height: 32px;
    }

    .site-title {
        padding-right: 16px;
        margin-right: 16px;
    }
}

/* Properties header styling */
.properties-header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 15px;
    height: 40px;
    display: flex;
    align-items: center;
}

.properties-header h3 {
    margin: 0;
    font-weight: bold;
}

/* Add these new styles */
.nav-tabs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-left,
.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.tab {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    color: #666;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.tab:hover {
    background: #f0f7ff;
    color: #2196F3;
}

.tab.active {
    background: #e3f2fd;
    color: #1976D2;
}

.tab i {
    margin-right: 8px;
    font-size: 16px;
}

.website-name {
    font-weight: 600;
    font-size: 18px;
    /* color: #2196F3; */
}

.language-selector {
    position: relative;
}

.language-selector select {
    appearance: none;
    padding: 8px 32px 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.language-selector select:hover {
    border-color: #2196F3;
}

.language-selector select:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

.language-selector::after {
    content: '▼';
    font-size: 12px;
    color: #666;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Desktop styles */
.nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Hide hamburger and mobile menu by default (desktop) */
.hamburger-menu {
    display: none;
    /* Hide on desktop */
}

.mobile-menu {
    display: none;
    /* Hide on desktop */
}

/* Show desktop navigation items */
.nav-tabs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: white;
    border-bottom: 1px solid var(--border-color);
}

.tabs-container {
    display: flex;
    gap: 16px;
}

/* Mobile styles */
@media screen and (max-width: 768px) {

    /* Show hamburger menu on mobile */
    .hamburger-menu {
        display: block;
        background: none;
        border: none;
        font-size: 24px;
        color: var(--text-primary);
        cursor: pointer;
        padding: 8px;
        margin-left: auto;
    }

    /* Hide desktop navigation */
    .nav-right:not(.mobile-menu) {
        display: none;
    }

    .tabs-container {
        display: none;
    }

    /* Rest of your existing mobile styles... */
}

/* All Media Queries Consolidated */
@media screen and (max-width: 1150px) {

    /* Container layout */
    .container {
        flex-direction: column;
        height: auto;
    }

    .content-wrapper {
        display: flex;
        flex-direction: column;
    }

    /* Schools list */
    .schools-list {
        display: none;
    }

    /* Controls */
    .controls {
        top: 10;
        left: 0;
        right: 0;
        height: auto;
        padding: 20px;
        background: white;
    }

    .controls-row {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    /* Properties list */
    .properties-list {
        width: 100%;
        height: auto;
        position: static;
        border-left: none;
        border-top: 1px solid #ccc;
        margin-top: 0;
    }

    .properties-header {
        margin-top: 0;
        border-top: none;
        padding: 10px;
        background: white;
        position: relative;
        z-index: 1;
    }

    .properties-header h3 {
        margin: 0;
        font-size: 16px;
        font-weight: bold;
    }

    .properties-content {
        max-height: none;
        overflow-y: visible;
        padding: 10px;
    }

    /* Property search */
    .property-search {
        width: 90%;
        margin: 5px auto;
    }

    .property-search input {
        flex: 1;
    }

    /* Mobile elements */
    .mobile-only {
        display: block;
        width: 100%;
        margin: 10px 0;
    }

    /* Dropdowns and buttons */
    #topSchools,
    #schoolSearchMobile,
    .filter-btn,
    .schools-search,
    #propertyType {
        width: 90%;
        margin: 5px auto;
        display: block;
    }

    /* Search results */
    .search-results {
        top: 30%;
        left: 10%;
    }

    /* Filter button */
    .filter-btn {
        width: 90%;
        margin: 10px auto;
        padding: 12px 16px;
        font-size: 16px;
        height: 44px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* Modal content */
    .modal-content {
        width: 95%;
        height: 90vh;
        margin: 5vh auto;
        padding: 15px;
        border-radius: 12px;
        display: flex;
        flex-direction: column;
    }

    .modal-body {
        flex: 1;
        overflow-y: auto;
        padding: 10px 5px;
    }

    .modal-header {
        padding: 10px 0;
        margin-bottom: 10px;
    }

    .modal-header h2 {
        font-size: 18px;
    }

    .filter-group {
        margin-bottom: 15px;
    }

    .filter-group label {
        font-size: 14px;
        margin-bottom: 5px;
    }

    /* Make inputs and selects more touch-friendly */
    .filter-group select,
    .filter-group input {
        height: 44px;
        font-size: 16px;
        padding: 8px 12px;
    }

    .range-inputs {
        gap: 8px;
    }

    .range-inputs input {
        height: 44px;
        font-size: 16px;
    }

    /* Make the apply button more prominent */
    .modal-footer {
        padding: 15px 0 5px 0;
        border-top: 1px solid var(--border-color);
        margin-top: 10px;
    }

    #applyFilters {
        width: 100%;
        height: 44px;
        font-size: 16px;
        margin-top: 10px;
    }
}

@media screen and (max-width: 768px) {

    /* Navigation */
    .nav-tabs {
        padding: 8px 16px;
    }

    .nav-left,
    .nav-right {
        gap: 8px;
    }

    .tab {
        padding: 6px 8px;
        font-size: 14px;
    }

    .tab span {
        display: none;
    }

    .tab i {
        margin-right: 0;
        font-size: 25px;
    }

    /* Logo and branding */
    .logo {
        height: 20px;
    }

    .website-name {
        font-size: 16px;
    }

    /* Language selector */
    .language-btn {
        padding: 6px;
    }

    .current-lang {
        display: none;
    }

    /* Coffee section */
    .coffee-section {
        margin: 20px;
        padding: 30px 20px;
    }

    .coffee-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .coffee-text h1 {
        font-size: 2em;
    }

    .coffee-text p {
        font-size: 1em;
    }

    .qr-container {
        padding: 20px;
    }

    .paynow-qr {
        width: 180px;
        height: 180px;
    }

    /* Agent banner */
    .agent-banner {
        /* flex-direction: column; */
        /* Stack items vertically */
        text-align: center;
        gap: 8px;
        font-size: 0.85rem;
        white-space: normal;
        /* Allow text wrapping */
        overflow-x: visible;
        /* Remove horizontal scroll */
    }

    .contact-btn {
        width: inherit;
        justify-content: center;
        /* Center the button text */
    }

    .agent-banner span {
        line-height: 1.4;
        /* Add some line spacing for readability */
    }
}

@media screen and (max-width: 480px) {
    .nav-tabs {
        flex-direction: column;
        padding: 8px;
    }

    .nav-left {
        width: 100%;
        justify-content: space-between;
        margin-bottom: 8px;
    }

    .nav-right {
        width: 100%;
        justify-content: space-between;
    }

    .logo-container {
        padding-right: 5px;
        margin-right: 5px;
    }

    .tab {
        flex: 1;
        justify-content: center;
    }

    /* Stack navigation on very small screens */
    .nav-tabs {
        flex-direction: column;
        gap: 12px;
    }

    .nav-right {
        width: 100%;
        justify-content: right;
    }

    .tab i {
        margin-right: 0;
        font-size: 18px;
    }

    .website-name {
        display: inline;
    }
}

/* Property detail page styles */
.property-detail-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.property-detail-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.property-detail-header h1 {
    margin: 0;
    flex: 1;
}

.property-detail-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.property-info-section {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 20px;
}

.detail-section {
    margin-bottom: 30px;
}

.detail-section h3 {
    margin-bottom: 15px;
    color: var(--text-primary);
}

/* School Items in Property Details */
.school-item {
    display: flex;
    align-items: flex-start;
    padding: 12px;
    margin: 8px 0;
    background: #f5f5f5;
    border-radius: var(--radius-sm);
    transition: background-color 0.2s;
}

.school-item:hover {
    background: #eee;
}

.school-item i {
    margin-right: 12px;
    color: var(--primary-color);
    margin-top: 3px;
}

.school-info {
    flex: 1;
}

.school-name {
    font-weight: 500;
    margin-bottom: 4px;
}

.school-address {
    font-size: 0.9em;
    color: var(--text-secondary);
}

.school-ranking {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    margin-right: 8px;
    font-size: 0.85em;
}

.no-schools {
    color: var(--text-secondary);
    font-style: italic;
    padding: 12px;
    text-align: center;
    background: #f5f5f5;
    border-radius: var(--radius-sm);
}

/* Property Item Styles */
.property-type {
    color: var(--primary-color);
    font-size: 0.9em;
    margin-bottom: 4px;
}

.property-info {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.top-year {
    background: var(--primary-color);
    color: white;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 0.85em;
}

.tenure {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.property-location,
.property-mrt {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-top: 4px;
}

.property-location i,
.property-mrt i {
    width: 16px;
    color: var(--primary-color);
    margin-right: 4px;
}

/* Map Link Styles */
.map-link {
    color: var(--text-secondary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s;
}

.map-link:hover {
    color: var(--primary-color);
}

.map-link i {
    margin-right: 6px;
}

/* Update property-location styles */
.property-location {
    margin-top: 4px;
}

.property-location .map-link {
    color: var(--text-secondary);
}

.property-location .map-link:hover {
    color: var(--primary-color);
}

/* Update detail-value styles for links */
.detail-value .map-link {
    color: var(--text-secondary);
}

.detail-value .map-link:hover {
    color: var(--primary-color);
}

/* Comparison Table School Styles */
.schools-cell {
    max-width: 300px;
    padding: 10px !important;
}

.school-row {
    padding: 4px 0;
    border-bottom: 1px solid #eee;
}

.school-row:last-child {
    border-bottom: none;
}

.school-ranking {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    margin-right: 8px;
    font-size: 0.85em;
}

/* Update existing table styles */
.comparison-table td {
    vertical-align: top;
    padding: 12px;
}

.mrt-walking-time {
    font-size: 0.9em;
    color: var(--text-secondary);
}

.footer {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 14px;
    margin-top: auto;
    background-color: #f5f5f5;
    border-top: 1px solid #eee;
}

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

.footer a:hover {
    text-decoration: underline;
}

.property-search {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    /* background: #f5f5f5; */
    display: flex;
    align-items: center;
}

.property-search input {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    border-right: none;
}

.search-btn {
    padding: 10px 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn i {
    pointer-events: none;
}

.properties-header {
    padding: 10px;
    background: #f5f5f5;
    border-bottom: 1px solid var(--border-color);
}

.properties-header h3 {
    margin: 0;
}

/* Update mobile styles */
@media screen and (max-width: 1150px) {
    .property-search {
        width: 90%;
        margin: 5px auto;
    }

    .property-search input {
        flex: 1;
    }
}

.phase-label {
    font-weight: 600;
    color: #444;
    background-color: #f0f0f0;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 0.9em;
}

.school-icons {
    margin-top: 8px;
}

.school-icons i {
    margin-right: 8px;
}

/* Specific icon colors */
.school-icons .fa-link {
    color: #FFD700;
    /* Golden color for affiliated schools */
}

.school-icons .fa-mars {
    color: #007bff;
    /* Blue for boys schools */
}

.school-icons .fa-venus {
    color: #dc3545;
    /* Red for girls schools */
}

/* Specific icon colors */
.school-attribute .fa-link {
    color: #FFD700;
    /* Golden color for affiliated schools */
}

.school-attribute .fa-mars {
    color: #007bff;
    /* Blue for boys schools */
}

.school-attribute .fa-venus {
    color: #dc3545;
    /* Red for girls schools */
}

.school-attribute .fa-fire-alt {
    color: #dc3545;
    /* Red for ballot indicator */
}

.school-attribute .fa-language {
    color: #28a745;
    /* Green color for SAP schools */
}

/* Coffee page styles */
.coffee-section {
    max-width: 900px;
    margin: 60px auto;
    padding: 40px;
    /* background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%); */
    /* border-radius: var(--radius-md); */
    /* box-shadow: var(--shadow-md); */
    position: relative;
    overflow: hidden;
}

.coffee-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    /* background: linear-gradient(90deg, var(--primary-color), #34c3ff); */
}

.coffee-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 50px;
    align-items: center;
}

.coffee-text {
    position: relative;
}

.coffee-text h1 {
    margin: 0 0 24px 0;
    color: var(--text-primary);
    font-size: 2.5em;
    font-weight: 700;
    line-height: 1.2;
    background: linear-gradient(90deg, var(--text-primary), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.coffee-text p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 1.1em;
}

.coffee-text strong {
    color: var(--primary-color);
    font-weight: 600;
}

.qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 30px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.paynow-qr {
    width: 220px;
    height: 220px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    padding: 10px;
    background: white;
    transition: transform 0.3s ease;
}

.qr-label {
    font-size: 1.1em;
    color: var(--text-primary);
    font-weight: 500;
    text-align: center;
}

.coffee-emoji {
    font-size: 2em;
    margin-bottom: 10px;
}

/* Mobile responsive styles */
@media screen and (max-width: 768px) {
    .coffee-section {
        margin: 20px;
        padding: 30px 20px;
    }

    .coffee-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .coffee-text h1 {
        font-size: 2em;
    }

    .coffee-text p {
        font-size: 1em;
    }

    .qr-container {
        padding: 20px;
    }

    .paynow-qr {
        width: 180px;
        height: 180px;
    }
}

/* Animation for QR code */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.qr-container {
    animation: float 6s ease-in-out infinite;
}

/* Hover effects */
.coffee-section:hover::before {
    background: linear-gradient(90deg, #34c3ff, var(--primary-color));
}

.property-name.hover-effect {
    position: relative;
    text-decoration: none;
    color: #333;
    transition: color 0.3s ease;
}

.property-name.hover-effect:hover {
    color: #007bff;
}

.property-name.hover-effect::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #007bff;
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease;
}

.property-name.hover-effect:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Font imports */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700&display=swap');

/* Base font settings */
:root {
    --font-en: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-zh: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
}

/* Default font for English */
html[lang="en"] body {
    font-family: var(--font-en);
    font-feature-settings: 'liga' 1, 'calt' 1;
    /* Enable ligatures for better readability */
}

/* Default font for Chinese */
html[lang="zh"] body {
    font-family: var(--font-zh);
    letter-spacing: 0.025em;
    /* Slightly increase spacing for Chinese characters */
}

/* Mixed language optimizations */
.website-name {
    font-family: var(--font-en);
}

html[lang="zh"] .website-name {
    font-weight: 700;
    /* Bolder weight for Chinese */
}

/* Numeric content always in English font */
.school-ranking,
.mrt-walking-time,
.detail-value {
    font-family: var(--font-en);
}

/* Navigation specific font adjustments */
.nav-tabs {
    font-family: var(--font-en);
}

html[lang="zh"] .nav-tabs {
    font-family: var(--font-zh);
}

/* Form elements font consistency */
input,
select,
button {
    font-family: inherit;
}

/* Add this style for the liked properties tab heart icon */
#likedPropertiesTab i.fa-heart {
    color: #ff4444;
}

/* Optional: Add hover effect */
#likedPropertiesTab:hover i.fa-heart {
    color: #cc0000;
}

.agent-banner {
    background: #f8f9fa;
    border-bottom: 1px solid var(--border-color);
    padding: 8px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.agent-banner i {
    color: var(--primary-color);
    flex-shrink: 0;
    /* Prevent icon from shrinking */
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #25D366;
    /* WhatsApp green */
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: all 0.2s ease;
    flex-shrink: 0;
    /* Prevent button from shrinking */
    white-space: nowrap;
    /* Keep button text on one line */
}

.contact-btn:hover {
    background: #128C7E;
    transform: translateY(-1px);
    color: white;
}

/* Remove the old language selector styles */
.language-selector {
    position: relative;
}

.language-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    padding: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    -webkit-appearance: none;
    /* Remove default arrow in Safari */
    -moz-appearance: none;
    /* Remove default arrow in Firefox */
    appearance: none;
    /* Remove default arrow */
}

.language-btn:hover {
    color: var(--primary-color);
}

.language-btn i {
    font-size: 1.1rem;
}

.current-lang {
    font-weight: 500;
    text-transform: uppercase;
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    display: none;
    min-width: 120px;
    z-index: 1000;
    -webkit-appearance: none;
    /* Remove default arrow in Safari */
    -moz-appearance: none;
    /* Remove default arrow in Firefox */
    appearance: none;
    /* Remove default arrow */
}

.language-selector:hover .language-dropdown {
    display: block;
}

.language-option {
    display: block;
    padding: 8px 16px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.language-option:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
}

/* Add a subtle divider between options */
.language-option:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

/* Mobile responsive adjustments */
@media screen and (max-width: 768px) {
    .language-btn {
        padding: 6px;
    }

    .current-lang {
        display: none;
    }
}

.about-section {
    max-width: 900px;
    margin: 60px auto;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.about-content {
    display: grid;
    gap: 50px;
    align-items: start;
}

.about-text {
    position: relative;
}

.about-text h1 {
    margin: 0 0 24px 0;
    color: var(--text-primary);
    font-size: 2.5em;
    font-weight: 700;
    line-height: 1.2;
    background: linear-gradient(90deg, var(--text-primary), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.about-text p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 1.1em;
}

.about-text strong {
    color: var(--primary-color);
    font-weight: 600;
}

.cta-section {
    margin-top: 40px;
    padding: 24px;
    background: #f8f9fa;
    border-radius: var(--radius-md);
    text-align: center;
}

.cta-section p {
    margin-bottom: 16px;
    font-weight: 500;
}

/* Mobile responsive styles */
@media screen and (max-width: 768px) {
    .about-section {
        margin: 20px;
        padding: 20px;
    }

    .about-text h1 {
        font-size: 2em;
    }

    .about-text p {
        font-size: 1em;
    }

    .cta-section {
        padding: 20px;
    }
}

/* Bilingual text styling */
.bilingual-text {
    margin-bottom: 30px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: var(--radius-md);
}

.bilingual-text p {
    margin: 0;
    padding: 10px 0;
}

.bilingual-text p:first-child {
    border-bottom: 1px solid var(--border-color);
}

/* Language specific styles */
.en {
    font-family: var(--font-en);
}

.zh {
    font-family: var(--font-zh);
}

/* Contact button language display */
.contact-btn span {
    display: inline-block;
}

.contact-btn span:not(:last-child)::after {
    content: ' | ';
    margin: 0 5px;
}

/* Mobile responsive adjustments */
@media screen and (max-width: 768px) {
    .bilingual-text {
        padding: 10px;
    }

    .bilingual-text p {
        padding: 8px 0;
    }
}

/* Update the existing mobile nav styles */
@media (max-width: 768px) {
    .nav-tabs {
        padding: 8px 16px;
    }

    .nav-left,
    .nav-right {
        gap: 8px;
    }

    .tab {
        padding: 6px 8px;
        font-size: 14px;
    }

    /* Hide text labels on mobile, only show icons */
    .tab span {
        display: none;
    }

    .tab i {
        margin-right: 0;
        font-size: 18px;
    }

    /* Adjust logo and website name */
    .logo {
        height: 32px;
    }

    .website-name {
        font-size: 16px;
    }
}

/* Add styles for very small screens */
@media (max-width: 480px) {
    .nav-tabs {
        flex-direction: column;
        padding: 8px;
    }

    .nav-left {
        width: 100%;
        justify-content: space-between;
        margin-bottom: 8px;
    }

    .nav-right {
        width: 100%;
        justify-content: space-between;
    }

    .logo-container {
        padding-right: 5px;
        margin-right: 5px;
    }

    /* Make tabs fill the width */
    .tab {
        flex: 1;
        justify-content: center;
    }
}

/* Add these new styles in your media queries section */
@media screen and (max-width: 768px) {
    /* ... existing mobile styles ... */

    /* Hamburger menu styles */
    .hamburger-menu {
        display: block;
        background: none;
        border: none;
        font-size: 24px;
        color: var(--text-primary);
        cursor: pointer;
        padding: 8px;
        margin-left: auto;
    }

    .mobile-menu {
        display: none;
        position: fixed;
        top: 44px;
        left: 0;
        right: 0;
        background: white;
        box-shadow: var(--shadow-md);
        z-index: 1000;
        padding: 16px;
    }

    .mobile-menu.active {
        display: block !important;
    }

    .mobile-menu .tabs-container {
        display: flex !important;
        flex-direction: column;
        gap: 16px;
    }

    .mobile-menu .tab {
        padding: 12px;
        display: flex;
        align-items: center;
        width: 100%;
    }

    .mobile-menu .tab span {
        display: inline-block !important;
        margin-left: 12px;
    }

    .mobile-menu .tab i {
        width: 24px;
        text-align: center;
    }

    .mobile-language-selector {
        margin-top: 16px;
        padding-top: 16px;
        border-top: 1px solid var(--border-color);
        display: flex;
        gap: 16px;
    }

    .desktop-only {
        display: none;
    }

    /* Hide desktop navigation elements */
    .nav-right:not(.mobile-menu) {
        display: none;
    }

    .tabs-container {
        display: none;
    }
}

/* Hide hamburger and mobile menu by default (desktop) */
.hamburger-menu {
    display: none;
    /* Hide on desktop */
}

.mobile-menu {
    display: none;
    /* Hide on desktop */
}

/* Update your existing media query */
@media screen and (max-width: 768px) {

    /* Show hamburger menu on mobile */
    .hamburger-menu {
        display: block;
        background: none;
        border: none;
        font-size: 24px;
        color: var(--text-primary);
        cursor: pointer;
        padding: 8px;
        margin-left: auto;
    }

    /* Hide desktop navigation */
    .nav-right:not(.mobile-menu) {
        display: none;
    }

    /* Rest of your existing mobile styles... */
}

#searchResults {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    margin-top: 4px;
    padding: 8px 0;
    display: none;
}

.search-result-item {
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-result-item:hover {
    background: var(--secondary-color);
}

.search-result-item.active {
    background: rgba(33, 150, 243, 0.05);
}

.search-result-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.search-result-address {
    font-size: 0.85em;
    color: var(--text-secondary);
}

.no-results {
    padding: 16px;
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
}

/* Custom scrollbar for search results */
#searchResults::-webkit-scrollbar {
    width: 8px;
}

#searchResults::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#searchResults::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

#searchResults::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

/* Add new collapsible controls styles */
.controls {
    padding: 15px;
    background: white;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 88px;
    /* 44px (nav) + 44px (toggle) */
    z-index: 999;
}

/* Enhanced controls toggle styles */
.controls-toggle {
    display: none;
    /* Hidden by default */
    width: 100%;
    padding: 12px 16px;
    background: white;
    border: none;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    align-items: center;
    /* Removed display: flex from here */
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 44px;
    z-index: 999;
}

.controls-toggle span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.controls-toggle span::before {
    content: '\f0b0';
    /* Filter icon */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 14px;
    color: var(--primary-color);
}

.controls-toggle i {
    transition: transform 0.3s ease;
    color: var(--text-secondary);
    font-size: 12px;
}

.controls-toggle.collapsed {
    border-bottom: none;
}

.controls-toggle.collapsed i {
    transform: rotate(180deg);
}

.controls-toggle:hover {
    background-color: var(--bg-hover);
}

.controls-toggle:active {
    background-color: var(--bg-active);
}

/* Update the controls top position to account for the toggle button */
@media screen and (max-width: 768px) {
    .controls {
        max-height: 500px;
        /* Set an initial max-height that's larger than content */
        transition: all 0.3s ease-out;
        overflow: hidden;
    }

    .controls.collapsed {
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
        border-bottom: none;
        opacity: 0;
    }

    .controls-row {
        padding-top: 10px;
    }
}

/* Show controls-toggle only on mobile */
@media screen and (max-width: 768px) {
    .controls-toggle {
        display: flex;
        /* Show and enable flex layout on mobile only */
    }
}

.agent-banner strong {
    color: var(--primary-color);
    /* Using the primary blue color variable */
    font-weight: bold;
}

.agent-banner a {
    text-decoration: none;
}

/* School Card for Mobile */
.selected-school-card {
    display: none; /* Hidden by default */
    background: white;
    border-radius: var(--radius-sm);
    border: 1px solid var(--primary-color);  /* Changed from var(--border-color) to var(--primary-color) */
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    padding: 16px;
}

/* Show school card on mobile */
@media screen and (max-width: 1150px) {
    .selected-school-card {
        display: block;
        margin-bottom: 12px;
    }
    
    /* Hide school card when no school is selected */
    .selected-school-card:empty {
        display: none;
    }
}
