/**
 * Church Organ Theme Colors
 * Primary: #C00100 (Red)
 * Secondary: #fff (White)
 * Background: #ededed (Light Gray)
 * Accent: #B8860B (Dark Goldenrod - darker gold)
 */

:root {
    --church-red: #C00100;
    --church-white: #ffffff;
    --church-light-gray: #ededed;
    --church-gold: #B8860B;
    --church-gold-light: #D4AF37;
    --church-dark: #1a1a1a;
}

/* Preloader - Organ Theme */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader-content {
    text-align: center;
    color: var(--church-gold-light);
}

/* Organ Keyboard */
.organ-keyboard {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 3px;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(to bottom, #2a2a2a 0%, #1a1a1a 100%);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 2px 5px rgba(255, 255, 255, 0.1);
}

.organ-key {
    width: 30px;
    height: 120px;
    position: relative;
}

.organ-key.white-key {
    background: linear-gradient(to bottom, #ffffff 0%, #f5f5f5 50%, #e0e0e0 100%);
    border: 1px solid #ccc;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3), inset 0 -2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.organ-key.white-key:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.3) 100%);
    border-radius: 0 0 4px 4px;
}

/* Black Keys */
.organ-key .black-key {
    position: absolute;
    width: 18px;
    height: 70px;
    background: linear-gradient(to bottom, #1a1a1a 0%, #0a0a0a 50%, #000000 100%);
    border: 1px solid #000;
    border-radius: 0 0 3px 3px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5), inset 0 -2px 5px rgba(255, 255, 255, 0.1);
    z-index: 10;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.organ-key .black-key:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(to bottom, rgba(100, 100, 100, 0.3) 0%, rgba(0, 0, 0, 0.3) 100%);
    border-radius: 0 0 3px 3px;
}

/* Only some keys play - non-sequential pattern */
.organ-key.white-key {
    animation: none;
}

/* Selected keys that will play - only 5 keys, well spaced */
.organ-key.white-key:nth-child(2) { 
    animation: keyPress 3s ease-in-out infinite, whiteKeyPress 3s ease-in-out infinite;
    animation-delay: 0s, 0s; 
}
.organ-key.white-key:nth-child(7) { 
    animation: keyPress 3s ease-in-out infinite, whiteKeyPress 3s ease-in-out infinite;
    animation-delay: 0.8s, 0.8s; 
}
.organ-key.white-key:nth-child(12) { 
    animation: keyPress 3s ease-in-out infinite, whiteKeyPress 3s ease-in-out infinite;
    animation-delay: 1.6s, 1.6s; 
}
.organ-key.white-key:nth-child(18) { 
    animation: keyPress 3s ease-in-out infinite, whiteKeyPress 3s ease-in-out infinite;
    animation-delay: 2.4s, 2.4s; 
}
.organ-key.white-key:nth-child(23) { 
    animation: keyPress 3s ease-in-out infinite, whiteKeyPress 3s ease-in-out infinite;
    animation-delay: 0.4s, 0.4s; 
}



@keyframes keyPress {
    0%, 20%, 55%, 100% {
        transform: translateY(0);
    }
    25%, 50% {
        transform: translateY(4px);
    }
}

@keyframes whiteKeyPress {
    25%, 50% {
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), inset 0 2px 5px rgba(0, 0, 0, 0.2);
        background: linear-gradient(to bottom, #e0e0e0 0%, #d0d0d0 50%, #c0c0c0 100%);
    }
}

@keyframes blackKeyPress {
    0%, 20%, 55%, 100% {
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5), inset 0 -2px 5px rgba(255, 255, 255, 0.1);
        background: linear-gradient(to bottom, #1a1a1a 0%, #0a0a0a 50%, #000000 100%);
    }
    25%, 50% {
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), inset 0 2px 5px rgba(255, 255, 255, 0.05);
        background: linear-gradient(to bottom, #0a0a0a 0%, #050505 50%, #000000 100%);
    }
}


/* Musical Notes */
.musical-notes {
    position: relative;
    height: 40px;
    margin-top: 20px;
}

.musical-notes .note {
    position: absolute;
    font-size: 24px;
    color: var(--church-gold-light);
    opacity: 0;
    animation: noteFloat 2.5s ease-in-out infinite;
}

.musical-notes .note:nth-child(1) {
    left: 20%;
    animation-delay: 0s;
}

.musical-notes .note:nth-child(2) {
    left: 40%;
    animation-delay: 0.625s;
}

.musical-notes .note:nth-child(3) {
    left: 60%;
    animation-delay: 1.25s;
}

.musical-notes .note:nth-child(4) {
    left: 80%;
    animation-delay: 1.875s;
}

@keyframes noteFloat {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    50% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-20px) scale(0.8);
    }
}

