/* ==========================================================
   SAMOS ARQUEOLÓXICO
   VISOR PÚBLICO

   Paneles flotantes
========================================================== */

/* ==========================================================
   OVERLAY
========================================================== */

#overlay{

    position:fixed;

    inset:0;

    background:rgba(0,0,0,.35);

    opacity:0;

    visibility:hidden;

    transition:opacity .30s ease;

    z-index:1900;

}


/* ==========================================================
   OVERLAY ACTIVO
========================================================== */

#overlay.activo{

    opacity:1;

    visibility:visible;

}

/* ==========================================================
   PANEL DE FICHA
========================================================== */

#panelFicha{
    position:fixed;

    top:var(--alto-cabecera);
    bottom:var(--alto-footer);

    left:calc(var(--ancho-panel) * -1);

    width:var(--ancho-panel);
    max-width:100%;

    height:auto;

    background:#ffffff;

    border-right:1px solid #e5e5e5;

    box-shadow:3px 0 15px rgba(0,0,0,.20);

    transition:left .35s ease;

    overflow-y:auto;

    scroll-behavior:smooth;
    overscroll-behavior:contain;

    z-index:2000;
}


/* ==========================================================
   PANEL ABIERTO
========================================================== */

#panelFicha.abierto{

    left:0;

}


/* ==========================================================
   PANEL DE FILTROS
========================================================== */

#panelFiltros{

    position:absolute;

    top:70px;

    right:20px;

    width:270px;

    padding:12px 14px 13px;

    background:#ffffff;

    border:1px solid rgba(140,106,24,.25);

    border-radius:8px;

    box-shadow:0 4px 16px rgba(0,0,0,.18);

    z-index:2000;

    display:none;

}

#panelFiltros.abierto{

    display:block;

}




/* ==========================================================
   GALERÍA

   (Se implementará más adelante)
========================================================== */

#galeria{

    display:none;

}


/* ==========================================================
   VISOR 360

   (Se implementará más adelante)
========================================================== */

#visor360{

    display:none;

}


/* ==========================================================
   RESPONSIVE

   Panel inferior para móviles
========================================================== */

@media (max-width:900px){

    /* ------------------------------------------
       PANEL DE FICHA
    ------------------------------------------ */

    #panelFicha{

    top:auto;

    left:0;

    bottom:var(--alto-footer);

    width:100%;

    height:75dvh;

    border-radius:18px 18px 0 0;

    transform:translateY(100%);

    transition:transform .35s ease;

}


    /* ------------------------------------------
       PANEL ABIERTO
    ------------------------------------------ */

   #panelFicha.abierto{

    transform:translateY(0);

}


/* ==========================================================
   PANEL DE FILTROS (MÓVIL)
========================================================== */

#panelFiltros{

    top:auto;

    right:0;

    left:0;

    bottom:var(--alto-footer);

    width:100%;

    max-width:none;

    border-radius:18px 18px 0 0;

    padding:20px;

    max-height:65vh;

    overflow-y:auto;

}

}

/* ==========================================================
   ACCIONES DEL PANEL DE FILTROS
========================================================== */

#accionesFiltros{

    display:flex;

    align-items:center;

    gap:5px;

    margin-bottom:10px;

    font-size:13px;

}


.linkFiltro{

    border:none;

    background:none;

    padding:0;

    margin:0;

    color:#2d6cdf;

    cursor:pointer;

    font-size:13px;

    text-decoration:underline;

}


.linkFiltro:hover{

    color:#184ea8;

}

/* ==========================================================
   LISTA DE TIPOLOGÍAS
========================================================== */

#listaFiltros{

    display:flex;

    flex-direction:column;

    gap:3px;

    margin-top:0;

}

.filtroTipologia{

    display:flex;

    align-items:center;

    gap:7px;

    min-height:22px;

    cursor:pointer;

    font-size:14px;

}

.filtroTipologia input{

    margin:0;

}

.iconoFiltro{

    width:16px;

    height:20px;

    object-fit:contain;

    flex-shrink:0;

}

/* ==========================================================
   CABECERA PANEL FILTROS
========================================================== */

#cabeceraFiltros{

    display:flex;

    align-items:center;

    gap:10px;

    margin-bottom:6px;

    padding-bottom:6px;

    border-bottom:2px solid rgb(140,106,24);

}

