* style.css */{

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

:root {
    --primary: #3498db;
    --primary-dark: #2980b9;
    --secondary: #3e677c;
    --accent: #04188d;
    --bg: #f4f6f9;
    --text: #070707;
    --radius: 10px;
    --shadow: 0 8px 20px rgba(0,0,0,0.08);
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

/* HEADER */
header {
    background: rgba(7, 67, 128, 0.808);
    backdrop-filter: blur(8px);
    color: #fff;
    padding: 0.5rem 0;
    position: fixed;
    width: 100%;
    height: 100px;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;

}
.logo {
    display: block;
    align-items: center;

}

.logo img {
    height: 100px;
    width: auto;
    display: flex;
    justify-content: center;
    align-items: center;
   
}
/* NAV */
.nav-links {
    display: flex;
    list-style: none;
    gap: 20px;
    
}

.nav-links a {
    color: #fff;
    text-decoration: solid;
    position: relative;
    transition: 0.3s;
}

.nav-links a::after {
    content: "";
    position: absolute;
    width: 0%;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: var(--primary);
    transition: 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

/* HERO */
.hero {
    background: linear-gradient(rgba(7, 4, 187, 0.6), rgba(16, 19, 158, 0.733)),
                url('') center/cover;
    height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 70px;
    text-align: center;
    color: #eef3f5;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    animation: fadeIn 1s ease;
}

/* SEARCH */
.search-bar {
    display: flex;
    max-width: 600px;
    width: 100%;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.search-bar input {
    flex: 1;
    padding: 12px;
    border: none;
    outline: none;
}

.search-bar button {
    padding: 12px 25px;
    background: var(--primary);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: 0.3s;
}

.search-bar button:hover {
    background: var(--primary-dark);
}

/* MAIN */
main {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
}

/* FILTROS */
.filters {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-group select,
.filter-group input {
    padding: 8px;
    border-radius: var(--radius);
    border: 1px solid #ddd;
}

/* TARJETAS */
.properties {
    display: grid;
    grid-template-columns: repeat(2, minmax(0px, 1fr));
    gap: 25px;
}

.property {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: 0.3s;
}

.property:hover {
    transform: translateY(-8px) scale(1.02);
}

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

/* CONTENIDO */
.property-content {
    padding: 20px;
}

.property h3 {
    margin-bottom: 10px;
    color: var(--secondary);
}

.property .price {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--accent);
}

.property .location {
    color: #777;
    margin: 8px 0;
}

.property .details {
    display: block;
    justify-content: space-between;
    margin: 15px 0;
}

.property .details span {
    background: #ecf0f1;
    padding: 6px 10px;
    border-radius: var(--radius);
    font-size: 0.85rem;
}

/* BOTÓN */
.property button {
    width: 100%;
    padding: 10px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: 0.3s;
}

.property button:hover {
    background: var(--primary-dark);
}

/* FOOTER */
footer {
    background: var(--secondary);
    color: #fff;
    text-align: center;
    padding: 25px 0;
    margin-top: 60px;
}

/* ANIMACIONES */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px);}
    to { opacity: 1; transform: translateY(0);}
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .filters {
        flex-direction: column;
    }

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


/* ===== AJUSTE RESPONSIVE DE TARJETAS ===== */

.properties {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
}

.property {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.property img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.property-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.property-content button {
    margin-top: auto;
}

/* Pantallas medianas */
@media (max-width: 900px) {
    .properties {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Celulares */
@media (max-width: 600px) {
    .properties {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ===== BOTONES ADMINISTRATIVOS ===== */

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.admin-actions form {
    margin: 0;
}

.admin-actions .btn-editar,
.admin-actions .btn-borrar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border: none;
    border-radius: 7px;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.admin-actions .btn-editar {
    background-color: #0d47a1;
    color: white;
}

.admin-actions .btn-borrar {
    background-color: #c62828;
    color: white;
}

.admin-actions .btn-editar:hover {
    background-color: #083579;
}

.admin-actions .btn-borrar:hover {
    background-color: #8e1717;
}


/* ===== BOTÓN DE UBICACIÓN Y ACCIONES ADMINISTRATIVAS ===== */
.property .btn-maps {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    box-sizing: border-box;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background .3s;
}
.property .btn-maps:hover { background: var(--primary-dark); }
.admin-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.admin-actions form { margin: 0; flex: 1; }
.admin-actions .btn-editar,
.admin-actions .btn-borrar {
    display: inline-flex; align-items: center; justify-content: center;
    width: 100%; min-height: 40px; padding: 9px 14px; box-sizing: border-box;
    border: 0; border-radius: 7px; font: inherit; font-weight: 600;
    text-decoration: none; cursor: pointer;
}
.admin-actions .btn-editar { background: #0d47a1; color: #fff; }
.admin-actions .btn-borrar { background: #c62828; color: #fff; }
.admin-actions .btn-editar:hover { background: #083579; }
.admin-actions .btn-borrar:hover { background: #8e1717; }

/* ===== VENTANA SUPERPUESTA DE DETALLES ===== */
.property { cursor: pointer; }
.property-modal { display: none; position: fixed; inset: 0; z-index: 1000; align-items: center; justify-content: center; padding: 20px; }
.property-modal.is-open { display: flex; }
.property-modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .78); }
.property-modal-dialog { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(260px, 1fr); width: min(1000px, 100%); max-height: 90vh; overflow: auto; background: #fff; border-radius: 14px; box-shadow: 0 15px 50px rgba(0,0,0,.3); }
.property-modal-dialog > img { display: block; width: 100%; height: 100%; min-height: 300px; max-height: 80vh; object-fit: contain; background: #f1f3f5; }
.property-modal-info { padding: 28px; overflow-wrap: anywhere; }
.property-modal-info h2 { margin: 0 35px 12px 0; color: var(--secondary); }
.property-modal-info .modal-price { color: var(--accent); font-size: 1.5rem; font-weight: 700; }
.property-modal-info .modal-location { margin-top: 18px; color: #666; }
.property-modal-close { position: absolute; z-index: 2; top: 10px; right: 12px; width: 42px; height: 42px; border: 0; border-radius: 50%; background: #fff; color: #111; font-size: 30px; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
body.modal-open { overflow: hidden; }
.foto-actual { display: block; max-width: 260px; max-height: 180px; object-fit: contain; margin: 8px 0; }
@media (max-width: 700px) {
    .property-modal-dialog { grid-template-columns: 1fr; }
    .property-modal-dialog > img { height: 38vh; min-height: 180px; max-height: 45vh; }
    .property-modal-info { padding: 20px; }
}


/* Estado comercial de cada propiedad */
.estado-propiedad { display: inline-block; margin: 8px 0 10px; padding: 6px 12px; border-radius: 999px; font-size: .82rem; font-weight: 800; letter-spacing: .02em; }
.estado-en-venta { background: #e2f7e9; color: #176b35; }
.estado-vendida { background: #ffe4e4; color: #a31d1d; }
.estado-apartada { background: #fff0cf; color: #805500; }

/* Secciones internas de información y documentos */
.informacion-sitio { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; padding: 54px max(6%, calc((100% - 1200px)/2)); background: #f2f6fa; scroll-margin-top: 95px; }
.informacion-columna { min-width: 0; }
.informacion-columna h2, .documentos-publicos h2, .panel-edicion-sitio h2 { color: var(--secondary, #3e677c); margin-top: 0; }
.informacion-columna p { line-height: 1.7; overflow-wrap: anywhere; }
.informacion-columna a, .documentos-publicos a { color: var(--primary, #031a9e); }
.documentos-publicos { padding: 35px max(6%, calc((100% - 1200px)/2)); scroll-margin-top: 95px; }
.lista-documentos { display: flex; flex-wrap: wrap; gap: 12px 28px; padding-left: 20px; }
.panel-edicion-sitio { padding: 38px max(6%, calc((100% - 1050px)/2)); background: #eef3fb; border-top: 1px solid #d3deec; }
.panel-edicion-sitio > p { color: #4e5b6a; }
.form-edicion-sitio { display: grid; gap: 10px; background: #fff; border: 1px solid #dce4ef; border-radius: 14px; padding: 24px; margin: 22px 0; box-shadow: 0 4px 16px rgba(10,35,75,.06); }
.form-edicion-sitio h3 { margin: 0 0 8px; color: var(--secondary, #3e677c); }
.form-edicion-sitio label { font-weight: 700; }
.form-edicion-sitio input, .form-edicion-sitio textarea { width: 100%; box-sizing: border-box; border: 1px solid #c8d3e1; border-radius: 8px; padding: 11px 12px; font: inherit; }
.form-edicion-sitio input[type=file] { background: #f8fafc; }
.btn-guardar-sitio { justify-self: start; border: 0; border-radius: 8px; background: var(--primary, #031a9e); color: white; padding: 12px 18px; font-weight: 700; cursor: pointer; }
.btn-guardar-sitio:hover { filter: brightness(1.15); }
.mensaje-sitio { padding: 12px 15px; border-radius: 8px; background: #fff; }
.mensaje-sitio.exito { border-left: 5px solid #1d8b49; color: #176b35; }
.mensaje-sitio.error { border-left: 5px solid #b72c2c; color: #a31d1d; }
footer a { color: inherit; }
@media (max-width: 700px) { .informacion-sitio { grid-template-columns: 1fr; padding: 35px 6%; } .documentos-publicos, .panel-edicion-sitio { padding: 30px 6%; } .form-edicion-sitio { padding: 17px; } }


/* ===== REDES SOCIALES DINÁMICAS HERCOMS ===== */
.redes-publicas { margin-top: 24px; }
.redes-publicas h3 { margin: 0 0 14px; color: var(--secondary, #3e677c); }
.redes-lista { display: flex; flex-wrap: wrap; gap: 12px; }
.red-social-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 9px 15px; border-radius: 10px; text-decoration: none !important; font-weight: 700; color: #fff !important; box-shadow: 0 3px 10px rgba(0,0,0,.12); transition: transform .18s ease, filter .18s ease; }
.red-social-link:hover { transform: translateY(-2px); filter: brightness(1.08); }
.red-social-icono { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; font-size: 20px; font-weight: 800; line-height: 1; }
.red-facebook { background: #1877F2; }
.red-instagram { background: linear-gradient(45deg, #FCAF45 0%, #DD2A7B 50%, #8134AF 100%); }
.red-tiktok { background: #111; }
.red-whatsapp { background: #25D366; color: #073d1d !important; }
.red-whatsapp .red-social-icono { color: #fff; }
.red-youtube { background: #FF0033; }
.red-linkedin { background: #0A66C2; }
.red-x-social { background: #171717; }
.red-otra { background: #174a83; }
.administracion-redes > p { line-height: 1.55; }
.form-red-nueva { display: grid; gap: 10px; padding: 18px; border: 1px solid #dce4ef; border-radius: 10px; background: #f8faff; }
.form-red-nueva h4, .administracion-redes > h4 { margin: 5px 0 8px; color: var(--secondary, #3e677c); }
.form-red-nueva label, .form-red-editar label { font-weight: 700; }
.form-red-nueva input, .form-red-editar input { width: 100%; min-width: 0; box-sizing: border-box; border: 1px solid #c8d3e1; border-radius: 8px; padding: 11px 12px; font: inherit; }
.red-admin-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: end; padding: 16px 0; border-top: 1px solid #dce4ef; }
.form-red-editar { display: grid; grid-template-columns: minmax(100px, .25fr) minmax(0, 1fr); gap: 8px 12px; align-items: center; }
.form-red-editar button { grid-column: 2; justify-self: start; }
.form-red-eliminar { margin: 0; }
.btn-eliminar-red { border: 0; border-radius: 8px; background: #c62828; color: #fff; padding: 12px 15px; font: inherit; font-weight: 700; cursor: pointer; }
.btn-eliminar-red:hover { background: #941c1c; }
@media (max-width: 650px) {
  .red-admin-item { grid-template-columns: minmax(0, 1fr); }
  .form-red-editar { grid-template-columns: 1fr; }
  .form-red-editar button { grid-column: 1; }
  .form-red-eliminar { justify-self: start; }
}
