/* ATP Home Page Custom Styles
 */

/* ========== GENERAL SETTINGS & VARIABLES ========== */
:root {
    --primary-color: #a51c36;
    --primary-color-light: #d13a5e;
    --primary-color-dark: #7c1427;
    --secondary-color: #546e7a;
    --secondary-color-light: #8c9ea8;
    --text-color: #333333;
    --light-text: #ffffff;
    --light-bg: #f8f9fa;
    --dark-bg: #212529;
    --border-radius: 10px;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* ========== BODY & BACKGROUND SETTINGS ========== */
body.home {
    background: url('../images/header_bg.png') center top/cover no-repeat fixed !important;
    background-attachment: fixed !important;
    background-size: cover !important;
    background-position: center top !important;
    min-height: 100vh !important;
    position: relative !important;
    width: 100% !important;
    overflow-x: hidden !important;
}

/* Ensure HTML element doesn't override */
html body.home {
    background: url('../images/header_bg.png') center top/cover no-repeat fixed !important;
    background-size: cover !important;
    background-position: center top !important;
    width: 100% !important;
    overflow-x: hidden !important;
}

/* Additional fallback for html element */
html.home,
html body.home,
body.home {
    background-image: url('../images/header_bg.png') !important;
    background-position: center top !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
}

/* ========== TRANSPARENT HEADER SETTINGS ========== */
/* Make header completely transparent on index page */
body.home .header-bg {
    background: transparent !important;
    backdrop-filter: none !important;
}

/* ========== HEADER / HERO GAP FIX ========== */
/* Remove any unintended gap between the navigation header and the hero section */
body.home header,
body.home header > nav,
body.home nav.navbar,
body.home .atp-main-nav,
body.home .atp-nav-header,
body.home #atp-header-wrap,
body.home #atpNavHeader,
body.home #masthead {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

body.home main,
body.home main.main-content,
body.home main.dashboard-page {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Override WordPress globals.css spacing on hero */
body.home .atp-modern-hero,
html body.home .main-content .atp-modern-hero {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Additional fixes for WordPress and Bootstrap spacing */
body.home .navbar,
body.home .navbar.navbar-expand-lg {
    margin-bottom: 0 !important;
}

/* Override home.css main-content background with highest specificity */
body.home.home .main-content,
html body.home .main-content,
.main-content {
    background: transparent !important;
    background-image: none !important;
    background-color: transparent !important;
}

/* Additional override for imported CSS */
body.home .main-content,
body.home main.main-content,
.home .main-content,
.home main.main-content {
    background: transparent !important;
    background-image: none !important;
    background-color: transparent !important;
    min-height: auto !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Make hero section completely transparent with highest specificity */
body.home.home .hero-section,
html body.home .hero-section,
.home .hero-section {
    background: transparent !important;
    background-image: none !important;
    background-color: transparent !important;
}

/* Remove hero section overlay */
body.home .hero-section::before {
    display: none !important;
    background: transparent !important;
}

/* Ensure container elements don't block background */
body.home .hero-content,
body.home .container-fluid,
body.home .container {
    background: transparent !important;
    background-image: none !important;
}

/* ========== TEXT VISIBILITY ENHANCEMENTS ========== */
body.home .header-bg .text-white {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8) !important;
}

body.home .header-bg .main-title {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8) !important;
}

body.home .main-title {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8) !important;
    color: #ffffff !important;
}

body.home .subtitle {
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8) !important;
    color: #ffffff !important;
}

/* ========== SEARCH SECTION ========== */
/* Transparent search section */
body.home .search-container {
    background: transparent !important;
    backdrop-filter: none !important;
    border-radius: 0 !important;
    padding: 15px !important;
    box-shadow: none !important;
    border: none !important;
}

/* Creative floating property tabs */
body.home .property-tabs {
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    backdrop-filter: none !important;
    display: flex !important;
    justify-content: center !important;
    gap: 10px !important;
    margin-bottom: 15px !important;
}

/* ========== TRANSPARENT BOXES ========== */
/* Direct fix for white transparent boxes */
.white-transparent-box,
.search-container.white-transparent-box,
.cause-banner.white-transparent-box {
    background-color: rgba(255, 255, 255, 0.85) !important;
    border-radius: 10px !important;
    padding: 20px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    position: relative !important;
    z-index: 100 !important;
}

/* ========== STATS CARDS ========== */
/* Enhance stats card visibility */
body.home .stats-card {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

/* ========== BANNERS AND SECTIONS ========== */
/* Enhance cause banner visibility */
body.home .cause-banner {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px) !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    margin: 1rem 0 !important;
}

/* Add transparency to registration banner */
body.home .atp-registration-banner {
    background: #ffffff !important;
    backdrop-filter: none !important;
    border-top: 1px solid rgba(233, 236, 239, 1) !important;
    border-bottom: 1px solid rgba(233, 236, 239, 1) !important;
}

/* Add white background to announcement banner */
body.home .announcement-banner {
    background: rgba(255, 255, 255, 1) !important;
    backdrop-filter: none !important;
}

/* Ensure all sections below hero have white backgrounds */
body.home section:not(.hero-section),
body.home .main-content section {
    background: rgba(255, 255, 255, 1) !important;
    backdrop-filter: none !important;
}

/* Enhanced text readability on transparent backgrounds */
body.home .cause-text {
    color: #333 !important;
    text-shadow: none !important;
}

body.home .registration-title {
    color: #0d6efd !important;
    text-shadow: none !important;
}

/* Fix for gap between registration banner and featured properties */
.atp-registration-banner {
    margin-bottom: 0 !important;
    border-bottom: none !important;
    position: relative;
    z-index: 10;
}

.featured-properties {
    margin-top: 0 !important;
    padding-top: 20px !important;
    border-top: none !important;
    position: relative;
    z-index: 5;
    box-shadow: 0 -1px 0 rgba(233, 236, 239, 1);
}

