/* ============================================
   PROFESSIONAL CSS RESET FOR PUBLIC LAYOUT
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
    width: 100%;
}

body {
    background-color: #ffffff;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    margin: 0;
    padding: 0;
    position: relative;
}

/* ============================================
   HERO SECTION - PROFESSIONAL FIX
   ============================================ */

.hero-section {
    position: relative;
    width: 100%;
    max-width: 100vw;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    border-bottom-left-radius: 50% 56%;
    border-bottom-right-radius: 50% 56%;
}
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 11, 24, 0.45);
    z-index: 1;
    border-bottom-left-radius: 50% 42%;
    border-bottom-right-radius: 50% 42%;
}
.hero-content {
    position: relative;
    z-index: 5;
    margin: auto;
    text-align: center;
    color: #ffffff;
    width: 100%;
    max-width: 950px;
    padding: 130px 20px 80px 20px;
}
.sub-title {
    font-size: clamp(12px, 1.5vw, 14px);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 15px;
}
.main-title {
    font-size: 34px;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 40px;
}
.counter-text {
    font-size: clamp(14px, 1.5vw, 16px);
    opacity: 0.9;
    font-weight: 400;
}
.search-container {
    background: #ffffff;
    border-radius: 50px;
    padding: 2px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
    transition: border-radius 0.3s ease;
}
.search-form {
    display: flex;
    align-items: center;
    width: 100%;
}
.search-field {
    flex: 1;
    position: relative;
    padding: 0 25px;
}
.search-field:not(:last-of-type)::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 30px;
    background-color: #e0e0e0;
}
.search-field input,
.search-field select {
    width: 100%;
    border: none;
    outline: none;
    font-size: 13px;
    color: #333333;
    background: transparent;
    height: 45px;
}
.search-field input::placeholder {
    color: #888888;
}
.select-field {
    display: flex;
    align-items: center;
    gap: 10px;
}
.field-icon {
    color: #aaaaaa;
    font-size: 16px;
    flex-shrink: 0;
}
.select-field select {
    appearance: none;
    cursor: pointer;
    width: 100%;
}
.arrow-icon {
    color: #888888;
    font-size: 12px;
    pointer-events: none;
    flex-shrink: 0;
}
.search-submit-btn {
    background-color: #001c3d;
    color: #ffffff;
    border: none;
    outline: none;
    padding: 0 35px;
    height: 52px;
    border-radius: 35px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 28, 61, 0.3);
    white-space: nowrap;
    flex-shrink: 0;
}
.search-submit-btn i {
    font-size: 16px;
    transition: transform 0.3s ease;
}
.search-submit-btn:hover {
    background-color: #002d62;
    box-shadow: 0 6px 20px rgba(0, 28, 61, 0.45);
    transform: translateY(-1px);
}
.search-submit-btn:hover i {
    transform: scale(1.15) rotate(-10deg);
}
.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}
.listing-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.listing-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.10);
}
.listing-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.listing-card-body {
    padding: 18px 20px 20px;
}
.listing-card-body h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #1a1a1a;
}
.listing-card-body .location {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 8px;
}
.listing-card-body .price {
    font-weight: 700;
    color: #2b73d2;
    font-size: 18px;
}
.listing-card-body .rating {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #f59e0b;
}
.section-title {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 10px;
}
.section-subtitle {
    text-align: center;
    color: #6b7280;
    margin-bottom: 40px;
}
.footer {
    background: #0b1a2e;
    color: #cbd5e1;
    padding: 50px 20px 30px;
    margin-top: 60px;
}
.footer-container {
    max-width: 1320px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}
