:root {
    --primary-color: #007bff;
    --secondary-color: #343a40;
    --text-color: #495057;
    --background-color: #f8f9fa;
    --card-bg-color: #ffffff;
    --border-color: #e9ecef;
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background-color: var(--card-bg-color);
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo img {
    max-height: 50px;
}
.nav a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 600;
    margin-left: 25px;
    transition: color 0.3s ease;
}
.nav a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('hero_fondo.jpg') no-repeat center center/cover;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    margin-bottom: 40px;
}
.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-width: 90%;
}
.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
}
.hero-content p {
    font-size: 1.2rem;
    font-weight: 300;
    margin-bottom: 30px;
}

.search-form {
    background-color: rgba(255,255,255,0.95);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    max-width: 600px;
}
.search-form form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.search-form input,
.search-form select {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    min-width: 200px;
}
.search-form button {
    padding: 10px 25px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.search-form button:hover {
    background-color: #0056b3;
}

/* Propiedades destacadas */
.properties-section {
    padding: 40px 0;
}
.properties-section h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 30px;
}
.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}
.property-card {
    background-color: var(--card-bg-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}
.property-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}
.card-body {
    padding: 20px;
}
.card-body h3 {
    font-size: 1.25rem;
    margin: 0 0 5px 0;
    font-weight: 600;
}
.card-body .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 10px 0;
}
.card-body .location {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0 0 15px 0;
}
.card-body .features span {
    background-color: #e9ecef;
    color: #6c757d;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-right: 5px;
}

/* Footer */
.footer {
    background-color: var(--secondary-color);
    color: #fff;
    text-align: center;
    padding: 20px 0;
    margin-top: 50px;
}

/* CAROUSEL - Estilos existentes */
.carousel-container {
    max-width: 800px;
    position: relative;
    margin: 20px auto;
}
.carousel-slide {
    display: flex;
    overflow: hidden;
    width: 100%;
}
.carousel-slide img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    display: none;
    transition: all 0.5s ease-in-out;
}
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.5);
}
.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}
.prev:hover, .next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* ICON LINKS - Estilos existentes */
.icon-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.icon-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 600;
    text-align: center;
}
.icon-link img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--secondary-color);
    transition: transform 0.3s ease;
}
.icon-link:hover img {
    transform: scale(1.1);
}

/* CONTACTO - Estilos existentes */
.contact-section {
    padding: 60px 0;
}
.contact-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--secondary-color);
}
.contact-section p {
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.1rem;
    color: var(--text-color);
}
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    align-items: flex-start;
}
.contact-info {
    background-color: var(--card-bg-color);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.contact-info h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--primary-color);
}
.contact-details .contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s ease;
}
.contact-details .contact-item:hover {
    color: var(--primary-color);
}
.contact-details .contact-item i {
    font-size: 1.5rem;
    margin-right: 15px;
    color: var(--primary-color);
}
.contact-form-wrapper {
    background-color: var(--card-bg-color);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.contact-form-wrapper h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--secondary-color);
}
.contact-form {
    display: flex;
    flex-direction: column;
}
.contact-form label {
    font-weight: 600;
    margin-bottom: 5px;
}
.contact-form input,
.contact-form textarea {
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}
.contact-form button {
    background-color: var(--primary-color);
    color: #fff;
    padding: 15px;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.contact-form button:hover {
    background-color: #0056b3;
}

/* MEDIA QUERIES para responsividad */
@media (max-width: 900px) {
    /* Contacto: las dos columnas se convierten en una */
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* Header: el menú se oculta o se ajusta */
    .header .container {
        flex-direction: column;
        text-align: center;
    }
    .nav {
        margin-top: 15px;
        flex-direction: column;
    }
    .nav a {
        margin: 5px 0;
    }

    /* Hero: el texto se hace más pequeño */
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .hero-content p {
        font-size: 1rem;
    }

    /* Búsqueda por iconos: los iconos se envuelven en varias líneas */
    .icon-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    /* Propiedades: el grid se ajusta a una sola columna */
    .property-grid {
        grid-template-columns: 1fr;
    }

    /* Formularios: los inputs ocupan todo el ancho */
    .search-form input,
    .search-form select,
    .search-form button {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .logo img {
        max-height: 60px;
    }
    .hero-content h1 {
        font-size: 2rem;
    }
}
/* Estilos para la tabla de administración */
.admin-section {
    padding: 40px 0;
}

.admin-section h2 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.admin-table th, .admin-table td {
    border: 1px solid var(--border-color);
    padding: 12px;
    text-align: left;
}

.admin-table th {
    background-color: var(--primary-color);
    color: #fff;
    font-weight: 600;
}

.admin-table tr:nth-child(even) {
    background-color: var(--background-color);
}

.destacada-checkbox {
    cursor: pointer;
    transform: scale(1.2);
}