/* Remove any potential negative margins */
body.home .main-content section {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Ensure no other elements can peek through */
.atp-modern-hero {
    margin-top: 0 !important;
    padding-top: 0 !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Fix for any residual gap */
body.home .main-content {
    background: #fff !important;
}

/* Keep the shared WordPress footer flush with the viewport bottom on the dashboard page. */
body.dashboard-home-page {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

body.dashboard-home-page > footer,
body.dashboard-home-page .site-footer,
body.dashboard-home-page #site-footer,
body.dashboard-home-page #colophon,
body.dashboard-home-page .footer-area,
body.dashboard-home-page .footer-bottom {
    margin-bottom: 0 !important;
}

body.dashboard-home-page > footer:last-of-type,
body.dashboard-home-page .site-footer:last-of-type,
body.dashboard-home-page #site-footer:last-of-type,
body.dashboard-home-page #colophon:last-of-type {
    padding-bottom: 0 !important;
}

/* WordPress footer markup can be inserted by the layout without preserving body classes. */
body > footer,
footer[role="contentinfo"],
footer.site-footer,
#site-footer,
#colophon {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    background-color: #1f1f1f !important;
}

body > footer:last-of-type::after,
footer[role="contentinfo"]:last-of-type::after,
footer.site-footer:last-of-type::after,
#site-footer:last-of-type::after,
#colophon:last-of-type::after {
    content: "";
    display: block;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background-color: #1f1f1f !important;
}

/* ========== BANNER TITLE (FROM HOME.CSS) ========== */
/* Banner Title */
.banner-title {
    color: #a51c36;
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin: 0;
    position: relative;
    z-index: 2;
}

/* ========== BUSINESS SECTION (TRADES AND LOCAL BUSINESS) ========== */
.business-section {
    background: #a51c36;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    max-width: 400px;
    width: 100%;
    margin: 10px auto;
}

/* Floating shapes styles */
.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.shape {
    position: absolute;
    color: rgba(255, 255, 255, 0.15);
    opacity: 0.7;
}

.shape-large {
    font-size: 28px;
    top: 15%;
    left: 10%;
    animation: float-large 8s ease-in-out infinite alternate;
}

.shape-medium {
    font-size: 24px;
    top: 25%;
    right: 15%;
    animation: float-medium 9s ease-in-out infinite alternate;
}

.shape-xlarge {
    font-size: 32px;
    bottom: 15%;
    right: 25%;
    animation: float-xlarge 10s ease-in-out infinite alternate;
}

/* Business Section Content */
.business-section h3 {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    margin-top: 0;
    margin-bottom: 15px;
    line-height: 1.2;
    position: relative;
    z-index: 2;
}

.business-section h3 img,
.business-section h3 i {
    margin-right: 10px;
    font-size: 22px;
}

.business-section p {
    font-size: 14px;
    color: #ffffff;
    margin-bottom: 20px;
    line-height: 1.4;
    position: relative;
    z-index: 2;
}

.business-content {
    position: relative;
    z-index: 2;
}

/* Button Styles */
.button-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    z-index: 2;
}

.business-btn {
    background: #ffffff;
    border: none;
    border-radius: 5px;
    padding: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
}

.business-btn:hover {
    background: #f8f8f8;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    color: #000;
    text-decoration: none;
}

.business-btn i {
    margin-right: 5px;
}

/* Directory button specific styles */
.directory-btn {
    margin-bottom: 10px;
}
/* Additional styling for business section top icons */
.trades-icon-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.trades-icon {
    color: white;
    font-size: 18px;
    opacity: 0.9;
}

.trades-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px 0;
}

.trades-title i {
    color: white;
    font-size: 20px;
}

/* Animations */
@keyframes float-large {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(10px, -10px) rotate(10deg); }
}

@keyframes float-medium {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-10px, -5px) rotate(-8deg); }
}

@keyframes float-xlarge {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(8px, 8px) rotate(5deg); }
}

/* Media queries for business section */
@media (max-width: 768px) {
    .business-section {
        padding: 15px;
        max-width: 350px;
    }

    .business-section h3 {
        font-size: 18px;
    }

    .business-section p {
        font-size: 13px;
        margin-bottom: 15px;
    }

    .business-btn {
        font-size: 13px;
        padding: 8px;
    }

    .shape-large {
        font-size: 24px;
    }

    .shape-medium {
        font-size: 20px;
    }

    .shape-xlarge {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .business-section {
        padding: 15px;
        max-width: 300px;
    }

    .business-section h3 {
        font-size: 16px;
    }

    .business-section p {
        font-size: 12px;
        margin-bottom: 12px;
    }

    .business-btn {
        font-size: 12px;
        padding: 8px;
    }
}

/*========== MODERN HERO SECTION STYLES ========== */
/* Modern Hero Section Styles */
.atp-modern-hero {
    background: transparent !important;
    background-image: none !important;
    padding: 0 0 8px 0;
    margin-top: 0 !important;
    color: white;
    font-family: 'Roboto', Arial, sans-serif;
    min-height: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.atp-search-wrapper {
    padding: 0 15px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.atp-search-header-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    width: 100%;
    margin-bottom: 8px;
    text-align: center;
}
.atp-search-header {
    font-size: 1.15rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0.5px;
    text-align: center;
    margin-bottom: 0;
    white-space: nowrap;
}
.atp-client-message {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    margin-bottom: 0;
    line-height: 1.3;
    max-width: 800px;
    white-space: normal;
}

.atp-search-form-container {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 15px;
    padding: 15px;
    margin: 0 auto 8px auto;
    width: 95%;
    max-width: 1400px;
    backdrop-filter: blur(6px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    box-sizing: border-box;
    overflow: hidden;
}

.atp-search-form {
    width: 100%;
    box-sizing: border-box;
}

.atp-search-input-wrapper {
    display: flex;
    margin-bottom: 10px;
    position: relative;
    border-radius: 30px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
    background: white;
    padding: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.7);
    width: 100%;
}

.atp-search-input-wrapper:focus-within {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), 0 0 0 3px rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.atp-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 14px;
}

.atp-search-input {
    flex: 1;
    padding: 10px 10px 10px 35px;
    border: none;
    min-width: 200px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: transparent;
}

.atp-search-input:focus {
    box-shadow: none;
    outline: none;
}

#dashboardSearchInput,
#dashboardSearchInput:hover,
#dashboardSearchInput:focus,
#dashboardSearchInput:focus-visible,
#dashboardSearchInput:active {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
}

