/* Reset y Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #23b1b7;
    --secondary: #1a8a8f;
    --accent: #5ed4d9;
    --gold: #bfa14a;
    --dark: #2c3e50;
    --success: #06d6a0;
    --danger: #ef476f;
    --warning: #bfa14a;
    --light: #e8f6f7;
    --white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-700: #495057;
    --gray-900: #212529;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--gray-900);
    background: var(--gray-100);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--gold), var(--primary));
    color: var(--white);
    padding: 1.5rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    background: rgba(0, 0, 0, 0.75);
    padding: 8px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    display: inline-block;
}

.logo h1 {
    font-size: 1.8rem;
    margin-bottom: 0.25rem;
    font-weight: 700;
    color: var(--white);
}

.logo img {
    height: 70px;
    width: auto;
    display: inline-block;
    vertical-align: middle;
    filter: brightness(1.1);
}

.logo p {
    font-size: 0.9rem;
    opacity: 0.9;
    color: var(--white);
}

.nav a {
    color: var(--white);
    text-decoration: none;
    margin-left: 1.5rem;
    font-weight: 500;
    transition: opacity 0.3s;
}

.nav a:hover {
    opacity: 0.8;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--accent), var(--primary));
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Filtros */
.filtros {
    background: var(--white);
    padding: 2rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.filtros-form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filtros-form select,
.filtros-form input {
    flex: 1;
    min-width: 150px;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 1rem;
}

.btn-buscar, .btn-limpiar {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
}

.btn-buscar {
    background: var(--primary);
    color: var(--white);
}

.btn-limpiar {
    background: var(--gray-300);
    color: var(--gray-700);
}

/* Propiedades */
.propiedades {
    padding: 3rem 0;
}

.propiedades h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--dark);
}

.propiedades-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.propiedad-card {
    background: var(--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;
}

.propiedad-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.propiedad-card.destacada {
    border: 3px solid var(--gold);
    box-shadow: 0 6px 20px rgba(191, 161, 74, 0.2);
}

.badge-destacada {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--gold);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.85rem;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(191, 161, 74, 0.4);
}

.propiedad-imagen {
    height: 200px;
    overflow: hidden;
}

.propiedad-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-imagen {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-200);
    font-size: 3rem;
}

.propiedad-contenido {
    padding: 1.5rem;
}