.musical-notes .note {
    position: absolute;
    font-size: 24px;
    color: var(--church-gold-light);
    opacity: 0;
    animation: noteFloat 2.5s ease-in-out infinite;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* Global color replacements - handled by specific selectors below */

/* ============================================
   Global Color Updates
   ============================================ */

body {
    background: var(--church-white);
    color: #363636;
    font-family: Arial, Helvetica, sans-serif !important;
}

h1, h2, h3, h4, h5, h6 {
    font-family: Arial, Helvetica, sans-serif !important;
    font-weight: 600;
}

/* ============================================
   Button Styles
   ============================================ */

/* Primary Button (Red) */
.btn-style-one,
.theme-btn.btn-style-one {
    background-color: var(--church-red);
    border-color: var(--church-red);
    color: var(--church-white);
}

.btn-style-one:hover,
.theme-btn.btn-style-one:hover {
    color: var(--church-red);
    background-color: transparent;
    border-color: var(--church-red);
}

/* Secondary Button (Gold) */
.btn-style-two,
.theme-btn.btn-style-two {
    background-color: var(--church-gold);
    border-color: var(--church-gold);
    color: var(--church-white)!important;
}

.btn-style-two:hover,
.theme-btn.btn-style-two:hover {
    color: var(--church-gold);
    background-color: transparent;
    border-color: var(--church-gold);
}

/* Tertiary Button (Gold Outline) */
.btn-style-three,
.theme-btn.btn-style-three {
    color: var(--church-gold);
    background-color: transparent;
    border-color: var(--church-gold);
}

.btn-style-three:hover,
.theme-btn.btn-style-three:hover {
    color: var(--church-white);
    background-color: var(--church-gold);
    border-color: var(--church-gold);
}

/* Button Style Four (Red Outline) */
.btn-style-four,
.theme-btn.btn-style-four {
    color: var(--church-red);
    background-color: transparent;
    border-color: var(--church-red);
}

.btn-style-four:hover,
.theme-btn.btn-style-four:hover {
    color: var(--church-white);
    background-color: var(--church-red);
    border-color: var(--church-red);
}

/* Icon Button */
.theme-btn.icon-btn .icon {
    background: var(--church-gold);
    color: var(--church-white);
}

/* ============================================
   Header Styles
   ============================================ */

.main-header {
    background: var(--church-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.main-header .main-box {
    background: var(--church-white);
}

/* Logo Size Constraints */
.main-header .logo img,
.main-header .logo-box img {
    max-width: 200px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.mobile-header .logo img {
    max-width: 150px;
    max-height: 50px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Navigation Links */
.main-menu .navigation > li > a,
.main-menu .navigation > li > span {
    color: #363636;
}

.main-menu .navigation > li:hover > a,
.main-menu .navigation > li:hover > span,
.main-menu .navigation > li.current > a,
.main-menu .navigation > li.current > span {
    color: var(--church-red);
}

/* ============================================
   Banner Section
   ============================================ */

.banner-section .background-layer:before {
    background: var(--church-red);
    background: linear-gradient(135deg, var(--church-red) 0%, #8B0000 100%);
    opacity: 0.9;
}

.banner-section .upper-heading h3 {
    color: var(--church-white);
}

.banner-section .upper-heading p {
    color: var(--church-white);
    opacity: 0.9;
}

/* ============================================
   Links and Accents
   ============================================ */

a {
    color: var(--church-red);
}

a:hover {
    color: var(--church-gold);
}

/* ============================================
   Section Titles
   ============================================ */

.sec-title h2 {
    color: #363636;
}

.sec-title .divider {
    background: var(--church-red);
}

.sec-title .divider:after {
    background: var(--church-gold);
}

/* ============================================
   Background Colors
   ============================================ */

.page-wrapper {
    background: var(--church-white);
}

/* Light Gray Background Sections */
.features-section,
.listing-section,
.how-it-works,
.testimonial-section {
    background: var(--church-light-gray);
}

/* ============================================
   Progress Bars
   ============================================ */

.bar-item .skill-bar .bar-inner .bar {
    border-bottom-color: var(--church-red);
}

/* ============================================
   Call to Action
   ============================================ */

.call-to-action:before {
    background: var(--church-red);
    background: linear-gradient(135deg, var(--church-red) 0%, #8B0000 100%);
    opacity: 0.9;
}

.call-to-action h3,
.call-to-action .text {
    color: var(--church-white);
}

/* ============================================
   Footer
   ============================================ */

.main-footer {
    background: #1a1a1a;
    color: var(--church-white);
}

.main-footer a {
    color: var(--church-white);
}

.main-footer a:hover {
    color: var(--church-gold);
}

/* ============================================
   Language Switcher
   ============================================ */

.language-switcher .current-language {
    background: rgba(212, 175, 55, 0.1);
    color: var(--church-gold-light);
}

.language-switcher .current-language:hover {
    background: rgba(212, 175, 55, 0.2);
}

/* ============================================
   Search Box
   ============================================ */

.header-search-form input {
    border-color: var(--church-light-gray);
}

.header-search-form input:focus {
    border-color: var(--church-red);
}

/* ============================================
   Tags and Badges
   ============================================ */

.tags span {
    background: var(--church-red);
    color: var(--church-white);
}

.tags span:first-child {
    background: var(--church-gold);
}

/* ============================================
   Rating Stars
   ============================================ */

.rating .fa-star {
    color: var(--church-gold);
}

/* ============================================
   Login/Register Box
   ============================================ */

.login-box {
    color: #363636;
}

.login-box a {
    color: var(--church-red);
}

.login-box a:hover {
    color: var(--church-gold);
}

/* ============================================
   Mobile Header
   ============================================ */

.mobile-header {
    background: #3e3e3e!important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 20px;
}

/* Mobile Menu Background */
.mm-menu,
.mm-panels,
.mm-panel {
    background: #B8860B !important;
}

.mm-menu {
    --mm-color-background: #B8860B !important;
}

.mm-panels {
    --mm-color-background: #B8860B !important;
}

.mobile-header .logo {
    display: flex;
    align-items: center;
}

.mobile-header .nav-outer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.mobile-header .outer-box {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Hamburger menu icon - white on red background */
.mobile-header .mobile-nav-toggler {
    color: var(--church-white) !important;
    font-size: 24px;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-header .mobile-nav-toggler .fa-bars {
    color: var(--church-white) !important;
}

/* Language switcher in mobile header */
.mobile-header .mobile-language-switcher {
    display: flex;
    align-items: center;
}

/* Language switcher on red mobile header background */
.mobile-header .language-switcher .current-language {
    background: rgba(255, 255, 255, 0.2) !important;
    color: var(--church-white) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.mobile-header .language-switcher .current-language:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

.mobile-header .language-switcher .current-language .lang-code,
.mobile-header .language-switcher .current-language .fa-chevron-down {
    color: var(--church-white) !important;
}

/* ============================================
   Mobile Preloader - Smaller Size
   ============================================ */
@media (max-width: 768px) {
    .preloader .organ-keyboard {
        transform: scale(0.6);
        margin-bottom: 15px;
        padding: 15px;
    }
    
    .preloader .organ-key {
        width: 18px;
        height: 72px;
    }
    
    .preloader .organ-key .black-key {
        width: 11px;
        height: 42px;
    }
    
    .preloader .musical-notes {
        height: 30px;
        margin-top: 10px;
    }
    
    .preloader .musical-notes .note {
        font-size: 18px;
    }
}

/* ============================================
   Mobile Search Buttons - Add Margin
   ============================================ */
@media (max-width: 768px) {
    /* Add margin between search buttons on mobile */
    .listing-search-form .form-group.col-sm-6 {
        margin-bottom: 15px !important;
    }
    
    .btn-style-two{
        margin-top: 15px;
    }

    .listing-search-form .form-group.col-sm-6:last-child {
        margin-bottom: 0 !important;
    }
    
    /* Ensure buttons are full width and have spacing on mobile */
    .listing-search-form .row .form-group button.theme-btn {
        width: 100%;
        margin-bottom: 0;
    }
    
    /* Add gap between the two button columns */
    .listing-search-form .row .form-group.col-lg-3.col-md-3.col-sm-6:first-of-type {
        margin-bottom: 15px !important;
    }
}

/* ============================================
   Form Elements
   ============================================ */

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--church-red);
}

/* ============================================
   Hover Effects
   ============================================ */

.listing-block:hover,
.feature-block:hover {
    box-shadow: 0 5px 20px rgba(192, 1, 0, 0.15);
}

/* ============================================
   Active States
   ============================================ */

.navigation > li.current > a,
.navigation > li.current > span {
    color: var(--church-red);
}

.tab-btn.active-btn {
    color: var(--church-white);
}

/* ============================================
   Gold Accents
   ============================================ */

.icon-box,
.icon-verified {
    color: var(--church-gold);
}

/* ============================================
   Specific Color Overrides
   ============================================ */

/* Replace old blue (#021f4a) with red */
.main-header .sticky-header,
.main-header .sticky-header .main-box {
    background: var(--church-white) !important;
}

/* Replace old orange (#ffa737, #ff9814) with church gold */
.theme-btn,
.add-listing,
.like-btn {
    color: var(--church-gold) !important;
}

/* Preloader */
.preloader {
    background: var(--church-white);
}

.preloader:before {
    border-top-color: var(--church-red);
    border-right-color: var(--church-red);
}

/* Scroll to top button */
.scroll-to-top {
    background: var(--church-red);
    color: var(--church-white);
}

.scroll-to-top:hover {
    background: var(--church-gold);
}

/* Social icons */
.social-icon-one a {
    background: var(--church-light-gray);
    color: var(--church-red);
}

.social-icon-one a:hover {
    background: var(--church-red);
    color: var(--church-white);
}

/* Copyright text */
.copyright-text {
    color: rgba(255, 255, 255, 0.8);
}

/* Listing blocks */
.listing-block .tags span {
    background: var(--church-red);
}

.listing-block .tags span:first-child {
    background: var(--church-gold);
}

/* Feature blocks */
.feature-block .overlay-box {
    background: rgba(192, 1, 0, 0.85);
}

.feature-block:hover .overlay-box {
    background: rgba(184, 134, 11, 0.9);
}

/* Testimonial section */
.testimonial-section {
    background: var(--church-light-gray);
}

/* News section */
.news-section {
    background: var(--church-white);
}

/* How it works section */
.how-it-works {
    background: var(--church-white);
}

/* Work block icons */
.work-block .icon-box img {
    filter: brightness(0) saturate(100%) invert(27%) sepia(95%) saturate(5000%) hue-rotate(350deg) brightness(0.75) contrast(1.2);
}

/* Additional overrides for inline styles and specific elements */
.main-header .outer-box .add-listing {
    color: var(--church-red);
}

.main-header .outer-box .add-listing:hover {
    color: var(--church-gold);
}

/* ============================================
   Comprehensive Color Replacements
   ============================================ */

/* Replace old blue (#021f4a) with red in various contexts */
.list-style-one li:hover .count,
.sticky-header,
.sticky-header .main-box {
    background: var(--church-red) !important;
}

/* Replace old orange/gold (#ffa737, #ff9814) with church gold */
.list-style-two li:before,
.sec-title .text {
    color: var(--church-gold) !important;
}

/* Welcome text in upper-heading should be white */
.banner-section .upper-heading p {
    color: #ffffff !important;
}

/* Line break for quoted text on mobile only */
.upper-heading h3 .quote-break {
    display: inline;
}

@media (max-width: 767px) {
    .upper-heading h3 .quote-break {
        display: block;
    }
}

/* Links and hover states */
.main-menu .navigation > li > a:hover,
.main-menu .navigation > li.current > a {
    color: var(--church-red) !important;
}

/* Button hover states */
.btn-style-one:hover {
    color: var(--church-red) !important;
    border-color: var(--church-red) !important;
}

.btn-style-two:hover {
    color: var(--church-gold) !important;
    border-color: var(--church-gold) !important;
}

/* Section backgrounds */
.features-section,
.listing-section {
    background: var(--church-light-gray) !important;
}

.how-it-works,
.testimonial-section {
    background: var(--church-white) !important;
}

/* Typography accents */
.sec-title h2 {
    color: #363636;
}

.sec-title .divider {
    background: var(--church-red) !important;
}

/* Status indicators */
.status {
    color: var(--church-red);
}

.status.open {
    color: var(--church-gold);
}

/* Icon colors */
.icon-verified {
    color: var(--church-gold) !important;
}

/* Cart and shopping elements */
.cart-btn .count {
    background: var(--church-red);
    color: var(--church-white);
}

/* Search form focus */
.header-search-form input:focus,
.listing-search-form input:focus,
.listing-search-form select:focus {
    border-color: var(--church-red) !important;
}

/* Tab buttons */
.listing-search-tabs .tab-buttons li.active-btn {
    color: var(--church-white) !important;
}

/* Overlay effects */
.feature-block .overlay-box .content h5,
.listing-block .lower-content h3 a {
    color: var(--church-white);
}

.feature-block:hover .overlay-box {
    background: rgba(192, 1, 0, 0.9) !important;
}

/* ============================================
   Organ Cards
   ============================================ */

.organ-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.organ-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(192, 1, 0, 0.2) !important;
}

.organ-card .organ-image img {
    transition: transform 0.3s ease;
}

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

.organ-card h4 {
    color: var(--church-red);
    transition: color 0.3s;
}

.organ-card:hover h4 {
    color: var(--church-gold);
}

/* Statistics Counters - Professional Design with Gold */
.statistics-counters {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin: 50px 0;
    flex-wrap: wrap;
    padding: 40px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

.counter-item {
    text-align: center;
    padding: 20px 30px;
    background: rgba(212, 175, 55, 0.1);
    border: 2px solid var(--church-gold-light);
    border-radius: 8px;
    min-width: 180px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.counter-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.3);
    background: rgba(212, 175, 55, 0.15);
}

.statistics-counters .counter-number {
    font-size: 56px;
    font-weight: bold;
    color: var(--church-gold-light);
    margin-bottom: 10px;
    font-family: 'Arial', 'Helvetica', sans-serif;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
}

.statistics-counters .counter-label {
    font-size: 18px;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: Arial, Helvetica, sans-serif;
}

/* Responsive Statistics */
@media (max-width: 768px) {
    .statistics-counters {
        gap: 30px;
        padding: 30px 15px;
    }

    .counter-item {
        min-width: 140px;
        padding: 15px 20px;
    }
    
    .statistics-counters .counter-number {
        font-size: 42px;
    }
    
    .statistics-counters .counter-label {
        font-size: 14px;
    }
}

/* Search Area */
.search-area .form-group select {
    border: 2px solid var(--church-light-gray);
}

.search-area .form-group select:focus {
    border-color: var(--church-red);
    outline: none;
}

/* Pagination - Smaller and SEO-friendly */
.pagination-wrapper {
    margin-top: 30px;
    margin-bottom: 30px;
}

.pagination-wrapper .pagination {
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination-wrapper .pagination li {
    margin: 0;
    display: inline-block;
}

.pagination-link {
    display: inline-block;
    padding: 6px 10px;
    min-width: 32px;
    text-align: center;
    font-size: 14px;
    line-height: 1.4;
    color: #363636;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: Arial, Helvetica, sans-serif;
}

.pagination-link:hover {
    background: var(--church-gold-light);
    color: #fff;
    border-color: var(--church-gold-light);
    text-decoration: none;
}

.pagination-link.pagination-current {
    background: var(--church-red);
    color: #fff;
    border-color: var(--church-red);
    font-weight: 600;
    cursor: default;
}

.pagination-link.pagination-disabled {
    color: #ccc;
    background: #f5f5f5;
    border-color: #e0e0e0;
    cursor: not-allowed;
    opacity: 0.6;
}

.pagination-ellipsis {
    display: inline-block;
    padding: 6px 5px;
    color: #666;
    font-size: 14px;
}

.pagination-first,
.pagination-last {
    font-weight: 600;
}

@media (max-width: 768px) {
    .pagination-link {
        padding: 5px 8px;
        min-width: 28px;
        font-size: 13px;
    }
    
    .pagination-wrapper .pagination {
        gap: 3px;
    }
}

/* Banner Section - Statistics Counters */
.banner-section .statistics-counters {
    position: relative;
    z-index: 1;
}

/* Banner Section - Limit Height */
.banner-section {
    min-height: 80vh !important;
    height: auto !important; /* Override fixed height from style.css */
    max-height: none !important; /* Allow expansion for detailed search */
    overflow: visible !important; /* Allow content to expand and push down */
    position: relative;
    align-items: flex-start !important; /* Start from top, don't center vertically */
    justify-content: flex-start !important; /* Start from top */
}

.banner-section .auto-container {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 40px 0;
    width: 100%;
    position: relative;
    z-index: 2;
}

/* Background layer should match banner height and stay behind content */
.banner-section .background-layer {
    min-height: 80vh !important;
    height: 100% !important; /* Match parent height */
    position: absolute !important;
    z-index: 0 !important; /* Stay behind content */
    width: 100%;
    left: 0;
    top: 0;
}

/* Carousel Background Slider - Simple Slider */
.banner-section .carousel-background {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;
}

.banner-section .carousel-slider {
    width: 100%;
    height: 100%;
    position: relative;
}

.banner-section .carousel-slide-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 80vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.banner-section .carousel-slide-item.active {
    opacity: 1;
    z-index: 1;
}

/* Black transparent overlay */
.banner-section .carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Black with 50% opacity */
    z-index: 2; /* Above carousel slides but below content */
    pointer-events: none; /* Allow clicks to pass through */
}

.banner-section .content-box {
    padding: 20px 0;
}

/* Page Header Section Styles */
.page-header-section {
    position: relative;
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.page-header-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.page-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.page-header-title {
    font-size: 56px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
    font-family: Arial, Helvetica, sans-serif;
    letter-spacing: 2px;
}

.page-header-divider {
    width: 100px;
    height: 4px;
    background: var(--church-gold-light, #D4AF37);
    margin: 0 auto;
    border-radius: 2px;
}

/* Contact Page Styles */
.contact-info-card {
    background: linear-gradient(135deg, #f8f8f8 0%, #ffffff 100%);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 35px rgba(0,0,0,0.12) !important;
}

.contact-icon {
    font-size: 48px;
    margin-bottom: 20px;
    text-align: center;
}

.contact-full-content {
    margin-top: 50px;
    padding: 40px;
    background: linear-gradient(135deg, #fafafa 0%, #ffffff 100%);
    border-radius: 15px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.05);
}

@media (max-width: 768px) {
    .page-header-title {
        font-size: 36px !important;
    }
    
    .contact-content-wrapper {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }
    
    .contact-info-card {
        padding: 30px 20px !important;
    }
}

/* Detailed Search Responsive Styles */
#detailed-search-fields {
    width: 100%;
    clear: both;
    position: relative; /* Ensure it flows naturally */
    z-index: 1; /* Stay in normal flow */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    margin-bottom: 0;
    padding-bottom: 0;
    transition: max-height 0.5s ease-in-out, opacity 0.5s ease-in-out, padding 0.5s ease-in-out, margin 0.5s ease-in-out, border 0.5s ease-in-out;
}

#detailed-search-fields.show {
    max-height: 3000px; /* Large enough to accommodate all fields */
    opacity: 1;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid var(--church-light-gray);
}

/* No transition when opened on page load (has filters) */
#detailed-search-fields.show[style*="transition: none"] {
    transition: none !important;
}

/* Ensure the form container doesn't cause upward push */
.listing-search-form {
    position: relative;
    z-index: 2;
    overflow: visible !important; /* Allow dropdowns to show outside */
}

.listing-search-tabs {
    position: relative;
    z-index: 2;
    overflow: visible !important; /* Allow dropdowns to show outside */
}

.listing-search-tabs .tabs-content {
    position: relative;
    overflow: visible !important; /* Allow dropdowns to show outside */
}

.listing-search-tabs .tab {
    position: relative;
    overflow: visible !important; /* Allow dropdowns to show outside */
}

/* Fix chosen dropdown z-index to appear on top */
.listing-search-form .chosen-container {
    position: relative;
    z-index: 1000 !important;
}

/* Add borders to chosen selects to match inputs */
.listing-search-form .chosen-container .chosen-single,
#detailed-search-fields .chosen-container .chosen-single {
    border: 2px solid #ddd !important;
    border-radius: 5px !important;
}

.listing-search-form .chosen-container.chosen-container-active .chosen-single,
#detailed-search-fields .chosen-container.chosen-container-active .chosen-single {
    border: 2px solid #ddd !important;
}

.listing-search-form .chosen-container.chosen-with-drop .chosen-single,
#detailed-search-fields .chosen-container.chosen-with-drop .chosen-single {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-bottom: none !important;
}

/* Add border to chosen-drop to match */
.listing-search-form .chosen-container .chosen-drop,
#detailed-search-fields .chosen-container .chosen-drop {
    border: 2px solid #ddd !important;
    border-top: none !important;
    border-radius: 0 0 5px 5px !important;
}

/* Also add border to main settlement select */
.listing-search-form .chosen-container .chosen-single {
    border: 2px solid #ddd !important;
    border-radius: 5px !important;
}

.listing-search-form .chosen-container .chosen-drop {
    z-index: 10001 !important;
    position: absolute !important;
    overflow: visible !important;
}

.listing-search-form .chosen-container.chosen-with-drop .chosen-drop {
    z-index: 10001 !important;
    position: absolute !important;
}

/* Ensure chosen-results can scroll properly */
.listing-search-form .chosen-container .chosen-results {
    max-height: 300px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    position: relative !important;
}

/* Ensure parent containers don't clip dropdowns */
.content-box {
    overflow: visible !important;
}

.auto-container {
    overflow: visible !important;
}

/* Fix for detailed search fields as well */
#detailed-search-fields .chosen-container {
    z-index: 1000 !important;
}

#detailed-search-fields .chosen-container .chosen-drop {
    z-index: 10001 !important;
    position: absolute !important;
    overflow: visible !important;
}

#detailed-search-fields .chosen-container .chosen-results {
    max-height: 300px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* Ensure all parent containers up to body allow overflow */
.banner-section {
    overflow: visible !important;
}

.banner-section .auto-container {
    overflow: visible !important;
}

.banner-section .content-box {
    overflow: visible !important;
}

/* Make sure form and row don't clip */
.listing-search-form form {
    overflow: visible !important;
}

.listing-search-form .row {
    overflow: visible !important;
}

.listing-search-form .form-group {
    overflow: visible !important;
    position: relative;
}

/* Prevent form groups from being pushed down when dropdown opens */
#detailed-search-fields .form-group {
    position: relative;
    z-index: auto;
}