#dashboardSearchInput:-webkit-autofill,
#dashboardSearchInput:-webkit-autofill:hover,
#dashboardSearchInput:-webkit-autofill:focus,
#dashboardSearchInput:-webkit-autofill:active {
    border: 0 !important;
    box-shadow: 0 0 0 1000px #fff inset !important;
    -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
    -webkit-text-fill-color: #1a1a2e !important;
}

.dashboard-page .atp-input-group-wrap:focus-within {
    border-color: transparent !important;
    box-shadow: none !important;
    outline: 0 !important;
}

.atp-search-btn {
    background-color: #b01e42;
    color: white;
    border: none;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.atp-search-btn:hover {
    background-color: #b01e42;
}

.atp-search-validation {
    margin: 2px 6px 10px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(192, 118, 0, 0.2);
    background: rgba(255, 249, 239, 0.92);
    color: #714500;
    font-size: 0.79rem;
    font-weight: 500;
    text-align: left;
    display: block;
    position: relative;
    backdrop-filter: blur(4px);
}

.atp-search-validation::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    border-radius: 10px 0 0 10px;
    background: linear-gradient(180deg, #e3a100, #b27a00);
}

.atp-search-validation-title {
    font-weight: 600;
    color: #714500;
    padding-left: 8px;
}

.atp-search-validation.is-visible {
    animation: atpSearchHintIn 220ms ease-out;
}

.atp-search-input-wrapper.atp-search-input-wrapper-invalid {
    border-color: rgba(176, 30, 66, 0.52);
    box-shadow: 0 2px 8px rgba(143, 24, 54, 0.12);
}

.atp-search-input-wrapper.atp-search-input-wrapper-prompt {
    border-color: rgba(176, 30, 66, 0.72);
    box-shadow: 0 0 0 2px rgba(176, 30, 66, 0.16), 0 6px 16px rgba(143, 24, 54, 0.16);
    animation: atpSearchFieldPrompt 1.25s ease-out 1;
}

.atp-search-input.atp-search-input-invalid::placeholder {
    color: rgba(143, 24, 54, 0.65);
}

.atp-search-btn.atp-search-btn-attention {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
    animation: atpSearchBtnPulse 520ms ease-out;
}

@keyframes atpSearchHintIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes atpSearchBtnPulse {
    0% { box-shadow: 0 0 0 0 rgba(176, 30, 66, 0.38); }
    100% { box-shadow: 0 0 0 10px rgba(176, 30, 66, 0); }
}

@keyframes atpSearchFieldPrompt {
    0% {
        box-shadow: 0 0 0 0 rgba(176, 30, 66, 0.08), 0 2px 8px rgba(143, 24, 54, 0.08);
    }
    50% {
        box-shadow: 0 0 0 3px rgba(176, 30, 66, 0.18), 0 8px 18px rgba(143, 24, 54, 0.18);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(176, 30, 66, 0.08), 0 2px 8px rgba(143, 24, 54, 0.08);
    }
}

/* ===== Property Type Category Buttons ===== */
.atp-property-types-wrapper {
    position: relative;
    width: 100%;
    margin: 0 0 12px 0;
}

.atp-property-types-wrapper::after {
    display: none;
}

/* Unified segmented-control bar */
.atp-property-types {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    margin: 0 0 10px 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    background: transparent;
    border: none;
    border-radius: 100px;
    box-sizing: border-box;
    justify-content: space-between;
}

.atp-property-types::-webkit-scrollbar {
    display: none;
}

.atp-type-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    text-align: center;
    text-decoration: none !important;
    font-size: 0.9rem;
    line-height: 1.2;
    border-radius: 100px;
    flex: 1 1 0;
    min-width: 0;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    font-weight: 600;
    letter-spacing: 0.2px;
    border: none;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: transparent;
    color: rgba(255, 255, 255, 0.88);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* No shimmer on this design */
.atp-type-btn::before {
    display: none;
}

/* Hover state */
.atp-type-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: none !important;
    transform: none;
}

/* Active / selected state */
.atp-type-btn.active,
.atp-property-types .atp-type-btn.active {
    background: linear-gradient(135deg, #c4243a 0%, #8c1530 100%) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 2px 12px rgba(176, 30, 66, 0.45) !important;
    transform: none;
    font-weight: 700;
}

/* Focus ring for accessibility */
.atp-type-btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.7);
    outline-offset: 2px;
}

/* For Sale — same as active by default */
.atp-sale-btn {
    background: linear-gradient(135deg, #c4243a 0%, #8c1530 100%) !important;
    color: #fff !important;
    box-shadow: 0 2px 12px rgba(176, 30, 66, 0.45) !important;
    font-weight: 700;
}

.atp-sale-btn:hover {
    background: linear-gradient(135deg, #d42840 0%, #9e1a38 100%) !important;
    box-shadow: 0 3px 16px rgba(176, 30, 66, 0.55) !important;
    color: #fff !important;
    transform: none !important;
}

.atp-let-btn,
.atp-build-btn,
.atp-auctions-btn,
.atp-commercial-btn,
.atp-investments-btn,
.atp-student-btn {
    /* inherits from .atp-type-btn */
}


.atp-preferred-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 11px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    text-align: center;
    width: 90%;
    margin: 0 auto;
    display: block;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
    cursor: pointer;
    z-index: 10;
    pointer-events: auto;
}

.atp-preferred-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    color: white;
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.atp-preferred-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: 0.6s;
    z-index: -1;
}

