/* Bootstrap 5 Form Fixes pro django-filter */

/* Základní styl pro form-select aby fungoval správně */
.form-select {
    display: block !important;
    width: 100% !important;
    padding: 0.375rem 2.25rem 0.375rem 0.75rem !important;
    font-size: 1rem !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    color: #212529 !important;
    background-color: #fff !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 16px 12px !important;
    border: 1px solid #ced4da !important;
    border-radius: 0.375rem !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

.form-select:focus {
    border-color: #86b7fe !important;
    outline: 0 !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

.form-select:disabled,
.form-select[readonly] {
    background-color: #e9ecef !important;
    opacity: 1 !important;
}

/* Sidebar form specifické styly */
#sidebar .form-select,
#sidebar .form-control {
    width: 100% !important;
    margin-bottom: 0 !important;
}

#sidebar .mb-3 {
    margin-bottom: 1rem !important;
}

#sidebar label {
    display: block !important;
    margin-bottom: 0.5rem !important;
    font-weight: 500 !important;
    color: #333 !important;
}

/* Tlačítko vyhledávání */
#sidebar .d-grid {
    display: grid !important;
    gap: 0.5rem !important;
}

#sidebar .btn-primary {
    width: 100% !important;
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: #fff !important;
    font-weight: 600 !important;
    padding: 0.75rem 1rem !important;
    font-size: 1rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: all 0.3s ease !important;
}

#sidebar .btn-primary:hover {
    background-color: #c82333 !important;
    border-color: #bd2130 !important;
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3) !important;
    transform: translateY(-1px) !important;
}

#sidebar .btn-primary:active,
#sidebar .btn-primary:focus {
    background-color: #bd2130 !important;
    border-color: #b21f2d !important;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.5) !important;
}

/* Zajistí, že form-control má konzistentní vzhled */
#sidebar .form-control {
    display: block !important;
    width: 100% !important;
    padding: 0.375rem 0.75rem !important;
    font-size: 1rem !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    color: #212529 !important;
    background-color: #fff !important;
    background-clip: padding-box !important;
    border: 1px solid #ced4da !important;
    appearance: none !important;
    border-radius: 0.375rem !important;
}

#sidebar .form-control:focus {
    color: #212529 !important;
    background-color: #fff !important;
    border-color: #86b7fe !important;
    outline: 0 !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

/* Odstranění starých Bootstrap Select stylů */
#sidebar select {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

/* Zajistí že se bootstrap-select nepřepíše */
.bootstrap-select {
    display: none !important;
}

/* Přepis případných konfliktních stylů */
#sidebar select.form-select,
#sidebar select[class*="form-select"] {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
}

/* Dodatečná ochrana proti bootstrap-select pluginu */
.bootstrap-select .dropdown-toggle,
.bootstrap-select .btn-light {
    display: none !important;
}

select {
    cursor: pointer !important;
}

/* ========================================
   MODERNÍ DESIGN NABÍDKA DOMŮ
   ======================================== */

/* Filtr a řazení */
.search-filter-modern {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 0.5rem;
    border-left: 4px solid #18ba60;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.search-results-count {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
}

.search-results-count .badge {
    font-size: 1rem;
    padding: 0.5rem 1rem;
}

/* Property cards */
.property-card {
    background: #fff;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.property-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.property-image-wrapper {
    height: 100%;
    min-height: 350px;
    overflow: hidden;
    background: #f8f9fa;
}

.property-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.property-card:hover .property-image {
    transform: scale(1.05);
}

.property-content {
    padding: 1.5rem;
}

.property-title {
    text-decoration: none;
    color: #2a2a2a;
    transition: color 0.2s ease;
}

.property-title:hover {
    color: #18ba60;
}

.property-title h3 {
    margin: 0;
    font-weight: 600;
}

.property-price {
    text-align: right;
}

.price-amount {
    display: inline-block;
    background: linear-gradient(135deg, #18ba60 0%, #16a854 100%);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-weight: 700;
    font-size: 1.25rem;
    box-shadow: 0 2px 8px rgba(24, 186, 96, 0.3);
}

.property-description {
    color: #6c757d;
    line-height: 1.6;
}

.property-features {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
}

.feature-item {
    text-align: center;
    padding: 0.5rem;
}

.feature-item i {
    color: #18ba60;
    font-size: 1.2rem;
}

.feature-item small {
    display: block;
    font-size: 0.75rem;
}

.feature-item .fw-semibold {
    color: #2a2a2a;
    font-size: 0.95rem;
}

.property-actions .btn {
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.property-actions .btn:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(24, 186, 96, 0.3);
}

/* Stránkování */
.pagination {
    margin-top: 2rem;
}

.pagination .page-link {
    color: #18ba60;
    border: 1px solid #dee2e6;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    margin: 0 0.25rem;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background-color: #18ba60;
    color: #fff;
    border-color: #18ba60;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(24, 186, 96, 0.3);
}

.pagination .page-item.active .page-link {
    background-color: #18ba60;
    border-color: #18ba60;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .property-image-wrapper {
        min-height: 200px;
    }
    
    .property-content {
        padding: 1rem;
    }
    
    .price-amount {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }
    
    .property-features {
        padding: 0.75rem;
    }
    
    .feature-item {
        padding: 0.25rem;
    }
}