/* When a dropdown is open, ensure it appears above all other form elements */
#detailed-search-fields .chosen-container.chosen-with-drop {
    z-index: 10004 !important;
    position: relative;
}

/* Ensure the dropdown itself has very high z-index */
#detailed-search-fields .chosen-container.chosen-with-drop .chosen-drop {
    z-index: 10005 !important;
}

/* Make sure other form groups stay below when a dropdown is open */
#detailed-search-fields .chosen-container.chosen-with-drop ~ .form-group,
#detailed-search-fields .form-group:has(.chosen-container.chosen-with-drop) ~ .form-group {
    position: relative;
    z-index: 1;
}

/* Specific fix: Building select should appear above builder select */
/* Use attribute selector for better browser support */
#detailed-search-fields select[name="building"] {
    position: relative;
}

#detailed-search-fields .form-group:has(select[name="building"]) .chosen-container.chosen-with-drop {
    z-index: 10004 !important;
}

#detailed-search-fields .form-group:has(select[name="building"]) .chosen-container.chosen-with-drop .chosen-drop {
    z-index: 10005 !important;
}

/* Builder select should be lower when building is open */
#detailed-search-fields select[name="builder"] {
    position: relative;
}

#detailed-search-fields .form-group:has(select[name="builder"]) {
    position: relative;
    z-index: 1;
}