.footer h4 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 18px;
}
.footer ul {
    list-style: none;
}
.footer ul li {
    margin-bottom: 8px;
}
.footer ul li a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}
.footer ul li a:hover {
    color: #fff;
}
.footer-bottom {
    text-align: center;
    border-top: 1px solid #1e2f44;
    padding-top: 25px;
    margin-top: 30px;
    font-size: 14px;
    color: #8a9bb5;
}
.language-switcher {
    position: fixed;
    bottom: 35px;
    left: 45px;
    z-index: 9999;
    background: #ffffff;
    padding: 10px 18px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: all 0.3s ease;
}
.language-switcher:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    transform: translateY(-2px);
}
.language-switcher .flag-icon {
    width: 24px;
    height: 16px;
    border-radius: 2px;
    flex-shrink: 0;
}
.language-switcher span {
    font-size: 15px;
    font-weight: 700;
    color: #222222;
}
.language-switcher i {
    font-size: 11px;
    color: #555555;
    transition: transform 0.3s ease;
}
.language-dropdown {
    position: fixed;
    bottom: 90px;
    left: 45px;
    z-index: 9998;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    min-width: 180px;
    display: none;
}
.language-dropdown.show {
    display: block;
    animation: slideUp 0.3s ease;
}
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.language-dropdown .lang-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-decoration: none;
    color: #333333;
}
.language-dropdown .lang-option:hover {
    background-color: #f5f7fa;
}
.language-dropdown .lang-option.active {
    background-color: #e8f0fe;
    font-weight: 600;
}
.language-dropdown .lang-option .flag-icon {
    width: 24px;
    height: 16px;
    border-radius: 2px;
    flex-shrink: 0;
}
.language-dropdown .lang-option .lang-name {
    font-size: 14px;
    flex: 1;
}
.language-dropdown .lang-option .check-icon {
    color: #2b73d2;
    font-size: 14px;
    display: none;
}
.language-dropdown .lang-option.active .check-icon {
    display: inline-block;
}
.listing-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 380px;
}
.listing-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.10);
}
.card-image-wrapper {
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}
.card-image-link {
    display: block;
    height: 200px;
    background: #f3f4f6;
}
.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.listing-card:hover .card-image {
    transform: scale(1.05);
}
.card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    color: #9ca3af;
    font-size: 14px;
}
.card-badge {
    position: absolute;
    top: 12px;
    background: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    z-index: 2;
}
.badge-left {
    left: 12px;
}
.badge-right {
    right: 12px;
    background: #10b981;
    color: #ffffff;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 6px;
}
.badge-left i {
    color: #6b7280;
    font-size: 13px;
}
.card-body {
    padding: 18px 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.card-title-link {
    text-decoration: none;
    margin-bottom: 12px;
}
.card-title {
    font-size: 19px;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}
.card-title-link:hover .card-title {
    color: #2b73d2;
}
.card-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    flex: 1;
}
.card-info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
}
.card-info-item i {
    color: #9ca3af;
    width: 16px;
    text-align: center;
    margin-top: 2px;
    flex-shrink: 0;
}
.card-info-item span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-footer {
    border-top: 1px solid #f3f4f6;
    padding-top: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.card-action-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: none;
    background: #fdf2f8;
    color: #4b5563;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 15px;
}
.card-action-btn:hover {
    background: #fce7f3;
    color: #db2777;
}
.card-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f9fafb;
    padding: 6px 14px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    color: #374151;
}
.card-rating i {
    color: #f59e0b;
    font-size: 14px;
}
.card-badge {
    position: absolute;
    top: 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.3);
}
.badge-left {
    left: 12px;
}
.badge-left i {
    font-size: 13px;
    color: #2b73d2;
}
.badge-right {
    right: 12px;
    color: #ffffff;
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 6px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.badge-right.bg-green-500 {
    background: #10b981;
}
.badge-right.bg-yellow-500 {
    background: #f59e0b;
}
.card-action-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: none;
    background: #fdf2f8;
    color: #4b5563;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 15px;
}
.card-action-btn:hover {
    background: #fce7f3;
    color: #db2777;
    transform: scale(1.05);
}
.card-action-btn i {
    font-size: 16px;
}
.card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.card-action-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: none;
    background: #fdf2f8;
    color: #4b5563;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 15px;
}
.card-action-btn:hover {
    background: #fce7f3;
    color: #db2777;
    transform: scale(1.05);
}
.card-action-btn i {
    font-size: 16px;
}
.favorite-form-inline {
    display: inline-block;
    margin: 0;
}
.favorite-btn {
    background: #fdf2f8;
    color: #9ca3af;
    transition: all 0.3s ease;
}
.favorite-btn:hover {
    background: #fce7f3;
    color: #ef4444;
    transform: scale(1.05);
}
.favorite-btn.active {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}
.favorite-btn.active:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: scale(1.1);
}
.favorite-btn i {
    transition: transform 0.3s ease;
}
.favorite-btn:hover i {
    transform: scale(1.15);
}
.favorite-btn:active {
    transform: scale(0.9);
}
@media (max-width: 1024px) {
    .language-switcher { bottom: 25px; left: 25px; }
    .language-dropdown { bottom: 80px; left: 25px; }
}
@media (max-width: 991px) {
    .hero-video, .hero-overlay {
        border-bottom-left-radius: 50% 20%;
        border-bottom-right-radius: 50% 20%;
    }
    .main-title { margin-bottom: 30px; }
}
@media (max-width: 768px) {
    .hero-section { min-height: 100vh; height: auto; }
    .hero-video, .hero-overlay {
        border-bottom-left-radius: 50% 12%;
        border-bottom-right-radius: 50% 12%;
    }
    .hero-content { padding: 110px 15px 90px 15px; }
    .search-container {
        border-radius: 24px;
        padding: 16px;
    }
    .search-form {
        flex-direction: column;
        gap: 12px;
    }
    .search-field {
        width: 100%;
        padding: 0;
        border-bottom: 1px solid #f0f0f0;
        padding-bottom: 8px;
    }
    .search-field:not(:last-of-type)::after { display: none; }
    .search-submit-btn { width: 100%; height: 48px; border-radius: 24px; }
    .language-switcher {
        position: fixed;
        bottom: 20px;
        left: 20px;
        margin: 0;
        display: inline-flex;
        width: fit-content;
    }
    .language-dropdown {
        bottom: 75px;
        left: 20px;
        min-width: 160px;
    }
    .listings-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .listings-grid { grid-template-columns: 1fr; }
}

