/* =================================================================== */
/* Custom CSS for Grosapp - Organized Version 4.0                     */
/* =================================================================== */

/* ------------------------------------------------------------------- */
/* 1. FONT DECLARATIONS
/* ------------------------------------------------------------------- */

/* Light Weight (300) */
@font-face {
    font-family: 'Open Sans';
    src: url('../fonts/open-sans-v43-latin-300.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

/* Regular Weight (400) */
@font-face {
    font-family: 'Open Sans';
    src: url('../fonts/open-sans-v43-latin-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Semi-Bold Weight (600) */
@font-face {
    font-family: 'Open Sans';
    src: url('../fonts/open-sans-v43-latin-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* Bold Weight (700) */
@font-face {
    font-family: 'Open Sans';
    src: url('../fonts/open-sans-v43-latin-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}


/* ------------------------------------------------------------------- */
/* 2. GLOBAL RESETS & UTILITIES
/* ------------------------------------------------------------------- */

/* Hide Kadence default header */
header#masthead {
    display: none !important;
}

/* Hide swipe progress indicator */
#zsn-progress {
    display: none !important;
}

/* Main wrapper padding for fixed header */
#wrapper {
    padding-top: 56px;
}


/* ------------------------------------------------------------------- */
/* 3. STICKY HEADER NAVIGATION
/* ------------------------------------------------------------------- */

/* Main sticky container */
.sticky-filter-nav-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Header bar layout */
.sticky-filter-nav-bar {
    background-color: #FFFFFF !important;
    border-bottom: 1px solid #EAEAEA !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06) !important;
    padding: 12px 10px !important;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 56px;
    box-sizing: border-box;
    max-width: 1280px;
    margin: 0 auto;
}

/* Filter items */
.filter-item {
    flex-shrink: 0;
}

.filter-district {
    flex: 1 1 auto;
    min-width: 120px;
}

.filter-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #f9f9f9;
    font-size: 14px;
}

/* Blue outline style for buttons and dropdown */
.sticky-filter-nav-bar .status-chip,
.sticky-filter-nav-bar .filter-select {
    background-color: transparent !important;
    border: 1px solid #0000ff !important;
    color: #0000ff !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    border-radius: 8px !important;
    padding: 6px 12px !important;
    box-shadow: none !important;
    outline: none !important;
    transition: all 0.2s ease-in-out;
}

/* Status chips container */
.filter-status-chips {
    flex: 0 0 auto;
    display: flex;
    gap: 1px;
    border: none;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.status-chip {
    background-color: #fff;
    color: #333;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    transition: background-color 0.2s, color 0.2s;
}

.status-chip:first-child {
    border-right: 1px solid #ccc;
}

.status-chip.active,
.sticky-filter-nav-bar .status-chip:hover,
.sticky-filter-nav-bar .status-chip.active {
    background-color: #0000ff !important;
    color: #fff !important;
}

/* Hamburger menu */
.filter-hamburger {
    flex: 0 0 auto;
    margin-left: auto;
}

.hamburger-button {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    position: relative;
}

.hamburger-icon {
    fill: #333;
}

.sticky-filter-nav-bar .hamburger-icon {
    fill: #0000ff !important;
}

.notification-dot {
    position: absolute;
    top: 2px;
    right: 0;
    width: 10px;
    height: 10px;
    background-color: #e60023;
    border-radius: 50%;
    border: 2px solid #fff;
    display: none;
}

/* Focus states */
.sticky-filter-nav-bar *:focus {
    outline: none !important;
    box-shadow: none !important;
}


/* ------------------------------------------------------------------- */
/* 4. ADVANCED FILTERS POPUP
/* ------------------------------------------------------------------- */

.advanced-filters-popup-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background-color: #fff;
    border-top: 1px solid #eee;
}

.advanced-filters-popup-container.open {
    max-height: 80vh;
    overflow-y: auto;
}

.advanced-filters-content {
    padding: 20px;
}

.popup-title {
    margin: 0 0 20px 0;
    text-align: center;
    font-size: 20px;
}

.adv-filter-group {
    margin-bottom: 20px;
}

.adv-filter-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
}

.adv-filter-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
}

.adv-filter-radio-group,
.adv-filter-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.adv-filter-radio-group label,
.adv-filter-checkbox-group label {
    font-weight: normal;
    display: flex;
    align-items: center;
    gap: 5px;
}

.popup-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.popup-button {
    flex-grow: 1;
    padding: 12px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.reset-button {
    background-color: #eee;
    color: #333;
}

.apply-button {
    background-color: #0073e6;
    color: #fff;
}

/* Popup blur effect */
body.ziiz-popup-active > #page {
    filter: blur(5px);
    transform: scale(0.98);
    transition: filter 0.3s ease-out, transform 0.3s ease-out;
    overflow: hidden;
}

.ziiz-popup-overlay {
    background: rgba(20, 20, 25, 0.6);
    transition: background-color 0.3s ease;
}


/* ------------------------------------------------------------------- */
/* 5. HOMEPAGE - DISTRICT SEARCH
/* ------------------------------------------------------------------- */

.district-search-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    width: 100%;
    max-width: 600px;
    margin: 40px auto;
    padding: 0;
    box-sizing: border-box;
}

.district-search-container .search-label {
    font-size: 16px;
    font-weight: 500;
    color: #555;
    text-align: center;
    margin-bottom: 12px;
}

.district-search-container .search-form {
    position: relative;
    display: flex;
    width: 100%;
}

.district-search-input,
.district-search-select {
    flex-grow: 1;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 14px 50px 14px 18px;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;
    -webkit-appearance: none;
    background-color: white;
}

.district-search-select {
    display: block;
}

.district-search-input-wrapper {
    display: none;
}

.district-search-container .search-button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    height: 40px;
    width: 40px;
    background-color: #0073e6;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background-color 0.2s ease;
}

