:root {
    --primary-color: #8b5a2b;
    --secondary-color: #000000;
    --accent-color: #d4af37;
    --text-color: #333333;
    --light-bg: #f9f9f9;
    --white: #ffffff;
    --transition: all 0.3s ease;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    margin-bottom: 1rem;
}
a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    /* margin: 0 auto;
    padding: 0 15px; */
    

}
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 0px 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 160px;
    
     
}

.header.scrolled {
    padding: 15px 0;
    background-color: rgba(255, 255, 255, 0.98);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    
}

.logo h2 {
    font-size: 24px;
    margin-bottom: 5px;
    color: var(--primary-color);
    
}

.logo p {
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
}



/* ------------------menu------------------ */
.navbar ul {
    display: flex;
    gap: 30px;
    align-items: right;
    
    
}

.navbar a {
    font-weight: 500;
    color: var(--text-color);
    position: relative;
    padding: 5px 0;
    
}

.navbar a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    bottom: 0;
    left: 0;
    transition: var(--transition);
}

.navbar a:hover:after,
.navbar a.active:after {
    width: 100%;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.logos {
    width: 40%;
    height: auto;
    margin-left: 30%;
}
.btn-contact {
 
    display: flex;
    padding: 5px 10px !important;
    font-family: 'Georgia', serif; 
    font-size: 1em;
    font-weight: bold;
    text-decoration: none;
    color: #4B2B0A; 
    /* text-align: center; */
    border: none;
    /* border-radius: 5px; */
    cursor: pointer;
    overflow: hidden; 
    position: relative; 
    z-index: 1;

    /* Fondo degradado dorado inicial */
    background: linear-gradient(to right, #FFD700 0%, #DAA520 50%, #B8860B 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); 

    
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}


.btn-contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%; 
    width: 200%;
    height: 50%;
    background: linear-gradient(to right,
        rgba(255, 255, 255, 0) 0%,      /* Transparente */
        rgba(255, 255, 255, 0.5) 40%,  
        rgba(255, 255, 255, 0.8) 50%,  
        rgba(255, 255, 255, 0.5) 60%,   
        rgba(255, 255, 255, 0) 100%     
    );
    transform: skewX(-20deg); 
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); 
    z-index: -1; 
}

.btn-contact:hover {
   
    /* border-radius: 10px; */
    background: linear-gradient(to right, #B8860B 0%, #DAA520 50%, #FFD700 100%);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4); 
  
  
    transform: translateY(-2px);
}


.btn-contact:hover::before {
    left: -50%; 
}
/* ------------------- */

.menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
}
/* Estilos responsivos */
@media (max-width: 992px) {
    .navbar {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 80%;
        height: calc(90vh - 80px);
        background-color: var(--white);
        flex-direction: column;
        align-items: right;
        justify-content: flex-start;
        padding: 40px 0;
        transition: var(--transition);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }

    .navbar.active {
        left: 0;
    }

    .navbar ul {
        flex-direction: column;
        width: 100%;
        text-align: right;
        
    }

    .navbar a {
        display: block;
        padding: 15px 0;
        
    }

    .menu-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero p {
        font-size: 1.2rem;
    }
    .hero img {
        width: 90px;
        height: auto;
        padding: 0;
        margin: 0;
    }
}
/* --- Estilos para la página de Propiedades (propiedades.html) --- */

.properties-page-main {
    padding-top: 140px; /* Para dejar espacio a la cabecera */
    min-height: 80vh;
    background-color: var(--light-bg); /* Fondo crema Ferrero */
}

.properties-filter-section {
    background-color: var(--white);
    padding: 40px 0;
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
}

.properties-filter-section h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 2rem;
}

.filter-form {
    display: flex;
    flex-wrap: wrap; /* Permite que los elementos salten de línea */
    gap: 15px; /* Espacio entre los elementos del filtro */
    justify-content: center;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
}