#cabeceraFiltros h2{

    margin:0;
    font-size:17px;
    font-weight:700;
    line-height:1;

    color:rgb(140,106,24);

}

#accionesFiltros{

    display:flex;

    align-items:center;

    gap:4px;

    margin:0;

    font-size:12px;

}

.linkFiltro{

    border:none;

    background:none;

    padding:0;

    margin:0;

    color:rgb(140,106,24);

    cursor:pointer;

    font-size:12px;

    text-decoration:none;

}

.linkFiltro:hover{

    text-decoration:underline;

    color:rgb(120,90,20);

}

#btnCerrarFiltros{

    width:22px;

    height:22px;

    margin-left:auto;

    border:none;

    background:none;

    color:rgb(140,106,24);

    font-size:22px;

    line-height:1;

    cursor:pointer;

    border-radius:4px;

    padding:0;

}

#btnCerrarFiltros:hover{

    background:rgba(140,106,24,.10);

}

/* ------------------------------------------
   ICONO DE LA TIPOLOGÍA
------------------------------------------ */

.iconoFiltro{

    width:16px;

    height:20px;

    object-fit:contain;

    flex-shrink:0;

}


/* GPS */

#btnGPS{

    position:absolute;

    right:15px;

    bottom:80px;

    z-index:1000;

    width:46px;

    height:46px;

    border:none;

    border-radius:50%;

    background:#fff;

    box-shadow:0 2px 8px rgba(0,0,0,.3);

    cursor:pointer;

    font-size:22px;

}

#btnGPS.activo{

    background:#2d8cff;

    color:#fff;

}


.leaflet-control-attribution{

    font-size:10px;

    background:rgba(255,255,255,0.45);

    padding:2px 6px;

}

/* ==========================================================
   PANEL DE PÁGINAS
   Mismo comportamiento que la ficha arqueológica
========================================================== */

#panelPagina{
    position:fixed;

    top:var(--alto-cabecera);
    bottom:var(--alto-footer);

    left:calc(var(--ancho-panel) * -1);

    width:var(--ancho-panel);
    max-width:100%;

    height:auto;

    background:#ffffff;

    border-right:1px solid #e5e5e5;

    box-shadow:3px 0 15px rgba(0,0,0,.20);

    transition:left .35s ease;

    overflow-y:auto;

    scroll-behavior:smooth;

    overscroll-behavior:contain;

    z-index:2000;

}


/* Panel abierto */

#panelPagina.abierto{

    left:0;

}


/* Botón cerrar */

#cerrarPagina{

    position:absolute;

    top:18px;

    right:18px;

    width:36px;

    height:36px;

    border:none;

    border-radius:50%;

    background:#f2f2f2;

    cursor:pointer;

    font-size:18px;

    transition:.2s;

}

#cerrarPagina:hover{

    background:#e4e4e4;

}


/* Título */

#tituloPagina{

    margin:24px 24px 24px;

    padding-right:60px;

    font-size:22px;

    font-weight:700;

    line-height:1.2;

    color:rgb(140,106,24);

}


/* Texto */

#contenidoPagina{

    font-size:16px;

    line-height:1.8;

    color:#333;

}

#contenidoPagina p{

    margin:0 0 18px;

}

#contenidoPagina h3{

    margin:28px 0 14px;

    padding-bottom:8px;

    border-bottom:1px solid #e4e4e4;

    font-size:18px;

    font-weight:600;

    color:rgb(140,106,24);

}


/* Galería */

#miniaturasPagina{

    display:grid;

    grid-template-columns:repeat(auto-fill,minmax(110px,1fr));

    gap:10px;

}

#miniaturasPagina img{

    width:100%;

    aspect-ratio:1;

    object-fit:cover;

    border-radius:6px;

    cursor:pointer;

    transition:.2s;

}

#miniaturasPagina img:hover{

    transform:scale(1.03);

}


/* ==========================================================
   MÓVIL
========================================================== */

@media (max-width:900px){

    #panelPagina{

        top:auto;

        left:0;

        bottom:var(--alto-footer);

        width:100%;

        height:75dvh;

        border-radius:18px 18px 0 0;

        transform:translateY(100%);

        transition:transform .35s ease;

    }

    #panelPagina.abierto{

        transform:translateY(0);

    }

}
/* ==========================================================
   CONTROL MENÚ
========================================================== */

