/* ===================================
   BALAYHUB - UNIFIED STYLES
   Responsive, Clean, Modern Design
   =================================== */

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "SF Pro Display", "Roboto", "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f5f5;
    color: #000000;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== LAYOUT CONTAINERS ===== */
.page-container {
    max-width: 48rem;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.content {
    flex: 1;
    overflow-y: auto;
    background-color: #f8f8f8;
    padding: 16px;
}

.content::-webkit-scrollbar {
    width: 0;
}

/* ===== HEADER STYLES ===== */
.page-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.header-title {
    font-size: 26px;
    font-weight: 700;
    color: #000000;
    flex: 1;
    text-align: center;
}

/* ===== BUTTONS ===== */
.back-btn {
    position: absolute;
    left: 1rem;
    background-color: #FFB800;
    border: none;
    color: #000000;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.back-btn:hover {
    background-color: #FFD000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.back-btn:active {
    opacity: 0.8;
    transform: translateY(1px);
}

.btn {
    width: 100%;
    height: 54px;
    padding: 16px 20px;
    font-size: 16px;
    font-family: inherit;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background-color: #FFD000;
    color: #000000;
    font-weight: 600;
}

.btn-primary:hover {
    background-color: #FFB800;
}

.btn-primary:active {
    opacity: 0.9;
}

.contact-btn {
    background-color: #FFB800;
    border: none;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    color: #000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.contact-btn:hover {
    background-color: #FFD000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

a.contact-btn,
a.back-btn {
    text-decoration: none;
}

.view-more-btn {
    background-color: #FFB800;
    border: none;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    color: #000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.view-more-btn:hover {
    background-color: #FFD000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* ===== BRAND LOGO (Login Page) ===== */
.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    margin-bottom: 48px;
}

.brand-text {
    font-size: 46px;
    font-weight: 700;
    color: #000000;
}

.location-pin {
    width: 46px;
    height: 46px;
}

/* ===== HEADING SECTION (Login Page) ===== */
.heading-section {
    text-align: center;
    margin-bottom: 32px;
    width: 100%;
}

.heading {
    font-size: 28px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 8px;
}

.subtext {
    font-size: 16px;
    color: #666666;
    font-weight: 400;
}

/* ===== FORMS (Login Page) ===== */
.login-form {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.text-input {
    width: 100%;
    height: 48px;
    padding: 12px 16px;
    font-size: 16px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.text-input:focus {
    border-color: #FFCC00;
}

.text-input::placeholder {
    color: #999999;
}

.signup-option {
    width: 100%;
    text-align: center;
    margin-top: 24px;
    margin-bottom: 32px;
}

.signup-option p {
    font-size: 14px;
    color: #666666;
}

.signup-link {
    color: #FFCC00;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

.signup-link:hover {
    opacity: 0.8;
}

.disclaimer {
    text-align: center;
    padding: 32px 0;
    width: 100%;
}

.disclaimer p {
    font-size: 13px;
    color: #666666;
    line-height: 1.6;
}

.disclaimer-link {
    color: #666666;
    text-decoration: underline;
    transition: color 0.2s;
}

.disclaimer-link:hover {
    color: #000000;
}

.demo-alert {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 16px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #000000;
    background-color: #FFF8D6;
    border: 1px solid #FFCC00;
    border-radius: 8px;
}

.demo-alert code {
    font-weight: 600;
}

.login-error {
    font-size: 13px;
    color: #dc2626;
    text-align: center;
}

.demo-note {
    font-size: 12px;
    color: #999999;
    margin-top: 8px;
}

.listing-actions .demo-note {
    width: 100%;
    margin-top: 0;
}

/* ===== DETAIL TABS ===== */
.detail-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 1.5rem;
}

.detail-tab {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #000000;
    text-decoration: none;
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.detail-tab:hover {
    background-color: #FFD000;
}

.detail-tab.active {
    background-color: #FFB800;
}

/* ===== FILTER BAR ===== */
.filter-bar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 16px 24px;
    background: linear-gradient(to bottom, #f9f9f9, #eaeaea);
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 0;
    z-index: 99;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.filter-button {
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 600;
    color: #000000;
    cursor: pointer;
    padding: 8px 16px;
    font-family: inherit;
    transition: opacity 0.3s ease;
}

.filter-button:active {
    opacity: 0.6;
}

/* ===== SEARCH BAR ===== */
.search-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto 1.5rem;
}

.search-input {
    width: 100%;
    padding: 10px 10px 10px 40px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    font-size: 14px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: #FFD000;
    box-shadow: 0 0 0 2px rgba(255, 208, 0, 0.2);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #9ca3af;
}

/* ===== PROPERTY CARDS (Uniform Design) ===== */
.property-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.property-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.property-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.property-name {
    font-size: 16px;
    font-weight: 700;
    color: #000000;
    margin: 0;
}

.property-address {
    font-size: 13px;
    color: #666666;
    line-height: 1.3;
    margin: 0;
}

.property-location {
    font-size: 13px;
    color: #666666;
    line-height: 1.3;
    margin: 0;
}

.property-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.property-rating .star {
    color: #FFD000;
    font-size: 16px;
}

.rating-text {
    font-size: 14px;
    font-weight: 600;
    color: #000000;
}

/* ===== LISTINGS PAGE ===== */
.listing {
    display: flex;
    gap: 16px;
    padding-bottom: 16px;
    margin-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
    animation: fadeIn 0.5s ease-in-out;
}

.listing-image {
    width: 208px;
    height: 176px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.listing-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.listing-actions {
    margin-top: auto;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.listing-link {
    font-size: 12px;
    color: #2563eb;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.listing-link:hover {
    color: #1d4ed8;
}

.listing-stars {
    color: #fbbf24;
    font-size: 14px;
}

.listing-rating {
    color: #374151;
    margin-left: 8px;
}

/* ===== RATINGS SECTION ===== */
.ratings-section {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 12px;
}

.rating-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.rating-row:last-child {
    margin-bottom: 0;
}

.stars {
    display: flex;
    gap: 2px;
    min-width: 80px;
}

.star {
    font-size: 14px;
    line-height: 1;
}

.star.filled {
    color: #FFD000;
}

.star.empty {
    color: #d9d9d9;
}

.star.half {
    color: #FFD000;
}

.rating-bar {
    flex: 1;
    height: 6px;
    background-color: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
}

.rating-fill {
    height: 100%;
    background-color: #FFD000;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.rating-count {
    font-size: 13px;
    color: #666666;
    min-width: 20px;
    text-align: right;
}

/* ===== REVIEW CARDS ===== */
.review-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.reviewer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.review-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.reviewer-name {
    font-size: 15px;
    font-weight: 600;
    color: #000000;
}

.review-date {
    font-size: 12px;
    color: #999999;
    white-space: nowrap;
}

.review-text {
    font-size: 14px;
    color: #333333;
    line-height: 1.5;
}

.review-stars {
    display: flex;
    gap: 2px;
}

.review-stars .star {
    font-size: 16px;
}

/* ===== AMENITIES LIST ===== */
.amenities-list {
    background: white;
    margin-top: 12px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.amenities-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid #e5e5e5;
}

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

.amenities-icon {
    font-size: 20px;
    color: #FFB800;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}

.amenities-checkmark {
    color: #FFB800;
    font-size: 18px;
    margin-left: auto;
}

.amenities-details {
    flex: 1;
}

.amenities-details h3 {
    font-size: 15px;
    margin: 0 0 2px 0;
    font-weight: 600;
    color: #000000;
}

.amenities-details p {
    font-size: 12px;
    color: #666666;
    margin: 0;
}

/* ===== NEARBY LOCATIONS CARD ===== */
.nearby-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px;
    margin-top: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.nearby-icon {
    font-size: 24px;
    color: #FFB800;
    flex-shrink: 0;
}

.nearby-content {
    flex: 1;
}

.nearby-content p {
    font-size: 13px;
    color: #000;
    margin: 4px 0;
    line-height: 1.4;
}

.nearby-content strong {
    font-weight: 600;
}

.nearby-footer {
    font-size: 12px;
    color: #999999;
    margin-top: 4px;
}

.nearby-actions {
    display: flex;
    align-items: center;
    margin-top: 12px;
}

/* ===== MAP SECTION ===== */
.map-container {
    margin-top: 12px;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.map-image {
    width: 100%;
    height: auto;
    display: block;
}

.map-frame {
    width: 100%;
    height: 320px;
    border: 0;
    display: block;
}

.map-legend {
    display: flex;
    justify-content: space-around;
    align-items: center;
    font-size: 11px;
    padding: 12px;
    background: white;
    border-top: 1px solid #e5e5e5;
    flex-wrap: wrap;
    gap: 8px;
}

.map-legend span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.text-danger { color: #dc2626; }
.text-primary { color: #2563eb; }
.text-pink { color: #ec4899; }
.text-purple { color: #8b5cf6; }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablets and Small Desktops */
@media (max-width: 768px) {
    .page-container {
        padding: 1rem 0.75rem;
    }

    .header-title {
        font-size: 22px;
    }

    .back-btn {
        padding: 5px 12px;
        font-size: 13px;
    }

    .listing {
        flex-direction: column;
    }

    .listing-image {
        width: 100%;
        height: 200px;
    }

    .listing-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-container {
        max-width: 100%;
    }

    .filter-bar {
        padding: 12px 16px;
    }
}

/* Mobile Devices */
@media (max-width: 480px) {
    .page-container {
        padding: 1rem 0.5rem;
    }

    .header-title {
        font-size: 20px;
    }

    .page-header {
        padding: 0.75rem;
    }

    .back-btn {
        left: 0.75rem;
        padding: 5px 10px;
        font-size: 12px;
    }

    .brand-logo {
        margin-bottom: 32px;
    }

    .brand-text {
        font-size: 36px;
    }

    .location-pin {
        width: 36px;
        height: 36px;
    }

    .heading {
        font-size: 24px;
    }

    .property-name {
        font-size: 15px;
    }

    .property-address,
    .property-location {
        font-size: 12px;
    }

    .contact-btn {
        font-size: 10px;
        padding: 5px 12px;
    }

    .filter-bar {
        gap: 60px;
        padding: 12px;
    }

    .amenities-details h3 {
        font-size: 14px;
    }

    .amenities-details p {
        font-size: 11px;
    }

    .nearby-content p {
        font-size: 12px;
    }

    .map-legend {
        font-size: 10px;
        padding: 10px;
    }
}

/* Large Screens */
@media (min-width: 1920px) {
    .page-container {
        max-width: 1200px;
    }
}

/* ===== TOP BAR ===== */
.top-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.top-bar-inner {
    max-width: 56rem;
    height: 56px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    gap: 16px;
}

.top-bar .back-btn {
    position: static;
    flex-shrink: 0;
}

.top-logo {
    display: flex;
    align-items: center;
    gap: 1px;
    font-size: 22px;
    font-weight: 700;
    color: #000000;
    text-decoration: none;
}

.top-logo svg {
    width: 22px;
    height: 22px;
}

.top-title {
    margin-left: auto;
    font-size: 16px;
    font-weight: 600;
    color: #000000;
    text-align: right;
}

.page-container {
    max-width: 56rem;
}

.filter-bar {
    top: 56px;
    border-radius: 12px;
    margin-bottom: 16px;
}

/* ===== PROPERTY HERO (Detail Pages) ===== */
.property-hero {
    position: relative;
    height: 280px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.property-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.property-hero-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 56px 20px 18px;
    color: #ffffff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
}

.hero-name {
    font-size: 26px;
    font-weight: 700;
}

.hero-address {
    font-size: 14px;
    margin-top: 2px;
}

.hero-rating {
    font-size: 14px;
    font-weight: 600;
    margin-top: 6px;
}

.hero-rating .star {
    color: #FFD000;
    font-size: 16px;
}

/* ===== LISTING CARDS ===== */
.listing-intro {
    text-align: center;
    margin: 0.5rem 0 1.25rem;
}

.listing-intro h2 {
    font-size: 26px;
    font-weight: 700;
}

.listing-intro p {
    font-size: 14px;
    color: #666666;
    margin-top: 4px;
}

.search-container {
    margin-bottom: 0.75rem;
}

.result-count {
    text-align: center;
    font-size: 13px;
    color: #666666;
    margin-bottom: 1.25rem;
}

#listings {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.listing {
    flex-direction: column;
    gap: 0;
    padding: 0;
    margin: 0;
    border: none;
    background-color: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.listing:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

.listing-image {
    width: 100%;
    height: 200px;
    border: none;
    border-radius: 0;
}

.listing-info {
    padding: 16px;
    gap: 6px;
}

.listing-info .property-name {
    font-size: 18px;
}

.listing-actions {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
}

/* ===== LOGIN SPLIT LAYOUT ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    background-color: #ffffff;
}

.login-brand {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    padding: 56px;
    background-color: #FFCC00;
}

.login-brand img {
    width: 100%;
    max-height: 52vh;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.login-tagline {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.15;
    color: #000000;
}

.login-tagline-sub {
    font-size: 16px;
    color: #333333;
    margin-top: 8px;
}

.login-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-box {
    max-width: 440px;
    width: 100%;
    padding: 48px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (max-width: 900px) {
    .login-brand {
        display: none;
    }
}

@media (max-width: 640px) {
    #listings {
        grid-template-columns: 1fr;
    }

    .property-hero {
        height: 220px;
    }

    .hero-name {
        font-size: 22px;
    }

    .listing-intro h2 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .top-bar-inner {
        gap: 10px;
    }

    .top-logo {
        font-size: 18px;
    }

    .top-logo svg {
        width: 18px;
        height: 18px;
    }

    .top-title {
        font-size: 13px;
    }
}

@media (min-width: 1920px) {
    .top-bar-inner {
        max-width: 1200px;
    }
}