.district-search-container .search-button:hover {
    background-color: #005bb5;
}

.district-search-container .search-button svg {
    width: 22px;
    height: 22px;
    fill: white;
}


/* ------------------------------------------------------------------- */
/* 6. HOMEPAGE - THREE CARD SECTION
/* ------------------------------------------------------------------- */

.action-cards-section {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    padding: 40px 5px;
    background-color: #f9f9f9;
}

.action-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.action-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0,0,0,0.1);
}

.action-card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    padding: 20px;
    box-sizing: border-box;
    display: block;
}

.action-card-content {
    padding: 24px;
}

.action-card h2 {
    font-size: 24px;
    margin: 0 0 12px 0;
    color: #333;
}

.action-card p {
    font-size: 16px;
    color: #555;
    line-height: 1.5;
    margin: 0 0 24px 0;
    min-height: 72px;
}

.action-card-button {
    display: inline-block;
    background-color: #0073e6;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 6px;
    border: 2px solid transparent;
    transition: background-color 0.2s, color 0.2s;
}

.action-card-button:hover {
    background-color: #005bb5;
}


/* ------------------------------------------------------------------- */
/* 7. HOMEPAGE - LATEST PROPERTIES SECTION
/* ------------------------------------------------------------------- */

.latest-properties-section {
    padding: 40px 5px;
    max-width: 1280px;
    margin: 0 auto;
}

.latest-properties-section .section-title {
    text-align: center;
    font-size: 28px;
    font-weight: bold;
    color: #333;
    margin-bottom: 30px;
}

.homepage-property-grid {
    display: grid;
    gap: 15px;
    grid-template-columns: 1fr;
}


/* ------------------------------------------------------------------- */
/* 8. ARCHIVE PAGE - HEADER & LAYOUT
/* ------------------------------------------------------------------- */

.archive-main-title {
    font-size: 1.75rem;
    margin-bottom: 0;
    line-height: 1.2;
}

.archive-result-count {
    font-size: 1rem;
    color: #666;
    margin-top: 5px;
    font-style: italic;
    padding-left: 15px;
    padding-right: 15px;
}

/* Archive content padding */
.post-type-archive-property .content-wrap {
    padding-left: 3px;
    padding-right: 3px;
}


/* ------------------------------------------------------------------- */
/* 9. ARCHIVE PAGE - PROPERTY GRID
/* ------------------------------------------------------------------- */

.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    justify-content: center;
}