#detailed-search-fields .form-group:has(select[name="builder"]) .chosen-container {
    z-index: 1 !important;
}

/* Alternative approach: Target by column and form-group order - more reliable */
/* Building is first form-group in first column */
#detailed-search-fields .col-lg-4:first-child .form-group:first-child .chosen-container.chosen-with-drop {
    z-index: 10006 !important;
}

#detailed-search-fields .col-lg-4:first-child .form-group:first-child .chosen-container.chosen-with-drop .chosen-drop {
    z-index: 10007 !important;
}

/* Builder is second form-group in first column - needs to be above year inputs */
#detailed-search-fields .col-lg-4:first-child .form-group:nth-child(2) {
    position: relative;
    z-index: 10002 !important;
}

#detailed-search-fields .col-lg-4:first-child .form-group:nth-child(2) .chosen-container {
    z-index: 10002 !important;
}

#detailed-search-fields .col-lg-4:first-child .form-group:nth-child(2) .chosen-container.chosen-with-drop {
    z-index: 10006 !important;
}

#detailed-search-fields .col-lg-4:first-child .form-group:nth-child(2) .chosen-container.chosen-with-drop .chosen-drop {
    z-index: 10007 !important;
}

/* Year of construction (third form-group) should be lower */
#detailed-search-fields .col-lg-4:first-child .form-group:nth-child(3) {
    position: relative;
    z-index: 1 !important;
}

