/**
 * Cres Properties Theme - Main Stylesheet
 * Matches cresproperties.com design exactly
 * Colors: Grey #ebebeb, White #ffffff, Blue #0000f0
 * Fonts: Quicksand (body), Merriweather (display)
 */

/* ============================================
   Google Fonts Import
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,400;0,700;1,400&family=Quicksand:wght@400;500;600;700&display=swap');

/* ============================================
   CSS Variables
   ============================================ */
:root {
    /* Brand Colors */
    --cres-blue: #0000f0;
    --cres-blue-dark: #0000c0;
    --cres-grey: #ebebeb;
    --cres-white: #ffffff;
    --cres-black: #000000;

    /* Text Colors */
    --cres-text: #000000;
    --cres-text-muted: #666666;
    --cres-text-light: #999999;

    /* Semantic Colors */
    --cres-success: #28a745;
    --cres-warning: #ffc107;
    --cres-danger: #dc3545;

    /* Fonts */
    --font-body: 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Merriweather', Georgia, serif;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Layout */
    --container-max: 1200px;
    --header-height: 60px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* ============================================
   Base Styles
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--cres-text);
    background: var(--cres-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Typography
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.3;
    color: var(--cres-black);
    margin-bottom: var(--space-md);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.125rem;
}

h6 {
    font-size: 1rem;
}

/* Section headings - Merriweather 36pt as seen on reference */
.section-heading {
    font-family: var(--font-display);
    font-size: 36pt;
    font-weight: 400;
    text-align: center;
    color: var(--cres-black);
    margin-bottom: var(--space-xl);
}

p {
    margin-bottom: var(--space-md);
}

a {
    color: var(--cres-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--cres-blue-dark);
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* Leaflet Map Fix - Override global img styles that break tile rendering */
.leaflet-container img {
    max-width: none !important;
    max-height: none !important;
    width: auto;
    height: auto;
}

.leaflet-container img.leaflet-image-layer {
    width: auto;
    height: auto;
}

.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane>svg,
.leaflet-pane>canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
    position: absolute;
    left: 0;
    top: 0;
}

.leaflet-tile {
    filter: inherit;
    visibility: hidden;
}

.leaflet-tile-loaded {
    visibility: inherit;
}

.leaflet-container {
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

/* ============================================
   Layout
   ============================================ */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* Section Backgrounds */
.section {
    padding: var(--space-3xl) 0;
}

.section-white {
    background: var(--cres-white);
}

.section-grey {
    background: var(--cres-grey);
}

/* HomepageSection from reference */
.HomepageSection {
    padding: var(--space-lg) 0;
}

/* ============================================
   Site Header - Fixed Navigation
   ============================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--cres-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: var(--header-height);
}

.header-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.site-header .logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cres-black);
    text-decoration: none;
}

.site-header .logo:hover {
    color: var(--cres-blue);
    text-decoration: none;
}

/* Main Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.main-nav a {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9375rem;
    color: var(--cres-black);
    text-decoration: none;
    transition: color var(--transition-fast);
    padding: var(--space-sm) 0;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--cres-blue);
    text-decoration: none;
}

/* Mobile Navigation Toggle - Hidden on desktop */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
    width: 36px;
    height: 36px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    z-index: 1001;
}

.mobile-nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--cres-black);
    transition: transform var(--transition-base), opacity var(--transition-fast);
}

/* Hamburger animation when active */
.mobile-nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Body padding to account for fixed header */
body {
    padding-top: var(--header-height);
}

/* Mobile Navigation Styles */
@media (max-width: 767.98px) {
    .mobile-nav-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--cres-white);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        transition: max-height var(--transition-base) ease-out;
    }

    .main-nav.active {
        max-height: 400px;
    }

    .main-nav a {
        padding: var(--space-md) var(--space-lg);
        border-bottom: 1px solid var(--cres-grey);
        text-align: left;
    }

    .main-nav a:last-child {
        border-bottom: none;
    }

    .main-nav a:hover {
        background: var(--cres-grey);
    }
}

/* ============================================
   Navigation - Fixed Top with Scroll State
   ============================================ */
#mainnav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    transition: all var(--transition-base);
}

/* Initial state - transparent at top */
#mainnav.bgi3-top {
    background-color: transparent !important;
}