.filter-form input[type="text"],
.filter-form input[type="number"],
.filter-form select {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    flex: 1 1 200px; /* Crece y encoge, con un tamaño base de 200px */
    max-width: 250px; /* Limita el ancho máximo de los inputs */
}

.filter-form button {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    font-weight: bold;
}

#applyFilters {
    background-color: var(--secondary-color); /* Dorado Ferrero */
    color: var(--white);
    box-shadow: 0 4px 10px var(--gold-shadow);
}

#applyFilters:hover {
    background-color: darken(var(--secondary-color), 10%);
    transform: translateY(-2px);
}

#clearFilters {
    background-color: #ccc;
    color: #333;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#clearFilters:hover {
    background-color: #bbb;
    transform: translateY(-2px);
}

/* --- Lista de Propiedades (Grid) --- */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Columnas responsivas */
    gap: 30px; /* Espacio entre las tarjetas de propiedad */
    padding: 20px 0;
}

.property-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08); /* Sombra suave Ferrero */
    overflow: hidden; /* Para que la imagen destacada no se desborde */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.property-card-image {
    width: 100%;
    height: 220px; /* Altura fija para las imágenes destacadas */
    overflow: hidden;
    position: relative;
}

.property-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Asegura que la imagen cubra el área sin distorsionarse */
    object-position: center;
    transition: transform 0.3s ease;
}

.property-card:hover .property-card-image img {
    transform: scale(1.05); /* Efecto zoom al pasar el ratón */
}

.property-card-body {
    padding: 20px;
    flex-grow: 1; /* Permite que el cuerpo crezca y empuje el pie hacia abajo */
    display: flex;
    flex-direction: column;
}

.property-card-body h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    white-space: nowrap; /* Evita que el título se rompa */
    overflow: hidden; /* Oculta el texto que se desborda */
    text-overflow: ellipsis; /* Añade puntos suspensivos */
}

.property-card-body p {
    font-size: 0.95rem;
    color: var(--text-color);
    line-height: 1.5;
    margin-bottom: 15px;
    flex-grow: 1; /* Permite que el párrafo de descripción crezca */
}

.property-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto; /* Empuja el footer al final de la tarjeta */
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.property-card-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--secondary-color); /* Dorado para el precio */
}

.property-card-type {
    font-size: 0.9rem;
    background-color: #f0f0f0;
    padding: 5px 10px;
    border-radius: 5px;
    color: #555;
    text-transform: capitalize;
}

.property-card-link {
    display: inline-block;
    background-color: var(--primary-color); /* Marrón oscuro para el botón */
    color: var(--white);
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.property-card-link:hover {
    background-color: darken(var(--primary-color), 10%);
}

.loading-message, .no-results {
    text-align: center;
    font-size: 1.2rem;
    color: #666;
    margin-top: 50px;
    grid-column: 1 / -1; /* Ocupa todo el ancho en el grid */
}

/* Media Queries para responsividad */
@media (max-width: 768px) {
    .filter-form {
        
        align-items: stretch;
        height: 50px;
        margin-bottom:350px ;
    }
    .filter-form input,
    .filter-form select,
    .filter-form button {
        max-width: 100%;
    }
    .properties-grid {
        grid-template-columns: 1fr; /* Una sola columna en móviles */
    }
    .properties-page-main{
        margin-top: 50px;
    }
}
/* --- Estilos para la página de Detalle de Propiedad (detalle-propiedad.html) --- */

.property-detail-page-main {
    padding-top: 120px;
    padding-bottom: 50px;
    background-color: var(--light-bg);
    min-height: 80vh;
}

.property-detail-card {
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-top: 30px;
}

.property-detail-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.property-detail-header h1 {
    font-size: 2.8rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.property-detail-header .location {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 15px;
}

.property-detail-header .price {
    font-size: 2.2rem;
    font-weight: bold;
    color: var(--secondary-color);
}

.property-detail-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.property-detail-gallery img {
    width: 100%;
    height: 200px; /* Altura fija para las imágenes de la galería */
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.property-detail-gallery img:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.property-detail-info {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
}

.property-detail-description,
.property-detail-features {
    flex: 1 1 45%; /* Cada columna ocupa aproximadamente la mitad */
    min-width: 300px; /* Ancho mínimo para evitar que se aplasten */
}

.property-detail-description h3,
.property-detail-features h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    border-bottom: 2px solid var(--secondary-color); /* Línea dorada */
    padding-bottom: 5px;
}

.property-detail-description p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-color);
}