/* ========================================
   MODERNÍ DESIGN DETAIL DOMU
   ======================================== */

.modern-detail {
    background: #fff;
}

/* Hlavička detailu */
.detail-header {
    border-bottom: 3px solid #18ba60;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.detail-title {
    color: #2a2a2a;
    font-weight: 700;
    font-size: 2rem;
    margin: 0;
}

.detail-actions .btn {
    transition: all 0.3s ease;
}

.detail-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Galerie */
.property-gallery-modern {
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.property-slide {
    position: relative;
    overflow: hidden;
}

.gallery-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.property-slide:hover .gallery-image {
    transform: scale(1.02);
}

/* Cenová karta */
.price-card .card {
    transition: all 0.3s ease;
}

.price-card .card:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.12) !important;
    transform: translateY(-2px);
}

.price-card .card-header {
    background: linear-gradient(135deg, #18ba60 0%, #16a854 100%);
    border: none;
    padding: 1rem 1.25rem;
}

.price-card .card-header h5 {
    display: flex;
    align-items: center;
    margin: 0;
}

.price-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.price-item:last-child {
    border-bottom: none;
}

.price-label {
    color: #6c757d;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.price-label a {
    text-decoration: none;
    transition: color 0.2s ease;
}

.price-label a:hover {
    color: #0056b3 !important;
}

.price-value {
    font-weight: 600;
    color: #2a2a2a;
    font-size: 1.1rem;
}

.price-item-main {
    padding: 1rem 0 0 0;
}

.price-label-main {
    color: #495057;
    font-weight: 500;
    font-size: 1rem;
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.price-value-main {
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 0.5rem;
}

.price-card .card-footer {
    border-top: 1px solid #dee2e6;
    padding: 1rem 1.25rem;
    line-height: 1.6;
}

/* Sekce karet (popis, parametry) */
.card {
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.1) !important;
}

.card-header {
    border: none;
    padding: 1rem 1.25rem;
}

.card-header h5 {
    display: flex;
    align-items: center;
    margin: 0;
}

.property-description {
    line-height: 1.8;
    color: #495057;
}

.property-description p {
    margin-bottom: 1rem;
}

/* Parametry */
.param-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: #fff;
    border-radius: 0.5rem;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.param-item:hover {
    background: #f8f9fa;
    border-color: #18ba60;
    transform: translateX(5px);
}

.param-item i {
    font-size: 1.5rem;
    margin-right: 0.75rem;
    width: 30px;
    text-align: center;
}

.param-label {
    color: #6c757d;
    margin-right: 0.5rem;
    font-weight: 500;
}

.param-value {
    color: #2a2a2a;
    font-weight: 600;
    margin-left: auto;
}

/* Půdorysy */
.floor-plan-img {
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
}

.floor-plan-img:hover {
    border-color: #18ba60;
    box-shadow: 0 4px 12px rgba(24, 186, 96, 0.2);
    transform: scale(1.02);
}

.image-popup {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
}

.image-popup::after {
    content: '\F52A'; /* Bootstrap Icon zoom */
    font-family: 'bootstrap-icons';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(24, 186, 96, 0.9);
    color: #fff;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-popup:hover::after {
    opacity: 1;
}

/* CTA tlačítko */
.cta-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2rem;
    border-radius: 0.75rem;
    border: 2px dashed #18ba60;
    text-align: center;
    margin-top: 2rem;
}