.propiedad-tipo {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.propiedad-contenido h3 {
    margin: 0.5rem 0;
    font-size: 1.25rem;
    color: var(--gray-900);
}

.ubicacion {
    color: var(--gray-700);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.propiedad-detalles {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.propiedad-detalles span {
    background: var(--gray-100);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
}

.propiedad-precio {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--secondary);
    margin: 1rem 0;
}

.btn-ver-mas {
    display: block;
    text-align: center;
    background: var(--primary);
    color: var(--white);
    padding: 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-ver-mas:hover {
    background: var(--secondary);
}

/* Detalle */
.propiedad-detalle {
    background: var(--white);
    padding: 2rem 0;
}

.galeria {
    margin-bottom: 2rem;
}

.galeria-principal {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.galeria-principal img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.galeria-miniaturas {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.5rem;
}

.miniatura {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}

.miniatura:hover, .miniatura.active {
    border-color: var(--primary);
}

.detalle-contenido {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.precio-grande {
    font-size: 2.5rem;
    color: var(--secondary);
    font-weight: bold;
    margin: 1rem 0;
}

.precio-renta {
    display: block;
    font-size: 1.2rem;
    color: var(--gray-700);
}

.caracteristicas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.caracteristica {
    background: var(--gray-100);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.caracteristica .icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.descripcion, .amenidades {
    margin: 2rem 0;
}

.contacto-box {
    background: var(--light);
    padding: 1.5rem;
    border-radius: 12px;
    position: sticky;
    top: 20px;
}

.contacto-box h3 {
    margin-bottom: 0.5rem;
}

.btn-contacto {
    display: block;
    text-align: center;
    padding: 0.75rem;
    margin: 0.5rem 0;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-contacto:nth-child(3) {
    background: var(--primary);
    color: var(--white);
}

.btn-contacto:nth-child(4) {
    background: var(--secondary);
    color: var(--white);
}

.btn-contacto.whatsapp {
    background: #25D366;
    color: var(--white);
}

.btn-contacto:hover {
    transform: scale(1.05);
}

/* Contacto */
.contacto {
    background: var(--gray-100);
    padding: 3rem 0;
    text-align: center;
}

.contacto h2 {
    margin-bottom: 0.5rem;
}

.contacto-subtitle {
    color: var(--gray-700);
    margin-bottom: 2rem;
}

.contacto-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.contacto-item {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
}

.contacto-item a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* Footer */
.footer {
    background: var(--gray-900);
    color: var(--white);
    padding: 2rem 0;
    text-align: center;
}

/* Admin */
.admin-page {
    background: var(--gray-100);
    min-height: 100vh;
}

.admin-header {
    background: linear-gradient(135deg, var(--dark), var(--gold));
    color: var(--white);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.admin-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.admin-nav {
    display: flex;
    gap: 1rem;
}

.admin-nav a {
    color: var(--white);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: background 0.3s;
}

.admin-nav a:hover, .admin-nav a.active {
    background: rgba(255,255,255,0.2);
}

.admin-container {
    padding: 2rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-info h3 {
    font-size: 2rem;
    color: var(--primary);
}

.quick-actions {
    margin: 3rem 0;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.action-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    color: var(--gray-900);
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.action-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.5rem;
}

.admin-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: var(--secondary);
}

.btn-secondary {
    background: var(--gray-300);
    color: var(--gray-900);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
}

.table-responsive {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.admin-table th {
    background: var(--dark);
    color: var(--white);
    padding: 1rem;
    text-align: left;
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.table-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.no-img {
    font-size: 2rem;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    margin: 0.25rem;
}

.badge-success {
    background: var(--success);
    color: var(--white);
}

.badge-inactive {
    background: var(--gray-300);
    color: var(--gray-700);
}

.badge-star {
    background: var(--gold);
    color: var(--white);
}

.btn-small {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    margin: 0.25rem;
    display: inline-block;
}

.btn-edit {
    background: var(--primary);
    color: var(--white);
}

.btn-delete {
    background: var(--danger);
    color: var(--white);
}

.btn-view {
    background: var(--gray-300);
    color: var(--gray-900);
}

/* Forms */
.property-form {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
}

.current-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.image-preview {
    position: relative;
}

.image-preview img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
}

.badge-principal {
    position: absolute;
    top: 5px;
    left: 5px;
    background: var(--gold);
    color: var(--white);
    padding: 0.25rem 0.5rem;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: bold;
}

.btn-delete-img {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--danger);
    color: var(--white);
    padding: 0.5rem;
    border-radius: 50%;
    text-decoration: none;
    font-size: 0.85rem;
}

.form-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
}

/* Login */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    text-align: center;
}

.login-box h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.login-box h2 {
    margin-bottom: 2rem;
    color: var(--gray-700);
}

.login-form {
    text-align: left;
}

.btn-login {
    width: 100%;
    background: var(--primary);
    color: var(--white);
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-login:hover {
    background: var(--secondary);
}

.login-footer {
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.login-footer a {
    color: var(--primary);
    text-decoration: none;
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-error {
    background: #ffe0e0;
    color: var(--danger);
    border-left: 4px solid var(--danger);
}

.alert-success {
    background: #d4f4dd;
    color: #28a745;
    border-left: 4px solid #28a745;
}

.no-results, .empty-state {
    text-align: center;
    padding: 3rem;
    background: var(--white);
    border-radius: 12px;
}

/* ====================================
   BOTONES DE COMPARTIR EN REDES SOCIALES
   ==================================== */
.compartir-social {
    background: var(--light);
    padding: 1.5rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.botones-compartir {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.btn-compartir {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    color: white;
}

.btn-compartir:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-whatsapp {
    background: #25D366;
}

.btn-whatsapp:hover {
    background: #20BA5A;
}

.btn-facebook {
    background: #1877F2;
}

.btn-facebook:hover {
    background: #0C63D4;
}

.btn-twitter {
    background: #000000;
}

.btn-twitter:hover {
    background: #333333;
}

.btn-email {
    background: var(--gold);
}

.btn-email:hover {
    background: #a68838;
}

.btn-copiar {
    background: var(--gray-700);
}

.btn-copiar:hover {
    background: var(--gray-900);
}

/* Responsive */
@media (max-width: 768px) {
    .detalle-contenido {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .filtros-form {
        flex-direction: column;
    }
    
    .nav {
        width: 100%;
        margin-top: 1rem;
    }
    
    .nav a {
        margin-left: 0;
        margin-right: 1rem;
    }
    
    .botones-compartir {
        flex-direction: column;
    }
    
    .btn-compartir {
        width: 100%;
        justify-content: center;
    }
}