/* Scrolled state - white background */
#mainnav.bgi3 {
    background-color: var(--cres-white) !important;
    box-shadow: var(--shadow-md);
}

#mainnav #logo {
    height: 50px;
    opacity: 1 !important;
}

/* Navigation Links */
#mainnav .navbar-nav .nav-link {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9375rem;
    padding: var(--space-sm) var(--space-md);
    transition: all var(--transition-fast);
}

/* Desktop - Navigation Colors */
@media (min-width: 768px) {
    #mainnav.bgi3-top .navbar-nav .nav-link {
        color: #000000;
    }

    #mainnav.bgi3-top .navbar-nav .nav-link:hover {
        color: var(--cres-blue);
    }

    #mainnav.bgi3 .navbar-nav .nav-link {
        color: var(--cres-black) !important;
    }

    #mainnav.bgi3 .navbar-nav .nav-link:hover {
        color: var(--cres-blue) !important;
    }
}

/* Mobile Navigation */
@media (max-width: 767.98px) {
    #mainnav .navbar-nav .nav-link {
        color: var(--cres-black) !important;
    }

    /* Offcanvas collapse - hidden by default on mobile */
    #mainnav .offcanvas-collapse,
    #WhateverIsNeeded {
        position: fixed;
        top: 56px;
        /* Height of navbar */
        left: 0;
        right: 0;
        bottom: 0;
        background-color: var(--cres-white) !important;
        padding: var(--space-lg);
        padding-bottom: var(--space-md);
        transform: translateY(-100%);
        visibility: hidden;
        opacity: 0;
        transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
        z-index: 1040;
        overflow-y: auto;
        max-height: calc(100vh - 56px);
    }

    /* Show menu when open class is added */
    #mainnav .offcanvas-collapse.open,
    #WhateverIsNeeded.open {
        transform: translateY(0);
        visibility: visible;
        opacity: 1;
    }

    /* Stack navigation items vertically */
    #WhateverIsNeeded .navbar-nav {
        flex-direction: column;
        align-items: stretch;
    }

    #WhateverIsNeeded .nav-item {
        border-bottom: 1px solid var(--cres-grey);
    }

    #WhateverIsNeeded .nav-link {
        padding: var(--space-md) 0;
    }
}


/* Navbar Toggler */
.navbar-toggler {
    border: none;
    padding: var(--space-sm);
    background-color: var(--cres-white) !important;
    border-radius: 4px;
}

.navbar-toggler-icon {
    background-color: var(--cres-white);
}

/* Dropdown Menus */
.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: 8px;
    padding: var(--space-sm) 0;
}

.dropdown-item {
    font-family: var(--font-body);
    padding: var(--space-sm) var(--space-lg);
    color: var(--cres-black);
    transition: background var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--cres-grey);
    color: var(--cres-blue);
}

/* Login Button */
.SiteUserToolbar .btnLogin {
    background-color: var(--cres-blue) !important;
    color: var(--cres-white) !important;
    border: none;
    border-radius: 4px;
    padding: var(--space-sm) var(--space-lg);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.875rem;
    transition: background var(--transition-fast);
}

.SiteUserToolbar .btnLogin:hover {
    background-color: var(--cres-blue-dark) !important;
}

/* ============================================
   Hero Section - Full Width Carousel
   ============================================ */
#herotheme2 {
    position: relative;
    height: 100vh;
    min-height: 600px;
    max-height: 900px;
    overflow: hidden;
}

/* Background Carousel */
.backgroundCarouselContainer {
    position: absolute;
    inset: 0;
}

#backgroundCarousel,
#backgroundCarousel .carousel-inner,
#backgroundCarousel .carousel-item {
    height: 100%;
}

.imgMainScroll {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Hero Content Overlay */
.bgiContent {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding: var(--space-xl);
}

.searchContainer {
    text-align: center;
    max-width: 600px;
    width: 100%;
}

/* Hero Logo */
.imageLogoContainer img {
    max-width: 100%;
    height: auto;
    margin-bottom: var(--space-xl);
}

#bannerLogo {
    max-width: 400px;
    width: 100%;
    transition: max-width var(--transition-base);
}