.atp-preferred-btn:hover::before {
    transform: translateX(100%);
}

/* Cause Statement Styles */
.atp-cause-statement {
    font-size: 0.8rem;
    margin: 8px auto 0;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9);
    padding: 6px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
    max-width: 800px;
    width: 85%;
}

.atp-details-link {
    color: white;
    text-decoration: underline;
    margin-left: 5px;
    transition: all 0.2s ease;
}

.atp-details-link:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* Preferred Search Modal */
#preferredSearchModal .modal-dialog {
    max-width: 520px;
}

#preferredSearchModal .modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    background: #ffffff;
}

#preferredSearchModal .modal-header {
    border-bottom: none;
    background: #ffffff;
    padding: 0.9rem 1.25rem 0.25rem;
    position: relative;
}

#preferredSearchModal .modal-title {
    font-weight: 600;
    font-size: 1.15rem;
    color: #b01e42;
    letter-spacing: 0.1px;
    width: 100%;
    text-align: center;
    margin: 0;
}

#preferredSearchModal .btn-close {
    font-size: 0.85rem;
    opacity: 1;
    background: #f2f2f2;
    border-radius: 50%;
    padding: 0.3rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    position: absolute;
    right: 1rem;
    top: 0.85rem;
}

#preferredSearchModal .modal-body {
    padding: 0.35rem 1.5rem 1.25rem;
    text-align: center;
}

#preferredSearchModal .modal-body p {
    color: #666666;
    font-size: 0.95rem;
    line-height: 1.45;
    margin-bottom: 0.9rem;
}

#preferredSearchModal .form-control {
    height: 44px;
    font-size: 0.95rem;
    box-shadow: none;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    transition: all 0.2s ease;
    text-align: center;
}

#preferredSearchModal .form-control:focus {
    border-color: #b01e42;
    box-shadow: 0 0 0 3px rgba(176, 30, 66, 0.12);
}

#preferredSearchModal .btn-danger {
    background: #b01e42;
    border: none;
    height: 44px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border-radius: 12px;
}

#preferredSearchModal .btn-danger:hover {
    background: #a51c36;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(176, 30, 66, 0.25);
}

#preferredSearchModal small {
    font-size: 0.8rem;
    color: #6c757d;
    display: block;
    margin-top: 0.8rem;
}

#preferredSearchModal small a {
    color: #b01e42;
    text-decoration: underline;
    font-weight: 500;
}

#preferredSearchModal .btn-close:focus {
    box-shadow: 0 0 0 0.15rem rgba(176, 30, 66, 0.2);
    opacity: 1;
}