/* Ensure year inputs don't interfere with builder dropdown */
#detailed-search-fields .col-lg-4:first-child .form-group:nth-child(3) input,
#detailed-search-fields .col-lg-4:first-child .form-group:nth-child(3) span {
    position: relative;
    z-index: 1 !important;
}

/* All form groups after builder should have lower z-index */
#detailed-search-fields .col-lg-4:first-child .form-group:nth-child(n+3) {
    position: relative;
    z-index: 1 !important;
}

/* Ensure technical condition stays below traktura when traktura dropdown is open */
/* Use attribute selector instead of :has() for better browser support */
#detailed-search-fields .form-group select[name="traktura"] {
    position: relative;
}

#detailed-search-fields .form-group select[name="traktura"] + *,
#detailed-search-fields .form-group:has(select[name="traktura"]) {
    position: relative;
    z-index: 1000;
}

#detailed-search-fields .form-group select[name="technical_condition"] {
    position: relative;
}

#detailed-search-fields .form-group:has(select[name="technical_condition"]) {
    position: relative;
    z-index: 1;
    margin-top: 0 !important;
}

/* Alternative: Target by form-group position in middle column */
#detailed-search-fields .col-lg-4:nth-child(2) .form-group:nth-of-type(2) {
    position: relative;
    z-index: 1;
    margin-top: 0 !important;
}