@media (max-width: 767.98px) {
    #bannerLogo {
        max-width: 240px;
    }
}

/* Search Box */
#HomeSearch {
    background-color: rgba(255, 255, 255, 0.5) !important;
    padding: var(--space-md);
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

#HomeSearch .input-group {
    box-shadow: var(--shadow-sm);
    border-radius: 6px;
    overflow: hidden;
}

#HomeSearch .form-control {
    border: none;
    padding: var(--space-md) var(--space-lg);
    font-family: var(--font-body);
    font-size: 1rem;
}

#HomeSearch .form-control:focus {
    box-shadow: none;
    outline: none;
}

#HomeSearch .btn {
    background-color: var(--cres-blue) !important;
    border-color: var(--cres-blue) !important;
    padding: var(--space-md) var(--space-xl);
    color: var(--cres-white);
}

#HomeSearch .btn:hover {
    background-color: var(--cres-blue-dark) !important;
    border-color: var(--cres-blue-dark) !important;
}

/* Call to Action */
.callToAction {
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--cres-black);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    font-family: var(--font-body);
    font-weight: 600;
    padding: var(--space-sm) var(--space-xl);
    border-radius: 4px;
    transition: all var(--transition-fast);
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
}

.btn-primary,
.sectionButton {
    background-color: var(--cres-blue) !important;
    border-color: var(--cres-blue) !important;
    color: var(--cres-white) !important;
}

.btn-primary:hover,
.sectionButton:hover {
    background-color: var(--cres-blue-dark) !important;
    border-color: var(--cres-blue-dark) !important;
    color: var(--cres-white) !important;
    text-decoration: none;
}

.btn-outline-primary {
    background-color: transparent;
    border: 2px solid var(--cres-blue);
    color: var(--cres-blue);
}

.btn-outline-primary:hover {
    background-color: var(--cres-blue);
    color: var(--cres-white);
}

/* ============================================
   Mission Section
   ============================================ */
.tinymcemedia {
    font-family: var(--font-display);
}

.tinymcemedia p {
    text-align: center;
}

/* Section Image */
.sectionImage {
    border-radius: 8px;
}

/* ============================================
   City Quick Links
   ============================================ */
.CityQuickLink {
    padding: var(--space-3xl) 0;
}

.CityQuickLink .headlineContainer h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    text-align: center;
    margin-bottom: var(--space-xl);
}

.CityQuickLink .card {
    border: none;
    border-radius: 8px;
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.CityQuickLink .card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.CityQuickLink .cardImage {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform var(--transition-base);
}

.CityQuickLink .card:hover .cardImage {
    transform: scale(1.08);
}

.cityDisplayNamePill {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-sm) var(--space-md);
    background-color: rgba(0, 0, 0, 0.7) !important;
}

.cityDisplayName {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--cres-white) !important;
}

/* ============================================
   Testimonials Section
   ============================================ */
#testimonialSlides {
    padding: var(--space-xl) 0;
}

#testimonialSlides .wrapper {
    position: relative;
    padding: var(--space-lg);
}

/* Quote marks in blue */
#testimonialSlides .wrapper p::before,
#testimonialSlides .wrapper p::after {
    color: var(--cres-blue);
    font-size: 2rem;
    font-family: serif;
}

#testimonialSlides .wrapper p::before {
    content: '"';
    position: absolute;
    left: 0;
    top: 0;
}

.customerText {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--cres-text);
}

.customerTextContainer {
    min-height: 100px;
}

/* Testimonial Author */
#testimonialSlides span[style*="italic"] {
    font-family: var(--font-body);
    font-style: italic;
}

/* Read More Link */
.SeeMoreLink a {
    color: var(--cres-blue) !important;
    font-family: var(--font-body);
    font-weight: 500;
}

/* Carousel Controls */
#testimonialSlides .carousel-control-prev,
#testimonialSlides .carousel-control-next {
    width: 30px;
    opacity: 0.5;
}

#testimonialSlides .carousel-control-prev:hover,
#testimonialSlides .carousel-control-next:hover {
    opacity: 1;
}

.icon-lg {
    font-size: 3rem;
    color: var(--cres-black);
}

/* ============================================
   Property Cards / Featured Listings
   ============================================ */
