* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 16px;
    text-align: center;
}

header h1 {
    font-size: clamp(1.8em, 5vw, 2.5em);
    margin-bottom: 10px;
    word-break: break-word;
}

.tagline {
    font-size: clamp(1em, 4vw, 1.2em);
    opacity: 0.9;
}

.direct-owner-badge {
    font-size: clamp(0.85em, 3vw, 1em);
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
    margin-top: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    background: #667eea;
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.mobile-nav a {
    display: inline-block;
    color: white;
    text-decoration: none;
    padding: 10px 16px;
    font-size: 0.95em;
    transition: background 0.3s ease;
}

.mobile-nav a:active {
    background: rgba(0,0,0,0.2);
}

/* Main Content */
main {
    padding: 40px 0;
}

.listings h2 {
    text-align: center;
    font-size: clamp(1.5em, 5vw, 2em);
    margin-bottom: 30px;
    color: #333;
}

/* Flat Cards */
.flat-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.flat-card:active,
.flat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.flat-image-wrapper {
    overflow: hidden;
    background: #e9ecef;
    min-height: 250px;
}

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

.flat-details {
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.flat-details h3 {
    font-size: clamp(1.3em, 4vw, 1.8em);
    color: #667eea;
    margin-bottom: 8px;
}

.location {
    color: #666;
    font-size: 1em;
    margin-bottom: 12px;
}

.features {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 0.9em;
}

.features li {
    padding: 6px 0;
    border-bottom: 1px solid #eee;
}

.features li:before {
    content: "✓ ";
    color: #667eea;
    font-weight: bold;
}

.description {
    color: #666;
    margin-bottom: 16px;
    font-size: 0.9em;
    line-height: 1.5;
}

.price {
    font-size: clamp(1.3em, 4vw, 1.8em);
    color: #764ba2;
    font-weight: bold;
    margin-bottom: 16px;
}

.period {
    font-size: 0.55em;
    color: #999;
}

/* Buttons */
.btn {
    padding: 14px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-align: center;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:active {
    transform: scale(0.98);
}

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

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    padding: 40px 16px;
    margin-top: 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.footer-section h4 {
    margin-bottom: 12px;
    color: #667eea;
}

.footer-section p {
    margin-bottom: 8px;
    font-size: 0.95em;
}

footer a {
    color: #667eea;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

footer a:active,
footer a:hover {
    opacity: 0.8;
}

.copyright {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 16px;
    font-size: 0.9em;
    opacity: 0.9;
}

#visit-counter {
    margin-left: 12px;
    padding: 4px 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    display: inline-block;
}

#visit-counter strong {
    color: #FFD700;
    font-weight: 700;
}

/* Tablet (768px and below) */
@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }

    header {
        padding: 30px 12px;
    }

    header h1 {
        font-size: 1.6em;
    }

    .tagline {
        font-size: 1em;
    }

    .direct-owner-badge {
        font-size: 0.8em;
        padding: 6px 12px;
        margin-top: 10px;
    }

    .mobile-nav {
        display: flex;
        gap: 0;
    }

    .mobile-nav a {
        flex: 1;
        text-align: center;
        padding: 12px 8px;
    }

    main {
        padding: 30px 0;
    }

    .listings h2 {
        font-size: 1.4em;
        margin-bottom: 24px;
    }

    .flat-card {
        grid-template-columns: 1fr;
        margin-bottom: 24px;
    }

    .flat-image-wrapper {
        min-height: 280px;
    }

    .flat-details {
        padding: 20px;
    }

    .flat-details h3 {
        font-size: 1.4em;
    }

    .features {
        grid-template-columns: 1fr 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    header {
        padding: 24px 12px;
    }

    header h1 {
        font-size: 1.4em;
    }

    .tagline {
        font-size: 0.9em;
    }

    .direct-owner-badge {
        font-size: 0.75em;
        padding: 6px 10px;
        margin-top: 8px;
        letter-spacing: 0px;
    }

    .mobile-nav {
        padding: 24px 0;
    }

    .listings h2 {
        font-size: 1.2em;
        margin-bottom: 20px;
    }

    .flat-details {
        padding: 16px;
    }

    .flat-details h3 {
        font-size: 1.2em;
        margin-bottom: 6px;
    }

    .location {
        font-size: 0.9em;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 4px;
        font-size: 0.85em;
    }

    .features li {
        padding: 4px 0;
    }

    .description {
        font-size: 0.85em;
        margin-bottom: 12px;
    }

    .price {
        font-size: 1.4em;
        margin-bottom: 12px;
    }

    .btn {
        padding: 12px 20px;
        min-height: 40px;
        font-size: 0.95em;
    }

    footer {
        padding: 30px 12px;
    }

    .footer-content {
        gap: 12px;
    }

    .footer-section h4 {
        font-size: 0.95em;
    }

    .footer-section p {
        font-size: 0.85em;
    }

    .copyright {
        font-size: 0.8em;
    }
}

/* Map Section */
.map-section {
    background: white;
    padding: 60px 0;
    margin-bottom: 0;
}

.map-section h2 {
    text-align: center;
    font-size: clamp(1.5em, 5vw, 2em);
    margin-bottom: 30px;
    color: #333;
}

.map-container {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.map-container iframe {
    width: 100%;
    display: block;
    border: none;
}

@media (max-width: 768px) {
    .map-section {
        padding: 40px 0;
    }

    .map-section h2 {
        font-size: 1.4em;
        margin-bottom: 20px;
    }

    .map-container iframe {
        height: 350px !important;
    }
}

@media (max-width: 480px) {
    .map-section {
        padding: 30px 0;
    }

    .map-section h2 {
        font-size: 1.2em;
        margin-bottom: 16px;
    }

    .map-container iframe {
        height: 280px !important;
    }

    #visit-counter {
        display: block;
        margin-left: 0;
        margin-top: 12px;
        font-size: 0.85em;
    }
}