.controlMenu{

    position:absolute;

    

    left:40px;

    z-index:1000;

    border-radius:8px;

}



#btnMenu{

    width:120px;

    height:30px;

    display:flex;

    align-items:center;

    justify-content:space-between;

    padding:0 12px;

    border:none;

    background:#ffffff;

    cursor:pointer;

    border-radius:8px;

    transition:.2s;

}

#btnMenu:hover{

    background:rgb(140,106,24);

    color:#ffffff;

}

/* Botón unido al menú cuando está abierto */

.controlMenu.abierto #btnMenu{

    border-radius:8px 8px 0 0;

}

/* Desplegable */

#menuPrincipal{

    position:absolute;

    top:30px;

    left:0;

    min-width:120px;

    display:none;

    background:#ffffff;

    border-radius:0 0 8px 8px;

    box-shadow:0 4px 14px rgba(0,0,0,.20);

    overflow:hidden;

    z-index:1000;

}

#menuPrincipal.abierto{

    display:block;

}

#menuPrincipal button{

    display:block;

    width:100%;

    padding:12px 16px;

    border:none;

    background:#ffffff;

    text-align:left;

    cursor:pointer;

    font-size:15px;

    transition:.2s;

}

#menuPrincipal button:hover{

    background:rgb(140,106,24);

    color:#ffffff;

}

/* ==========================================================
   FORMULARIO DE CONTACTO
========================================================== */

#formContacto{

    display:flex;

    flex-direction:column;

    gap:18px;

}


/* ==========================================================
   CAMPOS
========================================================== */

.campoContacto{

    display:flex;

    flex-direction:column;

    gap:6px;

}


/* ==========================================================
   ETIQUETAS
========================================================== */

.campoContacto label{

    font-size:14px;

    font-weight:600;

    color:rgb(140,106,24);

}


/* ==========================================================
   INPUTS Y TEXTAREA
========================================================== */

.campoContacto input,
.campoContacto textarea{

    width:100%;

    padding:10px 12px;

    border:1px solid #d5d5d5;

    border-radius:6px;

    background:#ffffff;

    color:#333;

    font-family:inherit;

    font-size:15px;

}


/* ==========================================================
   MENSAJE
========================================================== */

.campoContacto textarea{

    resize:vertical;

    min-height:130px;

    line-height:1.5;

}


/* ==========================================================
   CAMPOS ACTIVOS
========================================================== */

.campoContacto input:focus,
.campoContacto textarea:focus{

    outline:none;

    border-color:rgb(140,106,24);

    box-shadow:0 0 0 2px rgba(140,106,24,.12);

}


/* ==========================================================
   TEXTO DE AYUDA DEL ARCHIVO
========================================================== */

.axudaContacto{

    margin-top:2px;

    font-size:12px;

    line-height:1.4;

    color:#777;

}


/* ==========================================================
   SELECTOR DE ARCHIVO
========================================================== */

#contactoArquivo{

    padding:8px;

    background:#fafafa;

}


/* ==========================================================
   BOTÓN ENVIAR
========================================================== */

#btnEnviarContacto{

    width:100%;

    height:44px;

    border:none;

    border-radius:6px;

    background:rgb(140,106,24);

    color:#ffffff;

    font-family:inherit;

    font-size:15px;

    font-weight:600;

    cursor:pointer;

    transition:.2s;

}


#btnEnviarContacto:hover{

    background:rgb(120,90,20);

}


/* ==========================================================
   RESULTADO DEL ENVÍO
========================================================== */

#resultadoContacto{

    display:none;

    padding:10px 12px;

    border-radius:6px;

    font-size:14px;

    line-height:1.4;

}


/* Envío correcto */

#resultadoContacto.correcto{

    display:block;

    background:#eef7ee;

    border:1px solid #b8d8b8;

    color:#356435;

}


/* Error */

#resultadoContacto.error{

    display:block;

    background:#fff0f0;

    border:1px solid #e0b4b4;

    color:#8a3030;

}



/* ==========================================
   CONTROL OPACIDAD RELIEVE
========================================== */

#controlRelieve{

    display:none;

    margin:6px 0 0 1px;

}

#opacidadRelieve{

    width:100px;

    cursor:pointer;

}