* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #FF385C;
    --primary-hover: #E61E4D;
    --text-primary: #222222;
    --text-secondary: #717171;
    --border-color: #DDDDDD;
    --background-light: #F7F7F7;
    --white: #FFFFFF;
    --shadow: 0 2px 16px rgba(0, 0, 0, 0.12);
    --shadow-hover: 0 4px 24px rgba(0, 0, 0, 0.18);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    background-color: var(--background-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
header {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.navbar {
    padding: 16px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    font-size: 24px;
    color: var(--primary-color);
    font-weight: 700;
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    background-color: var(--background-light);
    color: var(--primary-color);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
    margin-bottom: 48px;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: 24px;
    margin-bottom: 12px;
    opacity: 0.95;
}

.hero-description {
    font-size: 18px;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Apartments Grid */
.apartments-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    padding: 24px 0 80px;
}

/* Apartment Card */
.apartment-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.apartment-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.apartment-image-container {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.apartment-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.apartment-card:hover .apartment-image {
    transform: scale(1.05);
}

.super-host-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--white);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.image-overlay {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--white);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.apartment-content {
    padding: 32px;
}

.apartment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.apartment-location {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

.location-icon {
    font-size: 16px;
}

.apartment-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
}

.star {
    color: #FFB800;
}

.rating-value {
    font-weight: 600;
    color: var(--text-primary);
}

.review-count {
    color: var(--text-secondary);
}

.apartment-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.apartment-details {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.detail-icon {
    font-size: 18px;
}

.apartment-description {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 24px;
    font-size: 15px;
}

.amenities-section {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
}

.amenities-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.amenities-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.amenity-badge {
    background: var(--background-light);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.booking-section {
    background: var(--background-light);
    padding: 24px;
    border-radius: 12px;
}

.booking-dates {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.date-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.date-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.date-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.date-value.highlight {
    color: var(--primary-color);
    font-size: 18px;
}

.pricing-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.price-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    color: var(--text-secondary);
}

.price-row.total {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    color: var(--text-primary);
}

.total-price {
    color: var(--primary-color);
    font-size: 20px;
}

.host-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.host-label {
    color: var(--text-secondary);
}

.host-name {
    font-weight: 600;
    color: var(--text-primary);
}

.super-host-label {
    background: var(--primary-color);
    color: var(--white);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.book-button {
    width: 100%;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.book-button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.book-button:active {
    transform: translateY(0);
}

/* Footer */
footer {
    background: var(--white);
    border-top: 1px solid var(--border-color);
    padding: 32px 0;
    margin-top: 80px;
    text-align: center;
    color: var(--text-secondary);
}

/* Booking Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.close {
    color: var(--text-secondary);
    font-size: 32px;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.close:hover,
.close:focus {
    color: var(--primary-color);
}

.modal-body {
    padding: 32px;
}

.booking-apartment-info {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.booking-apartment-info h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.booking-summary {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.summary-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.booking-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 56, 92, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.price-summary-modal {
    background: var(--background-light);
    padding: 20px;
    border-radius: 12px;
    margin-top: 8px;
}

.price-row-modal {
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.price-row-modal.total {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    color: var(--text-primary);
}

.total-price-modal {
    color: var(--primary-color);
    font-size: 20px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.cancel-button,
.submit-button {
    flex: 1;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.cancel-button {
    background: var(--background-light);
    color: var(--text-primary);
}

.cancel-button:hover {
    background: var(--border-color);
}

.submit-button {
    background: var(--primary-color);
    color: var(--white);
}

.submit-button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 56, 92, 0.3);
}

/* Responsive Design */
@media (min-width: 768px) {
    .apartments-grid {
        grid-template-columns: 1fr;
    }

    .apartment-image-container {
        height: 500px;
    }
}

@media (min-width: 1024px) {
    .apartment-card {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .apartment-image-container {
        height: 100%;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 20px;
    }

    .apartment-content {
        padding: 24px;
    }

    .apartment-title {
        font-size: 24px;
    }

    .booking-dates {
        grid-template-columns: 1fr;
    }
}