#detailed-search-fields .col-lg-4:nth-child(2) .form-group:nth-of-type(1) {
    position: relative;
    z-index: 1000;
}

/* Critical: Ensure chosen-drop can escape all containers */
.chosen-container .chosen-drop {
    z-index: 10001 !important;
    position: absolute !important;
}

.chosen-container.chosen-with-drop .chosen-drop {
    z-index: 10001 !important;
}

/* Ensure chosen-results scrollbar is visible and functional */
.chosen-container .chosen-results {
    max-height: 300px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    position: relative !important;
    height: auto !important;
    min-height: 0 !important;
}

/* Force scrolling to work - ensure results container is scrollable */
.chosen-container .chosen-drop .chosen-results {
    max-height: 300px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    display: block !important;
    position: relative !important;
}

/* Make sure the dropdown background is visible */
.chosen-container .chosen-drop {
    background-color: #fff !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

/* Force ALL possible parent containers to allow overflow */
.page-wrapper {
    overflow: visible !important;
}

.banner-section,
.banner-section * {
    overflow: visible !important;
}

.listing-search-tabs,
.listing-search-tabs * {
    overflow: visible !important;
}

.tabs-box,
.tabs-box * {
    overflow: visible !important;
}

.tabs-content,
.tabs-content * {
    overflow: visible !important;
}

.tab,
.tab * {
    overflow: visible !important;
}

/* Ensure chosen dropdown is always on top and scrollable */
.chosen-container.chosen-with-drop {
    z-index: 10000 !important;
}

.chosen-container.chosen-with-drop .chosen-drop {
    z-index: 10001 !important;
    position: fixed !important; /* Use fixed positioning to escape all containers */
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    /* Position will be calculated by JavaScript if needed */
}

.chosen-container .chosen-drop .chosen-results {
    max-height: 300px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    position: relative !important;
    display: block !important;
    height: auto !important;
}

/* Make sure the dropdown container itself doesn't clip */
.chosen-container .chosen-drop {
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
}

#detailed-search-fields .row {
    margin-left: -15px;
    margin-right: -15px;
}

