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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #0575E6 0%, #021B79 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

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

/* Header */
header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 30px 0;
    margin-bottom: 0;
}

header h1 {
    font-size: 2.5em;
    color: #0575E6;
    margin-bottom: 10px;
}

header p {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 20px;
}

/* Buttons */
.btn-add, .btn-primary, .btn-secondary, .btn-back, .btn-clear {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1em;
}

.btn-delete {
    display: inline-block;
    padding: 8px 16px;
    background: #ff4757;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9em;
    margin-top: 10px;
    transition: all 0.3s;
}

.btn-delete:hover {
    background: #ee2e3d;
    transform: translateY(-2px);
}

.btn-add, .btn-primary {
    background: #0575E6;
    color: white;
}

.btn-add:hover, .btn-primary:hover {
    background: #0461c4;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(5, 117, 230, 0.4);
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.btn-back {
    background: transparent;
    color: #0575E6;
    border: 2px solid #0575E6;
}

.btn-back:hover {
    background: #0575E6;
    color: white;
}

.btn-clear {
    background: #ff6b6b;
    color: white;
    padding: 10px 20px;
    font-size: 0.9em;
}

.btn-clear:hover {
    background: #ee5a5a;
}

/* Filters */
.filters-container {
    background: white;
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.filters-form {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
    font-size: 0.9em;
}

.filter-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.filter-group select:focus {
    outline: none;
    border-color: #0575E6;
}

/* Results Count */
.results-count {
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.results-count strong {
    color: #0575E6;
}

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

/* Alert Messages */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: bold;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Advertisement Containers */
.ad-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px auto;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.ad-top {
    margin-top: 0;
    margin-bottom: 25px;
}

.ad-between {
    grid-column: 1 / -1;
    margin: 25px 0;
}

.ad-bottom {
    margin-top: 30px;
    margin-bottom: 15px;
}

/* Advertisement Content */
.ad-content {
    width: 100%;
    max-width: 240px;
    margin: 0 auto;
}

.ad-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.ad-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.ad-item a {
    text-decoration: none;
    display: block;
}

.ad-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.ad-title {
    padding: 10px 12px;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    text-align: center;
    background: white;
    line-height: 1.3;
}

.ad-item:hover .ad-title {
    color: #0575E6;
}

/* Properties Grid */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

/* Property Card */
.property-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.property-type-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9em;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.property-type-badge.sale {
    background: #2ecc71;
    color: white;
}

.property-type-badge.rent {
    background: #3498db;
    color: white;
}

.property-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.no-image {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, #0575E6 0%, #021B79 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
}

.property-info {
    padding: 20px;
}

.property-title {
    font-size: 1.1em;
    margin-bottom: 10px;
    color: #333;
    line-height: 1.5;
    min-height: 3.2em;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.property-info p {
    margin: 8px 0;
    color: #666;
}

.city {
    font-size: 1em;
    font-weight: bold;
    color: #0575E6;
}

.date {
    font-size: 0.9em;
    color: #999;
    margin-top: 10px;
}

/* Contact Buttons */
.contact-buttons {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.btn-contact {
    flex: 1;
    display: inline-block;
    padding: 10px 15px;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.9em;
    transition: all 0.3s;
}

.btn-phone {
    background: #4CAF50;
    color: white;
}

.btn-phone:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.btn-whatsapp {
    background: #25D366;
    color: white;
}

.btn-whatsapp:hover {
    background: #20BA5A;
    transform: translateY(-2px);
}

/* Empty State */
.empty-state {
    text-align: center;
    background: white;
    padding: 60px 40px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.empty-state h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #0575E6;
}

.empty-state p {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 30px;
}

/* Form */
.form-container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="file"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input[type="text"]:focus,
.form-group input[type="tel"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0575E6;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #999;
    font-size: 0.9em;
}

#charCount {
    font-weight: bold;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.form-actions button,
.form-actions a {
    flex: 1;
    text-align: center;
}

/* Footer */
footer {
    background: white;
    margin-top: 60px;
    padding: 20px 0;
    text-align: center;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }
    
    .properties-grid {
        grid-template-columns: 1fr;
    }
    
    .filters-form {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .form-container {
        padding: 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .contact-buttons {
        flex-direction: column;
    }
    
    .btn-contact {
        width: 100%;
    }
    
    .property-title {
        font-size: 1em;
    }
}