/* Responsive adjustments for search form */
@media (max-width: 992px) {
    .atp-stats-container {
        padding-right: 20px;
        padding-left: 10px;
        margin-top: 10px;
        align-items: center;
    }

    .atp-stats-table {
        margin: 0 auto;
        max-width: 350px;
        min-width: 300px;
        width: 100%;
        font-size: 0.7rem;
    }

    .atp-search-form-container {
        max-width: 95%;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .atp-property-types {
        margin: 0;
    }

    .atp-preferred-btn {
        margin-left: auto;
        margin-right: auto;
    }

    .atp-cause-statement {
        margin-left: auto;
        margin-right: auto;
    }

    .atp-search-input-wrapper {
        max-width: 100%;
        width: 100%;
    }

    .atp-search-header-row {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        text-align: center;
    }

    .atp-search-header {
        text-align: center;
    }

    .atp-client-message {
        text-align: center;
    }

    .atp-cause-statement {
        text-align: center;
    }

    .atp-stats-container {
        margin-top: 15px;
        padding: 10px 10px;
        /* Equal padding on all sides */
        align-items: center;
        width: 100%;
    }

    .atp-stats-table {
        text-align: center;
        margin: 0 auto;
        max-width: 90%;
        min-width: 280px;
        width: 100%;
        padding: 10px 15px;
        width: 100%;
    }

    .atp-stats-row {
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    .atp-stats-header {
        font-size: 0.85rem;
    }

    .atp-comparison {
        font-size: 0.75rem;
        margin-bottom: 8px;
    }

    .atp-stats-table {
        font-size: 0.75rem;
        padding: 12px;
        max-width: 99vw;
        width: 100%;
    }
}

@media (max-width: 576px) {
    .atp-stats-container {
        padding: 5px;
        width: 100%;
        margin: 10px auto 0;
    }

    .atp-stats-table {
        max-width: 95%;
        min-width: 250px;
        font-size: 0.68rem;
        padding: 10px;
    }

    .atp-stats-badge {
        min-width: 34px;
        min-height: 34px;
        padding: 0 16px;
        font-size: 1.9rem;
    }

    .atp-cause-statement {
        font-size: 0.7rem;
    }

    .atp-stats-container {
        margin-top: 10px;
        padding: 5px 20px 5px 5px;
        /* Increased right padding */
        align-items: center;
    }

    .atp-stats-number {
        margin-left: 10px;
        min-width: 70px;
    }
}

@media (max-width: 480px) {
    .atp-stats-table {
        padding: 0.7rem;
        /* smaller padding on very small screens */
    }

    .atp-stats-number {
        font-size: 0.7rem;
    }
}

.category-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border: 2px solid transparent;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #ffffff 100%);
    border-radius: 10px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-width: 110px;
    box-shadow:
        0 3px 12px rgba(0,0,0,0.08),
        0 1px 3px rgba(0,0,0,0.12),
        inset 0 1px 0 rgba(255,255,255,0.8);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    backdrop-filter: blur(10px);
    flex: 0 1 auto;
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

/* ========== REGISTRATION BANNER STYLES ========== */
/* Unique registration banner styles with atp- prefix */
.atp-registration-banner {
    background: #ffffff !important;
    border-top: 1px solid rgba(233, 236, 239, 1) !important;
    border-bottom: 1px solid rgba(233, 236, 239, 1) !important;
    backdrop-filter: none !important;
}

.atp-registration-title {
    color: #a51c36 !important;
    font-size: 1.4rem !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
    text-shadow: none !important;
    margin-bottom: 1rem !important;
}

.atp-register-btn {
    background: linear-gradient(135deg, #a51c36 0%, #7c1427 100%) !important;
    color: #ffffff !important;
    border: 2px solid #a51c36 !important;
    padding: 10px 25px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    border-radius: 5px !important;
    display: inline-block !important;
    transition: all 0.3s ease !important;
    font-size: 1rem !important;
}

.atp-register-btn:hover {
    background: linear-gradient(135deg, #7c1427 0%, #a51c36 100%) !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(165, 28, 54, 0.3) !important;
    border-color: #7c1427 !important;
}

/* Additional breakpoint for very small devices */
@media (max-width: 380px) {
    .atp-property-types {
        flex-wrap: wrap;
        gap: 4px;
        overflow: visible;
        justify-content: flex-start;
    }

    .atp-type-btn {
        flex: 1 1 calc(25% - 3px);
        min-width: 0;
        padding: 9px 3px;
        font-size: 0.72rem;
        border-radius: 100px;
    }

    .atp-preferred-btn {
        width: 100%;
        font-size: 0.75rem;
        padding: 8px 10px;
    }
}

/* ========== MISCELLANEOUS STYLES ========== */
.hidden {
    display: none;
}

/* ========== MOBILE RESPONSIVE STYLES ========== */

/* Reduced hero section height */
body.home .hero-section {
    min-height: auto !important;
    padding: 0.8rem 0 !important;
}

body.home .hero-content {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

/* Enhanced mobile background image handling */
@media (max-width: 1200px) {
    body.home {
        background-position: center center !important;
        background-size: cover !important;
        background-attachment: fixed !important;
    }
}

/* Large tablets and small desktops (1024px and down) */
@media (max-width: 1024px) {
    body.home {
        background-position: center center !important;
        background-size: cover !important;
        background-attachment: scroll !important;
        min-height: 100vh !important;
    }

    body.home .hero-section {
        min-height: 40vh !important;
        padding: 1rem 0 !important;
    }

    body.home .hero-content {
        padding-top: 1rem !important;
    }

    body.home .main-title {
        font-size: 2.2rem !important;
        margin-bottom: 1.2rem !important;
    }

    body.home .subtitle {
        font-size: 1rem !important;
        margin-bottom: 1.8rem !important;
    }

    body.home .search-container {
        padding: 18px !important;
        margin: 0 10px !important;
    }

    body.home .stats-card {
        margin-top: 1.5rem !important;
    }

    .carousel-category-selector {
        padding: 0.8rem 0;
        border-radius: 0 0 18px 18px;
    }

    .category-buttons {
        gap: 6px !important;
        padding: 6px;
        border-radius: 13px;
        margin: 0 8px;
    }

    .category-btn {
        min-width: 100px;
        padding: 10px 16px;
        border-radius: 8px;
        font-size: 0.85rem;
        flex: 1 1 auto;
        white-space: nowrap;
    }

    .category-btn span {
        font-size: 0.85rem;
        letter-spacing: 0.2px;
    }
}

/* Fix for mobile devices where background-attachment: fixed doesn't work */
@media (max-width: 768px) {
    body.home {
        background: url('../images/header_bg.png') center center/cover no-repeat !important;
        background-attachment: scroll !important;
        background-size: cover !important;
        background-position: center center !important;
        min-height: 100vh !important;
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }

    .atp-search-form-container {
        padding: 15px;
        width: 90%;
        margin-left: auto;
        margin-right: auto;
    }

    .atp-property-types {
        justify-content: space-between;
        gap: 4px;
        max-width: 100%;
        flex-wrap: nowrap;
        overflow: hidden;
    }

    .atp-type-btn {
        padding: 10px 6px;
        font-size: 0.8rem;
        flex: 1 1 0;
        min-width: 0;
        margin-bottom: 0;
    }

    .atp-preferred-btn {
        width: 95%;
    }

    .atp-search-input {
        padding: 10px 10px 10px 32px;
    }

    .atp-search-btn {
        padding: 0 20px;
    }

    .atp-client-message {
        font-size: 0.7rem;
    }

    html body.home {
        background: url('../images/header_bg.png') center center/cover no-repeat !important;
        background-attachment: scroll !important;
        background-size: cover !important;
        background-position: center center !important;
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }

    body.home .hero-section {
        min-height: 35vh !important;
        padding: 0.8rem 0 !important;
    }

    body.home .hero-content {
        padding-top: 0.8rem !important;
        width: 98% !important;
    }

    body.home .main-title {
        font-size: 1.8rem !important;
        margin-bottom: 1rem !important;
        padding: 0 15px !important;
        line-height: 1.3 !important;
    }

    body.home .subtitle {
        font-size: 0.95rem !important;
        margin-bottom: 1.5rem !important;
        padding: 0 20px !important;
        line-height: 1.4 !important;
    }

    body.home .search-container {
        padding: 15px !important;
        margin: 0 15px !important;
        border-radius: 12px !important;
    }

    body.home .property-tabs {
        padding: 6px !important;
        border-radius: 8px !important;
        margin-bottom: 1rem !important;
    }

    body.home .property-tabs .nav-item {
        margin-bottom: 0.3rem !important;
    }

    body.home .property-tabs .nav-link {
        padding: 8px 12px !important;
        font-size: 0.85rem !important;
    }

    body.home .search-input-group {
        flex-direction: column !important;
        gap: 10px !important;
    }

    body.home .search-input {
        width: 100% !important;
        margin-bottom: 0 !important;
    }

    body.home .search-btn {
        width: 100% !important;
        margin: 0 !important;
        padding: 12px !important;
        font-size: 1rem !important;
    }

    body.home .location-btn {
        width: 100% !important;
        padding: 10px !important;
        font-size: 0.9rem !important;
    }

    body.home .cause-banner {
        flex-direction: column !important;
        text-align: center !important;
        padding: 15px !important;
        margin: 1rem 10px !important;
    }

    body.home .cause-text {
        margin-bottom: 1rem !important;
        margin-right: 0 !important;
        font-size: 0.9rem !important;
    }

    body.home .details-btn {
        font-size: 0.85rem !important;
        padding: 8px 16px !important;
    }

    body.home .stats-card {
        margin-top: 1rem !important;
        padding: 1rem !important;
    }

    .carousel-category-selector {
        padding: 0.6rem 0;
        border-radius: 0 0 15px 15px;
    }

    .category-buttons {
        gap: 5px !important;
        padding: 5px;
        border-radius: 12px;
        margin: 0 10px;
        flex-wrap: wrap;
        justify-content: center !important;
    }

    .category-btn {
        min-width: 85px;
        padding: 9px 14px;
        border-radius: 8px;
        flex: 1 1 calc(50% - 2.5px);
        max-width: calc(50% - 2.5px);
        min-height: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .category-btn span {
        font-size: 0.8rem;
        letter-spacing: 0.1px;
        line-height: 1.2;
        text-align: center;
    }

    .atp-registration-title {
        font-size: 1.2rem !important;
        line-height: 1.4 !important;
        padding: 0 10px !important;
    }

    .atp-registration-banner {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }

    .atp-register-btn {
        font-size: 0.95rem !important;
        padding: 8px 20px !important;
    }
}

/* Large mobile devices (576px and down) */
@media (max-width: 576px) {
    body.home {
        background: url('../images/header_bg.png') center center/cover no-repeat !important;
        background-attachment: scroll !important;
        background-size: cover !important;
        background-position: center center !important;
        min-height: 100vh !important;
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }

    /* Mobile: 2-row creative wrap — 4 per row 1, 3 stretched across row 2 */
    .atp-property-types {
        flex-wrap: wrap;
        gap: 5px;
        margin-bottom: 10px;
        max-width: 100%;
        justify-content: flex-start;
        overflow: visible;
    }

    .atp-type-btn {
        flex: 1 1 calc(25% - 4px);
        min-width: 0;
        padding: 11px 4px;
        font-size: 0.82rem;
        border-radius: 100px;
        text-align: center;
    }

    .atp-search-input {
        padding: 8px 8px 8px 30px;
        font-size: 0.85rem;
    }

    .atp-search-icon {
        left: 10px;
        font-size: 12px;
    }

    .atp-search-btn {
        padding: 0 15px;
        font-size: 0.9rem;
    }

    .atp-preferred-btn {
        font-size: 0.8rem;
        padding: 8px 10px;
    }

    .atp-cause-statement {
        font-size: 0.7rem;
    }

    html body.home {
        background: url('../images/header_bg.png') center center/cover no-repeat !important;
        background-attachment: scroll !important;
        background-size: cover !important;
        background-position: center center !important;
    }

    body.home .hero-section {
        min-height: 30vh !important;
        padding: 0.5rem 0 !important;
    }

    body.home .hero-content {
        padding-top: 0.5rem !important;
        width: 100% !important;
    }

    body.home .main-title {
        font-size: 1.5rem !important;
        text-align: center !important;
        margin-bottom: 0.8rem !important;
        padding: 0 10px !important;
        line-height: 1.2 !important;
    }

    body.home .subtitle {
        font-size: 0.9rem !important;
        text-align: center !important;
        margin-bottom: 1.2rem !important;
        padding: 0 15px !important;
        line-height: 1.3 !important;
    }

    body.home .search-container {
        padding: 10px !important;
        margin: 0 8px !important;
        border-radius: 0 !important;
    }

    body.home .property-tabs {
        padding: 0 !important;
        border-radius: 0 !important;
        margin-bottom: 0.8rem !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
    }

    body.home .property-tabs .nav-item {
        flex: 0 1 auto !important;
        margin-bottom: 6px !important;
    }

    body.home .property-tabs .nav-link {
        padding: 8px 12px !important;
        font-size: 0.75rem !important;
        text-align: center !important;
        background: rgba(255, 255, 255, 0.85) !important;
        border-radius: 20px !important;
        border: 1px solid rgba(255, 255, 255, 0.4) !important;
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15) !important;
        transition: all 0.3s ease !important;
        transform: translateY(0) !important;
        backdrop-filter: blur(5px) !important;
    }

    body.home .property-tabs .nav-link:hover {
        background: rgba(255, 255, 255, 0.95) !important;
        transform: translateY(-3px) !important;
        box-shadow: 0 5px 12px rgba(0, 0, 0, 0.25) !important;
    }

    body.home .property-tabs .nav-link.active {
        background: linear-gradient(135deg, #ff4d58, #d1394e) !important;
        color: white !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
    }

    body.home .property-tabs .nav-link i {
        display: block !important;
        margin-bottom: 4px !important;
        margin-right: 0 !important;
        font-size: 1rem !important;
    }

    body.home .search-input {
        font-size: 0.9rem !important;
        padding: 10px 15px !important;
        border-radius: 20px !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        background: rgba(255, 255, 255, 0.9) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    }

    body.home .search-btn {
        padding: 10px 20px !important;
        font-size: 0.9rem !important;
        border-radius: 20px !important;
        background: linear-gradient(135deg, #ff4d58, #d1394e) !important;
        border: none !important;
        box-shadow: 0 4px 10px rgba(209, 57, 78, 0.3) !important;
        transition: all 0.3s ease !important;
        transform: translateY(0) !important;
    }

    body.home .search-btn:hover {
        transform: translateY(-2px) !important;
        box-shadow: 0 6px 12px rgba(209, 57, 78, 0.4) !important;
        background: linear-gradient(135deg, #ff5d68, #e1495e) !important;
    }

    body.home .location-btn {
        padding: 8px 15px !important;
        font-size: 0.8rem !important;
        margin-top: 0.8rem !important;
        border-radius: 20px !important;
        background: rgba(0, 0, 0, 0.6) !important;
        color: white !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        backdrop-filter: blur(5px) !important;
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2) !important;
        transition: all 0.3s ease !important;
    }

    body.home .location-btn:hover {
        background: rgba(0, 0, 0, 0.7) !important;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3) !important;
    }

    body.home .cause-banner {
        padding: 12px !important;
        margin: 0.8rem 8px !important;
        border-radius: 8px !important;
    }

    body.home .cause-text {
        font-size: 0.8rem !important;
        margin-bottom: 0.8rem !important;
        line-height: 1.3 !important;
    }

    body.home .details-btn {
        font-size: 0.8rem !important;
        padding: 6px 12px !important;
    }

    body.home .stats-card {
        margin-top: 0.8rem !important;
        padding: 0.8rem !important;
        font-size: 0.9rem !important;
    }

    body.home .stats-title {
        font-size: 0.85rem !important;
    }

    body.home .stats-number {
        font-size: 1.5rem !important;
    }

    .banner-title {
        font-size: 1.4rem;
        padding: 0 15px;
    }

    .carousel-category-selector {
        padding: 0.5rem 0;
        margin-bottom: 1rem !important;
    }

    .category-buttons {
        gap: 4px !important;
        padding: 4px;
        flex-wrap: wrap;
        justify-content: center !important;
        margin: 0 8px;
    }

    .category-btn {
        min-width: 75px;
        padding: 8px 12px;
        flex: 1 1 calc(33.333% - 3px);
        max-width: calc(33.333% - 3px);
        margin-bottom: 4px;
        min-height: 36px;
        border-radius: 7px;
    }

    .category-btn span {
        font-size: 0.75rem;
        line-height: 1.1;
        letter-spacing: 0.05px;
        font-weight: 600;
    }

    .atp-registration-title {
        font-size: 1.1rem !important;
        margin-bottom: 0.75rem !important;
        padding: 0 15px !important;
    }

    .atp-register-btn {
        font-size: 0.9rem !important;
        padding: 8px 18px !important;
    }
}

/* Small mobile devices (480px and down) */
@media (max-width: 480px) {
    body.home {
        background: url('../images/header_bg.png') center center/cover no-repeat !important;
        background-attachment: scroll !important;
        background-size: cover !important;
        background-position: center center !important;
        min-height: 100vh !important;
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }

    html body.home {
        background: url('../images/header_bg.png') center center/cover no-repeat !important;
        background-attachment: scroll !important;
        background-size: cover !important;
        background-position: center center !important;
    }

    body.home .hero-section {
        min-height: 25vh !important;
        padding: 0.3rem 0 !important;
    }

    body.home .main-title {
        font-size: 1.3rem !important;
        margin-bottom: 0.6rem !important;
        padding: 0 8px !important;
    }

    body.home .subtitle {
        font-size: 0.85rem !important;
        margin-bottom: 1rem !important;
        padding: 0 12px !important;
    }

    body.home .search-container {
        padding: 10px !important;
        margin: 0 8px !important;
    }

    body.home .property-tabs .nav-item {
        flex: 1 1 calc(33.333% - 3px) !important;
    }

    body.home .property-tabs .nav-link {
        padding: 5px 6px !important;
        font-size: 0.7rem !important;
    }

    body.home .cause-banner {
        padding: 10px !important;
        margin: 0.6rem 6px !important;
    }

    body.home .cause-text {
        font-size: 0.75rem !important;
    }

    body.home .stats-card {
        padding: 0.6rem !important;
        font-size: 0.85rem !important;
    }

    .carousel-category-selector {
        padding: 0.4rem 0;
    }

    .category-buttons {
        gap: 3px !important;
        padding: 3px;
        margin: 0 6px;
    }

    .category-btn {
        min-width: 70px;
        padding: 7px 10px;
        flex: 1 1 calc(50% - 1.5px);
        max-width: calc(50% - 1.5px);
        border-radius: 6px;
        min-height: 34px;
    }

    .category-btn span {
        font-size: 0.7rem;
        font-weight: 600;
        line-height: 1;
    }

    .atp-registration-title {
        font-size: 1rem !important;
        padding: 0 10px !important;
    }

    .atp-register-btn {
        font-size: 0.85rem !important;
        padding: 7px 16px !important;
    }
}

/* Extra small mobile devices (360px and down) */
@media (max-width: 360px) {
    body.home {
        background: url('../images/header_bg.png') center center/cover no-repeat !important;
        background-attachment: scroll !important;
        background-size: cover !important;
        background-position: center center !important;
        min-height: 100vh !important;
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }

    html body.home {
        background: url('../images/header_bg.png') center center/cover no-repeat !important;
        background-attachment: scroll !important;
        background-size: cover !important;
        background-position: center center !important;
    }

    body.home .hero-section {
        min-height: 22vh !important;
    }

    body.home .main-title {
        font-size: 1.2rem !important;
        padding: 0 6px !important;
    }

    body.home .subtitle {
        font-size: 0.8rem !important;
        padding: 0 10px !important;
    }

    body.home .search-container {
        padding: 8px !important;
        margin: 0 6px !important;
    }

    body.home .property-tabs .nav-link {
        padding: 5px 10px !important;
        font-size: 0.65rem !important;
        border-radius: 15px !important;
    }

    body.home .property-tabs .nav-link i {
        font-size: 0.85rem !important;
        margin-bottom: 2px !important;
    }

    body.home .cause-banner {
        padding: 8px !important;
        margin: 0.5rem 5px !important;
    }

    body.home .cause-text {
        font-size: 0.7rem !important;
    }

    .carousel-category-selector {
        padding: 0.3rem 0;
    }

    .category-buttons {
        gap: 2px !important;
        padding: 2px;
        margin: 0 5px;
    }

    .category-btn {
        min-width: 60px;
        padding: 6px 8px;
        font-size: 0.65rem;
        flex: 1 1 calc(50% - 1px);
        max-width: calc(50% - 1px);
        min-height: 32px;
        border-radius: 5px;
    }

    .category-btn span {
        font-size: 0.65rem;
        font-weight: 600;
        letter-spacing: 0;
        line-height: 0.9;
    }
}

/* Touch-friendly enhancements */
@media (max-width: 768px) {
    body.home .property-tabs .nav-link:active {
        transform: scale(0.95) !important;
        transition: transform 0.1s ease !important;
    }

    body.home .search-btn:active {
        transform: scale(0.98) !important;
        transition: transform 0.1s ease !important;
    }

    body.home .location-btn:active {
        transform: scale(0.98) !important;
        transition: transform 0.1s ease !important;
    }

    body.home .details-btn:active {
        transform: scale(0.98) !important;
        transition: transform 0.1s ease !important;
    }

    .category-btn {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        cursor: pointer;
    }

    .category-btn:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }

    .category-btn.active:active {
        transform: scale(0.95);
    }
}

/* Landscape orientation adjustments - Enhanced mobile background responsiveness */
@media (max-width: 768px) and (orientation: landscape) {
    body.home {
        background: url('../images/header_bg.png') center center/cover no-repeat !important;
        background-attachment: scroll !important;
        background-size: cover !important;
        background-position: center center !important;
        min-height: 100vh !important;
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }

    html body.home {
        background: url('../images/header_bg.png') center center/cover no-repeat !important;
        background-attachment: scroll !important;
        background-size: cover !important;
        background-position: center center !important;
    }

    body.home .hero-section {
        min-height: 50vh !important;
        padding: 1rem 0 !important;
    }

    body.home .main-title {
        font-size: 1.6rem !important;
    }

    body.home .subtitle {
        font-size: 0.9rem !important;
    }

    body.home .search-container {
        padding: 12px !important;
    }

    body.home .property-tabs .nav-item {
        flex: 0 0 auto !important;
    }

    body.home .property-tabs .nav-link {
        padding: 6px 12px !important;
        font-size: 0.7rem !important;
    }

    body.home .search-input-group {
        flex-direction: row !important;
        gap: 10px !important;
        align-items: center !important;
    }

    body.home .search-btn {
        width: auto !important;
        min-width: 100px !important;
    }

    body.home .location-btn {
        margin-top: 0 !important;
        margin-left: 8px !important;
    }

    .category-btn {
        padding: 6px 12px;
        flex: 1 1 calc(16.666% - 3px);
        max-width: calc(16.666% - 3px);
        min-width: 65px;
        font-size: 0.75rem;
    }

    .category-btn span {
        font-size: 0.75rem;
    }
}

/* Accessibility improvements for mobile */
@media (max-width: 768px) {
    body.home .property-tabs .nav-link:focus {
        outline: 2px solid #007bff !important;
        outline-offset: 2px !important;
    }

    body.home .search-btn:focus,
    body.home .location-btn:focus,
    body.home .details-btn:focus {
        outline: 2px solid #007bff !important;
        outline-offset: 2px !important;
    }

    .category-btn:focus {
        outline: 2px solid #007bff;
        outline-offset: 2px;
        box-shadow:
            0 0 0 3px rgba(0,123,255,0.25),
            0 4px 12px rgba(0,0,0,0.15);
    }

    .category-btn:focus:not(.active) {
        border-color: rgba(0,123,255,0.5);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .category-btn {
        border: 2px solid #000;
        background: #fff;
    }

    .category-btn.active {
        background: #000;
        color: #fff;
    }
}

/* =======================
   Responsive fixes: stat card
   ======================= */
@media (max-width: 480px) {
    .atp-stats-container {
        padding: 6px 10px !important;
        display: flex !important;
        justify-content: center !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .atp-stats-table {
        min-width: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        margin: 6px auto !important;
        padding: 10px !important;
    }

    .atp-stats-badge-wrapper {
        width: 100% !important;
        text-align: center !important;
        margin: 6px 0 !important;
    }

    .atp-stats-badge {
        margin: 0 auto !important;
        display: inline-block !important;
        min-width: 44px !important;
        padding: 4px 10px !important;
    }

    .atp-stats-row {
        display: flex !important;
        justify-content: space-between !important;
        gap: 8px !important;
        padding: 6px 0 !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
    }

    .atp-stats-number {
        min-width: 48px !important;
        text-align: right !important;
        font-size: 0.9rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .atp-stats-label {
        flex: 1 1 auto !important;
        padding-right: 8px !important;
        font-size: 0.92rem !important;
        text-align: left !important;
        word-break: break-word !important;
    }

    .atp-stats-header,
    .atp-comparison {
        text-align: center !important;
        font-size: 0.9rem !important;
    }
}

@media (max-width: 360px) {
    .atp-stats-table {
        padding: 8px !important;
        width: calc(100% - 16px) !important;
    }

    .atp-stats-number {
        min-width: 42px !important;
        font-size: 0.78rem !important;
    }

    .atp-stats-label {
        font-size: 0.82rem !important;
    }
}

/* ========== SUCCESS/ERROR NOTIFICATION STYLES ========== */
.alert {
    border-radius: 8px;
    font-size: 1rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideDown 0.4s ease-out;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-success i {
    color: #28a745;
}

.alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-danger i {
    color: #dc3545;
}

.alert .btn-close {
    padding: 0.5rem;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Auto-dismiss animation */
.alert.fade-out {
    animation: fadeOut 0.5s ease-out forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