#detailed-search-fields .col-lg-4,
#detailed-search-fields .col-md-6,
#detailed-search-fields .col-sm-12 {
    padding-left: 15px;
    padding-right: 15px;
    margin-bottom: 20px;
}

#detailed-search-fields .form-group {
    margin-bottom: 20px;
}

#detailed-search-fields input,
#detailed-search-fields select {
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 991px) {
    #detailed-search-fields .col-lg-4 {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
    }
}
.banner-section{
    padding: 170px 0px 50px 0px;
}
@media (max-width: 767px) {
    .banner-section {
        min-height: 80vh;
        padding: 60px 0 40px;
    }
    .counter-label{
        font-size: 10px;
    }
    .banner-section .auto-container {
        min-height: 80vh;
        padding: 20px 15px;
    }
    
    #detailed-search-fields {
        margin-top: 20px;
        padding-top: 20px;
    }
    
    #detailed-search-fields .form-group {
        margin-bottom: 15px;
    }
    
    #detailed-search-fields input,
    #detailed-search-fields select {
        width: 100% !important;
        font-size: 14px;
    }
    
    #detailed-search-fields .row {
        margin-left: 0;
        margin-right: 0;
    }
    
    #detailed-search-fields .col-lg-4,
    #detailed-search-fields .col-md-6,
    #detailed-search-fields .col-sm-12 {
        padding-left: 0;
        padding-right: 0;
        margin-bottom: 15px;
    }
    
    /* Keep range inputs in the same row on mobile - labels visible */
    #detailed-search-fields .form-group > div[style*="display: flex"] {
        flex-wrap: nowrap !important;
    }
    
    #detailed-search-fields .form-group > div[style*="display: flex"] > span {
        display: inline !important;
    }
}