.property-detail-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr; /* Dos columnas para las características */
    gap: 10px;
}

.property-detail-features ul li {
    font-size: 1.05rem;
    color: var(--text-color);
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
}

.property-detail-features ul li:last-child {
    border-bottom: none;
}

.property-detail-features ul li i {
    color: var(--secondary-color); /* Iconos dorados */
    margin-right: 10px;
}

/* Regresar a la página de propiedades */
.back-to-properties {
    display: inline-block;
    margin-top: 30px;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    font-weight: bold;
}

.back-to-properties:hover {
    background-color: darken(var(--primary-color), 10%);
}

/* Mensajes de carga/error */
.property-detail-page-main .loading-message,
.property-detail-page-main .error-message {
    text-align: center;
    font-size: 1.2rem;
    color: #666;
    margin-top: 50px;
}

/* Media Queries para responsividad */
@media (max-width: 768px) {
    .property-detail-header h1 {
        font-size: 2rem;
    }
    .property-detail-header .price {
        font-size: 1.8rem;
    }
    .property-detail-info {
        flex-direction: column;
        gap: 20px;
    }
    .property-detail-description,
    .property-detail-features {
        flex: 1 1 100%;
        min-width: unset;
    }
    .property-detail-features ul {
        grid-template-columns: 1fr; /* Una columna en móviles */
    }
    .property-detail-gallery {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    .property-detail-gallery img {
        height: 150px;
    }
}
/* --- Estilos Generales de Administración --- */
:root {
    --admin-primary: #4A90E2; /* Azul para acciones primarias */
    --admin-secondary: #F7B500; /* Amarillo/Naranja para acentos o advertencias */
    --admin-danger: #D0021B; /* Rojo para acciones peligrosas */
    --admin-bg-light: #f4f6f9; /* Fondo claro */
    --admin-bg-dark: #34495e; /* Fondo oscuro para sidebar */
    --admin-text-light: #ecf0f1; /* Texto claro */
    --admin-text-dark: #2c3e50; /* Texto oscuro */
    --admin-card-bg: #ffffff; /* Fondo de tarjetas */
    --admin-border-color: #e0e0e0; /* Color de bordes */
}

body.admin-login-body {
    font-family: 'Arial', sans-serif;
    background-color: var(--admin-bg-light);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

.login-container {
    background-color: var(--admin-card-bg);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 100%;
    max-width: 400px;
}

.login-container h2 {
    color: var(--admin-text-dark);
    margin-bottom: 30px;
    font-size: 2rem;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--admin-text-dark);
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--admin-border-color);
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box; /* Incluye padding y borde en el ancho */
}

.form-group textarea {
    resize: vertical;
}

.btn-admin-primary,
.btn-admin-secondary {
    display: inline-block;
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-decoration: none;
    text-align: center;
}

.btn-admin-primary {
    background-color: var(--admin-primary);
    color: var(--admin-text-light);
    margin-top: 10px;
}

.btn-admin-primary:hover {
    background-color: darken(var(--admin-primary), 10%);
    transform: translateY(-2px);
}

.btn-admin-secondary {
    background-color: #ccc;
    color: var(--admin-text-dark);
    margin-left: 10px;
}

.btn-admin-secondary:hover {
    background-color: #bbb;
    transform: translateY(-2px);
}