.cta-button {
    background: linear-gradient(135deg, #18ba60 0%, #16a854 100%) !important;
    border: none !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    padding: 1.25rem 2rem !important;
    font-size: 1.1rem !important;
    border-radius: 3rem !important;
    box-shadow: 0 4px 12px rgba(24, 186, 96, 0.3) !important;
    transition: all 0.3s ease !important;
}

.cta-button:hover {
    background: linear-gradient(135deg, #16a854 0%, #14964a 100%) !important;
    box-shadow: 0 6px 16px rgba(24, 186, 96, 0.4) !important;
    transform: translateY(-2px) !important;
}

.cta-button i {
    font-size: 1.2rem;
}

/* Responsive pro detail */
@media (max-width: 768px) {
    .detail-title {
        font-size: 1.5rem;
    }
    
    .detail-actions {
        margin-top: 1rem;
    }
    
    .price-value-main {
        font-size: 1.5rem;
    }
    
    .param-item {
        font-size: 0.9rem;
    }
    
    .param-item i {
        font-size: 1.25rem;
        width: 25px;
    }
    
    .cta-button {
        padding: 1rem 1.5rem !important;
        font-size: 1rem !important;
    }
}

/* ========================================
   OWL CAROUSEL - OPRAVA IKON
   ======================================== */

/* Přepsání Font Awesome ikon na Bootstrap Icons */
.property-carousel .owl-controls .owl-prev:after,
.property-carousel .owl-controls .owl-next:after {
    font-family: 'bootstrap-icons' !important;
    font-size: 1.2rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
}

.property-carousel .owl-controls .owl-next:after {
    content: "\f285" !important; /* bi-chevron-right */
}

.property-carousel .owl-controls .owl-prev:after {
    content: "\f284" !important; /* bi-chevron-left */
}

/* ========================================
   NOVÝ BOOTSTRAP 5 HOMEPAGE SLIDER
   ======================================== */

#homeCarousel {
    height: 600px;
    margin-bottom: 0;
}

#homeCarousel .carousel-inner {
    height: 600px;
}

#homeCarousel .carousel-item {
    height: 600px;
}

#homeCarousel .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

#homeCarousel .carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem 15%;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.5) 70%, transparent 100%);
    text-align: center;
}

#homeCarousel .caption-content {
    max-width: 800px;
    margin: 0 auto;
}

#homeCarousel .carousel-caption h2 {
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin-bottom: 1rem;
}

#homeCarousel .carousel-caption p {
    color: #fff;
    font-size: 1.2rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

#homeCarousel .carousel-caption .badge {
    font-size: 1rem;
    padding: 0.5rem 1rem;
}

#homeCarousel .price-tag {
    display: inline-block;
    background: linear-gradient(135deg, #18ba60 0%, #16a854 100%);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 2rem;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(24, 186, 96, 0.4);
}

#homeCarousel .btn-danger {
    padding: 0.75rem 2.5rem;
    font-size: 1.1rem;
    border-radius: 2rem;
    font-weight: 600;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
    transition: all 0.3s ease;
}

#homeCarousel .btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(220, 53, 69, 0.5);
}

/* Carousel controls */
#homeCarousel .carousel-control-prev,
#homeCarousel .carousel-control-next {
    width: 80px;
    opacity: 1;
}

#homeCarousel .carousel-control-prev-icon,
#homeCarousel .carousel-control-next-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(24, 186, 96, 0.9);
    border-radius: 50%;
    background-size: 40%;
    transition: all 0.3s ease;
}

#homeCarousel .carousel-control-prev:hover .carousel-control-prev-icon,
#homeCarousel .carousel-control-next:hover .carousel-control-next-icon {
    background-color: rgba(24, 186, 96, 1);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(24, 186, 96, 0.5);
}

/* Indicators */
#homeCarousel .carousel-indicators {
    margin-bottom: 1.5rem;
}

#homeCarousel .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #fff;
    background-color: transparent;
    opacity: 0.7;
    transition: all 0.3s ease;
}

#homeCarousel .carousel-indicators button.active {
    background-color: #18ba60;
    border-color: #18ba60;
    opacity: 1;
    transform: scale(1.3);
}

/* Responsive */
@media (max-width: 992px) {
    #homeCarousel,
    #homeCarousel .carousel-inner,
    #homeCarousel .carousel-item {
        height: 500px;
    }
    
    #homeCarousel .carousel-caption {
        padding: 2rem 10%;
    }
    
    #homeCarousel .carousel-caption h2 {
        font-size: 2rem;
    }
    
    #homeCarousel .price-tag {
        font-size: 1.25rem;
        padding: 0.75rem 1.5rem;
    }
}

@media (max-width: 768px) {
    #homeCarousel,
    #homeCarousel .carousel-inner,
    #homeCarousel .carousel-item {
        height: 450px;
    }
    
    #homeCarousel .carousel-caption {
        padding: 1.5rem 5%;
    }
    
    #homeCarousel .carousel-caption h2 {
        font-size: 1.5rem;
    }
    
    #homeCarousel .carousel-caption p {
        font-size: 1rem;
    }
    
    #homeCarousel .price-tag {
        font-size: 1.1rem;
        padding: 0.5rem 1.25rem;
    }
    
    #homeCarousel .btn-danger {
        padding: 0.6rem 2rem;
        font-size: 1rem;
    }
    
    #homeCarousel .carousel-control-prev-icon,
    #homeCarousel .carousel-control-next-icon {
        width: 45px;
        height: 45px;
    }
}