/* ------------------------------------------------------------------- */
/* 10. PROPERTY CARDS (Archive & Homepage)
/* ------------------------------------------------------------------- */

.property-card-final {
    font-family: 'Open Sans', sans-serif;
    background: #ffffff;
    border: 1px solid #e9edf0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.property-card-final:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Card link */
.card-link-final {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Image container */
.card-image-container-final {
    position: relative;
}

.card-image-container-final img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.card-favorite-icon-final {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
}

/* Card content */
.card-content-final {
    padding: 18px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Price and stats row */
.card-row-1 {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 14px;
    gap: 10px;
}

.card-price-final {
    font-size: 1.15em;
    font-weight: 700;
    color: #1a202c;
    white-space: nowrap;
}

.card-price-final .price-secondary-final {
    font-size: 0.8em;
    font-weight: 500;
    color: #555;
}

.card-stats-final {
    font-size: 0.9em;
    font-weight: 400;
    color: #555;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Title */
.card-title-final {
    font-size: 1.05em;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 6px 0;
    color: #2c3e50;
}

/* Location */
.card-location-final {
    font-size: 0.85em;
    font-weight: 400;
    color: #5d677a;
    margin: 0;
    margin-top: auto;
    padding-top: 10px;
}

/* Lister name */
.card-lister-name-final {
    font-size: 0.7rem;
    letter-spacing: 0.6px;
    color: #b0b9c9;
}


/* ------------------------------------------------------------------- */
/* 11. SINGLE PROPERTY PAGE - KEY FACTS
/* ------------------------------------------------------------------- */

.key-facts-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #e5e5e5;
}

.fact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex-basis: calc(33.333% - 15px);
    min-width: 120px;
}

.fact-item .fact-icon {
    margin-bottom: 12px;
}

.fact-item .fact-icon svg {
    width: 32px;
    height: 32px;
    color: #333;
}

.fact-item .fact-value {
    font-size: 1.1em;
    font-weight: 700;
    color: #1a202c;
    line-height: 1.2;
}

.fact-item .fact-label {
    font-size: 0.9em;
    color: #718096;
    line-height: 1.2;
    margin-top: 4px;
}


/* ------------------------------------------------------------------- */
/* 12. RESPONSIVE MEDIA QUERIES
/* ------------------------------------------------------------------- */

/* Small screens (500px+) */
@media (min-width: 500px) {
    .homepage-property-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets (768px+) */
@media (min-width: 768px) {
    /* District search */
    .district-search-select {
        display: none;
    }
    
    .district-search-input-wrapper {
        display: block;
        width: 100%;
    }
    
    .district-search-container .search-label {
        font-size: 18px;
    }
    
    .district-search-input {
        padding: 16px 60px 16px 20px;
        font-size: 18px;
    }
    
    .district-search-container .search-button {
        height: 45px;
        width: 45px;
    }
    
    /* Action cards */
    .action-cards-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
    
    .action-cards-section {
        padding: 60px 30px;
    }
    
    /* Latest properties */
    .latest-properties-section {
        padding: 60px 30px;
    }
    
    /* Kadence header padding */
    #masthead,
    .site-header-wrap,
    header.site-header {
        padding-top: 5px;
    }
}

/* Mobile only (max 767px) */
@media (max-width: 767px) {
    .post-type-archive-property .site-content .container {
        padding-left: 3px !important;
        padding-right: 3px !important;
    }
}

/* Desktops (992px+) */
@media (min-width: 992px) {
    .homepage-property-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}


/* ============================================================================
   HEADER - LOGO STYLING
   ============================================================================ */

/* Logo Container */
.filter-item.filter-logo {
    display: flex;
    align-items: center;
    margin-right: 12px;
}

.sticky-nav-logo-link {
    display: block;
    line-height: 0;
}

/* Logo Size - Mobile & Desktop */
.sticky-nav-logo {
    height: 36px;
    width: auto;
    display: block;
}

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

/* Desktop - Larger Logo */
@media (min-width: 769px) {
    .sticky-nav-logo {
        height: 42px;
    }
    
    .filter-item.filter-logo {
        margin-right: 15px;
    }
}