.CustomPropertyCarousel,
.CustomPropertyScroll {
    padding: var(--space-xl) 0;
}

.CustomPropertyCarousel .card,
.CustomPropertyScroll .card {
    border: 1px solid var(--cres-grey);
    border-radius: 8px;
    overflow: hidden;
    transition: all var(--transition-base);
    background: var(--cres-white);
}

.CustomPropertyCarousel .card:hover,
.CustomPropertyScroll .card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

/* Property Image */
.card-img-top {
    background-size: cover;
    background-position: center;
    border-radius: 0;
}

.ratio-3x2 {
    aspect-ratio: 3/2;
}

/* Property Details */
.search-result-details {
    padding: var(--space-sm) 0;
}

.srTop {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xs);
}

.propSaleStatus,
.search-result-proptype {
    font-size: 0.75rem;
    font-family: var(--font-body);
}

.search-result-price {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--cres-black);
    margin-bottom: var(--space-xs);
}

.AddressDisplay {
    line-height: 1.4;
}

.srAddress {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--cres-black);
    display: block;
}

.srCity {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--cres-text-muted);
    display: block;
}

/* Property Specs */
.search-result-specs {
    display: flex;
    gap: var(--space-md);
    list-style: none;
    padding: var(--space-sm) 0 0 0;
    margin: var(--space-sm) 0 0 0;
    border-top: 1px solid var(--cres-grey);
    font-size: 0.75rem;
    color: var(--cres-text-muted);
    font-family: var(--font-body);
}

/* Carousel Controls */
.CustomPropertyCarousel .carousel-control-prev,
.CustomPropertyCarousel .carousel-control-next {
    background: none;
    color: var(--cres-black) !important;
    width: 5% !important;
    opacity: 0.5;
}

.CustomPropertyCarousel .carousel-control-prev:hover,
.CustomPropertyCarousel .carousel-control-next:hover {
    opacity: 1;
}

.icon-med {
    font-size: 5rem;
    line-height: 1;
}

/* See All Link */
a[style*="color:blue"],
a[style*="color: blue"] {
    color: var(--cres-blue) !important;
    font-family: var(--font-body);
    font-weight: 500;
}

/* ============================================
   Footer
   ============================================ */
#footer {
    background: var(--cres-grey);
    padding: var(--space-3xl) 0 var(--space-xl);
    color: var(--cres-black);
}

#footer a {
    color: var(--cres-black) !important;
    text-decoration: none;
}

#footer a:hover {
    color: var(--cres-blue) !important;
}

.footerLinks {
    font-family: var(--font-body);
    font-size: 0.875rem;
}

.footerLinks:focus {
    outline: none;
}

/* Footer Badges */
.footer-badges img {
    height: 40px;
    margin-right: var(--space-md);
    opacity: 0.8;
}

/* Disclaimer */
.DisclaimerContainer {
    font-size: 0.75rem;
    color: var(--cres-text-muted);
    line-height: 1.5;
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* ============================================
   Contact Modal
   ============================================ */
.btn-contactX {
    border: none;
    outline: none;
    box-shadow: none;
    background-color: transparent;
    font-size: 32pt;
    font-family: 'Times New Roman', serif;
    font-weight: 600;
}

.contactform-input,
.contactform-input:focus {
    border: none;
    background-color: transparent;
    font-family: var(--font-body);
    font-size: 14pt;
    color: #666666;
}

.contactform-input::placeholder {
    color: #5e5e5e;
}

.contactform-input-hr {
    margin-top: 8px;
    background-color: #5e5e5e !important;
    opacity: 1;
    height: 2px !important;
}

.contactform-input-hr-errormsg {
    background-color: var(--cres-blue) !important;
    color: var(--cres-white) !important;
    font-size: 0.75rem;
    padding: 4px 8px;
}

/* ============================================
   Forms
   ============================================ */
.form-control {
    font-family: var(--font-body);
    border: 1px solid var(--cres-grey);
    border-radius: 4px;
    padding: var(--space-sm) var(--space-md);
}

.form-control:focus {
    border-color: var(--cres-blue);
    box-shadow: 0 0 0 3px rgba(0, 0, 240, 0.1);
    outline: none;
}

/* ============================================
   Utilities
   ============================================ */
.text-blue {
    color: var(--cres-blue) !important;
}

.bg-blue {
    background-color: var(--cres-blue) !important;
}

.bg-grey {
    background-color: var(--cres-grey) !important;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 991.98px) {
    #herotheme2 {
        height: auto;
        min-height: 500px;
    }

    #bannerLogo {
        max-width: 280px;
    }

    .section-heading {
        font-size: 24pt;
    }
}