.error-message {
    color: var(--admin-danger);
    margin-top: 10px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* --- Dashboard y Formulario de Administración --- */
body.admin-dashboard-body {
    font-family: 'Arial', sans-serif;
    display: flex;
    min-height: 100vh;
    background-color: var(--admin-bg-light);
}

.admin-sidebar {
    width: 250px;
    background-color: var(--admin-bg-dark);
    color: var(--admin-text-light);
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h3 {
    font-size: 1.8rem;
    color: var(--admin-secondary);
}

.admin-sidebar nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-sidebar nav ul li {
    margin-bottom: 10px;
}

.admin-sidebar nav ul li a {
    display: block;
    padding: 12px 15px;
    color: var(--admin-text-light);
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.admin-sidebar nav ul li a:hover,
.admin-sidebar nav ul li a.active {
    background-color: rgba(255, 255, 255, 0.15);
}

.admin-sidebar nav ul li a i {
    margin-right: 10px;
    width: 20px; /* Para alinear iconos */
    text-align: center;
}

.admin-main-content {
    flex-grow: 1; /* Ocupa el resto del espacio */
    padding: 30px;
}

.admin-header {
    background-color: var(--admin-card-bg);
    padding: 25px 30px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.admin-header h1 {
    color: var(--admin-text-dark);
    font-size: 2.2rem;
    margin: 0;
}

.admin-section {
    background-color: var(--admin-card-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--admin-border-color);
    padding-bottom: 15px;
}

.section-header h2 {
    font-size: 1.8rem;
    color: var(--admin-text-dark);
    margin: 0;
}

/* Tabla de propiedades */
.properties-admin-table table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.properties-admin-table th,
.properties-admin-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--admin-border-color);
    color: var(--admin-text-dark);
}

.properties-admin-table th {
    background-color: var(--admin-bg-light);
    font-weight: bold;
    color: var(--admin-text-dark);
    text-transform: uppercase;
    font-size: 0.9rem;
}

.properties-admin-table td .action-buttons {
    display: flex;
    gap: 8px;
}

.properties-admin-table td .btn-admin-small {
    padding: 8px 12px;
    font-size: 0.85rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.2s ease;
}

.btn-admin-edit {
    background-color: var(--admin-primary);
    color: var(--white);
}

.btn-admin-edit:hover {
    background-color: darken(var(--admin-primary), 10%);
}

.btn-admin-delete {
    background-color: var(--admin-danger);
    color: var(--white);
}

.btn-admin-delete:hover {
    background-color: darken(var(--admin-danger), 10%);
}

/* Formulario de Propiedad */
.property-form .file-input {
    display: block; /* Asegura que ocupe su propia línea */
    margin-top: 8px;
}

.property-form .image-preview-text {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

.gallery-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.gallery-previews img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid var(--admin-border-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Responsividad para Admin */
@media (max-width: 992px) {
    body.admin-dashboard-body {
        flex-direction: column;
    }
    .admin-sidebar {
        width: 100%;
        height: auto;
        padding: 15px;
        flex-direction: row; /* Sidebar horizontal */
        justify-content: space-around;
        align-items: center;
    }
    .sidebar-header {
        display: none; /* Oculta el título en móviles */
    }
    .admin-sidebar nav ul {
        display: flex;
        justify-content: center;
        gap: 15px;
    }
    .admin-main-content {
        padding: 20px;
    }
    .properties-admin-table table {
        font-size: 0.9rem;
    }
    .properties-admin-table th,
    .properties-admin-table td {
        padding: 8px 10px;
    }
    .properties-admin-table td .action-buttons {
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 576px) {
    .login-container {
        padding: 25px;
    }
    .admin-header h1 {
        font-size: 1.8rem;
    }
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .properties-admin-table {
        overflow-x: auto; /* Permite scroll horizontal en tablas */
    }
    .header {
        height: 195px;
    }
}