.custom-select-wrapper {
    position: relative;
    cursor: pointer;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}
.custom-select-wrapper .field-icon {
    flex-shrink: 0;
}
.custom-select-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 4px 0 0;
    font-size: 13px;
    color: #333333;
    height: 45px;
    background: transparent;
}
.custom-select-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.custom-select-options {
    position: absolute;
    top: calc(100% + -88px);
    left: 0;
    width: 100%;
    min-width: 200px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    list-style: none;
    margin: 0;
    z-index: 999;
    display: none;
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid #f0f0f0;
}
.custom-select-options.open {
    display: block;
    animation: dropdownFade 0.2s ease;
}
@keyframes dropdownFade {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.custom-select-options li {
    padding: 10px 20px;
    font-size: 14px;
    color: #333333;
    transition: background 0.15s ease;
    cursor: pointer;
    white-space: nowrap;
}
.custom-select-options li:hover {
    background: #f5f7fa;
}
.custom-select-options li.selected {
    background: #e8f0fe;
    font-weight: 600;
    color: #001c3d;
}
.custom-select-options li.selected::before {
    content: "✓ ";
    color: #001c3d;
    font-weight: 700;
}
.custom-select-options::-webkit-scrollbar {
    width: 6px;
}
.custom-select-options::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
.custom-select-options::-webkit-scrollbar-thumb {
    background: #c1c7cd;
    border-radius: 10px;
}
.custom-select-options::-webkit-scrollbar-thumb:hover {
    background: #a0a7ae;
}
.custom-select-wrapper .custom-arrow {
    transition: transform 0.3s ease;
    font-size: 12px;
    color: #888888;
    pointer-events: none;
}
.custom-select-wrapper .custom-arrow.open {
    transform: rotate(180deg);
}
@media (max-width: 768px) {
    .custom-select-wrapper {
        width: 100%;
    }
    .custom-select-options {
        min-width: 100%;
        left: 0;
        right: 0;
    }
}