@media (max-width: 767.98px) {
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .section {
        padding: var(--space-2xl) 0;
    }

    #herotheme2 {
        min-height: 400px;
    }

    #bannerLogo {
        max-width: 200px;
    }

    .CityQuickLink .card {
        width: 150px !important;
        height: 150px !important;
    }
}

@media (max-width: 479px) {
    #mobileHomeSearch #HomeSearch {
        border-radius: inherit !important;
        padding: 10px;
    }

    .container {
        padding: 0 var(--space-md);
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {

    #mainnav,
    .carousel-control-prev,
    .carousel-control-next,
    .SiteUserToolbar,
    .favorite-btn {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000;
    }
}

/* ============================================
   Favorite Button Styles
   ============================================ */
.favorite-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    color: #666;
    font-size: 1.1rem;
    z-index: 10;
}

.favorite-btn:hover {
    background: #fff;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.favorite-btn:hover i {
    color: #ff4757;
}

.favorite-btn.active {
    background: #fff;
}

.favorite-btn.active i {
    color: #ff4757;
}

/* Heart animation on click */
.favorite-btn.animate {
    animation: heartBeat 0.3s ease-in-out;
}

@keyframes heartBeat {
    0% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.3);
    }

    50% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
    }
}

/* Size variants */
.favorite-btn-sm {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
}

.favorite-btn-lg {
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
}

/* Absolute positioning for card overlays */
.favorite-btn-absolute {
    position: absolute;
    top: 12px;
    right: 12px;
}

/* Favorites Navigation Badge */
.favorites-nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.favorites-badge {
    display: none;
    align-items: center;
    justify-content: center;
    background: #ff4757;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 50px;
    margin-left: 4px;
}

/* Property card relative positioning for favorite button */
.property-card-wrapper {
    position: relative;
}

.property-card-wrapper .favorite-btn-absolute {
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.property-card-wrapper:hover .favorite-btn-absolute {
    opacity: 1;
}

/* ============================================
   Property Gallery
   ============================================ */
.property-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

@media (min-width: 576px) {
    .property-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 992px) {
    .property-gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.gallery-item {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    background: var(--cres-grey);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-base);
}

.gallery-item-overlay i {
    color: var(--cres-white);
    font-size: 1.5rem;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity var(--transition-base), transform var(--transition-base);
}

.gallery-item:hover .gallery-item-overlay {
    background: rgba(0, 0, 0, 0.35);
}

.gallery-item:hover .gallery-item-overlay i {
    opacity: 1;
    transform: scale(1);
}

/* ============================================
   Lightbox Modal
   ============================================ */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gallery-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-counter {
    margin-top: var(--space-md);
    color: var(--cres-white);
    font-family: var(--font-body);
    font-size: 0.9rem;
    opacity: 0.8;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--cres-white);
    font-size: 2.5rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
    z-index: 10;
    line-height: 1;
    padding: 0.5rem;
}

.lightbox-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--cres-white);
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity var(--transition-fast), background var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.lightbox-nav:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
    left: 1rem;
}

.lightbox-next {
    right: 1rem;
}

@media (max-width: 767.98px) {
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .lightbox-close {
        font-size: 2rem;
    }
}

/* ============================================
   Content Blocks - Accordion
   ============================================ */

.content-accordion {
    margin-bottom: var(--space-xl);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.content-accordion__item {
    border: none;
    border-bottom: 1px solid rgba(0, 0, 240, 0.08);
    background: var(--cres-white);
}

.content-accordion__item:last-child {
    border-bottom: none;
}

.content-accordion__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    width: 100%;
    padding: var(--space-lg) var(--space-xl);
    background: var(--cres-white);
    border: none;
    text-align: left;
    cursor: pointer;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.0625rem;
    color: var(--cres-black);
    transition: all var(--transition-base);
    position: relative;
}