/* Native Select Styling - Replace Chosen.js */
.native-select {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    background-color: #fff;
    font-size: 14px;
    font-family: inherit;
    color: #363636;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23363636' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    padding-right: 35px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.native-select:hover {
    border-color: #999;
}

.native-select:focus {
    outline: none;
    border-color: var(--church-gold-light, #d4af37);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.native-select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Ensure native selects in search form match input styling */
.listing-search-form .native-select,
#detailed-search-fields .native-select {
    width: 100%;
    padding: 10px;
    padding-right: 35px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    background-color: #fff;
}

/* Select2 Styling to match form inputs */
/* Hide native select arrow */
.select2-select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: none !important;
}

.select2-container--default .select2-selection--single {
    height: auto !important;
    border: 2px solid #ddd !important;
    border-radius: 5px !important;
    padding: 8px 10px !important;
    min-height: 42px !important;
    overflow: hidden !important;
    max-width: 100% !important;
}
.select2-selection .select2-selection--single {
    overflow: hidden !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 26px !important;
    padding-left: 0 !important;
    padding-right: 20px !important;
    color: #363636 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    max-width: 100% !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px !important;
    right: 10px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #363636 transparent transparent transparent !important;
    border-width: 6px 5px 0 5px !important;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent #363636 transparent !important;
    border-width: 0 5px 6px 5px !important;
}

.select2-container--default .select2-dropdown {
    border: 2px solid #ddd !important;
    border-top: none !important;
    border-radius: 0 0 5px 5px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #ddd !important;
    border-radius: 3px !important;
    padding: 6px 10px !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--church-gold-light, #98780d) !important;
    color: #fff !important;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #ffffff !important;
    color: black !important;
}

.page-full-content img{
    padding: 10px;
}
.select2-container {
    z-index: 1000 !important;
    max-width: 100% !important;
    width: 100% !important;
}

.select2-dropdown {
    z-index: 10001 !important;
}

/* Ensure Select2 dropdowns appear above other elements */
.listing-search-form .select2-container,
#detailed-search-fields .select2-container {
    position: relative;
    z-index: 1000 !important;
}

.listing-search-form .select2-dropdown,
#detailed-search-fields .select2-dropdown {
    z-index: 10001 !important;
}