.content-accordion__header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: transparent;
    transition: background var(--transition-base);
}

.content-accordion__header:hover {
    background: rgba(0, 0, 240, 0.02);
}

.content-accordion__header.is-open {
    background: rgba(0, 0, 240, 0.03);
    color: var(--cres-blue);
}

.content-accordion__header.is-open::before {
    background: var(--cres-blue);
}

.content-accordion__header span {
    flex: 1;
    line-height: 1.4;
}

.content-accordion__icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    padding: 4px;
    border-radius: 50%;
    background: var(--cres-grey);
    color: var(--cres-text-muted);
    transition: all var(--transition-base);
}

.content-accordion__header:hover .content-accordion__icon {
    background: rgba(0, 0, 240, 0.1);
    color: var(--cres-blue);
}

.content-accordion__header.is-open .content-accordion__icon {
    background: var(--cres-blue);
    color: var(--cres-white);
    transform: rotate(180deg);
}

.content-accordion__content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--cres-white);
}

.content-accordion__content.is-open {
    max-height: 2000px;
}

.content-accordion__inner {
    padding: 0 var(--space-xl) var(--space-xl) var(--space-xl);
    padding-left: calc(var(--space-xl) + 4px);
    color: var(--cres-text);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.8;
    border-left: 4px solid var(--cres-blue);
    margin-left: 0;
    background: linear-gradient(to right, rgba(0, 0, 240, 0.02), transparent);
}

.content-accordion__inner p {
    margin-bottom: var(--space-md);
}

.content-accordion__inner p:last-child {
    margin-bottom: 0;
}

/* Mobile adjustments */
@media (max-width: 767.98px) {
    .content-accordion__header {
        padding: var(--space-md) var(--space-lg);
        font-size: 0.9375rem;
    }

    .content-accordion__inner {
        padding: 0 var(--space-lg) var(--space-lg) var(--space-lg);
        padding-left: calc(var(--space-lg) + 4px);
        font-size: 0.9375rem;
    }
}

/* ============================================
   Content Blocks - Table
   ============================================ */

.content-table-wrapper {
    margin-bottom: var(--space-xl);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.content-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-body);
}

.content-table th,
.content-table td {
    padding: var(--space-md);
    text-align: left;
    border: 1px solid var(--cres-grey);
}

.content-table thead th {
    background: var(--cres-grey);
    font-weight: 600;
    color: var(--cres-black);
}

.content-table tbody tr:nth-child(even) {
    background: #f9f9f9;
}

.content-table tbody tr:hover {
    background: #f0f0f0;
}

/* Responsive table - cards on mobile */
@media (max-width: 767.98px) {
    .content-table {
        display: block;
    }

    .content-table thead {
        display: none;
    }

    .content-table tbody {
        display: block;
    }

    .content-table tbody tr {
        display: block;
        margin-bottom: var(--space-md);
        border: 1px solid var(--cres-grey);
        border-radius: 8px;
        padding: var(--space-sm);
        background: var(--cres-white);
    }

    .content-table tbody td {
        display: flex;
        justify-content: space-between;
        padding: var(--space-sm) var(--space-md);
        border: none;
        border-bottom: 1px solid var(--cres-grey);
    }

    .content-table tbody td:last-child {
        border-bottom: none;
    }

    .content-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--cres-text-muted);
        margin-right: var(--space-md);
        flex-shrink: 0;
    }
}

/* ============================================
   Content Blocks - Form
   ============================================ */

.content-form {
    margin-bottom: var(--space-xl);
}

/* ============================================
   NEW BLOCKS STYLES
   ============================================ */

/* Features Grid */
.block-features .card {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.block-features .card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

/* Agent Card */
.block-agent .card-title {
    color: var(--cres-black);
}
.block-agent .btn-outline-primary:hover {
    color: var(--cres-white) !important;
}

/* Mortgage Calculator */
.block-mortgage .card {
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}
.block-mortgage .display-6 {
    font-family: var(--font-display);
}

/* Recent Posts */
.block-recent-posts .card-img-top {
    transition: opacity var(--transition-fast);
}
.block-recent-posts .card:hover .card-img-top {
    opacity: 0.9;
}
.block-recent-posts .card-title a:hover {
    color: var(--cres-blue);
}
